Solana Token Supply & Decimals

Introduction

Supply and decimals are fundamental concepts for SPL tokens on Solana. They define how tokens are counted and displayed. Understanding them is crucial for both users and developers. This page covers their definitions, how they impact user experience and accounting, and best practices for managing them.

Diagram explaining token supply and decimals including human units, base units, conversion formulas, and different decimal precision levels

Token Supply and Decimals - Understanding Token Economics

Simple Definitions

ConceptDefinitionExample
Human unitsWhat users see in wallets and exchanges1.23 TOKEN
Base unitsSmallest indivisible units (always integers)1,230,000 base units
DecimalsDigits after decimal point in human display6 decimals = 1,000,000 base units per human unit
Total supplyTotal minted minus burned (absolute maximum)1,000,000,000 base units
Circulating supplyPublicly available and actively traded tokensExcludes locked, treasury, escrow tokens

Decimals Deep Dive

Decimals are a critical setting for any SPL token. They are configured at mint initialization. Once set, they cannot be changed later. This immutability ensures consistent accounting and prevents confusion.

Common Decimal Choices

DecimalsUse CaseExampleBest For
0Non-fractional itemsTickets, loyalty points, collectiblesWhole numbers only
6Financial tokensUSDC, USDT, governance tokensReasonable precision
9High precisionSOL, micro-paymentsMaximum precision

Decimals in Practice

Here’s how decimals work for common real-world tokens:

Token TypeDecimalsExampleUse Case
SOL91 SOL = 1,000,000,000 lamportsNative token, micro-payments
USDC/USDT61 USDC = 1,000,000 base unitsStablecoins, DeFi
Governance tokens6 or 91 TOKEN = 1,000,000 or 1,000,000,000DAO voting, staking
NFTs01 NFT = 1 base unitNon-fractional collectibles

Conversions & Rounding (Safe Math)

Converting between human units and base units is essential. Always perform calculations using integers (base units) to avoid floating-point errors. This is a crucial best practice for financial applications.

Conversion Formulas

base = human × 10^decimals
human = base ÷ 10^decimals

Practical Examples

ScenarioToken DecimalsHuman UnitsBase UnitsCalculation
Standard conversion91.51,500,000,0001.5 × 10^9
Smallest amount60.00000111 ÷ 10^6
Whole numbers0555 × 10^0

Why This Matters: Using whole numbers prevents floating-point precision errors that can cause accounting discrepancies, especially important for financial applications.

Supply 101

Understanding token supply involves two main operations: minting and burning.

Supply Operations

OperationEffect on Total SupplyWho Can Do ItPurpose
MintingIncreases total supplyMint authority onlyCreate new tokens
BurningDecreases total supplyAnyone with tokensRemove from circulation

Supply Types

Capped tokens: Have a maximum total supply that can never be exceeded
Uncapped tokens: Have no predefined limit

Treasury, vesting, and locks affect the circulating supply, not the total supply. Tokens held in these mechanisms are still part of the total supply. However, they are not considered part of the active circulating supply. This distinction is important for market analysis.

Authorities control minting and burning. The mint authority can create new tokens. The freeze authority can freeze token accounts. Understanding these roles is key to managing token supply.

Operational Scenarios

Decimals and supply impact various operational scenarios:

ScenarioImpactBest Practice
Airdrops / rewardsPrecision affects dust amountsChoose sensible precision for your use case
DEX pricingAffects price display and tick sizeConsider user perception and trading precision
Payments/microtransactionsHigher decimals enable small amountsUse 9 decimals for micro-payments
Bridges/listingsConsistent decimals are vitalEnsure decimals match across platforms
Cross-chain bridgingDecimals must match or be convertedHandle conversion properly to prevent fund loss

Reference Tables

Table A: Decimals Cheat Sheet

Decimals1 human unit equals (base units)Suitable for
01Tickets, badges, non-fractional items
2100Fiat-like displays (e.g., cents)
61,000,000Finance tokens, small splits
91,000,000,000Micro-payments, SOL-like precision

Table B: Supply Terms & Sources

TermWhat it meansOn-chain sourceNotes
Total supplyAmount minted minus burnedMint account supplyInteger in base units
Circulating supplySupply in public handsOff-chain + on-chainExcludes locks/escrow; not protocol-enforced
Max supply (policy)Project-declared capDocs / governanceNot enforced by SPL token program
Treasury balanceTeam/DAO holdingsToken accountsAffects circulating, not total

Best Practices

Decide decimals before launch: This is a permanent decision. Choose decimals that align with your token’s intended use and price range.
Communicate supply policy: Be transparent about your token’s total and circulating supply. Track and publish circulating supply regularly.
Prefer integer math: Always perform calculations using the token’s base units. Convert to human units only for display purposes.
Test formatting: Verify how your token appears in wallets, explorers, and DEX UIs. Ensure it looks as intended.
Consider revoking mint authority: Once your token’s supply policy is final, consider revoking the mint authority to increase trust.

Risks & Anti-Patterns

Changing implied decimals in off-chain UI: This can confuse users. The on-chain decimals are fixed.
Over-fractionalization: Creating a token with too many decimals can lead to “dust” amounts that are practically unusable.
Unclear treasury/vesting disclosures: Lack of transparency about locked or vested tokens can erode trust.
Unclear or changing supply disclosures: Inconsistent supply information undermines project credibility.
Relying on floats: Performing calculations with floating-point numbers can introduce precision bugs. Always use integer math for token amounts.

📝 Conclusion

Decimals define a token’s precision. Supply policy defines trust. Use integer math and clear documentation for a smooth user experience. These fundamental concepts are crucial for successful token management.

❓ FAQ

Q: Can I change decimals after creating a token?

A: No, decimals are set at mint initialization and cannot be changed later. This ensures consistency and prevents issues with token accounting.

Q: Why do wallets show different decimal places?

A: Wallets may show different decimal places due to their internal rounding and display rules. Always refer to the token’s defined decimals for the true precision.

Q: What’s the difference between total and circulating supply?

A: Total supply is the total amount of tokens ever minted minus burned. Circulating supply is the total supply minus tokens that are locked, in escrow, or held in treasury accounts.

Q: How do I avoid rounding errors when paying rewards?

A: To avoid rounding errors, always perform calculations using the token’s base units (integers) and convert to human units only for display purposes.