Less trust between people wishing to exchange ERC20 tokens between them. Sometimes you do not know the second party for an exchange.
Our Smart Contract does the transaction for both sides. Our Smart Contract enables the creation of one side exchange to be done with the first and second party. Thus the transaction would be fully done or not done at all. A small fee (206000000 WEI) is payable for the usage of each function of this Smart Contract. This fee is transferred to the A-Token Smart Contract to increase its' Reserve.
This Smart Contract has 4 functions:
(address smart1, uint256 amount1, address two2, address smart2, uint256 amount2) – Where a new transaction is built.
(uint _Id) Which allow to view all data of an exchange.
(uint exchanged) – Where both parties can cancel the exchange. If the deal was constructed with Ether, this Ether will be returned to the proper wallet. Do remember that Approve Function of ERC20 tokens can be canceled by using the "spender" address and the 0 amount.
(uint exchanged) – Where the second part initiates the exchange.