Skip to content

Solana Transfer Fee Extension: How Tax Tokens Work

Sanket DalviUpdated Nov 21, 20267 min read

Solana transfer fee extension: how tax tokens work

A Token-2022 transfer fee stays withheld on the account that receives the tokens until it is collected, as the Solana token program docs explain. It never goes straight to the creator's wallet.

The transfer fee extension on a Solana token's mint sets a rate in basis points (100 bp = 1%), with an optional cap in tokens. It works in 3 steps:

  1. The creator sets the rate and cap on the mint, for example with Tokenry's Solana tax token creator.
  2. Every transfer, buys and sells included, pays it.
  3. Only the withdraw withheld authority can collect it.

How the Token-2022 transfer fee is calculated

A Token-2022 transfer fee is one rate that applies to every transfer of the token. The rate is set in basis points: 1 bp is 0.01%, so the program divides the rate by 10,000. The token program source allows up to 10,000 bp, which is 100% of every transfer. The maximum fee is optional, and it is a fixed number of tokens per transfer.

The program takes whichever is smaller, the rate or the cap:

Transfer fee = the smaller of (amount × rate in basis points ÷ 10,000, rounded up) and the maximum fee

For example, with a 1% rate, a transfer of 1,000 tokens withholds 10 tokens, and 990 arrive. Add a cap of 9 tokens and the same transfer withholds 9, so 991 arrive.

The sender pays: the sender's balance drops by the full amount, and the recipient receives the amount minus the fee.

Once a transfer reaches the cap, the fee stops growing, so on very large transfers the real rate falls toward zero. Here is a 2% rate with a 5,000-token cap:

Tokens sentFee withheldReal rate
10,0002002%
100,0002,0002%
1,000,0005,000 (cap reached)0.5%

Where the fee goes: withheld on each token account

The fee stays on the receiving token account as a withheld amount. The recipient cannot spend it, and it does not count in the spendable balance. A creator who checks their wallet after the first trades will see no tax there yet.

Solana uses this design for speed. With one central fee account, every transfer of the token would wait on that account. Spreading the fee across holder accounts lets transfers run in parallel.

Because there is no central fee wallet, collecting means finding every holder account with withheld fees. There are two ways to do it:

  • Withdraw from accounts: the withdraw withheld authority moves fees straight from holder accounts to any account it chooses.
  • Harvest, then withdraw: anyone can harvest withheld fees from holder accounts into the mint account. Then the withdraw withheld authority withdraws fees from the mint.

Moving fees out of holder accounts or out of the mint always needs the withdraw withheld authority. The authority that sets the rate cannot move fees.

For holders, withheld fees matter when they close an account. An empty token account that still holds withheld fees cannot be closed until those fees are harvested. The holder can harvest them to the mint and then close the account.

Withheld fees do not expire. They stay on the accounts, or in the mint after a harvest, until the withdraw withheld authority withdraws them.

Who can change or collect the fee

A transfer fee mint has two roles. Both are separate from the mint authority (one wallet can hold more than one role), and both are set when the mint is created.

RoleWhat it can doIf it is removed
Transfer fee config authorityChange the rate and the maximum feeNobody can change the rate or cap again
Withdraw withheld authorityWithdraw withheld fees from holder accounts or the mintNobody can withdraw the withheld fees

A rate change does not apply at once. The token program code sets a new fee to take effect two epochs after it is set. The program keeps the older and the newer fee, each with the epoch it starts in, and switches to the newer one at that epoch, so holders get notice before any change.

Because of this delay, you cannot launch with a very high fee for the first minutes of trading and lower it right after. The lower rate would only start two epochs later.

If the transfer fee config authority is removed, the rate and cap are fixed for good. Tokenry's "Lock tax rate" option makes the rate permanent.

Only the withdraw withheld authority can move the withheld fees, so if that wallet's key is lost, the fees stay where they are.

Transfer fees in swaps and liquidity pools

The token program itself charges the fee, so it applies to every transfer, wallet to wallet included, and there is no exempt list. Sending the token through another program does not avoid it.

A swap pays the fee on the way in and on the way out. A buy is a transfer from the pool to the buyer, and a sell is a transfer from the seller to the pool. The Raydium transfer fee docs give a worked swap: 1,000 tokens go in with a 1% fee, 10 are withheld, and 990 reach the pool vault before the pool's own 0.25% trade fee comes off. A route through several pools pays the fee each time this token moves.

Some quotes show the amount before the token's fee. Raydium checks slippage against what the pool sends out, before the transfer fee, so what lands in your wallet can be a little below "minimum received".

Not every pool type takes these tokens. From each DEX's own docs:

