Skip to content
SOLTidy

How to set and claim Token-2022 transfer fees on Solana

How Token-2022 transfer fees work for creators: set basis points and a maximum fee, then harvest withheld fees to the mint and withdraw them. Costs and timing.

Cover image for How to set and claim Token-2022 transfer fees on Solana
By 8 min read 1682 words

Key takeaways

  • A Token-2022 transfer fee is set in basis points with a maximum fee per transfer, and the token program withholds it from the amount the recipient receives on every transfer.
  • Token-2022 transfer fees are not sent to the creator; they sit as a withheld amount inside each recipient's token account until someone harvests them to the mint.
  • Harvesting Token-2022 withheld fees to the mint is permissionless, but only the withdraw-withheld authority can withdraw them from the mint to a wallet.
  • A Token-2022 transfer fee change takes effect at the start of the second epoch after it is set, which was roughly 32 to 64 hours at the 1.34-day epoch length measured on 5 October 2026.
  • Raydium CPMM and CLMM and Orca Whirlpools support Token-2022 transfer fee mints, while Raydium's older AMM v4 does not support Token-2022 at all.

The short answer

A Token-2022 transfer fee is a rate in basis points plus a maximum fee per transfer, set when the mint is created. On every transfer the token program withholds the fee inside the recipient's token account; nothing reaches you automatically. To get paid you harvest the withheld amounts into the mint, which anyone can do, then withdraw them with the withdraw-withheld authority. A rate change waits until the second epoch after you make it, about 32 to 64 hours at October 2026 epoch lengths.

How does the Token-2022 transfer fee extension work?

The transfer fee extension makes the token program itself charge a fee on every transfer of your token, regardless of which wallet, DEX or contract moves it. It is the TransferFeeConfig extension of the Token-2022 program, and it stores four things on the mint: the fee in basis points, the maximum fee per transfer, the transfer fee config authority and the withdraw-withheld authority.

On each transfer the program calculates:

fee = min(ceil(amount × basis points ÷ 10,000), maximum fee)

The sender spends the full amount, the recipient's balance rises by the amount minus the fee, and the fee is recorded as a withheld amount in the recipient's token account. Transfers must use TransferChecked or TransferCheckedWithFee; the latter makes the caller state the expected fee and fails if it does not match, which protects integrators against a surprise rate.

Two constraints decide everything else:

  • It must be chosen at creation. InitializeTransferFeeConfig has to run before InitializeMint, in the same transaction that creates the account. You cannot add a fee to an existing token, and classic SPL Token mints cannot have one.
  • The fee is in your token, never SOL. A 2% fee on 1,000 tokens leaves 20 of your tokens withheld, not 2% of their value in SOL.

The trader's view of the same extension, including why it shows up on rug checkers, is in Token-2022 explained for traders. This post is the creator's side.

How should you choose the basis points and maximum fee?

Choose the rate for what your token is for, and use the maximum fee to keep large transfers sane. One basis point is 0.01%, so 100 basis points is 1% and 10,000 is 100%. The maximum fee is stored in the token's smallest unit, so with 6 decimals a 500-token cap is stored as 500,000,000.

What a 1% fee with a 500-token cap does to different transfer sizes:

Transfer amountFee at 1%Fee withheld with a 500-token capRecipient receives
1,000 tokens1010990
10,000 tokens1001009,900
50,000 tokens50050049,500
1,000,000 tokens10,000500999,500

A few practical points from building the tool:

  1. Keep the rate low. Every buy and every sell pays it, and liquidity providers pay it on deposits and withdrawals too. Screeners flag fees above a few percent, and round trips at high rates are unprofitable for traders by construction.
  2. Use a cap if large holders or exchanges will move the token. A treasury transfer of 10 million tokens at 1% would otherwise withhold 100,000.
  3. Leave the cap at the maximum if you want the percentage to always apply. "No cap" is stored as the largest 64-bit value.
  4. Decide the authorities before you sign. They are the real trust question, covered next.

Who controls the fee: which authorities exist?

