Track 5 · Tokens · lesson 4
Why unlimited approval is a loaded gun
9 min
Almost every dApp asks for an unlimited approval. Almost everyone grants one. Here is what you are actually agreeing to.
Nudge
Show me the approach
Show me the code
Explain the solution
Why unlimited is the default
Approving exactly what you need means approving again on every purchase — an extra transaction and an extra fee, every time.
Approve type(uint256).max once and you never see the prompt again. From a
product perspective it is obviously better. That is why it won.
The cost is that you have granted a permanent, unlimited right to move that token out of your wallet, to a contract you may never think about again.
It survives you disconnecting. It survives you clearing browser data. It survives the project shutting down. It survives you forgetting the site existed.
If that contract is ever compromised — or was malicious from the start, waiting — everything you hold of that token goes, whenever the attacker chooses.
Predict
You granted an unlimited USDC approval to a DEX in 2022 and haven't used it since. Today the DEX is exploited. What happens to your USDC?
What to actually do
Approve what you need when the amount is known and the extra transaction is tolerable. Some wallets now let you edit the amount at the prompt.
Review and revoke periodically. Revoke.cash and Etherscan's approval checker both list every live approval on your address. Revoking is a transaction and costs gas, which is exactly why people put it off.
Use a burner for anything unfamiliar. A separate address holding only what that session needs cannot lose more than that.
Prefer permit where it exists (EIP-2612). A signed, time-limited,
amount-limited approval, submitted in the same transaction as the action — with
the caveat from track 2 that a permit signature is itself something attackers
will ask you to sign.
Check
What is the safest habit around approvals?
Worth remembering
- Unlimited approvals exist to save a transaction per purchase, and that convenience is why they dominate.
- An approval is permanent, survives disconnecting, and does not expire.
- A contract compromised years later can use every approval ever granted to it.
- Approve what you need, revoke what you don't, and use a burner for anything unfamiliar.
- `permit` gives signed, bounded approvals — but the signature itself is a phishing target.