The Trustless OTC smart contract is deployed at (0x62f49e904af170Ea377F399aCa76C13fF25a6F5E)[https://etherscan.io/address/0x62f49e904af170ea377f399aca76c13ff25a6f5e#code]
This contract allows trading of any tokens, between two counterparties without the need for a trusted escrow.
The instructions here assume the use of MyCrypto or a similar wallet to interact with the Ethereum blockchain.
User A wants to sell 1000 Token YYY for 2000 Token ZZZ.
User A must first give approval for the OTC contract to interact with their balance of Token YYY.
- Visit MyCrypto and navigate to Tools > Interact with Contracts.
- Enter the smart contract address for Token YYY and the ABI (these can be found from Etherscan).
- Select the 'approve' function from the dropdown list.
- Spender field should be set to the OTC contract address: 0x62f49e904af170Ea377F399aCa76C13fF25a6F5E
- Amount should be set to 10000000000000000000000000000000000000000000000
- Confirm the transaction
- Visit MyCrypto and navigate to Tools > Interact with Contracts.
- Enter the smart contract address for the OTC contract and the ABI (these can be found from Etherscan).
- Select the 'initiateTrade' function from the dropdown list.
- tokenFrom field should be token YYY address
- tokenTo field should be token ZZZ address
- amountFrom field should be token YYY amount to sell (including trailing zeros to represent decimals - 18 in most cases)
- amountTo field should be token ZZZ amount to buy (including trailing zeros to represent decimals - 18 in most cases)
- Confirm the transaction
- Once the transaction has succeeded a trade ID will be emitted in an event on the contract.
- This contains the trade ID which must be given to the trading partner you wish to fill your offer.
- Send the trade ID to your counterparty.
- Visit MyCrypto and navigate to Tools > Interact with Contracts.
- Enter the smart contract address for Token ZZZ and the ABI (these can be found from Etherscan).
- Select the 'approve' function from the dropdown list.
- Spender field should be set to the OTC contract address: 0x62f49e904af170Ea377F399aCa76C13fF25a6F5E
- Amount should be set to 10000000000000000000000000000000000000000000000
- Confirm the transaction
- Visit MyCrypto and navigate to Tools > Interact with Contracts.
- Enter the smart contract address for the OTC contract and the ABI (these can be found from Etherscan).
- Select the 'take' function from the dropdown list.
- tradeID field should be the ID given by your counterparty.
- Confirm the transaction