Five weeks into my #100DaysOfSolana challenge and I just crossed into
the most exciting territory yet — Solana's token layer. This week I went
from zero token knowledge to creating, branding, minting, distributing,
and even charging fees on tokens — all on-chain. Here's everything I learned.
What "Tokens" Actually Means on Solana
Before this week, I thought tokens were complicated. Smart contracts,
deployment scripts, audits — the whole Web3 horror story.
Turns out, Solana has a completely different model. The SPL Token Program
is a single shared, audited program already deployed on-chain. Every token
on Solana — from USDC to memecoins to your own project token — is created
using the same program. You never write token logic. You just call it.
This is the Web2 equivalent of using Stripe instead of building your own
payment processor. The infrastructure is already there.
Day 29: My First Token — Raw and Nameless
On Day 29, I ran one command:
spl-token create-token
A token appeared on-chain. Supply: 0. Decimals: 9. Mint authority: me.
Then I minted 100 tokens into a token account:
spl-token create-account MINT_ADDRESS
spl-token mint MINT_ADDRESS 100
spl-token display MINT_ADDRESS
Output: SPL Token Mint
Address: 2M6t3SbJMz95mZ8nzF8MLq364v2ZQQ235BkxhE93g7hq
Supply: 100000000000
Decimals: 9
Mint authority: AWKYsCGBcfGLSz6QpmXzRn7EJ9fRhiJsjYSLDV3c9L9y
Freeze authority: (not set)
Key insight: Supply shows 100000000000 for 100 tokens because
decimals = 9, so 100 × 10^9. All on-chain math is integer arithmetic —
no floating point, no rounding errors.
One problem: Explorer showed it as "Unknown Token." No name, no symbol.
That sent me to Day 30.
Day 30: Giving My Token an Identity with Token-2022
The fix: switch to Token Extensions Program (Token-2022). This newer
standard embeds metadata — name, symbol, URI — directly inside the mint
account. No separate Metaplex account needed.
spl-token create-token \
--program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb \
--enable-metadata \
--decimals 6
spl-token initialize-metadata MINT_ADDRESS \
"100DaysCoin" "HUNDO" \
"https://raw.githubusercontent.com/solana-developers/opos-asset/main/assets/DeveloperPortal/metadata.json"
My token now had an identity: 100DaysCoin (HUNDO).
Then I minted 1000 HUNDO and transferred 250 to a second wallet:
spl-token transfer MINT_ADDRESS 250 SECOND_WALLET \
--fund-recipient --allow-unfunded-recipient
Final: 750 HUNDO (me) / 250 HUNDO (second wallet). The
--fund-recipient flag automatically created the recipient's Associated
Token Account (ATA) and covered rent. One flag replaces what would be
multiple API calls in Web2.
Day 31: Built-in Transfer Fees — No Middleware Required
This was the most mind-bending day. In Web2, charging a per-transaction
fee means building middleware, hooking into payment flows, writing fee
collection jobs. On Solana, it's one flag at mint creation:
spl-token create-token \
--program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb \
--transfer-fee-basis-points 100 \
--transfer-fee-maximum-fee 5000
100 basis points = 1% fee. The program enforces it on every transfer —
no middleware, no bypass possible.
spl-token transfer MINT_ADDRESS 100 SECOND_WALLET --expected-fee 1
The --expected-fee flag is a safety check: the transfer fails if the
calculated fee doesn't match what you specify. After the transfer:
My wallet: 900 tokens
Second wallet: 99 tokens ← received 100, 1 withheld as fee
The withheld fee sits locked in the recipient's token account. Only the
withdraw withheld authority (set to my wallet at creation) can collect it:
spl-token withdraw-withheld-tokens MY_TOKEN_ACCOUNT SECOND_WALLET_TOKEN_ACCOUNT
Final result: 901 tokens in my wallet (900 + 1 fee swept back) ✅
The Mental Model That Changed Everything
| Web2 Concept | Solana Equivalent |
|---|---|
| Rewards program definition | Mint account |
| User balance row in DB | Token Account (ATA) |
| Display name / branding | On-chain metadata (Token-2022) |
| Transfer API endpoint | spl-token transfer |
| Payment processor fee | Transfer fee basis points |
| Fee collection middleware | withdraw-withheld-tokens |
| Admin-only mint permission | Mint authority (cryptographic) |
SPL Token vs Token-2022: Quick Reference
| Feature | SPL Token | Token-2022 |
|---|---|---|
| Basic minting & transfers | ✅ | ✅ |
| On-chain metadata | ❌ | ✅ |
| Transfer fees | ❌ | ✅ |
| Interest-bearing tokens | ❌ | ✅ |
| Confidential transfers | ❌ | ✅ |
For any new token in 2026: Token-2022 is the default.
What's Next
Week 6 goes deeper — more Token Extensions, and eventually building
tokens with real utility. The foundation is solid.
31 days in. 69 to go.
Articles in this series:
→ Day 29: SPL Token Basics
→ Day 30: Token-2022 Branded Token
🔗 GitHub: 100-days-of-solana
Building daily → @GopichandAI | #100DaysOfSolana
Top comments (0)