DEV Community

Cover image for Three Token-2022 Mints in One Week: Fees, Yield, and Soul-Bound Tokens on Solana
Vinay
Vinay

Posted on

Three Token-2022 Mints in One Week: Fees, Yield, and Soul-Bound Tokens on Solana

A Token-2022 mint is not just a number that moves around. It is a number that moves around with rules attached.

If you have ever worked with Stripe, you know the pattern. You start with a simple charge. Then you add features — subscriptions, transfer fees, metadata. Each feature is a separate API call, and wiring them together is your job.

Token-2022 (the upgraded SPL Token program at TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb) flips that. Instead of middleware living next to the asset, the middleware lives inside the asset. You bake rules directly into the mint at creation time, and every wallet, program, and dApp that handles your token automatically respects them.

Here are three mints I shipped this week, what each extension does, and when you would reach for one.


1. Transfer Fee Mint — Skim 1% on Every Transfer

Mint: AXdJwLSxuzh2hjLvwEtjuDSKXMhWeVwvH2ZZkfguTBJP
Explorer: https://explorer.solana.com/address/AXdJwLSxuzh2hjLvwEtjuDSKXMhWeVwvH2ZZkfguTBJP?cluster=devnet
Extension: Transfer Fee (100 basis points = 1%, max fee 1,000,000 tokens)

spl-token create-token \
  --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb \
  --transfer-fee-basis-points 100 \
  --transfer-fee-maximum-fee 1000000 \
  --decimals 6
Enter fullscreen mode Exit fullscreen mode

When you transfer this token, the protocol automatically splits the amount: the recipient gets 99%, and 1% goes into a withheld_amount field on the recipient's account — untouchable by the recipient. The mint authority can sweep those withheld fees at any time with a single withdraw-withheld-tokens command.

spl-token transfer --expected-fee 10 $MINT 1000 $RECIPIENT --allow-unfunded-recipient
spl-token withdraw-withheld-tokens $MY_TA $RECIPIENT_TA
Enter fullscreen mode Exit fullscreen mode

When to use: Creator royalties, protocol fees on a stablecoin, a treasury skim on a community currency. The fee is enforced at the protocol level — no middleware, no webhook, no way to route around it.


2. Interest-Bearing + Transfer Fee — Yield That Compounds While You Watch

Mint: FALRuEMugKuEf4e5sD4SHL5JsXcmZqGmtBgEPWC3BUpQ
Explorer: https://explorer.solana.com/address/FALRuEMugKuEf4e5sD4SHL5JsXcmZqGmtBgEPWC3BUpQ?cluster=devnet
Extensions: Transfer Fee (100bps) + Interest-Bearing (5000bps = 50% APR)

spl-token create-token \
  --program-id TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb \
  --decimals 6 \
  --transfer-fee-basis-points 100 \
  --transfer-fee-maximum-fee 1000000 \
  --interest-rate 5000
Enter fullscreen mode Exit fullscreen mode

Two extensions, one mint, zero conflict. I minted 1,000,000 tokens, and within seconds the displayed balance started growing — no transaction needed. The trick: interest updates the UI amount only. The raw token balance in your account never changes. The protocol computes the displayed amount on the fly from the mint's rate and the network clock.

# Check balance twice with a 30s pause — watch it grow
spl-token balance $MINT
sleep 30
spl-token balance $MINT
Enter fullscreen mode Exit fullscreen mode

The transfer fee still operates on the raw amount, so both extensions compose cleanly. You get a token that charges fees when it moves and yields interest while it sits.

When to use: Savings accounts, vesting schedules, any token where time should affect value.


3. Non-Transferable Mint — A Token That Refuses to Move

Mint: 3oJBDKS7hrnTsjKQVJ9wGXZm3BVt6NnGekBXfbHRyvfP
Explorer: https://explorer.solana.com/address/3oJBDKS7hrnTsjKQVJ9wGXZm3BVt6NnGekBXfbHRyvfP?cluster=devnet
Extension: Non-Transferable (soul-bound)

spl-token create-token --program-2022 --enable-non-transferable
Enter fullscreen mode Exit fullscreen mode

I minted one token to myself and tried to send it to a fresh wallet. The runtime rejected me immediately:

Error: The transfer is disabled because this token is non-transferable
Enter fullscreen mode Exit fullscreen mode

That error is the feature. The non-transferable extension turns a fungible token into a soul-bound badge. Once it lands in your account, it stays there forever — no wallet, marketplace, or dApp can move it.

When to use: Certificates, credentials, achievement badges, identity attestations — anything where the holder should be the permanent owner.


What Surprised Me

The biggest surprise was that none of this required a custom smart contract. In Web2, every new behavior means a new API endpoint, a new database migration, a new cron job. On Solana with Token-2022, you flip a flag at creation time and the runtime does the rest — fees, interest, transfer restrictions, all composed from the same primitive.

The second surprise was the interest extension. I kept waiting for a "mint" transaction to appear, but there never was one. The balance just... drifted upward. It is the closest thing to a bank savings account I have seen on a blockchain, and it took one flag to enable.

If I were building a real product, I would reach for the transfer fee extension for a creator-owned token where every trade pays the treasury, and the non-transferable extension for on-chain credentials that prove attendance or completion without the risk of secondary sales.

Top comments (0)