aboutcrypto

How to revoke bridge contract approval after transfer: zero it

You can clear a bridge contract’s leftover ERC-20 approval after a transfer. When you use cBridge to move an ERC-20 token, the approval belongs to the chain from which you send it. Open an approval checker, find the bridge spender on that chain, and confirm a revoke transaction. You are done when the token’s allowance to that spender reads zero on every source chain you used.

How do you revoke a bridge contract approval after transferring?

Revoke the ERC-20 allowance on the chain where you approved the bridge spender. Start after the transfer has finished, with the wallet that made the approval and enough of that chain’s gas token to pay for one transaction.

  1. Open Revoke.cash, or use Etherscan’s Token Approval Checker for Ethereum. Connect your wallet or enter its public address to view approvals.
  2. Select the source chain and look for the token you sent. Revoke.cash lets you switch networks; for an explorer, use the explorer for the relevant chain.
  3. Identify the bridge contract in the spender field. Compare its address with the spender shown in your original approval transaction. A token can have several approvals, so the token name alone is not enough.
  4. Choose Revoke for that token and spender. Review the wallet prompt and confirm the transaction that sets the allowance to zero: approve(spender, 0).
  5. Wait for confirmation, then refresh the checker. The allowance should show zero or disappear from its list of active approvals. Repeat for any other source chain you used.

The revoke is an on-chain transaction, so it costs gas in the source chain’s gas token. Its fee depends on that chain and current network demand. Revoking changes the spender’s permission to take tokens from your wallet; it does not reverse a completed transfer or change a transfer already in transit after its source transaction has confirmed.

Why must you check every source chain?

You must check every source chain because each chain records its own token allowances. Revoking an Ethereum approval changes Ethereum state only. An approval made on Arbitrum or Polygon remains active until you revoke it on that network too.

Take an illustrative route: you send a token from Ethereum to Arbitrum through cBridge, then later send it from Arbitrum to Polygon. The first bridge approval is recorded by the token contract on Ethereum. The second is recorded by the token contract on Arbitrum. Clearing the Ethereum allowance leaves the Arbitrum allowance available to its spender, even when you use the same wallet address for both trips.

Make a short list of the networks from which you initiated transfers. Visit each one in the approval checker and inspect the relevant token and spender pair. A destination balance by itself tells you nothing about whether you approved a spender there; that network needs a revoke only if you also granted an approval on it. The useful completion check is zero allowance on each source chain where you approved, not a single successful revoke receipt.

What is an unlimited token approval?

An unlimited ERC-20 approval gives a spender an allowance of 2^256 − 1 token base units, the maximum value the approval field can hold. It is effectively permission to move any amount of that token that reaches your wallet while the allowance remains active.

A bridge transfer may use some or all of a limited allowance. A large or unlimited allowance can remain after the transfer, ready for a later transaction without another approval signature from you. If the approved contract is compromised, that standing permission creates exposure. A compromised interface may also steer you into harmful interactions with a spender you already approved.

For an occasional bridge user, I would revoke an unused large allowance after the transfer settles. The gas fee buys a clear end to that spender’s access. On a future transfer, approving the exact amount you intend to send limits what remains, though it means paying for a new approval each time you bridge.

What is Permit2 and how do its approvals differ?

Permit2 is a separate token spending contract that can manage permissions through signatures and expiring allowances. A standard bridge approval names the bridge contract as the ERC-20 spender; a Permit2 flow first gives the ERC-20 token’s permission to Permit2, then controls which other spender may use that permission. Uniswap’s Permit2 overview describes both reusable, time-bound allowances and one-time signature transfers.

Read the spender field before revoking. If it names the bridge contract, revoke that direct allowance. If it names Permit2, inspect the Permit2 permissions as well as the token’s underlying approval to Permit2. A one-time signature that has been spent leaves no reusable permission from that signature, while an underlying ERC-20 approval to Permit2 may still remain. Apply the same per-chain check to either kind of standing permission.

Do hardware wallets protect against malicious approvals?

Hardware wallets protect the signing key, but a token approval you confirm on the device is still valid on-chain. After you sign, an approved spender can use the remaining allowance without asking the device to sign each token transfer. Review the spender address and amount on the device when possible, and revoke permissions you no longer need. Revoke.cash also explains why hardware wallet keys do not block approval-based spending.

For a finished bridge transfer, the deciding detail is the allowance that remains on the source chain. Clear the correct token and spender pair, then check every other chain from which you bridged so no leftover bridge approval is missed.

What should you check next?

Check transaction history if tokens have gone missing, use a spending cap for your next approval, and use the appropriate revocation method for any non-EVM token account.

How can I tell if an approval was used to drain my wallet?

An approval was likely used if an outgoing token transfer was initiated through the approved spender rather than by a transaction you sent directly. Open the outgoing transfer in that chain’s explorer and inspect the transaction caller and method, such as transferFrom or a Permit2 transfer. Compare the spender with your earlier approval transaction. A transfer log shows where tokens went, but the transaction details establish how they moved. Revoke any still-active suspect allowance promptly; revocation stops future use of that permission, not transfers already confirmed.

How do I set a custom spending cap in MetaMask?

Set a custom spending cap in MetaMask when its token approval prompt appears: edit the proposed amount, enter the amount needed for this transfer, and confirm the approval. MetaMask’s spending cap instructions show the control in its wallet interface. An exact cap can be consumed by the bridge transfer, leaving no useful allowance for later spending. You will need another approval, with another gas fee, for your next transfer.

Are there approvals on non-EVM chains like Solana?

Solana token accounts can grant a delegate permission to move a limited amount of tokens. That permission uses Solana’s token programs, not ERC-20 approve(spender, 0). Solana’s Revoke instruction clears the delegate and its remaining amount for the token account. Inspect the token account on Solana and use a Solana-compatible wallet or tool to revoke it; an Ethereum approval checker cannot change that account.