Explanation of permit2

Explanation of permit2
by timdaub.eth12379 🥝 • 2y • github.com
AI summary of the linked article

Permit2 is a canonical Uniswap contract that lets protocols move ERC20 tokens with the signature-based UX and expiring allowances of EIP-2612, even for existing tokens that do not support permit. Users make one infinite approve() to the Permit2 contract, then sign an off-chain permit2 message that names the spender, token, amount, nonce and deadline. The protocol then calls permitTransferFrom() on Permit2, which validates the signature and performs the transferFrom() on the token, so the same approval can be reused by other integrating protocols. The guide's example is a multi-user vault that uses this flow for single and batch deposits.

Recommended by 2 curators
avatar
Saving this for later.
Characters remaining: 10,000

comment guidelines