DEX and pool typeTransfer fee tokensNote
Raydium CPMMSupported
Raydium CLMMSupported
Raydium AMM v4Not supportedNo Token-2022 support
Meteora DLMMSupported[Meteora's Token-2022 page](https://docs.meteora.ag/core-products/dlmm/token-2022-support) lists transfer fees as allowed, but a mint that keeps a freeze authority is not accepted without review
Orca WhirlpoolsSupported[Orca's extension docs](https://docs.orca.so/create/pools/extensions) require a token badge for a mint with a freeze authority

Before you pool on Meteora DLMM or Orca, revoke the freeze authority, or the token goes to review or is rejected.

Your own pool deposit is a transfer too. When you seed a pool, the vault receives the amount minus the fee, so add the fee when you size the deposit.

Apps and exchanges need Token-2022 support to move the token. An app built only for classic SPL tokens may not handle it, or may expect the full amount to arrive.

Transfer fee vs EVM tax vs transfer hook

An EVM tax token, the kind Tokenry's EVM token creator makes, works differently from Solana's transfer fee:

Transfer fee extensionEVM tax token (Tokenry's EVM creator)
Where it livesIn the Token-2022 program, set on the mintIn the token's own contract
Buys vs sellsOne rate for every transferBuy, sell and transfer taxes set separately
Changes the amount receivedYes, the fee is withheldYes, a share of the taxed trade or transfer is taken
How fees are collectedWithdrawn by the withdraw withheld authoritySent to fee wallets, burned or added to liquidity

A transfer hook is a different Token-2022 extension and charges no fee. The mint points to a separate program, and Token-2022 calls that program after the transfer logic. For the wider picture of what Token-2022 adds, see SPL Token vs Token-2022.

Choosing a rate, a cap and whether to lock

You set the transfer fee when you create the mint, so decide these three things first:

ChoiceWhat to weigh
RateTokenry's form takes 0.01% to 10%, in steps of 0.01%. Traders pay on the buy and again on the sell, so a 5% rate costs a round trip almost 10%, and a high rate cuts volume.
CapSet in tokens, not percent. A cap protects large wallets and your own pool moves. A cap that is too low makes big trades almost free of the tax.
Lock now or laterLocking is permanent, and holders can see that a locked rate will never rise. An unlocked rate lets you adjust it later, with two epochs' notice.

You can keep the collected fees as project income, or withdraw them and burn them with the token burner.

What to check before you buy a token with a transfer fee

You can look up the mint on a Solana explorer before buying. A token with a transfer fee is a Token-2022 mint, and its transfer fee config holds every setting that matters:

  1. Current and next rate: the older and the newer fee, with the epoch each one starts in.
  2. The maximum fee: a missing or high cap with a high rate takes a large share of every sell.
  3. The transfer fee config authority: if one is still set, it can raise the rate, up to 100%, with two epochs' notice.
  4. The withdraw withheld authority: the wallet that collects the fees.

For other checks on a new token, see how to spot a rug pull.

Create and collect a transfer fee without code

The Solana tax token creator sets the rate, the cap, the collector wallet and the rate lock in one form. The collector is your connected wallet unless you set another. After launch, Solana Claim Tax scans every holder account and collects the withheld tax to your wallet. It handles many accounts per transaction with one approval, and it can sell part of the tax for SOL in the same flow. Tokenry is non-custodial: you sign every transaction in your own wallet.

What it costs:

ItemCost
Tax token creator service fee0.25 SOL
Rent and network fees at creationabout 0.005 to 0.006 SOL
Revokes and rate lock at creationFree
Claim Tax scanFree
Claim Tax, per claim run0.03 SOL plus network fees
Locking the rate later, on Claim Tax0.05 SOL

Developers who already work with the Token-2022 command line tool or SDK, or who want other extensions on the same mint, can add the transfer fee in code. The Solana token program docs include command line examples for the transfer fee.

Next steps: revoke the freeze authority, then create a liquidity pool.

Do it with Tokenry

0.15 SOL Tokenry fee, plus a small network rent

FAQ

Frequently asked questions

Something not covered here? Contact support.

Is a Token-2022 transfer fee the same as Solana's network fee?

No. Solana's network fee is paid in SOL for every transaction. The transfer fee is paid in the token itself and is withheld for the withdraw withheld authority to collect.

Who pays the transfer fee, the sender or the receiver?

The sender's balance drops by the full amount sent. The receiver gets that amount minus the fee.

Can the creator raise the transfer fee after launch?

Yes, if the transfer fee config authority is still set. The program allows up to 100%, and a new rate starts two epochs after it is set. Once the rate is locked, nobody can change it.

How often can I withdraw transfer fees?

Any time. Each withdrawal is a transaction signed by the withdraw withheld authority.

Are transfer fee withdrawals visible on-chain?

Yes. Each withdrawal is a public transaction that anyone can see on a Solana explorer.

Can I burn the fees I collect?

Yes. Once withdrawn, the fees are ordinary tokens in your wallet, and you can burn them like any other tokens.