Skip to main content

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​

AspectTraditional ApprovalsPermit2 Approvals
Gas CostTwo transactions needed (approve + transfer)One-time approval, then gasless signatures
ControlBasic approve amount and revoke onchainFine-grained with expiration times
SecurityUnlimited approvals can be used to transfer any amountUnlimited 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:

  1. Initial Setup:

    • Approve Permit2 for your tokens
    • Choose between limited or unlimited approval amounts
  2. For Each Transfer:

    • Sign a message specifying exact amount and expiration
    • No gas needed for approval
    • Transfer only happens with your signature
  3. 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:

  1. Limited: Approve specific amounts. Requires new on-chain approval for each order, using more gas.
  2. Unlimited: One-time approval. Future orders only need signatures, saving gas.