Token Approvals & Permit2
Bungee Protocol uses Permit2 to enable efficient token transfers. This page explains how token approvals work, your options, and important security considerations.
Comparison of Token Approvals​
Aspect | Traditional Approvals | Permit2 Approvals |
---|---|---|
Gas Cost | Two transactions needed (approve + transfer) | One-time approval, then gasless signatures |
Control | Basic approve amount and revoke onchain | Fine-grained with expiration times |
Security | Unlimited approvals can be used to transfer any amount | Unlimited approvals to permit2 contract cannot transfer without your signature |
See Uniswap Permit2 for technical details.
How Signatures Work​
Each signature for a Permit2 transfer includes:
- Token Details: Address and amount
- Expiration Time: When the signature becomes invalid
- Nonce: Ensures signatures can't be reused
- Chain ID: Prevents cross-chain replay attacks
How Bungee Uses Permit2​
Bungee Protocol integrates Permit2 to create a better user experience:
-
Initial Setup:
- Approve Permit2 for your tokens
- Choose between limited or unlimited approval amounts
-
For Each Transfer:
- Sign a message specifying exact amount and expiration
- No gas needed for approval
- Transfer only happens with your signature
-
Security Features:
- Each signature has an expiration time
- Signatures specify exact amounts
- Transfers require explicit approval
Approval Options​
Choose Your Approval Type
Permit2 supports two approval methods:
- Limited: Approve specific amounts. Requires new on-chain approval for each order, using more gas.
- Unlimited: One-time approval. Future orders only need signatures, saving gas.