For the complete documentation index, see llms.txt. This page is also available as Markdown.

Permit2 Approval

Before the first Permit2 payment on a given wallet/token/chain combination, the payer wallet must grant the Permit2 contract an ERC-20 allowance. This is a one-time transaction — once done, it does not need to be repeated for the same wallet/token/chain.

Why This Is Needed

Permit2 works by having the Permit2 contract pull tokens from the payer's wallet on behalf of a spender (the Ivorypay gas-payer vault). For this to succeed, the token contract must allow the Permit2 contract to move funds. Without this allowance, the on-chain transfer will revert and the deposit will fail with:

x402: insufficient Permit2 allowance — sender must approve Permit2 contract

Permit2 Contract Address

The Permit2 contract is deployed at the same address on every EVM chain:

0x000000000022D473030F116dDEE9F6B43aC78BA3

When You Need It

See Supported Assets. Permit2 is used for:

  • Any transfer on BSC or Ethereum (any token).

  • Any non-USDC token on any chain.

EIP-3009 transfers (USDC on Base, Polygon, Lisk) do not require this approval.

Checking Existing Allowance

Before sending an approval transaction, check whether the allowance is already sufficient:

Running the Approval

The approval transaction requires a funded wallet with native gas tokens (BNB on BSC, ETH on Ethereum). Connect the wallet to a provider for the correct chain:

Notes

  • The approval amount is MaxUint256 (unlimited). This avoids re-approving as the balance is spent.

  • The approval is scoped to the Permit2 contract only — not to Ivorypay directly. Permit2 then enforces per-transfer limits through the signed authorization.

  • If you rotate the payer wallet address, the new wallet must complete its own approval.

  • The approval does not expire on-chain. It remains valid until explicitly revoked or replaced.

Last updated