GetBackSOL
Back to blog
·4 min read

Is closing a Solana token account safe? What actually happens on-chain

Anytime an action involves signing a wallet transaction, it's worth asking what could go wrong. With closeAccount specifically, the honest answer is: less than you'd think, because the safety check isn't implemented by whichever app you're using — it's enforced by the Solana Token Program itself.

The zero-balance rule is enforced on-chain

closeAccount is one of the core instructions defined in Solana's SPL Token Program — the same program every wallet, exchange, and dApp uses to move tokens. Its logic explicitly checks the account's token balance before doing anything else, and if that balance isn't exactly zero, the entire transaction fails. Not partially — the whole thing reverts. There's no code path where an app, malicious or careless, can force a close on an account that still holds tokens. It's a rule of the network, not a courtesy of whatever interface you're using.

What gets signed, and by whom

Closing an account requires a signature from that account's authority — normally, your own wallet. Any legitimate tool builds the transaction and asks your wallet to sign it; your wallet shows you what you're approving, and nothing is broadcast to the network without that signature. Non-custodial means exactly that: the app never holds your keys or has the ability to sign on your behalf.

Where the reclaimed SOL goes

When an account closes, its rent-exempt reserve is transferred to whichever address is specified as the destination in the instruction — for a legitimate tool, that's your own wallet, in the same transaction. A well-built tool will show you the destination and the exact amount before you sign, and any service fee is a separate, visible instruction in that same transaction rather than something quietly deducted afterward.

What to actually check before you use a tool

  • Does it show you the exact accounts and amounts before you sign, or does it ask for a blind approval?
  • Is the fee explicit and calculated before you confirm, not a surprise after?
  • Has the project disclosed whether it's been independently audited, and is it honest if it hasn't?

The underlying instruction is safe by design. The thing actually worth scrutinizing is the app wrapped around it — how transparent it is about what it's doing and what it takes.

Ready to check your own wallet? Scan it with GetBackSOL — free to check, 30% fee only on what you actually reclaim.