All tools / Mint

Token-2022 fee cap calculator

Compute the exact Token-2022 transfer fee with round-up and the maximumFee cap, from a mint or by hand.

Exact math

fee = ceil(amount × bps ÷ 10000), then capped at maximumFee; the recipient gets amount − fee. With a mint, the epoch-active bps and cap are read from transferFeeConfig. The simpler tax decoder floors and ignores the cap.