SolstackBlog
← All guides

Token Creation & Minting

How to Add a Transfer Fee to Your Solana Token

How Token-2022's TransferFeeConfig extension withholds and collects a fee on-chain on every transfer, and what to decide before you set one.

2026-09-20·6 min read·Verified against mainnet-beta
How to Add a Transfer Fee to Your Solana Token

A transfer fee, sometimes called a "tax token" mechanic, takes a cut of every transfer and sends it somewhere the creator controls. Teams usually use it to fund liquidity, rewards or a treasury. On Solana this isn't tracked off-chain by the creator. It's a protocol extension, TransferFeeConfig, and the Token-2022 program enforces it.

How it works on-chain

TransferFeeConfig is set when the mint is created. It holds two numbers: a fee in basis points (1 bp = 0.01%) and an optional maximum fee per transfer, in the token's base units. From then on, every transfer through the Token-2022 program withholds that percentage. The sender does nothing different, and there's no way to transfer without paying it, because the program applies it inside the transfer instruction.

The part that surprises people is where the fee goes. The withheld amount doesn't go to a wallet. It builds up inside the recipient's own token account, in a separate withheld-amount field, until the holder of the withdraw authority runs a harvest instruction to sweep it out. Splitting it into two steps (withhold, then harvest) means the transfer instruction never has to know or trust an outside collection address.

The settings you choose

  • Fee in basis points. 100 bps is 1% of every transfer. Most tax tokens use somewhere between 1 and 5%. Higher fees discourage trading, because every hop costs more.
  • Maximum fee. A hard cap in base units, whatever the transfer size. Without a cap, one very large transfer can withhold a very large amount even at a modest rate.
  • Authorities. The fee authority can change the rate later. The withdraw authority can harvest and move the collected fees. They can be one key or two. With two keys, the person who can change the rate can't automatically take the money, which is a useful split on a team with several people.

What holders see

Everyone who receives the token gets a little less than the sender sent, on every transfer. That includes DEX swaps, because the token program applies the fee no matter which app calls the transfer. Tell your holders about it. An undisclosed transfer fee looks like a red flag, because every trade is worth less than the displayed price suggests. Token safety checkers flag live transfer-fee extensions for this reason.

Decide on the authorities before you mint

The rate and the collection are controlled by on-chain authorities, so this is a long-term decision, much like mint or freeze authority. Whoever holds the fee authority can change or remove the fee. If you want the fee fixed for good, plan to revoke or lock the fee authority once the rate is where you want it. If you expect to adjust it over time, for example starting high and lowering it as liquidity grows, keep the authority and say so publicly.

Building it

Solstack's Token-2022 Creator sets TransferFeeConfig in the same transaction that creates the mint. Enter the fee percentage and, if you want one, a maximum fee, and the fee applies from the token's first transfer. The Token-2022 Creator docs walk through it, including how it works alongside the other Token-2022 extensions.