Here's what happens step by step when you create a new fungible SPL token using the spl-token CLI or equivalent SDK calls. Order matters — misordering these steps produces broken or unusable tokens.
Step 1: Generate a keypair for the mint account. This keypair's public key becomes your token's permanent address. You can let the CLI generate one randomly or use a vanity address. Once created, this cannot change.
Step 2: Create the mint account on-chain. This allocates 82 bytes of storage on Solana and pays rent (approximately 0.00144768 SOL for a mint account as of current rent rates). You set the decimal count here — for a standard fungible token, 6 or 9 decimals are typical (USDC uses 6, many memecoins use 6 or 9). This is permanent. You cannot change decimals after creation.
Step 3: Set mint authority and freeze authority. The wallet that creates the mint is the default authority for both. Mint authority controls supply expansion. Freeze authority can lock individual token accounts. You can later transfer these authorities to another address, or revoke them entirely by setting them to null.
Step 4: Create a token account for yourself. Before you can mint tokens to your own wallet, your wallet needs an ATA for this new mint. The spl-token CLI usually handles this implicitly when you run mint-to.
Step 5: Mint tokens. The mint authority signs a transaction telling the SPL Token program to increase the supply and credit tokens to a specified token account. You specify the amount in the smallest unit — if your token has 6 decimals, minting 1,000,000 units gives you 1.000000 tokens as displayed in wallets.
⚠ Common mistake: Setting decimals to 0 for a token you intend to be fungible and divisible. Decimals = 0 means every token is a whole unit and cannot be split. This is fine for tickets or points, but terrible for a currency-like token.