HANNISOL
Sign in
Token Security2 min read·Apr 18, 2026

How to Protect Your Solana Wallet from Drainers

Wallet drainers are malicious smart contracts that steal everything in your wallet with a single approval. Learn how they work, how to spot them, and the habits that prevent catastrophic loss.

H
Hannisol Team
How to Protect Your Solana Wallet from Drainers

The approval that empties your wallet in seconds

A wallet drainer is a malicious smart contract or transaction designed to transfer all tokens from your wallet to an attacker's wallet in a single operation. Unlike rugpulls (where token price goes to zero) or exchange hacks (where a centralized party loses your funds), drainers require your active — if unwitting — participation. You must sign a transaction that grants the drainer's contract permission to access your assets.

This is why drainers are typically delivered through phishing — you believe you're signing a legitimate transaction on a trusted platform, but you're actually approving a drainer's permissions. The result: within seconds of your approval, every token and NFT in your wallet is transferred to wallets you've never seen. The operation is irreversible.


How drainers work technically

Solana drainers typically operate through one of several mechanisms:

Token program approvals: SPL tokens can have delegate approvals — a permission that allows a specified address to transfer your tokens without requiring your signature on each transfer. A drainer requests this approval through a transaction that appears to be doing something else (claiming an airdrop, minting an NFT, claiming rewards). Once the approval is granted, the drainer's automated bots transfer your tokens before you notice.

Malicious program interactions: Some drainers use custom programs that, when invoked with your wallet's signature, execute complex transaction sequences that move your assets through multiple intermediate accounts before delivering them to the attacker's address. The transaction simulation in your wallet may show only the initial instruction, not the subsequent atomically-executed steps.

Compromised frontend injection: Legitimate DeFi protocol frontends that have been hacked may inject malicious transactions alongside legitimate ones. When you approve what appears to be a normal swap, an additional malicious approval is included in the same transaction.


The habits that prevent draining

Read every transaction request carefully: Phantom and Solflare both simulate transactions and show expected token movements before you confirm. If the simulation shows unexpected token transfers — especially to addresses you don't recognize — do not approve.

Use a hardware wallet for significant holdings: Even if you approve a malicious transaction from a phishing site, a hardware wallet requires physical button confirmation on its own screen. The hardware wallet's display shows the actual transaction being signed — a second chance to catch a drainer before it executes.

Keep a separation between hot and cold wallets: Use a small-balance "hot" wallet for active DeFi and NFT interactions, keeping the bulk of your holdings in a separate cold wallet you don't connect to websites. A drainer can only drain the wallet you connect.

Revoke unnecessary approvals regularly: Use Solana's token approval revocation tools (available through Phantom's security center or third-party tools) to remove delegations you no longer need. Past approvals remain active until explicitly revoked.

Check every token and protocol you interact with using Hannisol before connecting your wallet. Scam projects often use drainer mechanics. Check at Hannisol.

Ready to apply this to a real token?

Run any Solana mint address through Hannisol's 8-dimension risk engine — free, no signup required.

Analyze a token on Hannisol →

Related articles