-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
EIP-2612: Add ERC20 permit() function #2206
Comments
I agree that However, the ERC-777 solves UX issues better than I think it is a separate discussion if people are using ERC-777 improperly or not, and maybe we should not go in there on Github. |
For the underlying issue of re-entrance:
Currently the reason why these hacks happen are "bad defaults". Re-entrance should be opt-in, not opt-out. |
Yes, I wasn't suggesting ERC777 should be removed or avoided (on the contrary, I think it opens the door to many interesting possibilities), but it does require a deeper understanding of the EVM and the Ethereum ecosystem, partly due to the 'bad defaults' you've mentioned. In that sense, |
EIP: ethereum/EIPs#2613 |
I don't think this is necessarily true. There's two potential improvements I've seen discussed, which I'm sure you're aware of, but figured I'd mention anyway:
Regardless of the spec decided upon, I still think it's valuable addition |
Thanks for mentioning those improvements @mds1! The ERC is very detailed - I encourage people interested in this to go read it.
That implementation has Both |
An alternative could be: https://eips.ethereum.org/EIPS/eip-3009 https://twitter.com/smpalladino/status/1313526048143945729?s=20 |
@nventuro what are your thoughts on combining ERC777 features (like transferAndCall-type deposits) and permit() signature txs? Does having both add value to an ERC-20 token? |
I'd say it depends on what you intend to use the token for. For 'regular' ERC20 usage (e.g. exchange, participation in DeFi platforms), the bare interface is enough since there's no feature discovery. |
Thanks for response @nventuro. Here, wondering how an updated WETH contract might use both permit() to establish more gasless transactions, as well erc677 to reduce number of txs, metamask popups: WETH10/WETH10#19 |
Another focus of the problem may be this new method of open zeppelin can help |
@alfredolopez80 Please ask in the forum. https://forum.openzeppelin.com |
Sure i will do today |
There's been some discussion about an ERC20 extension with the
permit
function, popularized by MakerDAO's Dai token (see the code here).This recently became even more relevant in light of hacks revolving ERC777 and reentrancy, since
permit
could help solve some of the UX issues that drive people to using ERC777 improperly. It looks like a proper ERC might be in the works: we should make sure we're compliant if that ends up happening. In all likelihood the spec will be identical to the Dai code, however.Link to EIP-2612
The text was updated successfully, but these errors were encountered: