Escrow exhange contract for tokens

This is repost from https://bitcointalk.org/index.php?topic=2007679.msg19988910
One guy asked in Reddit about simple ethereum contract which can serve as escrow exchange for any tokens. I accepted the challange and created it in little more then in one hour.
Now everyone can use this contract to safelly escrowed sell their tokens to anyone.
Here are simple steps to sell tokens:
0) Be sure that's all OK reading source code of contract here https://etherscan.io/address/0x03a6290b5c0875313422ee003bd323979c8d1ac2#code
1) Run function approve(address _spender, uint256 _value) in the contract with your tokens setting maximum value of tokens for sale to EscrowExhange contract address
2) Run function setTokenForSale(uint course, address tokenContractAddress) in the contract 0x03a6290b5c0875313422ee003bd323979c8d1ac2 , setting the course in wei and the address of contract with your tokens. Course means the number of wei for 1 token. For example if you estimate cost of tokens 100 tokens for 1 ETHER course will be 10000000000000000 (16 zeroes) wei.
3) Send information to token buyer about your deal with your address under which your tokens are holded in tokens contract (this address is necessary information but buyer also need to know the mentioned course of course). Or post such information somewhere if you want anyone will see that you declare your tokens for sale.
4) Buyer should simply execute function buyToken(address sellerAddress) of the EscrowExhange contract mentioning your address (that exact address under which your tokens are mapped in tokens contract).
Voila!
I'm not sure if this solution is original and appeared earlier, but I did not see any relevant search result in this branch of the forum for keywords "escrow exhange token contract".
Sign In or Register to comment.