Token-2022 Extensions on Solana

Introduction

Token-2022 is an enhanced version of Solana’s SPL token program that introduces modular extensions for advanced token functionality. It operates as a separate program with a different program ID from the classic SPL Token program, requiring applications to explicitly support it.

Diagram showing Token-2022 extensions including transfer fees, non-transferable tokens, default frozen accounts, and other advanced features

Token-2022 - Advanced Token Extensions on Solana

History and Motivation

Solana introduced Token-2022 to address limitations in the original SPL token program and provide developers with more flexible token designs. The upgrade enables:

Compliance features for regulated financial applications
Advanced DeFi mechanics like transfer fees and hooks
Modular architecture allowing developers to select only needed features
Enhanced metadata and identity capabilities

Technical Architecture

Token-2022 operates at a different program ID than the classic SPL Token program. This separation means:

  • Applications must explicitly support Token-2022 to interact with these tokens
  • Classic SPL wallets can interact with Token-2022 tokens if no incompatible extensions are used
  • Extensions are modular and can be combined as needed

Token Extensions

Extensions are add-on features that can be attached to token mints at creation. Some extensions can be adjusted later by authorities, while others are permanently fixed once set.

Extension Overview Table

ExtensionPurposeAuthorityPermanenceUse Cases
Transfer FeeDeducts percentage on transfersMint authorityAdjustableProject funding, revenue sharing
Non-TransferablePrevents token transfersMint authorityPermanentSoulbound tokens, identity proofs
Default FrozenStarts accounts frozenFreeze authorityAdjustableCompliance, permissioned assets
Permanent DelegateGrants permanent rightsMint authorityPermanentCustodial recovery, services
Transfer HookCustom transfer logicDevelopersAdjustableCompliance, allowlists, logging
Metadata PointerEnhanced metadata storageUpdate authorityAdjustableBranding, identity, off-chain data

1. Transfer Fee Extension

  • Function: Deducts a percentage of each transfer and routes it to a designated fee account
  • Example: 2% fee means sending 100 tokens delivers 98 to recipient, with 2 going to the collector
  • Authority: Mint authority
  • Use cases: Project funding, donations, revenue sharing
  • Considerations: May cause negative user experience; some exchanges refuse to list fee-bearing tokens

2. Non-Transferable Extension

  • Function: Prevents tokens from being transferred once received
  • Use cases: Soulbound tokens, identity proofs, KYC verification
  • Considerations: Tokens become permanently locked if applied incorrectly
  • Support: Broad but not universal across all wallets

3. Default Frozen Extension

  • Function: New token accounts start in a frozen state until explicitly unfrozen
  • Authority: Freeze authority
  • Use cases: Compliance onboarding, permissioned assets
  • Considerations: Users may be confused by frozen accounts

4. Permanent Delegate Extension

  • Function: Grants permanent rights to a designated address to operate on tokens
  • Use cases: Custodial recovery, service providers
  • Considerations: Cannot be revoked once set; poses security risks if keys are compromised

5. Transfer Hook Extension

  • Function: Executes custom logic during transfers (e.g., compliance checks, allowlists, logging)
  • Authority: Developers/mint authority
  • Use cases: Advanced DeFi, regulated assets
  • Considerations: Adds computational cost; transfers can fail if hooks fail

6. Metadata Pointer Extension

  • Function: Stores or references additional metadata directly on the mint (e.g., branding, off-chain JSON links)
  • Authority: Update authority
  • Use cases: Richer metadata, identity, branding
  • Considerations: Off-chain links can become invalid over time

Authority Roles

Token-2022 maintains the same authority structure as classic SPL tokens:

AuthorityControl LevelRisk LevelCommon Use Cases
Mint AuthorityToken creation/destructionHighProject creators, initial distribution
Freeze AuthorityAccount freezing/unfreezingMediumCompliance, security measures
Update AuthorityMetadata and extensionsLowBranding updates, corrections
DelegateTemporary transfer rightsLowTrading, service providers

