Solana’s Token-2022 standard is changing how developers design tokens by embedding automatic yield mechanics directly into the mint itself. Instead of routing holders through staking pools or external protocols, a single token can now pay interest every second, compounding silently on chain. That capability removes friction for users and simplifies smart-contract architecture—no additional approvals, no unstaking delays, just continuous rewards baked into the asset.
How the Token-2022 Interest Model Works
Token-2022 introduces a built-in interest rate field in the mint account. The rate is expressed in basis points (bps), where 1 bps equals 0.01%. Setting a rate of 500 bps yields a 5% APY, and the protocol applies interest continuously using the elapsed time since the last update. Because the calculation runs on chain, balances appear to grow even without new transactions, creating a seamless savings experience.
Key technical details:
- The supply stored on chain never changes; only the UI balance increases.
- A 16-bit signed integer caps the rate between -32,768 bps (negative interest) and 32,767 bps (~327.67% APY).
- The rate authority—typically the token creator—can update the rate at any time.
- All interest calculations reference the mint’s last update timestamp, ensuring consistency across wallets and explorers.
Step-by-Step: Deploy a 5% APY Token in Minutes
Before you begin, ensure you have the Solana CLI and the SPL Token CLI installed. A funded wallet on devnet or testnet is required; mainnet is not recommended for early testing.
1. Create the Mint with a Fixed Rate
Use the spl-token create-token command with the Token-2022 program ID and your desired rate.
spl-token create-token --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb --interest-rate 500The CLI returns a unique mint address. Save it for the next steps.
2. Create a Token Account for Your Wallet
Generate a token account tied to your wallet and the new mint.
spl-token create-account <MINT_ADDRESS> --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEbThis account holds your balance and receives interest automatically.
3. Mint an Initial Supply
Issue an initial supply of tokens to your account. For demonstration, 1,000 tokens with 9 decimals is sufficient.
spl-token mint <MINT_ADDRESS> 1000 --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEbImmediately check your balance to confirm receipt.
4. Verify Interest Accrual
Run the balance command again. Even seconds after minting, the reported amount will exceed the original 1,000 tokens because interest has already started compounding.
spl-token balance <MINT_ADDRESS> --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEbA typical output might show 1000.000362839, reflecting fractional gains from the elapsed seconds since minting.
5. Inspect Mint Metadata
Display the mint’s configuration to confirm the interest rate and authority.
spl-token display <MINT_ADDRESS> --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEbThe output includes:
- Raw supply (1 billion units with 9 decimals).
- Interest-bearing flag and current rate (500 bps).
- Rate authority address, which controls future adjustments.
Adjusting Rates On-the-Fly
As the rate authority, you can raise or lower the APY dynamically. For example, increasing to 150% APY (15,000 bps) accelerates interest accumulation.
spl-token set-interest-rate <MINT_ADDRESS> 15000After the change, subsequent balance checks will reflect the new rate. Trying to set a rate beyond the 16-bit limit (e.g., 35,000 bps) triggers an error, preventing invalid configurations.
Practical Use Cases for Interest-Bearing Tokens
- Yield-bearing stablecoins that pay real yield without relying on external protocols or governance votes.
- Automated savings tokens that reward holders continuously, making them ideal for payroll or recurring rewards programs.
- Dynamic APY models that adjust rates based on market conditions, enabling algorithmic monetary policies.
- Composable DeFi primitives usable across lending markets, exchanges, and automated market makers without integration overhead.
Solana’s Token-2022 standard turns every mint into a self-sustaining yield engine. Whether you’re experimenting on devnet or preparing a production launch, the ability to mint, fund, and tune interest rates in minutes unlocks new design possibilities for token economies.
AI summary
Solana Token-2022 programıyla saniyede otomatik faiz kazanan tokenlar üretin. Adım adım rehber ile APY ayarlama ve bileşik faiz avantajlarını keşfedin.