Token approval gas cost: why the first swap is always more expensive
The first time you swap a token on a decentralized exchange, you pay two separate gas costs: one for approving the token contract to spend your tokens, and another for the swap itself. That approval transaction is the reason your first swap can cost noticeably more than subsequent ones. It is not a glitch, not an overcharge, and not something you can avoid if you want to trade an ERC-20 token for the first time - but there are ways to reduce the sting, and a few exceptions worth knowing about.
What an approval actually does
Most ERC-20 tokens (and many other standards on Ethereum and its layer-2s) are built so that a third party - like a decentralized exchange's smart contract - cannot simply pull tokens from your wallet. The token contract needs your explicit permission first. That permission is called an allowance, and it is set by sending a special transaction: the approval.
When you approve a DEX's router contract to spend, say, 1,000 USDC, you are telling the token contract, "This DEX can spend up to 1,000 USDC from my wallet." Once that transaction is mined, the DEX can move that amount on your behalf without asking again. The swap that follows then uses that allowance. That is why the two transactions exist: approval, then transfer.
The approval is not a fee charged by the DEX. It is a normal transaction on the chain, which means you pay gas for it like any other operation. The token contract updates its ledger, your wallet signs off, and the network processes it.
Why the first swap costs more
The extra cost comes entirely from the approval transaction being an additional transaction. If a swap alone would cost 15 gwei in gas, the approval might cost another 15 to 25 gwei, depending on how complex the token contract is. Combined, your first swap can easily cost 1.5 to 2 times what a later swap costs - because later swaps, if the allowance is still sufficient, skip the approval entirely.
There is also a hidden factor: the approval transaction itself is often a simple "set allowance" call, but it still has to be included in a block. It competes with every other transaction for block space. If you send it during a busy period, you pay more for it. And if you send it with a low gas price, it might sit pending for hours - while your subsequent swap waits for it to confirm.
The "infinite approval" workaround
Most DEXs, when you swap for the first time, give you the option to approve an "infinite" or "maximum" allowance. Instead of approving a specific amount like 1,000 USDC, you approve the maximum possible number (usually 2^256 - 1). This means you never need to approve that token again - the allowance is effectively unlimited.
The trade-off is security. With an infinite allowance, the DEX contract can spend your entire balance of that token at any time, forever, unless you revoke it. If the DEX's contract is exploited or malicious, your tokens are at risk. Many users accept this risk for convenience, because the alternative is paying an approval fee every single time you swap a new token.
Some wallets and DEXs now offer "revoke" features or allow you to set a custom, smaller allowance. Revoking an approval costs another transaction, so it only makes sense if you plan not to trade that token again soon.
When you might not pay a second approval
There are a few cases where the first swap is not more expensive:
- Stablecoin pools on the same router: If you approved USDC for Uniswap's router, and later approve DAI for the same router, you pay a new approval. But if you already approved USDC and then swap USDC for DAI, no new approval is needed - the allowance is still there.
- Native tokens: ETH (or MATIC on Polygon, AVAX on Avalanche, etc.) do not require approval. They are the chain's native asset, and transferring them is built into the protocol. So your first ETH swap might not have an approval cost if you are swapping ETH for a token - but the token you receive will need approval before you can swap it again.
- Layer-2s with different standards: Some L2s, like Arbitrum and Optimism, use the same ERC-20 standard, so approvals work similarly. On other chains, like Solana or some Cosmos-based chains, the model is different - there is no separate approval transaction at all. But if you are reading this page on a site about Ethereum and L2s, assume the approval applies.
How to Pay Less for Approvals
You cannot avoid the approval entirely, but you can reduce its cost and frequency.
-
Approve once, swap many times: Set a reasonable allowance that covers multiple trades. If you plan to swap USDC regularly, approve a larger amount once rather than approving small amounts repeatedly. This spreads the cost over several swaps, making each one effectively cheaper.
-
Use layer-2 networks: On Arbitrum, Optimism, or Base, approval transactions cost a fraction of a cent in most cases. The mechanism is the same, but the base fee is much lower. If you are just testing a token, do it on an L2 first.
-
Check the allowance before approving: Some wallets show you your current allowance for a token. If it is still large enough, you do not need to approve again. Revoking and re-approving unnecessarily just burns gas.
-
Time your approval: Send the approval when network congestion is low. On Ethereum, that often means weekends or late nights UTC. On L2s, the fee is usually so low that timing hardly matters.
-
Use a gas estimator that recommends a safe limit: The approval transaction is simple, but setting the gas limit too low will cause it to fail, and you will pay the fee anyway. Most wallets estimate this correctly, but if you are setting a custom limit, leave a 20-30% buffer.
What about the swap itself?
The swap after the approval is not more expensive because of the approval. It is just a separate transaction that also costs gas. If you see a higher total on your first swap, it is the sum of the two transactions, not a markup on the swap itself. The DEX does not charge you extra for the privilege of approving.
The Bottom Line
The first swap for a token on a decentralized exchange costs more because you are paying for two transactions: one to set the allowance, one to execute the trade. That is by design, not a bug. If you trade regularly on the same chain with the same token, the approval cost eventually becomes trivial. If you only trade once, it is a one-time tax on using permissionless finance. The mechanism is straightforward, the cost is transparent, and the workaround - infinite approvals - comes with a security trade-off you should understand before you use it.
Not financial advice. seapresale.xyz publishes market data and general information about digital assets. Crypto assets are volatile and you can lose everything you put in. Nothing here is a recommendation to buy, sell or hold, and we make no price predictions.
Prices are sourced from third parties and may be delayed or wrong. Verify anything you intend to act on against a primary source.