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.
View the worked illustrationClose illustration
Scroll the illustration to inspect the details.
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
Read next
More from this space
-
2 min read
Wrapped SOL and native SOL in a wallet balance
Separate a native SOL balance, wrapped token amount and token-account reserve before adding a wallet total.
-
2 min read
US memecoin swap records when no cash changes hands
Reconstruct a US investor’s example token-for-token disposition using dollar basis, value received and transaction records.
-
2 min read
A hidden or unsolicited token in Phantom: what changed?
Separate a wallet’s visibility warning from token ownership and a verified or realizable dollar value.