Skip to the article
Web3 News

Crypto markets, protocols and policy

How to Clear a Token Approval After a Swap

Token approvals let swap contracts spend specified assets; identify the spender, revoke unused access on the same network, and confirm the updated allowance on-chain.

Web3 News Editorial2 min read

Cover art: How to Clear a Token Approval After a Swap

After a token swap, you can clear an unused approval by setting the token allowance for the swap spender to zero on the same network. Ethereum’s ERC-20 standard defines approvals as permission for a spender to withdraw up to an allowed amount; the approval itself does not move tokens.

What does a token approval let a contract do?

The ERC-20 interface lets a token holder authorize a spender address for a specified amount, and lets a contract check the remaining allowance. A swap may use a router or another contract as its spender, so the address shown in the approval record matters more than the name of the service you used.

Some swaps request an exact amount, while others request a larger or unlimited allowance to avoid asking again for later trades. The trade-off is convenience against ongoing permission: unused allowance can remain available to that spender until it is spent, changed or revoked. For the routing context, this fuller guide to Rango bridge route choices explains how route selection fits into a cross-chain swap.

How do you revoke an unused approval?

Open the wallet or an approval-management feature, select the token and network, then find the spender address and set its allowance to zero. The action submits a transaction on that network and usually requires a network fee; wait for confirmation before treating the approval as cleared.

  • Check the network and token contract address against the swap you made.
  • Match the spender address to the approval record; do not revoke a different contract by name alone.
  • Choose revoke or set allowance to zero, then review and submit the transaction.
  • After confirmation, check the allowance again on the same network.

What should you check after revoking?

Confirm the allowance is zero in the wallet or approval record. Revoking permission does not undo a completed swap, recover tokens already spent, or cancel a pending transaction.

For a cross-chain swap, check each network separately: an approval on the token’s source network does not clear an approval on another network. If you trade through the same spender again, the next swap may require a new approval, so approve only the amount you intend to use when the wallet offers that choice.