Market Cap: $2.1871T -0.79%
Volume(24h): $73.1141B -14.73%
Fear & Greed Index:

28 - Fear

  • Market Cap: $2.1871T -0.79%
  • Volume(24h): $73.1141B -14.73%
  • Fear & Greed Index:
  • Market Cap: $2.1871T -0.79%
Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos
Top Cryptospedia

Select Language

Select Language

Select Currency

Cryptos
Topics
Cryptospedia
News
CryptosTopics
Videos

Uniswap "Approve" vs "Swap": What's the difference? (Process Guide)

Approving a token on Uniswap is a separate gas-costly transaction that grants the router permission to spend—no tokens move yet; only later does the swap transfer assets.

Apr 01, 2026 at 01:19 pm

Understanding the Approval Transaction

1. When a user connects a wallet to Uniswap and selects a token not previously authorized for spending, the interface prompts an 'Approve' action.

2. This approval is not a swap—it is a separate Ethereum transaction that modifies the token contract’s allowance mapping to permit Uniswap’s router contract to withdraw a specified amount from the user’s wallet.

3. The approval transaction consumes gas and confirms on-chain, but no tokens move at this stage—only permission is granted.

4. Users may approve unlimited allowances or set custom limits; however, many wallets default to infinite approvals unless manually adjusted.

5. Once approved, the same allowance remains valid across future swaps until revoked or overwritten, even across different Uniswap versions or third-party interfaces using the same router address.

The Swap Execution Flow

1. After approval succeeds, users enter input/output amounts, slippage tolerance, and deadline parameters before initiating the 'Swap' action.

2. The swap transaction calls Uniswap’s Router contract, which internally executes transfers: pulling approved tokens from the user’s wallet and depositing output tokens in return.

3. This step involves real asset movement—input tokens are debited, output tokens are credited, and liquidity pools are rebalanced accordingly.

4. Slippage protection triggers if the actual price deviates beyond the user-defined threshold, causing the transaction to revert without execution.

5. Each swap generates a unique transaction hash visible on Etherscan, with logs confirming both the transfer-in and transfer-out events tied to the pool’s reserves.

Gas Consumption Differences

1. Approve transactions typically cost between 45,000 and 65,000 gas units depending on token contract complexity and network congestion.

2. Swap transactions usually consume 120,000 to 220,000 gas units due to multiple internal calls—including balance checks, reserve updates, fee calculations, and event emissions.

3. Reusing an existing approval avoids repeating the first gas cost, making subsequent swaps comparatively cheaper.

4. Tokens with non-standard implementations—such as those requiring reentrancy guards or custom transfer logic—may inflate approve gas usage significantly.

5. Layer-2 deployments like Uniswap v3 on Optimism reduce both approve and swap gas fees by over 90% compared to mainnet Ethereum executions.

Security Implications of Approvals

1. An infinite approval grants permanent control over the approved token balance to the target contract—even if compromised or maliciously upgraded.

2. Historical exploits like the 2021 BadgerDAO front-end compromise leveraged pre-existing unlimited approvals to drain user funds silently.

3. Wallets such as MetaMask now display warning banners when approving high-risk contracts or setting unlimited allowances.

4. Tools like Etherscan Token Approvals Checker allow users to audit active allowances and revoke unnecessary ones directly via transaction.

5. Revocation requires its own gas-costly transaction and does not auto-expire—users must proactively manage permissions to maintain hygiene.

Frequently Asked Questions

Q: Can I skip approval if I’ve swapped the same token on another DEX?A: No. Approvals are contract-specific. A token approved for SushiSwap’s router is not valid for Uniswap’s router—even if both use identical token addresses.

Q: Why does my wallet show “Approved” but the swap still fails with ‘insufficient allowance’?A: This occurs when the approved amount is lower than the input quantity selected for the swap—or when the token’s decimals were misinterpreted during approval setup.

Q: Does changing slippage affect the approval step?A: No. Slippage settings apply exclusively to the swap transaction. Approval only concerns the maximum spendable amount—not pricing or execution conditions.

Q: Can I approve a token for Uniswap v2 and use it seamlessly on v3?A: Yes, provided the approval targets the same router contract address used by the interface. However, v3’s new router (0x68b3465833fb72A70ecDF485E0e4C7bD82185493) requires its own separate approval if previously granted only to v2’s router.

Disclaimer:info@kdj.com

The information provided is not trading advice. kdj.com does not assume any responsibility for any investments made based on the information provided in this article. Cryptocurrencies are highly volatile and it is highly recommended that you invest with caution after thorough research!

If you believe that the content used on this website infringes your copyright, please contact us immediately (info@kdj.com) and we will delete it promptly.

Related knowledge

See all articles

User not found or password invalid

Your input is correct