Compatibility and Wallet Support

Extension Support Levels

ExtensionWallet SupportExchange SupportRisk Level
Transfer FeeWell supportedVariable (many refuse fee tokens)Medium
Non-TransferableBroad supportGenerally supportedLow
Default FrozenModerate supportLimited supportMedium
Permanent DelegateLimited supportLimited supportHigh
Transfer HooksLimited supportLimited supportHigh

Compatibility Notes

  • SPL-compatible wallets can interact with Token-2022 tokens if no incompatible extensions are used
  • Exchanges may refuse to list tokens with certain extensions (particularly transfer fees)
  • dApps must explicitly support Token-2022 to utilize extension features

Creating Token-2022 Mints

Token-2022 mints can be created using:

Solana CLI tools with the spl-token program
Anchor framework for programmatic creation
Third-party tools like Solana Playground

Comparison: SPL vs Token-2022 vs NFTs

FeatureSPL TokensToken-2022NFTs
Program IDSPL TokenToken-2022SPL Token or Token-2022
ExtensionsNoneModular extensionsMetadata extensions only
ComplexityLowMedium to HighLow to Medium
Use CasesGeneral-purpose tokensSpecialized tokensUnique digital assets
CompatibilityUniversalVariableUniversal
Development TimeFastMedium to SlowFast to Medium

Real-World Examples

Extension TypeReal-World UseExample Projects
Transfer FeeGaming projects charging fees to fund developmentGaming tokens, revenue-sharing tokens
Non-TransferableAchievement badges that cannot be resoldGaming achievements, identity verification
Default FrozenFinancial assets requiring KYC before transferRegulated tokens, compliance tokens
Permanent DelegateCustodians with recovery capabilitiesInstitutional custody, service providers
Transfer HookDeFi protocols enforcing compliance rulesRegulated DeFi, compliance platforms

Risks and Best Practices

Common Risks

Risk CategoryDescriptionImpact Level
User ExperienceUnexpected transfer fees, frozen accounts, non-transferable restrictionsMedium
CompatibilityWallets or exchanges may not support certain extensionsHigh
SecurityPermanent delegate abuse, failed transfer hooks, misapplied restrictionsHigh

Best Practices

Document token policies clearly for users
Test thoroughly on devnet before mainnet deployment
Revoke unnecessary authorities when possible
Start with minimal extensions and add complexity gradually

Avoid overcomplicating token designs
Do not hide transfer fees from users
Do not assume universal wallet support for all extensions

📝 Conclusion

Token-2022 extends Solana’s SPL token program with modular extensions for advanced functionality.
It provides powerful features for specialized tokens but introduces complexity and compatibility considerations.

Key Decision Points

  • Use SPL tokens when simplicity and maximum compatibility are priorities
  • Use Token-2022 when advanced features like transfer fees, compliance, or custom logic are required

Final Recommendations

✅ Always balance functionality vs user experience
✅ Conduct thorough testing before production deployment
✅ Start simple and add complexity gradually
✅ Document all token policies clearly for users

The key is to choose the right tool for your specific use case while maintaining excellent user experience and broad compatibility.

❓ FAQ

Q: Can I convert an SPL token to Token-2022?

A: No, Token-2022 is a separate program. You must create a new mint. Existing SPL tokens continue to function normally.

Q: Do transfer fees increase Solana network fees?

A: No, Solana network fees remain unchanged. Transfer fees are deducted from the token amount itself.

Q: Will Token-2022 tokens work on all exchanges?

A: Not necessarily — many exchanges refuse to list tokens with transfer fees or restrictive extensions.

Q: Are Token-2022 tokens more expensive to use?

A: Base transaction costs remain the same. Extensions like transfer fees add additional costs to users.

Q: Can SPL wallets send/receive Token-2022 tokens?

A: Yes, as long as no incompatible extensions are used. However, extension features won’t be available.

📚 References and Further Reading