Should we support both Permit2
and traditional ERC-20 approvals?
#13
Replies: 3 comments 9 replies
-
I am not sufficiently familiar with the flow of the Worth noting that this may bear implications for the front-end implementation - cc @razgraf and @gavriliumircea; you might have to change the ERC-20 approval system that you guys have already implemented and ask the user to sign permit messages. Side note - as I said on the call yesterday, we should think of the target contracts as a special type of Solidity system that can be easily swapped and upgraded (unlike the core contracts). This is, in fact, one of the significant advantages of the proxy approach. |
Beta Was this translation helpful? Give feedback.
-
I have just found out that the Permit2 contract has only been deployed on the Ethereum, Optimism, Arbitrum, Polygon, and Celo chains. Therefore, if we intend to deploy our v2 contracts on other chains, we must support both Permit2 and traditional ERC-20 approvals. |
Beta Was this translation helpful? Give feedback.
-
Closing, as we decided to implement only Permit2 for the time being. |
Beta Was this translation helpful? Give feedback.
-
During our last call, we discussed using Permit2 and we pretty much agreed that it would be a good option. However, I have a question: are we planning to require all users to approve the Permit2 contract, or will we provide an option to approve our contracts? A user might not trust Permit2.
We could implement two different versions of the create function:
create
andpermit2Create
. Although, this may confuse some users and require additional information on our end.For maximum clarity this pattern would be used only for the target contract, the core does not integrate Permit2:
user --> proxy --> target --> core
Regarding using Permit2: it offers a more user-friendly experience in the DeFi ecosystem (e.g. allowing users to create streams without needing to approve if they've already done that on other platform), there is also the risk of potential loss if the Permit2 contract were to be hacked. It's worth noting that Uniswap has not experienced any such incidents in the past.
Check this link for a great explanation.
What do you guys say?
Beta Was this translation helpful? Give feedback.
All reactions