Autonomous crypto exchange platform
Autonomous crypto exchange platform using 0x protocol

How Smart Contract works
The Ethereum token standard ERC20 is standing on “Ethereum request for comments” and it is used for ethereum smart contracts. ERC20 explain a common list of orders that an ethereum token has to apply and giving developers the power to program how latest token will function within the ethereum ecosystem.
ERC20 clarify the set of rules which require being met in order for a token to be accepted and called as “ERC20 Token” which are the blockchain assets that have value and can be sent received like bitcoin, ethereum or any cryptocurrency.
Here @BTT we have developed the Autonomous crypto exchange platform using 0x protocol as you can see in the image.
youtubeLInk : https://www.youtube.com/watch?v=dBA5_sDOwto&feature=youtu.be
Above diagram shows the basic demonstration of the smart fund system. You can see here the two way the trading of COT token between the smart fund contract and the platform contract and between the third party user having the external ethereum account.
Here, is the overview of the above diagram. You can see that we have a smartFund platform over here as contract deployed into the ethereum and consider there is a front-end UI to trigger the required trade as per the portfolio, which we can the trader UI. There is a “third party taker” who is willing to trade with the platform token that is the COT token.
As in demonstration, we are having the two types of tokens over here. 1st is COT token which is basically holded by the smart fund as a part of the investment.
Let us first demonstrate the investment so consider the role of co-trader who is willing to invest some amount of his COT tokens to the smart fund on behalf of the particular trader. With the given account is having COT balance 10000.

Let us first demonstrate the investment so consider the role of co-trader who is willing to invest some amount of his COT tokens to the smart fund on behalf of the particular trader. With the given account is having COT balance 10000.

We have a Trader who has had some kind of portfolio on to the smart fund platform.
So here we will invest some amount like 100 COT to the smart fund with the address of respective trader. First, we will approve it and then we will transfer the fund. So here in the below image, you can see that the smart COT holding will increase to 100 and the COT balance of the particular co-trader will decrease.

The same will be visible in trader UI. so here demonstrated that the smart fund platform is holding 100 COT on behalf of the given particular trader and the investment is actually by this the particular co-trader shown in the image.
The same will be visible in trader UI. so here demonstrated that the smart fund platform is holding 100 COT on behalf of the given particular trader and the investment is actually by this the particular co-trader shown in the image.
So here current holding of BTT is 0 for the smart fund. Now here you can see that the generated sing order. 
So this is the particularly 0x protocol formatted signed an order which we can post it on the third party relay and where some for third-party counts can fill it against this order. Here I will copy the signed order and we will get the BTT holder where that BTT can the fill this particular order. As our order expecting 15 BTT that is the taker token against our 10 COT tokens. So Here, will filling 15 against this order.
On the above image, this is particular BTT management of this particular account holder which is already having the BTT balance of 10000. So this party can fill again the particular order if he is willing to exchange it for this COT.
First of all, we need to approve by clicking on “Set taker approve” and then “Fill Signed order using 0x.js”. So there will be a deduction of 15 BTT from this particular holder’s account and this BTT will be deposited or exchange with the COT of this trade fund account.
Here 10 COT has been deducted from here and the 15 COT has been deposited to the smart fund so in this case where the smart fund generated the signed order on behalf of this particular trader.
Now we will see the reverse scenario. There is exist some third party order which is willing to signed order with the 10 BTT for COT. We need to populate the COT address before generating the signed order from that third party. The maker’s address is the account holder. The token address of BTT & COT and the signer is himself is here. Here make a token amount is 10 and the account holder is willing to have 15 takers token amount so here it is reversed. So the taker amount will be the COT.

We will approve it and generate the order.
So here we see that the reverse scenario where some third-party account holder having some token is willing to exchange again as a COT and will be then supplied over by the trader to the smart fund platform contract and then the contract will settle again with the COT holders.

So here we will copy the 0x formatted order and paste it on making exchange trade.
Here you can see that the “Exchange contract address” which is the same as “Exchange”. The rest of the information populated and then you will see here the taker token amount is 15 so it kind of 15 COT token is for 10 BTT.
When I will exchange the token this particular front end will posting this information to the smartFund platform contract and the contract will communicate with the exchange 0x compatible exchange which will in term trade the provided order.