Two separate authorities control a transfer fee mint, and each can be a wallet, a multisig or none.

AuthorityWhat it can doIf set to none
Transfer fee config authorityChange the basis points and maximum fee with SetTransferFeeThe fee is fixed forever
Withdraw-withheld authorityWithdraw harvested fees from the mint, or directly from token accountsCollected fees can never be withdrawn, which works as a burn on transfer

These sit alongside the usual mint and freeze authorities, which work exactly as on the classic program; mint authority vs freeze authority covers those. Buyers check the transfer fee config authority first, because an active one means the rate can be raised later.

How do you claim the fees your token has collected?

You claim transfer fees in two steps: harvest the withheld amounts into the mint, then withdraw them from the mint to your own token account. Step by step:

  1. Find the accounts holding fees. Every token account of the mint has a withheld amount. Buys withhold the fee in the buyer's account; sells withhold it in the pool's vault, so pool vaults typically hold some of the largest balances.
  2. Harvest to the mint. HarvestWithheldTokensToMint moves withheld amounts from a list of token accounts into a withheld total on the mint. It is permissionless, because it can only move fees toward the mint.
  3. Withdraw from the mint. WithdrawWithheldTokensFromMint sends the mint's withheld total to a token account you choose, and only the withdraw-withheld authority can sign it.
  4. Or withdraw directly. WithdrawWithheldTokensFromAccounts lets the authority pull from token accounts in one step, but every batch needs the authority's signature, so harvesting is usually more convenient.

Harvesting also helps your holders: a Token-2022 account cannot be closed while it holds withheld fees, even with a zero balance, so regular harvests let people close empty accounts and get their rent back. Holders can also harvest their own account as part of the close; spl-token close does it automatically, as covered in closing Solana token accounts with the CLI.

From a terminal, the spl-token CLI covers all of this for free apart from network fees, with commands such as spl-token withdraw-withheld-tokens and spl-token set-transfer-fee; the Solana docs describe the extension and its instructions. If you prefer a browser, I built Claim Transfer Fees for exactly this job. Paste the mint and it scans every token account, decodes each withheld amount and shows the total, the number of accounts holding fees and the amount already on the mint, all without a wallet. Connect the wallet that holds the withdraw-withheld authority and Harvest + withdraw packs up to 25 accounts per transaction, largest first, and sends everything on the mint to your associated token account, creating it for about 0.0015 SOL of rent if needed. It charges a flat 0.02 SOL per transaction; viewing is free. For a mint with thousands of tiny dust accounts, harvesting the largest 100 usually captures most of the value.

How long does it take to change the transfer fee?

A new rate becomes active at the start of the second epoch after you set it, so it always waits between one and two full epochs. SetTransferFee writes a "newer" fee next to the "older" one, and the mint applies whichever is in force for the current epoch.

In wall-clock terms that depends on epoch length, which has varied over Solana's history. An epoch is 432,000 slots. I measured the last two complete epochs on 5 October 2026 at about 115,500 seconds each, roughly 1.34 days, so a change made that day would have activated about 32 to 64 hours later. Tell holders by the activation epoch, which is stored on the mint, rather than by a number of days.

The delay is a protection for holders, but it does not protect a quote in flight. Raydium's documentation notes that its slippage check runs on the gross amount the pool sends, before the outbound transfer fee, so a rate that changes between quote and execution reduces what the trader receives. If you change the fee, announce it well before the activation epoch.

Will DEXes and wallets accept a transfer fee token?

Most major Solana venues accept transfer fee tokens, but not every pool type does. At the time of writing, in October 2026:

VenueTransfer fee mints
Raydium CPMMSupported; the pool works on the amount its vault actually receives
Raydium CLMMSupported through its SwapV2 instruction
Raydium AMM v4Not supported; AMM v4 does not support Token-2022 at all
Orca WhirlpoolsTransferFee is listed as supported without a Token Badge
JupiterRoutes through venues that support the token; quotes are meant to be net of the fee, though adapter bugs that overstated output have been reported

