Home / Crypto / Academy / Custody and security

Approvals, signatures and wallet drainers

This is the mechanism behind most crypto theft. It takes fifteen minutes to understand and then protects you permanently.

MODULE 9 OF 64 LEVEL 2: CUSTODY AND SECURITY 9 MIN

Why approvals exist

A smart contract cannot take your tokens without permission. So before a swap, you grant the contract permission to spend that token. That grant is the approval, it is a separate transaction, and it usually persists forever with no limit unless you change it.

Why that becomes dangerous

Two ways. Either you approve a malicious contract directly, which then drains you immediately. Or you approved a legitimate contract months ago, that contract is later exploited, and your approval is still live.

The signature types worth recognising

What you might be asked to sign
Connect wallet
Harmless
Shares your public address so a site can show your balance. Never costs anything and never needs approving. If connecting asks you to approve a transaction, close the site.
Sign message
Usually harmless
Proves you control the address, used for logins. Free. But if the text is unreadable or looks like structured data, do not sign it.
Approve token
Dangerous if unlimited
Grants a contract permission to move that token. Set a spending cap rather than unlimited where your wallet allows it.
Permit or Permit2
Most dangerous
A gasless off chain signature that grants spending permission without an onchain transaction. It looks like a harmless message and it is not. Most modern drainers use exactly this.
setApprovalForAll
Very dangerous for NFTs
Grants permission over an entire NFT collection at once. Almost never needed outside a genuine marketplace listing.
A Permit signature costs no gas and shows no transaction, which is precisely why it fools people. If a site asks you to sign something you cannot read in plain English, refuse. Nothing legitimate needs that.

The five minute habit

  1. Go to revoke.cash, or the token approvals tab on your chain's block explorer.
  2. Paste your address to review without even connecting.
  3. Look at every live approval. Anything you do not recognise or no longer use should go.
  4. Revoke them. Each revoke is a transaction and costs gas.
  5. Repeat every few months and immediately after using anything new.

Use a wallet that shows you the outcome

Rabby and Phantom both simulate a transaction and show the resulting balance change before you approve. If a signature would move a token you did not intend to spend, they say so. That single feature stops the overwhelming majority of drainer attacks.

READ NEXT

BEFORE YOU MOVE ON

Common questions

What is a Permit signature?

A gasless off chain signature that grants a contract permission to spend your tokens. It looks like a harmless message request because there is no transaction and no fee, which is exactly why drainers use it.

How often should I revoke approvals?

Every few months, and immediately after interacting with any new protocol. It takes about five minutes and it is the highest value security habit in crypto.

Risk warning: crypto is highly volatile and largely unregulated. You can lose everything you put in. Nothing here is financial, investment or tax advice.

← PREVIOUS
Spotting a rug pull before you buy
NEXT →
Where to actually keep your crypto