Memecoin trading 2 min read

Closing an empty Solana token account: what returns?

Identify the account’s token amount, close authority and refundable lamports before treating it as empty.

An empty slot separates rows of metal tokens arranged in a dark tray.
View the worked illustrationClose illustration

Scroll the illustration to inspect the details.

Two zero-balance accounts each hold an assumed 0.002 SOL. A third still has one raw token unit.

A Solana token account is a separate account for a specific mint. Closing it sends its remaining lamports to the specified destination and removes that account. Closing one token account does not close the owner’s wallet or other token accounts. The token program requires an ordinary non-native token account to have a zero token balance before closure.

Count eligible accounts at raw precision

Suppose three ordinary token accounts each hold 0.002 SOL in lamports. Two have raw token balances of zero. A third displays 0.00 in the wallet but still holds one raw token unit after rounding. Only the first two clear the ordinary zero-balance test. If all other requirements are met, closing those two returns 0.004 SOL gross to the specified destination. The value of a final transaction fee is separate.

The 0.002 amounts are illustrative. The returned amount is the remaining lamports in the particular account, and the program may impose additional closure conditions for some extensions. Check the owner or designated close authority, the exact token program and the destination. A person who can see the account is not necessarily authorized to close it.

Recognize the wrapped-native exception

An account for the native mint can be closed with a nonzero token amount to unwrap its SOL. That exception does not make a nonzero memecoin balance closable. Preserve the account address and before-and-after records when reconciling a wallet that appears to lose a line after closure.

Check the raw token-unit conversion if the wallet presents the remaining unit as zero.

Close Token Account - Solana Developer Docs · Create a Token Account - Solana Developer Docs · Sync Native - Solana Developer Docs

Compare memecoin trading platformsOrder types, fees and supported networks

Read next

More from this space