Token-2022 Best Practices
Rules for choosing Token-2022 extensions and shipping compatible clients on Agave 4.1.1.
Search across all documentation pages
Rules for choosing Token-2022 extensions and shipping compatible clients on Agave 4.1.1.
Tokenkeg... vs TokenzQd... branches all builders.findAssociatedTokenPda requires correct tokenProgram.token_interface for vaults listing external tokens. Classic Token constraint rejects Token-2022 deposits.anchor_spl::token and anchor_spl::token_interface types in one account struct. The classic Mint/TokenAccount owner check rejects Token-2022 accounts; convert the whole struct to InterfaceAccount + Interface<TokenInterface>.transfer_checked, never the unchecked transfer. It is deprecated on classic Token and Token-2022 rejects it outright on transfer-fee mints.spl_token::instruction::* returns IncorrectProgramId for TokenzQd...; use spl_token_2022::instruction::*.ReentrancyNotAllowed.amount field for confidential balances. Indexers need extension-aware parsers.Only when an extension provides hard requirement - else classic Token maximizes compatibility.
Enabling transfer hooks without SDK support for extra accounts in all client paths.
Devnet mint + Surfpool 0.12.0 + target wallet/DEX smoke tests before mainnet.
Yes for DeFi programs accepting arbitrary user-selected mints.
Yes - different standards for different asset types in same app.
Verify immutability flags at mint init - wrong URI permanent without upgrade path.
Default frozen affects new accounts; freeze authority still required for thaw.
Parse TLV extensions or use DAS; do not assume 165-byte accounts only.
When extension benefit outweighs liquidity and wallet friction of new mint.
TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb on all clusters.
Stack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.
Reviewed by Chris St. John·Last updated Jul 19, 2026