What is token approval?

A permission you grant a smart contract to spend a specific token from your wallet, required before most decentralized applications can move funds on your behalf.

Not yet verifiedHow we verify

3 min read

In this entry

A permission you grant a smart contract to spend a specific token from your wallet, required before most decentralized applications can move funds on your behalf.

Many interfaces request an unlimited approval by default, so the contract may spend that token without limit for as long as the permission stands. If the contract is later exploited, every wallet with a live unlimited approval is drainable. Setting a finite amount costs an extra transaction each time but caps the damage. Review live approvals periodically using a block explorer's approval view. See approval revocation and smart contract.

This is the single largest category of avoidable loss in self-custody, and it happens to people who did nothing wrong on the day it happened.

How it works

The ERC-20 standard separates ownership from spending permission. Your balance sits in the token contract's table under your address. A separate allowance table records how much another address may move on your behalf (source: EIP-20).

Before a decentralized exchange can swap your tokens, it needs an allowance. The interface asks you to sign an approval transaction that writes an entry into that table. Only then can the swap itself run.

Two properties make this dangerous rather than merely fiddly.

Allowances persist. They do not expire, do not decrease unless spent, and survive long after you stop using the application. A permission granted years ago is still live today.

Unlimited is the common default. Interfaces request the maximum value so users do not have to approve again on every trade, which is convenient and means the allowance is effectively "everything you will ever hold of this token".

The consequence is that an exploit of a contract you approved months ago can drain the token from your wallet without you signing anything on the day. The signature that mattered was the approval.

EIP-2612 offers a signed permit as an alternative, which can carry a deadline and avoids a separate transaction, though it does not remove the underlying allowance concept.

Example

Illustrative. You swap $200 of a token on a decentralized exchange and grant an unlimited approval to do it. A year later you hold $20,000 of that token in the same wallet and have not used the application since. The application's router is exploited. Every wallet with a live unlimited allowance can be drained of that token, including yours, and the loss is $20,000 rather than the $200 you were trading. Approving exactly $200 at the time would have capped the exposure at $200, at the cost of one extra approval transaction on your next trade.

Why it matters when you buy

Buying on a centralized exchange involves no approvals at all, which is one of the real differences between venue types. If you buy on chain, every purchase leaves permissions behind that you are responsible for reviewing. The guide comparing venue types covers the trade-off, and the guide on verifying a token contract covers checking what you are approving.

Questions

How do I see what I have approved?

Block explorers provide an approval view per address that lists live allowances by token and spender. Reviewing it periodically is the maintenance this requires.

Does revoking an approval cost money?

It is a transaction, so it costs gas on the chain involved. Revoking several at once on a cheap chain is inexpensive; on a busy one it is worth batching. See gas.

Do exchange purchases create approvals?

No. A centralized exchange trades internally and never asks your wallet to approve anything, which is why exchange buying leaves no permissions to manage. See cex.