How Inner-CPI Solana Wallet Drainers Work and How to Stop Them Cold
The nastiest wallet drainers on Solana never put an obvious SOL transfer at the top level of a transaction. Instead, a fake airdrop claim, fake verification site, or rigged token hook calls an innocent-looking wrapper program that executes nested Cross-Program Invocations (Inner CPIs) deep inside execution.
Anatomy of a Nested Inner-CPI Drain
At top level, your wallet sees a single instruction calling Program X with opaque byte calldata. Once signed, Program X invokes the SPL Token program (`Approve` or `SetAuthority`) and `SystemProgram.transfer` across every writable account passed in the account meta array. In one block, native SOL and high-value SPL tokens move to a drainer vault.
Three Red Flags Veteran On-Chain Operators Watch For
First: unverified closed-source program IDs requesting writable access to your main SOL pubkey and multiple unrelated token accounts at once. Second: fake 'claim free reward' links dropped in token metadata descriptions or Telegram comments. Third: Token-2022 mints carrying custom `TransferHook` or `PermanentDelegate` authorities.
Never Use Your Vault Wallet in the Trenches + Simulate Pre-Signature
Keep size in cold hardware storage and trade from a compartmentalized hot wallet. Before interacting with unfamiliar mints, run a read-only 12-Layer Kamikaze AI scan on Rent & Rug Shield, and disconnect your wallet immediately after legitimate 0x09 rent claims.
Side-by-Side Comparison
| Attack Vector | What the User Thinks They Sign | What Inner-CPI Actually Executes |
|---|---|---|
| Fake Claim Wrapper | Claim $50 Memecoin Airdrop | Nested SystemProgram.transfer of Native SOL |
| Silent SPL Approve | Verify Discord Holder Role | Unlimited Delegate Approval on USDC & Blue-Chips |
| Owner Authority Swap | Unstake Promotional NFT | SetAuthority Transferring ATA Ownership to Attacker |
Frequently Asked Questions
Can pasting my public Solana address into Rent & Rug Shield expose my wallet to a drainer?
Never. A public Solana address is public ledger data just like viewing Solscan. Read-only scans never open your wallet extension and cannot sign or approve anything.
How do I revoke old suspicious token approvals?
Audit your open token accounts regularly, close unused zero-balance accounts via pure 0x09 CloseAccount, and never leave unlimited SPL delegate approvals active on trading wallets.