-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Evaluate usage of transferFrom, approve #16
Comments
It's needed for smart contract interoperability. It's the standard pattern to pay another contract with ERC20 tokens. Example: When buying tokens at an exchange with trustlines money, you'd first approve a certain amount of trustline money for the seller at the exchange, register the path buyer to seller, then call the buy function of the exchange contract, which would transfer the tokens if it can do a successful transferFrom(buyer, seller), approve is called again with zero to release storage. All within the same transaction, so it's atomic. Are there other suggestions how, prove of payment to contracts could work? |
Gas cost considerations? |
we want to support ERC223 instead of ERC20 for the reasons described here: ethereum/EIPs#223 |
You should keep in mind that ERC20 token standard functions are leading to monetary losses. I wrote a number of articles about it (for example this one). The main problem of ERC20 token is that it has two ways of transferring funds:
which assumes that first pattern is processed without handling by the receiver and the second pattern simulates transaction handling. The purpose of
This was relevant at the moment of creating ERC20 token standard, but the stack depth attack was fixed through EIP150 . As the result of this I think that there is no need to develop and implement the
I'd like to recommend to remove |
Discuss why and if we need it and then implement it properly. At the moment it does not make sense.
The text was updated successfully, but these errors were encountered: