Token-2022 Extension Type 2 Rent Recovery Engineering • M027

Reclaiming SOL Rent From Empty Token-2022 Accounts Blocked by Withheld Transfer Fees

Thousands of Solana traders hold zero-balance Token-2022 accounts that display 0.00 tokens in Phantom and Solflare yet repeatedly fail to close on legacy cleaners with Custom Program Error 0x20 (AccountHasWithheldTransferFees). Because Extension Type 2 (TransferFeeAmount) stores residual tax dust inside TLV bytes [174..182], plain 0x09 CloseAccount calls revert until permissionless HarvestWithheldTokensToMint ([0x1a, 0x04]) clears the counter. Solana Rent & Rug Shield automates that exact atomic two-step sweep—recovering 2,039,280 lamports (0.00203928 SOL) base up to 2,157,600+ TLV lamports at a 0% 1st-claim fee versus Sol Incinerator (~2%) and ClaimYourSol (5%), backed by our 11-Layer Block-0 Jito/Sybil defense vs RugCheck/SolSniffer/GoPlus and a 30% ?ref= split.

Unlock Stuck Token-2022 Rent Now (0% 1st Claim) Open Atomic Token-2022 Cleaner Get 30% ?ref= Link
2,157,600
Lamports Reclaimed Per 182B Fee ATA (0% 1st)
[0x1a, 0x04]
Permissionless Harvest Bundled Before 0x09 Close
2,039,280
Base Lamports Per Standard 165B SPL ATA
0% 1st Fee
Keep 100% vs Sol Incinerator ~2% & ClaimYourSol 5%
Interactive Trench EV Simulator • Unit M027

Bundled Rug Loss Prevention + Dead ATA Rent Recovery Estimator

Estimate how much SOL our 11-Layer Block-0 Jito/Sybil & Token-2022 TLV Shield saves per month compared to relying on RugCheck, SolSniffer, or GoPlus — plus instant 0%-fee 1st-claim recovery (2,039,280 lamports = 0.00203928 SOL per dead ATA).

0.611784 SOL
Unlocked Free on Claim #1 (0% Fee • 2,039,280 lamports/ATA)
-0.012236 SOL
Saved vs Sol Incinerator ~2% Fee (-0.030589 SOL vs 5% Burn)
-0.030589 SOL
Saved vs ClaimYourSol 5% Skim
<120ms
Layer-11 Sybil & Layer-10 TLV Verdict Speed (0 Auto-Billing)

Why Zero-Balance Token-2022 Tax Accounts Revert on Standard 0x09 CloseAccount

Whenever you buy or receive a Token-2022 asset configured with ExtensionType::TransferFeeConfig (Type 1 on the Mint), the Associated Token Account Program allocates a 182-byte account owned by TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb: 165 bytes for the base account struct, 1 byte for AccountType::Account (0x02 at offset 165), 4 bytes for ExtensionType::ImmutableOwner (type 7, length 0 at offsets 166..170), and 12 bytes for ExtensionType::TransferFeeAmount (type 2, length 8 at offsets 170..182). Crucially, incoming taxed transfers credit your spendable balance at bytes [64..72] while parking the deducted transfer tax right inside your own ATA's withheld_amount u64 field at bytes [174..182]!

Later, when you sell 100% of your spendable balance on Jupiter or Raydium, bytes [64..72] drop to 0—so Phantom, Solflare, and Backpack display an empty 0.00 balance. However, if the token's withdraw_withheld_authority never ran a sweep on your ATA, bytes [174..182] still contain non-zero withheld tokens! When a legacy cleaner built for 165-byte SPL accounts fires a raw 0x09 CloseAccount instruction, spl-token-2022 checks TransferFeeAmount.withheld_amount != 0 and immediately aborts the transaction with TokenError::AccountHasWithheldTransferFees (0x20), stranding 2,157,600 lamports per account.

182-Byte Token-2022 ATA Layout & Atomic [0x1a, 0x04] + [0x09] Fix
Stuck 182-Byte Token-2022 ATA Memory Map:
  [000..064] mint + owner pubkeys
  [064..072] amount          = 0 (u64 LE -> Wallet UI shows '0.00 Tokens')
  [165]      account_type    = 0x02 (AccountType::Account)
  [166..170] TLV #1          = type 0x0700 (ImmutableOwner), len 0x0000
  [170..174] TLV #2          = type 0x0200 (TransferFeeAmount), len 0x0800 (8B)
  [174..182] withheld_amount = 48,291,004 (NON-ZERO -> Blocks plain 0x09 Close!)

Solana Rent & Rug Shield Atomic Two-Instruction Sequence:
  Ix[0] TokenzQd...PxuEb :: HarvestWithheldTokensToMint (Data: [0x1a, 0x04])
        Accounts: [Mint (writable), User_ATA (writable)]  <-- 100% Permissionless!
        Effect  : Sweeps 48,291,004 withheld units to Mint; sets ATA [174..182] = 0
  Ix[1] TokenzQd...PxuEb :: CloseAccount (Data: [0x09])
        Accounts: [User_ATA (writable), User_Wallet (writable), User_Wallet (signer)]
        Effect  : Credits +2,157,600 lamports (+0.00215760 SOL) directly to User_Wallet!

Lamport & EV Forensics: Base 2,039,280 vs 2,157,600+ TLV Rent Math at 0% First Claim

Because Solana's rent-exemption formula scales linearly with account byte size—(128 storage overhead bytes + data_len) * 6,960 lamports—Token-2022 Associated Token Accounts lock significantly more SOL than legacy 165-byte SPL Tokenkeg accounts. While a standard 165-byte SPL ATA locks (128 + 165) * 6,960 = 2,039,280 lamports (0.00203928 SOL), a 182-byte Token-2022 TransferFee ATA locks (128 + 182) * 6,960 = 2,157,600 lamports (+5.80% more SOL per account), and a 187-byte Fee + TransferHook ATA locks 2,192,400 lamports (0.00219240 SOL).

Consider an active degen wallet holding 50 legacy empty SPL ATAs plus 30 stuck 182-byte Token-2022 withheld-fee ATAs. Legacy cleaners that lack [0x1a, 0x04] harvesting either fail outright on the 30 Token-2022 accounts—leaving 64,728,000 lamports (0.06472800 SOL) stranded on-chain—or shave ~2% to 5% off everything they do close. Solana Rent & Rug Shield harvests and closes all 80 accounts cleanly, returning all 166,692,000 lamports (0.16669200 SOL) on your 1st claim at 0% fee—saving 8,334,600 lamports over ClaimYourSol (5%) and ~3,333,840 to 8,334,600 lamports over Sol Incinerator.

80-Account Mixed SPL + Stuck Token-2022 Recovery Benchmark
Wallet Inventory: 50 Empty SPL ATAs (165B) + 30 Stuck Token-2022 Fee ATAs (182B)

  50 x 165B SPL ATAs          : 50 * 2,039,280 = 101,964,000 lamports (0.10196400 SOL)
  30 x 182B Token-2022 ATAs   : 30 * 2,157,600 =  64,728,000 lamports (0.06472800 SOL)
  Gross Unlockable SOL        : 166,692,000 lamports (0.16669200 SOL)

Net Payout by Platform:
  Unpatched Legacy Cleaner    :  99,924,720 lamports (Fails on 30 TLV ATAs + 2% fee!)
  ClaimYourSol (5% Fee)       : 158,357,400 lamports (-8,334,600 lamports fee deducted)
  Sol Incinerator (~2.5% Fee) : 162,524,700 lamports (-4,167,300 lamports fee deducted)
  Rent & Rug Shield (0% 1st)  : 166,692,000 lamports (100% of all 80 ATAs recovered!)

Full-Lifecycle Protection: Pre-Buy 11-Layer Shield + Post-Trade TLV Rent Sweep

Single-purpose tools split Solana wallet hygiene in half: RugCheck, SolSniffer, and GoPlus display delayed, static token scores without ever helping you recover a single lamport of trapped Token-2022 rent, while fee-heavy burn sites like Sol Incinerator and ClaimYourSol wait until after you get rugged to tax your remaining rent deposits by 2% to 5%. Worse, neither group handles the full matrix of Token-2022 extensions across both pre-swap security and post-swap account reclamation.

Solana Rent & Rug Shield unifies both halves into one zero-custody engine. Before you swap, our sub-120ms 11-Layer Shield audits Block-0 Jito Sybil bundles (Layer-11), round-trip exit liquidity (Layer-7), wash velocity (Layer-8), inner-CPI drainers (Layer-9), and Token-2022 TLV traps (Layer-10). After you exit a trade, our dual-program cleaner automatically pairs [0x1a, 0x04] HarvestWithheldTokensToMint with [0x09] CloseAccount at 0% 1st-claim fee, backed by 24h, 30-Day, and Monthly passes ($0 auto-billing) and instant 30% ?ref= SOL referral splits.

Token-2022 Withheld-Fee Rent Recovery & Security Matrix

DimensionSolana Rent & Rug ShieldSol Incinerator / ClaimYourSolRugCheck / SolSniffer / GoPlus
Withheld-Fee Auto-HarvestAuto-prepends permissionless [0x1a, 0x04] before 0x09 CloseBasic flows can revert on Error 0x20 or charge 2%-5% feeNo Token-2022 account closing capability
182B+ TLV Lamport RecoveryFull 2,157,600 to 2,192,400+ lamports returned on 1st claimDeducts ~2% to 5% cut from enlarged Token-2022 rentZero lamport recovery
165B Legacy SPL RecoveryFull 2,039,280 lamports (0.00203928 SOL) at 0% 1st claimDeducts 40,785 to 101,964 lamports per closed ATAZero lamport recovery
Frozen Trap IsolationQuarantines byte [108]==0x02 accounts before tx simulationManual deselection often required to avoid batch failureStatic mint report only
Pre-Buy Token-2022 ShieldLive <120ms 11-Layer TLV + Block-0 Sybil defense includedZero pre-trade rug or honeypot detectionCached 30-180s scores miss live epoch/authority flips
Pass Billing & ?ref= Split24h / 30-Day / Monthly ($0 auto-billing) + 30% ?ref= SOLNo sniper bot API; smaller referral payoutsRecurring SaaS plans; zero instant 30% SOL split

4-Step Playbook: Close Stuck Token-2022 Tax Accounts at 0% Fee

Step 1: Connect Wallet in Read-Only Dual-Program Scan Mode

Connect Phantom, Solflare, Backpack, or Ledger at rentandrugshield.com. Our RPC scanner queries both Tokenkeg and TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb accounts simultaneously.

Step 2: Detect Hidden Withheld Fees at Bytes [174..182]

Our byte parser flags every zero-balance 182-byte Token-2022 ATA carrying non-zero TransferFeeAmount.withheld_amount while quarantining frozen (state == 0x02) traps.

Step 3: Bundle [0x1a, 0x04] Harvest + [0x09] CloseAccount

We construct an unsigned atomic transaction pairing permissionless HarvestWithheldTokensToMint ([0x1a, 0x04]) right before CloseAccount ([0x09]) so stuck tax accounts close on the first try.

Step 4: Approve Locally for 100% First-Claim SOL + 30% ?ref=

Confirm the net +SOL gain in your wallet simulation to receive 2,039,280 to 2,157,600+ lamports per ATA at 0% 1st-claim fee, then share your ?ref= link for 30% SOL splits.

Frequently Asked Questions

Why does my empty Token-2022 account fail to close with Custom Program Error 0x20?

Hex error 0x20 (decimal 32) in spl-token-2022 is TokenError::AccountHasWithheldTransferFees. Even when your spendable balance at bytes [64..72] is zero, taxed incoming transfers leave withheld fee units inside bytes [174..182], blocking CloseAccount until those withheld units are harvested to the Mint.

Do I need the token creator's signature to run HarvestWithheldTokensToMint?

No! Unlike WithdrawWithheldTokensFromAccounts ([0x1a, 0x03]), which requires the developer's withdraw_withheld_authority, HarvestWithheldTokensToMint ([0x1a, 0x04]) is 100% permissionless—anyone can invoke it inside the same transaction right before closing their own ATA.

What if the developer closed or froze the Mint—can HarvestWithheldTokensToMint still run?

HarvestWithheldTokensToMint writes the swept fee counter into the Mint account's TransferFeeConfig struct, which succeeds whenever the Mint exists on-chain (even if mint_authority and transfer_fee_config_authority were revoked). Only if your individual ATA itself was frozen (byte 108 == 0x02) is closing blocked.

Why do Token-2022 tax accounts refund 0.00215760 SOL instead of 0.00203928 SOL?

Solana rent scales at 6,960 lamports per byte (including 128 bytes of account metadata overhead). Adding 1 AccountType byte, 4 ImmutableOwner bytes, and 12 TransferFeeAmount bytes expands a 165-byte ATA to 182 bytes, increasing recoverable rent from 2,039,280 to 2,157,600 lamports.

Institutional Pricing Ladder ($0 Free 1st Claim + $19.99 / $49.99 / $99 / $500 Passes)

New layers included free during active pass, $0 auto-billing. Settle instantly in SOL, SPL USDC, Stripe Card, or autonomous HTTP 402 (x402).

Free 1st Claim & 24h Trench Pass

$0 Free 1st Scan & 0% 1st Claim

Keep 2,039,280 / 2,039,280 lamports (0.00203928 SOL) on your first wallet claim vs Sol Incinerator ~2% and ClaimYourSol 5%. Extra single 11-Layer scan: $0.10. 24h Trench Pass: $1.99.

Launch Live Scanner

30-Day Trader Pro

$19.99/mo$39.99/mo

Unlimited Web & Telegram 11-Layer pre-buy audits including Layer-11 Block-0 Jito/Sybil Cluster Defense, beating RugCheck, SolSniffer, and GoPlus.

Activate $19.99 Trader Pro

30-Day Ultra Pro + Sniper Bot API

$49.99/mo$99.00/mo

15,000 API calls/mo ($0.0033/call) + real-time Rug Webhooks + Layer-11 Block-0 Sybil & Token-2022 TLV flags for automated trading bots.

Get $49.99 Sniper Bot API

30-Day Quant Desk Pro API

$99.00/mo$199.00/mo

100,000 API calls/mo ($0.00099/call), <120ms Priority SLA + Batch Sybil funding graph endpoints & Streamable HTTP MCP.

Unlock $99 Quant Desk API

Enterprise Unlimited API

$500/mo$999/mo

Unlimited B2B RPC-backed 11-Layer scoring feeds for wallets, DEX terminals, and launchpads with 100+ RPS throughput and 99.95% SLA.

Provision $500/mo Enterprise SLA

Autonomous HTTP x402 & MCP

x402 v2 Zero-Signup Agent Pay

Machine-native Solana USDC & SOL settlement via /api/x402/v2 and /mcp with 14,640h Mainnet telemetry proof.

Inspect x402 & MCP Spec
Zero-Custody On-Chain Affiliate Engine (3,000 bps)

Earn a Sticky 30% Atomic ?ref= Split (+50% Higher Than 20% Programs)

Paste any valid Solana wallet address to generate your shareable ?ref=<Wallet> link. Every referred pass checkout ($1.99 / $19.99 / $49.99 / $99 / $500) or repeat rent cleanup splits 30% directly to your wallet inside the same unsigned Solana transaction with zero custody, zero withdrawal minimums, and automatic self-referral protection.

Related Solana Security & Rent Forensics Guides

Unit M023 • Cluster D

Token-2022 Malicious TransferHook Honeypot Detector | Layer-10 Audit

Audit Token-2022 TransferHook honeypots via 11-Layer Shield. Reclaim 2,039,280 lamports (0.00203928 SOL) at 0% 1st claim + earn a 30% ?ref= split.

Unit M024 • Cluster D

Token-2022 PermanentDelegate Rug Scanner & TLV Audit | 11-Layer Gate

Block Token-2022 PermanentDelegate rugs with 11-Layer Shield. Reclaim 2,039,280 lamports (0.00203928 SOL) at 0% 1st claim + earn a 30% ?ref= split.

Unit M025 • Cluster D

Token-2022 Hidden 100% TransferFeeConfig Trap Checker | 11-Layer

Catch 10,000 bps Token-2022 fee traps via our 11-Layer Shield. Reclaim 2,039,280 lamports (0.00203928 SOL) at 0% 1st claim + earn a 30% ?ref= split.

Unit M026 • Cluster D

Token-2022 DefaultAccountState Frozen & Soulbound Detector | 11-Layer

Stop Token-2022 DefaultAccountState::Frozen traps via 11-Layer Shield. Reclaim 2,039,280 lamports (0.00203928 SOL) at 0% 1st claim + 30% ?ref= split.

Unit M028 • Cluster D

SolSniffer & GoPlus vs Layer-10 Token-2022 Audit | 11-Layer Shield

Compare SolSniffer & GoPlus vs our <120ms 11-Layer Shield. Reclaim 2,039,280 lamports (0.00203928 SOL) at 0% 1st claim + earn a 30% ?ref= split.

Unit M034 • Cluster E

Trojan, Photon, BullX & BonkBot Wallet SOL Rent Recovery Guide

Reclaim 2,039,280 lamports (0.00203928 SOL) per Trojan, Photon or BullX ATA at 0% 1st claim with 11-Layer Shield checks and a 30% ?ref= split.