-
Notifications
You must be signed in to change notification settings - Fork 12k
Make permit
compatible with smart-contract wallets like Gnosis and Argent
#2845
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
Comments
Thank you @juniset for raising this issue. It is technically possible, and I would even say easy, to fix this issue for ERC20Permit. One should note that ERC20Votes (our implementation of the Comp voting token) and Governor (base one Compound's Governor's ABI) do use ECDSA.recover in a context where the user address is unknown (recovered by ecdsa). This means that there will still be part of our code where we cannot unfortunately use
|
We really want to do this, but the current text of EIP-2612 is very explicit that the permit is an ECDSA signature by the token owner address:
So we don't feel comfortable making this change unilaterally, and the EIP is still in Draft so there is an opportunity to make this change directly in the spec. The fact that it is backwards compatible makes me hopeful that it should be accepted without much pushback. We think the best course of action is to propose a pull request in ethereum/EIPs with the required change to EIP-2612. @juniset What do you think? |
@frangio I agree that the spec of EIP-2612 should be clarified to include EIP-1271 signatures as being valid. I had raised that issue a while ago (ethereum/EIPs#2613 (comment)) and mentioned it again today. However, one could argue that using Adding it today would also give a signal to the supporters of EIP-2612 and encourage them to clarify the definition of a valid signature. |
@juniset Just to clarify I meant opening a pull request directly with the change ready to be accepted by the authors of the EIP. I think this will be a more sure way to get it accepted. |
Motivation
Make the
permit
method compatible with smart-contract wallets that implement EIP1271, and make smart-contract wallets compatible with dapp flows that leverage thepermit
method (e.g. via WalletConnect).Requested change
Replace
ECDSA.recover
bySignatureChecker. isValidSignatureNow
inopenzeppelin-contracts/contracts/token/ERC20/extensions/draft-ERC20Permit.sol
Line 55 in aefcb3e
The text was updated successfully, but these errors were encountered: