SecurityBeginner

Token Approvals: Check and Revoke Unlimited Allowances

What a token approval lets a contract do, why unlimited allowances are a standing risk, and how to review and revoke them in a few clicks.

ChainBridge ResearchUpdated 5 min read

On this page6 sections

Key takeaways

  • An approval lets a contract move a token from your wallet, and it stays valid until you revoke it.
  • Unlimited approvals turn any future bug or key leak in that contract into a risk for your whole balance of the token.
  • ChainBridge asks for the exact amount of each swap and checks every spender against its contract allowlist.
  • Review your approvals on the /approvals page and revoke what you no longer use; revoking is an on-chain transaction.

What is a token approval?

A smart contract cannot take ERC-20 tokens from your wallet on its own. You first call approve() on the token, naming a spender (for example a swap router) and an amount. The spender can then call transferFrom() to move up to that amount whenever it wants.

That is why your first swap of a token takes an extra step. The approval is a separate transaction, or part of a single batched confirmation if your wallet supports it (see one-click swaps). Native coins such as ETH need no approval.

The catch: approvals do not expire. Many apps ask for an unlimited amount so you never have to approve again. Months later, that contract can still move every unit of the token you hold.

Why unlimited approvals are risky

An unlimited approval is a signed blank check. It is only as safe as the contract it points to, for as long as you leave it in place.

The contract gets exploited

A bug in a router or vault lets an attacker call transferFrom on everyone who approved it. Your approval is the door; you do not have to sign anything new.

The frontend gets hijacked

A compromised website asks you to approve an attacker address instead of the real contract. The prompt looks like any other approval.

The admin keys leak

An upgradeable contract whose owner key is stolen can be swapped for code that drains approved tokens.

You approved a scam

Phishing sites and fake airdrop claims exist to collect approvals and permit signatures. Once granted, they are used within minutes.

Two well-documented cases:

Exploits that used existing approvals
IncidentLoss (rounded)What happened
BadgerDAO, 2021~$120MAttackers injected extra approval requests into the official frontend. Users who signed them were drained later through those approvals.
Dexible, 2023~$2MA router function could be made to call any token contract, so attackers used existing user approvals to transfer tokens to themselves.

In both cases, users who had already revoked their approvals lost nothing.

How ChainBridge handles approvals

  • Exact amounts. When a swap needs an approval, ChainBridge asks for the amount of that swap, not an unlimited allowance.
  • Allowlisted spenders. The approval target returned by an aggregator or bridge is checked against a list of known contracts on the server and again in your browser before you sign. An unknown spender blocks the route.
  • Simulation. The review screen simulates the approval and the swap together, so a transaction that would fail is caught before you pay gas.
  • Permit2 for 0x. 0x routes use Permit2: you approve the Permit2 contract for the swap amount, then sign a permit. Read Permit2 explained for how it works.

Check and revoke your approvals

The approvals page scans every supported network in parallel for allowances your wallet has granted to the swap and bridge contracts ChainBridge knows: Permit2, the 0x, KyberSwap and ParaSwap routers, LI.FI, Relay and several others.

  1. Connect your wallet

    Open /approvals and connect. The scan starts on its own.

  2. Read the list

    Each row shows the token, the spender, the network and the allowance. Unlimited ones are flagged and sorted first.

  3. Revoke what you do not need

    Click Revoke on a row, or select several and revoke them in one go. Each revoke sets the allowance to zero in a transaction, and the page shows its estimated gas cost first. You may be asked to switch network.

  4. Cross-check with a full scanner

    The page covers known swap contracts only. For approvals to anything else, use a dedicated tool such as Revoke.cash or the token approval checker of your network's block explorer.

What to revoke first
ApprovalWhy
Unlimited approvals to apps you no longer useFull access to that token, with nothing in return
Approvals to a spender you do not recognizeCould be a phishing approval you did not notice
Approvals to a contract that was just exploitedAttackers drain existing approvals first
Unlimited approvals to apps you still useSwap them for exact-amount approvals when you next trade

Permit2 vs classic approvals

Permit2 is a shared approval contract deployed by Uniswap Labs. You approve it once per token, then grant spending rights to apps with signed permits that carry an amount and a deadline.

Classic ERC-20 approvals compared with Permit2
FeatureClassic approvalPermit2
How access is grantedAn on-chain approve() transaction per appOne approval to the Permit2 contract, then a signed permit per app or trade
AmountWhatever the app asks for, often unlimitedSet in each permit
ExpiryNever; valid until revokedEach permit has a deadline
CostGas for every approval and every revokeGas once per token; permits are free signatures
Main riskForgotten approvals that never expireSigning a malicious permit, which costs no gas and is easy to miss

Approval checklist

  • Approve the exact amount you are about to swap whenever the app lets you
  • Never approve a spender you cannot identify, especially from a link in a message
  • Review your approvals once a month and after any news of an exploit
  • Revoke immediately when a protocol you used is hacked
  • Keep large balances in a wallet that never approves anything (see wallet security)
  • Treat permit signatures with the same care as approval transactions

Check your approvals

Scan the allowances your wallet has granted to swap and bridge contracts on every supported network, and revoke the ones you no longer need.

Open approvals