Guide · Security

How to revoke token approvals

Every time you let a router move an ERC-20 token, you grant an allowance that stays active until you change it. Over months of trading, these standing permissions accumulate, and any contract you ever approved with an unlimited allowance remains able to move that token — including if it is later upgraded maliciously or compromised. Revoking approvals you no longer need is the cheapest, highest-leverage security habit in DeFi. This guide explains how allowances work, how to audit them, and how to revoke the ones that are dead weight.

What an approval actually grants

An ERC-20 approval authorizes a specific spender contract to move up to a set amount of one token from your wallet. Many interfaces default to an unlimited allowance for convenience, so you only approve once. The trade-off is that an unlimited approval is a permanent standing key: the approved contract can move that token at any future time, up to the limit, without asking again. If that contract is exploited later, your approval is the door it walks through.

Exact vs unlimited allowances

Whenever your wallet offers the choice, approve the exact amount you are about to trade rather than unlimited. This means an extra approval next time, but it eliminates the standing risk between trades. For tokens or routers you use constantly you might accept an unlimited approval for convenience — just make a habit of reviewing those periodically rather than letting them pile up forgotten.

Audit your existing approvals

Use a reputable allowance-checker tool or your wallet's built-in permissions view to list every active approval per chain: which token, which spender, and how much. You will likely find approvals to contracts you used once and forgot. Treat anything you no longer recognize or use as a candidate for revocation. Do this per network, since approvals are chain-specific.

Revoke what you do not need

Revoking is itself an on-chain transaction that sets the allowance back to zero, so it costs gas. Prioritize revoking unlimited approvals on tokens that hold real value and approvals to contracts you do not trust or recognize. You do not need to revoke everything constantly — a periodic cleanup, plus preferring exact approvals going forward, keeps your exposure small.

Build it into your routine

Set a recurring reminder — quarterly is reasonable for active traders — to review allowances across the chains you use. Combine that with never signing an approval or message you do not understand, and revoking promptly if you ever interact with a contract that later turns out to be suspect. These habits cost a little gas and a few minutes, and they prevent the kind of loss that no amount of trading skill can recover.

Legal

Risk disclosure

XAUConnect is a non-custodial swap aggregator. Digital assets are volatile and may lose value rapidly. Content on this page is educational and not investment advice. Verify every contract address on the official block explorer before approving a transaction.

Frequently asked questions

Why are unlimited approvals risky?

They are a standing permission: the approved contract can move that token at any time up to the limit. If the contract is later exploited or upgraded maliciously, your approval is the path it uses.

Should I always approve the exact amount?

For most trades, yes — it removes the standing risk between trades at the cost of an extra approval next time. For constantly-used routers you might accept unlimited, but review those periodically.

How do I see my active approvals?

Use a reputable allowance-checker or your wallet's permissions view, per chain, to list each token, spender, and allowance amount.

Does revoking cost money?

Yes, revoking is an on-chain transaction that costs gas. Prioritize unlimited approvals on valuable tokens and approvals to contracts you no longer trust.

Live execution

Trade on XAUConnect

Open the swap page to compare live routes, set slippage, and sign from your own wallet — fully non-custodial.

Continue exploring

Related markets, guides & networks

Curated next steps based on this topic — deepen your research before you trade.

Build programmatically

Swap via API for bots and AI agents — quotes, builds, and cross-chain routes.

Developer quickstart