ERC20 Permit Generator

Generate EIP-2612 permit signatures for gasless token approvals

⚠️
Security Warning: Never share your private key. This tool demonstrates the EIP-2612 permit structure. For production use, integrate with a wallet (MetaMask, WalletConnect) to sign permits client-side.
1 = Ethereum, 137 = Polygon, 42161 = Arbitrum, 10 = Optimism
Usually 0 for the first permit. Query the contract for the current nonce.

1. What is EIP-2612 Permit?

EIP-2612 introduces a permit function for ERC-20 tokens that allows users to approve token transfers with a signature instead of a transaction. This enables gasless approvals where the spender can execute both the approval and the transfer in a single transaction, paying for both.

2. How does it work?

How Permits Work

Instead of calling approve() which costs gas, users sign an off-chain message (EIP-712) containing the approval details. The spender then submits this signature along with the permit details to the token contract. The contract verifies the signature and updates the approval, all within the spender's transaction.

Common Use Cases

  • DEX trades without prior approval transactions
  • Gasless token transfers (relayer pays gas)
  • Improved UX by reducing transaction steps
  • Meta-transactions and account abstraction

Supported Tokens

Not all ERC-20 tokens support permits. Notable tokens with permit functionality include DAI, USDC (on some chains), UNI, COMP, and many newer tokens. Always verify the token contract implements EIP-2612 before using permits.

3. Examples

USDC Permit on Ethereum

Owner: 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0
→ Spender: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
  (Uniswap V2 Router)
→ Amount: 1000000000 (1000 USDC, 6 decimals)
→ Token: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
  (USDC mainnet)
→ Deadline: 1698768000 (Nov 1, 2023)

DAI Permit - Polygon Network

Owner: 0xd8dA6BF26968b4f88d2F8fC25bB5d4E5ce3E5e53
→ Spender: 0xE592427A0AEce92De3Edee1F18E0157C05861564
  (Uniswap V3 Router)
→ Amount: 1000000000000000000 (1 DAI, 18 decimals)
→ Token: 0x8f3Cf7ad23Cd3CaDbD9735AFF958023D60C95eEE
  (DAI Polygon)
→ ChainID: 137

Custom Token Permit - Arbitrum

Token: 0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8
  (USDC.e Arbitrum)
→ Nonce: 0
→ ChainID: 42161
→ Signature can be submitted to permit() function
  for gasless approval

Relayer Pattern - Meta-transaction

User signs permit offline
→ Relayer submits transaction with permit signature
→ Contract validates signature (ecrecover)
→ Approval is granted without user paying gas

References