Token Approval

Security Updated Nov 2026

What an approval actually is

An ERC-20 token keeps a table: for each owner and each spender, an allowance. approve(spender, amount) writes a row in that table. From then on the spender can call transferFrom(owner, anywhere, amount) without you signing anything again.

That is how every DEX, lending market and aggregator works — and it is also how a wallet gets emptied weeks after the transaction that set it up.

The three shapes of approval risk

  1. Unlimited allowance. Most interfaces ask for 2^256 - 1 so you never approve twice. The convenience is real; so is the standing liability: the spender can take everything, forever, until revoked.
  2. Approval to the wrong contract. A phishing site asks you to approve a token to a contract that looks like a router. The transaction is real, the contract is not.
  3. Signature-based approvals (permit). EIP-2612 lets an approval be granted by a signature instead of a transaction: no gas, no visible transaction in your history, and a full allowance if the amount is unlimited. This is the payload of most “free mint / claim” drainers.

How to audit what you have granted

  1. Open a revoke tool (Revoke.cash, Etherscan’s Token Approvals page) and connect the wallet — read-only, no transaction needed.
  2. Sort by “unlimited” first: those are the ones worth thinking about.
  3. Keep approvals for protocols you actively use; revoke those you have not touched in months.
  4. After any unusual signature request, check again — a permit approval does not appear as a transaction, only as an allowance.

How to avoid granting the wrong one

  • Treat “approve” as a separate decision from “swap”. Read the spender address and compare it with the protocol’s documented router.
  • Prefer exact-amount approvals where the interface allows it; unlimited only for a protocol you use weekly.
  • Never approve from a wallet that holds your long-term balance — use a hot wallet with a working balance for DeFi, keep the rest elsewhere.
  • If a site asks you to sign a permit for an amount you did not choose, refuse. There is no legitimate reason to let a site set an unlimited allowance through a signature.
Cite Quoting welcome. Please credit Onchain Diary and link here.