How Wallet Drainers Work
Learn how wallet drainers trick users into signing malicious transactions. Understand the mechanism, spot red flags, and prevent crypto theft.
A wallet drainer is a type of malicious script or website that tricks a user into signing a transaction that transfers their cryptocurrency or NFTs to an attacker. The attack does not require stealing a private key or seed phrase; instead, it abuses the user’s own approval. This page explains the mechanism step by step, why the victim usually approves the malicious request, and the specific prompts that should stop you.
The Mechanism: How a Drainer Works
A wallet drainer typically operates through a fake website or a compromised decentralized application (dApp). The attack unfolds in several stages:
-
The Lure: The victim visits a website that promises something attractive: a free airdrop, a mint of a new NFT, a token swap with a better rate, or access to a restricted service. The site looks legitimate, often copying the design of a well-known project.
-
The Connection Request: The site asks the user to connect their wallet. This is a standard request for any dApp, and the user is accustomed to it. Connecting a wallet does not give the site access to funds; it merely reveals the public address and allows the site to send transaction requests.
-
The Malicious Transaction: After connecting, the site prompts the user to sign a transaction. This is where the attack occurs. The transaction is not what it appears to be. For example, it might be labeled as a “claim” or “approve” but actually sets an allowance for the attacker to spend the user’s tokens. In other cases, it might be a transaction that transfers tokens directly to the attacker.
-
The Approval: The user reviews the request in their wallet interface. If they do not scrutinize the details, they click “Confirm” or “Sign.” The transaction is then broadcast to the network, and the attacker receives the funds or the approval to move them.
-
The Aftermath: The user notices their assets are gone, but the transaction is irreversible. The attacker may have moved the funds to another address immediately.
Why Victims Approve
The primary reason victims approve these malicious transactions is a lack of understanding of what a signature authorizes. Many users believe that signing a transaction is like clicking a button to verify their identity, not realizing that it can transfer assets or grant permissions. Additionally, attackers exploit urgency and social engineering: the promise of a limited-time airdrop or a high-demand mint pushes users to act quickly without reading the details.
Another factor is the complexity of transaction details. When a wallet requests approval, it shows a summary, but the technical details (like the function being called or the recipient address) may be hidden or abbreviated. Users often skip the “more details” section, trusting the site’s interface.
Red Flags: Specific Prompts to Stop You
Certain signs should immediately make you pause before signing anything:
- Unfamiliar DApp: If you have never used the site before and it suddenly asks for a signature, be suspicious. Legitimate dApps have a track record and community verification.
- Unusual Function Calls: The wallet may show a function call like
approveorsetApprovalForAllwhen you expected a simple transfer. These functions grant permissions to the caller to move your assets. - High Gas Fees: A transaction that transfers a large amount of tokens or sets a high allowance will have a higher gas fee. If the fee seems excessive for what you think you are doing, it is a red flag.
- Request to Sign a Message: Some scams ask you to sign a message (off-chain signature) that, when combined with a separate transaction, can be used to drain your wallet. Be wary of signing any message that asks for a private key or seed phrase (which you should never provide).
- Pressure Tactics: If the site uses a countdown timer or says “only 5 left,” it is a common psychological trick to rush you.
Comparison Table: Legitimate vs. Malicious Requests
| Aspect | Legitimate Transaction | Malicious Transaction | When a Cause Does NOT Apply |
|---|---|---|---|
| Purpose | Clear: you are buying, selling, or interacting with a known contract | Vague or mismatched: claiming an airdrop but the function is approve | If you are interacting with a well-known contract, the purpose may be clear, but always verify the contract address. |
| Recipient | Address you recognize (e.g., a DEX router) | Address that is unfamiliar or a random string | If you are using a proxy contract, the recipient might not be the final destination, but the contract should be verified. |
| Data | Human-readable description of the action | Hex data that is not easily readable | Some legitimate transactions have complex data, but you can still check the function name. |
| Gas Limit | Reasonable for the action | Excessively high, suggesting a complex operation | A high gas limit might be normal for a complex DeFi interaction, but it warrants extra scrutiny. |
| Urgency | None; you can take your time | Countdown timers or limited supply | Some legitimate mints have time limits, but they should not pressure you to ignore details. |
What People Get Wrong: The Misdiagnosis
A common misdiagnosis is that wallet drainers are a form of malware that infects your computer or phone. In reality, most drainers are purely web-based and do not require any malicious software on your device. The attack works entirely through the browser and the wallet interface. This is a natural mistake because users often associate scams with viruses, but understanding that the attack is a social engineering and transaction-signing issue is key to prevention.
Another misdiagnosis is that connecting your wallet is dangerous. Connecting alone is not; it is the signing of a transaction that is risky. Many users believe that if they don’t enter their seed phrase, they are safe. While that is true for phishing attacks that try to steal keys, drainers do not need your keys. They need your signature.
How to Protect Yourself
- Use a Hardware Wallet: Hardware wallets require physical confirmation for each transaction, making it harder for a remote attacker to trick you into signing. However, you must still review the details on the device.
- Review Transaction Details: Always expand the transaction details in your wallet. Check the recipient address, the amount, and the function being called. If anything looks off, reject it.
- Check Contract Addresses: For any dApp you interact with, verify the contract address from official sources (like the project’s website or a trusted explorer). If the site asks you to interact with a contract that is not the official one, it is a scam.
- Use a Burner Wallet: For airdrops or unfamiliar sites, use a separate wallet with only a small amount of funds. This limits the potential loss.
- Revoke Approvals: Periodically check and revoke token approvals you have given to contracts. Use tools like Etherscan’s token approval checker or similar services for other chains.
- Never Share Your Seed Phrase: No legitimate service will ever ask for your seed phrase or private key. If a site asks for it, it is a scam. Never enter it anywhere except your wallet device during initial setup.
What to Do If You’ve Been Drained
If you suspect you have been drained, act quickly:
- Move Remaining Assets: Transfer any remaining funds to a new wallet that has never been connected to the malicious site.
- Revoke Approvals: If the attack was an approval, revoke it immediately using a revoke tool.
- Report the Incident: Report the scam to the platform where you encountered it (e.g., the browser extension store, the blockchain explorer, or a scam reporting service).
- Change Passwords: If you reused passwords for any accounts, change them, as you may have been phished for other credentials.
Stopping a wallet drainer before you sign
Wallet drainers are a serious threat, but they are preventable. By understanding the mechanism—that a signature can authorize a transfer or approval—you can spot the red flags and avoid becoming a victim. Always take your time, review every transaction, and never trust a site that pressures you. The security of your assets depends on your vigilance.
Common questions
What is a wallet drainer?
A wallet drainer is a malicious script or website that tricks you into signing a transaction that transfers your cryptocurrency or NFTs to an attacker. It does not steal your private key; it abuses your approval.
How do hackers drain crypto wallets?
Hackers use phishing sites that ask you to connect your wallet and then present a fake transaction request. If you sign it, you authorize a transfer or set an allowance for the attacker to spend your tokens.
Can my wallet be drained just by connecting to a site?
No, connecting your wallet only reveals your public address. The danger comes when you sign a transaction. Always review the transaction details before confirming.
What are signs of a wallet drainer?
Signs include an unfamiliar dApp, a transaction with a function like 'approve' or 'setApprovalForAll' when you expected a simple transfer, high gas fees, and pressure tactics like countdown timers.
What should I do if I think I've been scammed?
Immediately move any remaining assets to a new wallet, revoke any approvals you may have given, report the scam, and change any passwords you may have reused.
Read next
- Fake Wallet Apps and Extensions: How Counterfeits Work How counterfeit wallet apps and extensions reach people, what they do once installed, how to find the genuine download, and what to do if a phrase was exposed.
- How Hardware Wallets Work: Keys, Signing, and Limits Hardware wallets keep private keys offline and sign transactions on-device. Learn the mechanism, what it protects, and what it doesn't.
- What a Seed Phrase Actually Is Learn what a seed phrase really is: the master key to all your crypto. Understand how it works, why it's not a password, and how to keep it safe.
- Liquidity Pools: How They Work Learn how liquidity pools power decentralized exchanges, how fees are earned, and the risks like impermanent loss.
- What Crypto Tax Software Actually Does Learn how crypto tax software imports transactions, matches transfers, and applies cost basis. Understand its limitations and what you must verify manually.