Jump to content
Crypto Talk

Opinion and debate on crypto

Token Approval Gas: Exact vs Unlimited Allowance Costs

Exact amount vs unlimited token approval: unlimited costs less over repeated trades because one approval covers later swaps, while exact approval repeats the fee.

Crypto Talk Newsroom 3 min read

Token Approval Gas: Exact vs Unlimited Allowance Costs

Unlimited ERC-20 approval costs less gas over repeated trades because one approval covers later swaps; exact-amount approval requires another paid transaction each time. The saving grows with trade frequency, but unlimited approval leaves the spender able to use the allowance, so the right choice depends on how often you trade that token and how much you trust the contract.

How approval frequency and swap gas add up

Unlimited approval reduces the number of approval transactions, and can slightly reduce gas on each later swap. An ERC-20 allowance is set for a specific token, spender and network. Each approve call is a separate transaction, so if you make N trades with exact approvals, you pay for N approvals. With unlimited approval, you approve once for that token, spender and network, then reuse the allowance.

That difference matters most when you repeatedly trade the same token through the same contract on the same network. Change any one of those, and the existing allowance does not cover the new combination. A one-off swap is unlikely to benefit much from setting a standing allowance; repeated swaps avoid the cost of submitting a fresh approval each time.

cowswap is a decentralized exchange interface where signed trade intents are matched through solver-run batch auctions. Its cowswap limit orders topic adds useful context on how a limit order can fit into that trading flow. For approval gas, the key point is that you approve the relevant relayer contract once; later gasless swaps need no new approval.

There can also be a smaller saving inside each transfer. OpenZeppelin-based tokens and WETH skip the allowance write in transferFrom when an unlimited allowance is in place. That means later swaps can use slightly less gas as well as avoiding new approval transactions. It is a per-swap saving, so it compounds with repeated use, but it does not remove the initial approval cost.

Which approval fits your trading pattern?

Exact approval suits a one-off trade or a token you rarely use; unlimited suits repeated trading through a spender you trust. The gas trade-off is straightforward: exact approval limits the allowance to the amount needed but repeats transaction costs, while unlimited approval pays the approval cost once and leaves a larger allowance active.

Unlimited allowance is the maximum uint256 value. That makes it convenient for recurring trades, but it also creates standing exposure if the spender is compromised: the spender may be able to use the allowance. Revoke approvals for tokens you no longer trade, and consider exact amounts when you do not expect to reuse the spender.

EIP-2612 permit offers another route when a token supports it: the token can grant an allowance from a signature rather than a separate on-chain approval transaction. Support varies by token and integration, so it is not a universal substitute. Check whether both the token and the trading flow support permits before counting on that option.

For a token you trade repeatedly through a trusted contract, choose unlimited approval to reduce cumulative gas. For a single trade, infrequent use or a spender you do not trust with a standing allowance, choose exact approval. Your trade frequency determines whether the repeated fee savings are worth the lasting exposure.