IndexCrypto
Educational only. Not financial, tax or legal advice, and nothing here is a recommendation to buy anything.

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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 approve or setApprovalForAll when 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

AspectLegitimate TransactionMalicious TransactionWhen a Cause Does NOT Apply
PurposeClear: you are buying, selling, or interacting with a known contractVague or mismatched: claiming an airdrop but the function is approveIf you are interacting with a well-known contract, the purpose may be clear, but always verify the contract address.
RecipientAddress you recognize (e.g., a DEX router)Address that is unfamiliar or a random stringIf you are using a proxy contract, the recipient might not be the final destination, but the contract should be verified.
DataHuman-readable description of the actionHex data that is not easily readableSome legitimate transactions have complex data, but you can still check the function name.
Gas LimitReasonable for the actionExcessively high, suggesting a complex operationA high gas limit might be normal for a complex DeFi interaction, but it warrants extra scrutiny.
UrgencyNone; you can take your timeCountdown timers or limited supplySome 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:

  1. Move Remaining Assets: Transfer any remaining funds to a new wallet that has never been connected to the malicious site.
  2. Revoke Approvals: If the attack was an approval, revoke it immediately using a revoke tool.
  3. 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).
  4. 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