Jump to content
Tareom

News from across crypto

What if your ERC-20 approval is below the bridge amount?

If token approval is less than your bridge amount, the ERC-20 allowance cannot cover the full pull; approve enough before submitting the transfer from your wallet.

The Tareom Editors4 min read

What if your ERC-20 approval is below the bridge amount?

If your ERC-20 allowance is below the amount you want to bridge with cBridge, the transfer cannot pull the full amount. The token contract checks whether the spender has enough allowance when it tries to take tokens from your wallet.

  • Bridge amount: 100 tokens.
  • Allowance: 70 tokens.
  • Shortfall: 30 tokens.

The allowance sets the token spending limit

An ERC-20 allowance is the amount of a token that you let a spender take from your wallet. You grant it with an approve transaction, which sets that limit for a particular spender. For a bridge transfer, the token contract checks the allowance when the bridge step tries to use transferFrom to pull your tokens.

In the 100-token case above, an allowance of 70 is not enough: the token contract cannot authorize a 100-token pull. The bridge step therefore cannot complete as requested. The 70-token allowance does not mean that the transfer will automatically be reduced to 70; the requested amount and the permission to spend it have to line up.

cBridge may ask you to increase the allowance before you reach the transfer step. If you are deciding how to reduce an existing permission later, lower a cBridge allowance to a set amount covers setting a smaller limit without revoking it.

What happens next depends on whether you have only seen an app prompt or have submitted a wallet transaction. A prompt to approve more is a request for you to authorize a separate action. If you have not submitted a transaction, the transfer has not been sent and there is no transaction gas to pay for that unsubmitted transfer.

An app prompt and a submitted transfer have different outcomes

An app prompt to increase approval gives you a chance to fix the shortfall before submitting the bridge transfer. Review the wallet prompt for the token and approval amount, then approve enough for the transfer you intend to make. After that approval is confirmed, submit the bridge transfer as a separate action if the app asks you to.

If you submit the transfer while the allowance remains too low, the token contract generally rejects the attempted pull and the transaction reverts. A reverted transaction does not complete the bridge or move the intended tokens through it. It can still cost gas because the transaction was submitted and processed, even though it failed.

Compare two transfers with the same token and requested amount: each asks to bridge 100 tokens. In the first, the allowance is 70, so the contract cannot authorize the full pull. In the second, the allowance is 100, so the allowance is sufficient for that pull. The allowance is the deciding factor in these cases; an adequate allowance lets the transfer proceed past this check, while an undersized one does not.

Approving exactly 100 tokens for a 100-token transfer is enough for that transfer, assuming the token and spender match. Once the full amount is successfully spent, that approval has no allowance left. A later transfer would need more allowance to be available, through a new approval or a larger allowance that was already granted.

Before sending, confirm that the approval is for the token you plan to bridge and that the allowance covers the intended amount. Then review each wallet transaction: first the approval, if needed, and then the bridge transfer. An approval authorizes spending up to its limit; it does not itself perform the bridge.

Related questions

Do I need to approve a bridge for every transfer?

You need enough allowance available for the transfer. If a previous approval still covers the intended amount for the relevant spender, another approval may not be needed. If the allowance has been spent, or is too low, approve more before submitting the transfer.

Can I revoke a token approval after bridging?

You can change an allowance after bridging. Setting it to zero revokes the remaining permission; setting a smaller amount reduces it while leaving some permission in place. Choose an amount that matches what you want the spender to be able to use.