Jump to content
Tareom

News from across crypto

How to lower a token allowance without revoking it: set a cap

How to lower a token allowance without revoking it: read the spender allowance, approve a smaller total, then confirm the new value on an explorer.

The Tareom Editors5 min read

How to lower a token allowance without revoking it: set a cap

To lower a large ERC-20 allowance without leaving it at zero, call approve(spender, newAmount) with the smaller total. Start by reading the allowance for the token and spender, enter the new amount in raw units, submit the approval, and check the updated value on Etherscan.

  • 100 USDC with 6 decimals equals 100000000 raw units.
  • approve sets the total allowance; it does not subtract from the old value.

Set the new allowance from the token contract

For a standard ERC-20 token on an EVM chain, approving a smaller total replaces the spender’s previous allowance. EIP-20 defines approve as overwriting the current allowance with the new value, so calculate the amount you want left and submit that amount.

This matters when a wallet has an old, oversized approval for a bridge or another app. If you want a cBridge approval to cover only a planned transfer, set the allowance to the maximum amount you intend that spender to use. The allowance is a spending limit, not a balance or a promise that the spender will use the full amount.

Open the token’s page on Etherscan, choose the contract’s read functions, and call allowance(owner, spender). Enter your wallet as owner and the approved contract as spender. Use the spender address shown by the application or its verified contract details; do not assume that a familiar app name identifies the right address.

For context, a bridge can use pooled liquidity or token mappings to transfer supported assets between networks. When checking an approval related to cBridge, identify the specific spender address for the network and token you are using. The linked topic can help explain the assets involved in a cbridge tokens transfer, while the allowance itself is tied to a token contract and spender address.

Then work through these steps in order:

  1. Open the token contract on the relevant chain’s block explorer. Confirm that it is the token you hold and select its read functions.
  2. Read allowance(owner, spender) using your wallet address and the spender address. Record the displayed value and make sure you are looking at the correct chain.
  3. Choose a reduced total allowance based on what you expect the spender to need. Find the token’s decimals before converting that amount to raw units.
  4. Connect your wallet to the token contract’s write functions. Call approve(spender, rawAmount) with the spender address and your new total, then review and confirm the transaction in your wallet.
  5. Read allowance(owner, spender) again after the transaction confirms. The returned value should match the new allowance you set.

Amount conversion: token interfaces often show human-readable amounts, while contract calls use raw units. Multiply the desired token amount by 10 raised to the token’s decimals. For a 100 USDC allowance with 6 decimals, enter 100000000, not 100. A different token may use a different number of decimals.

Revoke.cash can also edit an allowance when the token and chain are supported: connect your wallet, find the approval, choose its edit control, enter the reduced amount, and confirm the transaction. The contract call still sets the new total. You need the spender address, the token’s decimals, and enough native currency on that chain to pay transaction gas.

There is one implementation detail to watch. OpenZeppelin Contracts v5 removed the non-standard decreaseAllowance helper, and many tokens do not offer that function. Since approve sets an absolute allowance, entering the new total is the broadly usable way to reduce it without relying on a decrement function.

EIP-20 also recommends that interfaces set an allowance to zero before changing it to another value, to reduce a possible race condition if the spender uses the old allowance during the change. Some tokens or interfaces may therefore require a zero approval first. That route briefly revokes the allowance before you set the reduced total; follow the token’s behavior and understand the two transactions before confirming them.

Confirm the new limit and transaction cost

The updated allowance is confirmed when the explorer’s read call returns your new value for that owner and spender. A submitted transaction alone is not confirmation: wait for it to succeed, then query the allowance again. If the value is unchanged, check the transaction status, chain, token contract, owner address, and spender address before trying again.

Lowering an allowance costs gas because changing it requires an on-chain transaction. Reading the allowance on an explorer is a view call and does not itself require you to send a transaction. The gas amount varies with the chain and transaction conditions, so check the wallet’s estimate and keep native gas available before submitting.

What allowance amount should I set for a bridge?

Set the smallest allowance that covers the amount you intend the approved spender to use, plus any amount the bridge flow explicitly requires. The right value depends on the transfer and the contract’s behavior; there is no universal bridge allowance. A lower cap limits what that spender can draw under the approval, but you may need to approve again for a later transfer.

Does lowering an allowance cost gas?

Yes. Sending approve to write the new allowance costs gas in the chain’s native currency. Etherscan’s allowance read is free to perform as a view, but the change takes a confirmed transaction. Re-read the allowance after confirmation so you know the lower limit is active.