Knowledge base
Security6 min read

How to avoid Solana wallet drains

One common drain vector is signing a malicious transfer, approval or authority change. Compromised seed phrases or private keys can also cause losses. Here are the mechanics and habits that help reduce risk.

How a drain actually happens

For example, a signed transaction can grant a spending allowance through Approve or an inner program call (CPI), or owner control through SetAuthority. An unused allowance can permit a later transfer without a new owner signature. Another transaction can transfer funds immediately. These are examples, not a universal drain sequence.

The approval trap (Approve / ApproveChecked)

Approve sets a delegate and an allowed amount on a token account. The delegate can spend without your new signature within the remaining allowance, which decreases as it is spent and does not expire merely with time. Revoke removes the delegation. Malicious sites hide Approve inside a normal-looking swap or an airdrop claim.

Authority changes (SetAuthority / close authority)

SetAuthority can change the account owner or the close authority. An owner change hands over full account control; close authority alone cannot transfer the token balance. Closing a non-native token account requires a zero token balance; extensions may add constraints. Wrapped SOL is an exception: its account can be closed with a balance to reclaim SOL. Authorities can persist until explicitly changed.

Malicious airdrop tokens and Token-2022

Receiving an airdrop alone does not grant wallet access. A permanent delegate can transfer or burn only its mint's tokens, not arbitrary wallet assets. A transfer hook adds logic within passed permissions, not blanket permission to drain funds. Freeze, pausable and transfer fee add separate risks. Check the mint before swapping.

Habits and checks that reduce risk

Keep bulk funds in a cold wallet and use a separate hot account for swapping. Read what you sign. Use an aggregator with pre-sign checks: SpaceSwap inspects instructions and, when data is available, writable accounts and Token-2022 mints; before signing it attempts to simulate the transaction bytes. Unavailable pre-sign data shows a warning in the panel you confirm; an unavailable simulation is shown there too, and the confirm button names the consent to send without the second check — your wallet signature gives it. Proceeding does not confirm safety. Revoke stale approvals. Never share your seed phrase.

Key takeaways

  • A new owner signature is not always needed: an existing delegate, a permanent delegate for its mint or stolen keys can be involved.
  • Approvals and authorities can persist after a swap; inspect their current state.
  • Check the mint and its Token-2022 extensions before swapping.
  • Pre-sign checks reduce risk but are not a guarantee of safety.

Ready to swap with pre-sign checks?

SpaceSwap blocks drain instructions, bounds writable accounts and simulates the transaction before signing. Funds are signed only in your wallet.

Open swap