Comparison of Token Approvals
| Aspect | Traditional Approvals (Bungee Manual) | Permit2 Approvals (Bungee Auto) |
|---|---|---|
| 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 |
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 crosschain replay attacks
How Bungee Uses Permit2
Bungee Auto 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
Permit2 supports two approval methods:
- Limited: Approve specific amounts. Requires new onchain approval for each request, using more gas.
- Unlimited: One-time approval. Future requests only need signatures, saving gas.