How the fee works
Token-2022 can charge a fee on each transfer. You set:
- Fee in basis points. 100 basis points is 1%.
- Maximum fee. A cap per transfer, in token units.
- Authorities. One can change the fee, and one can withdraw what has been collected.
The fee is withheld in the receiving token account. It is not paid straight to you. See how to collect Token-2022 transfer fees.
Steps
- Create the mint on the Token-2022 program (
spl-token create-token --program-2022on the CLI, or a creator tool that supports transfer fees). - Set the fee, the maximum fee and the two authorities.
- Add metadata and mint your supply.
- Create a pool and test with small buys and sells.
Know the limits
- Changing the fee takes effect only after a delay of about two epochs, so a fee increase cannot happen instantly.
- Not every exchange, aggregator or wallet handles every Token-2022 extension. Test before you promise trading.
- Buyers and rug checkers read the fee settings. A high fee or live authorities will be noticed.
Compare tools on the token creators page and the Token-2022 tools page.
