Overview
A drainer is a malicious smart contract or script designed to automatically steal assets from connected wallets. Drainers are commonly deployed through phishing sites that trick users into signing malicious transactions.
Drainer attacks have caused hundreds of millions in losses. Never sign transactions on unfamiliar websites or approve unlimited token allowances.
How Drainers Work
Phishing Site : Victim visits a fake website mimicking a legitimate project
Wallet Connection : Site requests wallet connection (appears normal)
Malicious Approval : User signs a transaction granting unlimited token approvals
Asset Theft : Drainer contract transfers all approved assets to attacker
Speed : Entire process can happen in seconds
Types of Drainer Attacks
Approval-Based Drainers
Request ERC-20 token approvals
Can drain all approved tokens at any time
Most common type
NFT Drainers
Target NFT collections
Often use setApprovalForAll function
Can steal entire collections in one transaction
Permit-Based Drainers
Use EIP-2612 permit signatures
No on-chain approval transaction required
Harder to detect before execution
Native Token Drainers
Trick users into signing ETH transfers
Often disguised as minting or claiming functions
Detection Indicators
Common Drainer Tactics
Fake airdrops : “Claim your free tokens” phishing
Fake mints : Impersonating popular NFT drops
Compromised Discord/Twitter : Links posted from hacked accounts
SEO poisoning : Fake sites ranking for popular project searches
Typosquatting : Domains similar to legitimate projects
API Example
Response indicating drainer activity:
Protection Strategies
Verify URLs - Always check you’re on the official website
Review approvals - Use our Approval Risks endpoint
Limit approvals - Only approve exact amounts needed
Revoke old approvals - Regularly audit and revoke unused approvals
Use hardware wallets - Provides extra signing verification step
Check before signing - Read transaction details carefully