Wallets such as Phantom and Solflare display and send Token-2022 tokens, but how prominently they show the fee varies. Some trading bots and aggregators skip fee tokens entirely. Expect slippage errors from traders who set a tolerance below your fee, and say the rate clearly wherever you list the token.

Run your own mint through the free Rug Check before launch to see what buyers will see: it flags transfer fees and scores them by the rate and whether the config authority is still active.

What does it cost to launch a transfer fee token?

Creating a fee token costs Solana rent for the mint and your token account, plus any tool fee. With the Tax Token Creator, the SOLTidy fee is a flat 0.15 SOL and the network rent is about 0.005 SOL, roughly 0.0031 SOL for the 346-byte mint with metadata and 0.0016 SOL for your token account. Revoking the mint authority in the same transaction adds 0.02 SOL. It creates the mint with the fee extension, on-chain metadata and your full supply in one transaction, and lets you set either fee authority to none. The spl-token CLI does the same for network costs only if you are comfortable with it. The cost of a classic token for comparison is in how much it costs to create a Solana token, and the full sequence of launch steps is in how to launch a Solana token.

If you plan to share collected fees with holders, the free Holder Snapshot exports every holder of a Token-2022 mint, and the Multisender (0.0005 SOL per recipient) sends the payout, warning when recipients will receive less because of your own fee.

Bottom line

A Token-2022 transfer fee is set once, as basis points and a cap, in the transaction that creates the mint. The fees never arrive on their own: they are withheld in every recipient's account until someone harvests them to the mint and the withdraw-withheld authority withdraws them. Keep the rate low, decide deliberately whether to keep or give up each authority, announce any change before its activation epoch, and harvest regularly so holders can close their accounts. Holders who want their rent back after a harvest can reclaim SOL from those empty accounts in one scan.

Questions & answers

How do I add a transfer fee to an existing Solana token?

You cannot. The transfer fee extension has to be initialized on the mint before the mint itself is initialized, in the same transaction that creates the account, and classic SPL Token mints cannot carry it at all. To launch a fee token you create a new Token-2022 mint with the TransferFeeConfig extension. Only the rate and cap of an existing fee mint can change later, and only if its fee config authority is still active.

Why am I not receiving the transfer fees from my token?

Because Token-2022 never sends them to you automatically. Each transfer withholds the fee inside the recipient's token account. You collect it in two steps: harvest the withheld amounts from token accounts into the mint, which anyone can do, then withdraw from the mint to your token account, which requires the withdraw-withheld authority's signature. Until then the fees only appear as withheld fields on holder accounts.

How is the Token-2022 transfer fee calculated?

The fee is the transfer amount times the basis points divided by 10,000, rounded up, and then capped at the maximum fee. With 100 basis points (1%) and a 500-token cap, a 10,000-token transfer withholds 100 tokens and a 1,000,000-token transfer withholds 500. The sender spends the full amount; the recipient receives the amount minus the fee.

How long does it take to change a Token-2022 transfer fee?

A new rate set with SetTransferFee becomes active at the start of the second epoch after the current one, so it waits between one and two full epochs. Epochs are 432,000 slots; on 5 October 2026 one took about 1.34 days, so the delay was roughly 32 to 64 hours. Holders can see the pending fee and its activation epoch on the mint the whole time.

What happens if I set the withdraw-withheld authority to none?

Nobody can ever withdraw the collected fees. They can still be harvested into the mint, but they stay there permanently, which works as a burn on every transfer. It is a common choice for tokens that want a deflationary fee without the suspicion that the team is skimming trades. The decision cannot be reversed, because no one is left to set a new authority.

How much does it cost to claim Token-2022 transfer fees?

On the network, only transaction fees and, once, about 0.0015 SOL of rent if your token account for the mint does not exist yet. With the spl-token CLI that is all you pay. SOLTidy's Claim Transfer Fees tool charges a flat 0.02 SOL per transaction, and each transaction harvests up to 25 accounts before withdrawing everything on the mint to your wallet.