Home › Learn › DeFi Safety
DeFi Safety

What is Wallet drainer?

Malicious code — often a fake site or signed transaction — that tricks you into authorizing transfer of your tokens, emptying the wallet.

How it works

Unlike stealing a seed phrase, a drainer gets you to sign a transaction that grants it access. The signature looks routine; the payload moves your assets. The defense is reading what you actually sign, never blindly approving.

Example

In practiceA fake mint site has you 'approve' a transaction that's actually a setApprovalForAll, letting it move your whole collection.

How do I avoid drainers?

Only interact with verified contracts, read every signature's real meaning, and revoke approvals you don't need. If a site rushes you, leave.

Go deeper: DeFi From Scratch

The complete, step-by-step guide — every command, config, and the reasoning behind it.

Get the guide