ciphs / cryptocurrency

CIPHS© Cryptocurrency & Consensus Code
http://ciphs.org
MIT License
2 stars 2 forks source link

EtherDelta error bad jump destination #9

Open ciphs opened 6 years ago

ciphs commented 6 years ago

Causing sender losing fees for every transactions.. figure out it was not metamask itself. it must be ED having issue with the smart contract. I open up this issue to confirm the delay for exchange listing for Ciphs.

ciphs commented 6 years ago

Findings: etherdelta_2.depositToken uses transferFrom, which requires allowance to be set; however, the allowance for etherdelta_2 to withdraw from address is 0

Solution: Set etherdelta_2 as address spender and set amount of uint256 into approve functions. This would allow amount of Ciphs to be spend to other Smart Contract.

Bug: It seems uint256 wont reflect even after executed approve functions with etherdelta_2 as address spender. Here are the tx

@billiegate @Dexaran

is there any way to force uint256 to increase and whats set in 'approve' function for etherdelta_2 address would reflect same amount on 'allowance'.

ciphs commented 6 years ago

The issue has been highlight. It seem etherdelta smart contract haven't implement tokenFallback function for ERC223 token. https://github.com/forkdelta/tokenbase/issues/397

Forkdelta team is working on new contract. Give them a couple of weeks for testing.