etherdelta / smart_contract

EtherDelta smart contract
212 stars 171 forks source link

Add support for 'revert' instead of 'throw' #1

Closed MeoMix closed 1 year ago

MeoMix commented 6 years ago

Hey there,

It would be nice if you could update the contract to use revert instead of throw. It would lead to less gas consumption :)

ghost commented 6 years ago

Agreed! The only challenge is that the smart contract upgrade will be a painful procedure. 100,000 addresses withdrawing Ether and any number of tokens to switch to the new smart contract...

wparad commented 6 years ago

@ghost, that will always be a problem with contracts. Why not let the market decide how to handle this. Rather than force the upgrade, allow both versions on the website and display the current conversion. If users want to migrate to a "safer" contract then they will, and if they don't they can keep using the existing one. Eventually all of them will be on the new one, if it is better.

One way to do this, is to create a special indicator in the UI next to the trade signally it is for a legacy contract, and when clicking that icon will show you a difference summary.

It isn't a good idea to prevent innovation because of difficulty, instead we should work to decrease the difficulty of innovation. I believe UX redesign is on the etherdelta roadmap 2018Q2, doesn't say if it only for mobile.