
Solana Witches
Non-Custodial
Verified Error Solution
How to Fix "Solana Cannot Close Account: Transfer Fee Withheld"
Token-2022 introduces transfer fees stored directly inside recipient accounts. If an account has withheld fees, standard CloseAccount fails with an error.
Dissolve $SOL Container
1-Click Non-Custodial ATA Reclamation
Rent Locked
+0.00204 SOL
Target Asset:$SOL
Status:Awaiting wallet connection
Reclaim Value:~0.00203928 SOL ($0.35 USD)
Atomic batch execution • 0 escrow • Lamports return directly to fee payer
100% Non-Custodial
0 Escrow (Direct to Wallet)
SPL Program Certified
Root Cause Analysis
Token-2022 runtime enforces that all withheld fees must be harvested back to the mint or fee authority before the account container can be closed.
Step-by-Step Resolution
- Identify the Token-2022 mint and fee authority.
- Dispatch createHarvestWithheldTokensToMintInstruction to clear withheld fees.
- Execute createCloseAccountInstruction to reclaim the 0.00203928 SOL rent deposit.
On-Chain Instruction Reference
// 1. Harvest withheld fees on Token-2022
import { createHarvestWithheldTokensToMintInstruction, createCloseAccountInstruction, TOKEN_2022_PROGRAM_ID } from "@solana/spl-token";
const harvestIx = createHarvestWithheldTokensToMintInstruction(
token2022Mint,
[userTokenAccount],
TOKEN_2022_PROGRAM_ID
);
// 2. Now close the account safely
const closeIx = createCloseAccountInstruction(
userTokenAccount,
userWallet, // Destination of reclaimed SOL
userWallet, // Authority
[],
TOKEN_2022_PROGRAM_ID
);Technical FAQ
Why does Solana Witches handle this automatically?
Our smart batch scanner detects Token-2022 extension offsets and prepends the harvest instruction into the same atomic transaction, ensuring your account closes and rent is recovered seamlessly.
How much rent do I get back from a Token-2022 account?
Token-2022 accounts with extensions typically lock 0.00203928 to 0.0025 SOL depending on the extension byte size.