DeFi & AMM

Token Approval

A transaction granting a smart contract permission to spend a specific amount of tokens on behalf of a wallet.

Token Approval — A token approval is an on-chain transaction that grants a smart contract permission to spend a specific amount of tokens from your wallet. Token approvals are required before interacting with most DeFi protocols, including decentralized exchanges, lending platforms, and yield farms.

How It Works

On EVM-compatible blockchains (Ethereum, BSC, Arbitrum, Base), the ERC-20 token standard requires a two-step process for transferring tokens to a smart contract. First, you call the approve() function on the token contract, specifying which contract (the spender) can access your tokens and the maximum amount it can spend. Second, the spender contract calls transferFrom() to move your tokens.

This approval mechanism exists because smart contracts cannot pull tokens from your wallet without explicit permission. Each approval is token-specific and spender-specific — approving Uniswap to spend your USDC does not grant it access to your WETH.

Approvals are stored on-chain as an allowance mapping. You can check your active approvals using tools like Revoke.cash or Etherscan's token approval checker. Each approval transaction costs gas, which is why many interfaces request larger-than-needed or unlimited approvals to avoid repeated approval transactions.

Why It Matters in DeFi

Token approvals are a critical security surface in DeFi. If you approve a malicious or compromised contract, it can drain the approved tokens from your wallet at any time without further confirmation. Hundreds of millions of dollars have been lost through approval exploits, where attackers either deploy phishing contracts or exploit vulnerabilities in approved protocols.

Best practices include approving only the exact amount needed for each transaction, regularly reviewing and revoking unused approvals, and being cautious with contracts that request infinite approvals. Understanding token approvals is essential for anyone actively trading or farming in DeFi.

Real-World Example

When you want to swap 1,000 USDC for ETH on a DEX, your wallet first prompts you to approve the DEX router contract to spend your USDC. You can choose to approve exactly 1,000 USDC or an unlimited amount. After the approval transaction confirms, you submit the swap transaction, and the router contract uses the approval to move USDC from your wallet into the liquidity pool.

Common questions about Token Approval in cryptocurrency and DeFi.

Yes, each approval is an on-chain transaction that costs gas. On Ethereum mainnet, approvals typically cost $1-5 depending on network congestion. On Layer 2 networks like Arbitrum or Base, approval costs are usually under $0.10.

Yes. Tools like Revoke.cash, Etherscan's token approval checker, and wallet security features in apps like Rabby let you view every active approval for your wallet address across supported chains.

No. An approval only grants permission — it does not move any tokens. The spender contract must execute a separate transferFrom() call to actually move your tokens. However, once approved, the spender can transfer up to the approved amount at any time.

Ready to put your knowledge into practice?

Start Boosting