Token Approval Also Requires Gas Fees: What Operations Are Included in One Approval

 / 
1

Every time you see the "approve" confirmation before swapping tokens on Uniswap, that approval itself is an on-chain transaction and requires a gas fee. This approval transaction is essentially a call to the token contract that changes your account state.

OKX Exchange
A leading global cryptocurrency platform,suitable for both beginners and experienced traders.
New user benefit: 20% off trading fees upon registration!!

Goal

Understand exactly what steps are included in one token approval operation and why it is a separate gas cost.

Core Rules of Token Approval

The core of token approval is the approve function defined in the ERC-20 standard. When you call it, you are telling the token contract: "I allow a specific contract address, such as Uniswap's Router, to transfer up to X tokens from my balance." This permission record is stored in the token contract's allowance mapping.

This operation costs gas because it changes state on the blockchain by writing your approval amount. A complete approval flow includes these operations packaged and executed by the EVM:

  1. Call approve(spender, amount): Your wallet sends a transaction to the token contract address for the token you hold, calling its approve method.

  2. Set the allowance: The token contract executes code and writes the relationship between spender (for example, the Uniswap contract) and amount (the quantity you approve) into the contract's internal storage.

  3. Emit the Approval event: The contract creates an Approval event log on-chain, recording "who approved whom for how much."

High risk warning: Do not approve "Maximum" just to save effort. That is like giving that contract a master key to your wallet. If the contract is hacked or has a vulnerability, your wallet could be drained directly. Approving only the exact amount needed for the current operation is a basic way to protect your assets.

Only after completing this approval step can the Uniswap contract call the transferFrom function in a later actual transaction, such as a swap, to actually move your tokens away.

Two Approval Modes Compared

Approval methods are evolving. There are two main modes, and they directly affect your steps and gas costs.

ModeStepsGas CostUse Case
Traditional ERC-20 ApprovalTwo steps: 1. Send a separate approval transaction (pay gas). 2. Send the actual transaction (pay gas again).Requires two gas feesMost standard ERC-20 tokens, such as USDT (some implementations).
Signature-Based Approval (EIP-2612 Permit)One step: Sign a message offline in your wallet (no gas cost), then send the signature with the actual transaction. The gas sponsor (such as the dApp) or you complete approval and the operation in the same transaction.Only one transaction gas fee (merged into the actual transaction)Tokens that support the EIP-2612 standard (such as some newer ERC-20 tokens and some Layer 2 tokens).

If the dApp and token you interact with support EIP-2612, you will clearly feel the process is smoother because there is no separate approval transaction popup.

Common Reasons Approval Transactions Fail

  • Approval amount too low: You previously approved 100 USDT, but now you want to swap 200 USDT. If you do not approve enough again, the actual transaction will revert with Transfer amount exceeds allowance, and the gas fee is not refunded.

  • Insufficient wallet balance: When starting an approval transaction, if your wallet does not have enough ETH to pay the gas fee, the transaction will fail to submit.

How to Verify Approval Results

After the approval transaction succeeds, check the transaction details on a block explorer such as Etherscan:

  • In "Logs", find the Approval event. Check that owner (your address), spender (the approved contract address), and value (the approved amount) are correct.

  • You can also use Etherscan's "Token Approval Checker" tool to view all token approvals for your address.

OKX Exchange
A leading global cryptocurrency platform,suitable for both beginners and experienced traders.
New user benefit: 20% off trading fees upon registration!!

FAQ

Q: After approving an amount, do I need to approve again after using it? A: Yes. The approved amount is consumed cumulatively. For example, if you approve 100 tokens and transfer 60 the first time, the remaining allowance is 40. If you then want to transfer 50, because 40 < 50, you need to send another approval transaction to increase the allowance.

Q: How do I cancel an approval I gave to a contract? A: Send another approval transaction with amount set to 0. This resets the allowance to zero, which revokes the permission. This operation also requires gas.