SettleMint
ArchitectureComponentsToken Features

Transaction Fee

Per-transaction fee deducted from transfer amounts on every mint, burn, or transfer. Uses supportsRewriting to reduce the amount in-flight before compliance checks and recipient receipt.

Purpose: Transaction Fee deducts a per-transaction fee from every mint, burn, or transfer by rewriting the transfer amount in-flight. The recipient receives amount - fee; the fee goes to a configured recipient.


Interface (capabilities)

This feature exposes the following capabilities. It is a rewriting feature — it modifies the transfer amount in-flight, so the recipient receives the post-fee amount.

CapabilityWho can callInputsOn-chain effectEmitsNotes
Deduct fee on operationAutomatic (hook)Triggered on mint, burn, transferRewrites amount; routes fee to recipientTransactionFeeCollectedsupportsRewriting = true
Set fee ratesGOVERNANCE_ROLERates per operation type (mint, burn, transfer in bps)Updates fee rate configurationFeeRatesUpdatedBlocked after freeze
Set fee recipientGOVERNANCE_ROLERecipient addressRedirects future fee collectionFeeRecipientUpdatedEffective immediately
Freeze fee ratesGOVERNANCE_ROLENonePermanently locks all ratesFeeRatesFrozenIrreversible

Business impact

  • Holders: Net-based fee — holders receive less than the face amount of a transfer. Senders initiate transfers for gross amount; recipients receive net.
  • Issuer / recipient: Fee collected in the token itself to configured feeRecipient.
  • Economics: Deducted on every operation (mint, burn, transfer). Fee rates can differ per operation type.

Risks & abuse cases

  • Compliance module ordering risk: Because supportsRewriting = true, the amount is rewritten before compliance modules run their checks. A compliance module checking minimum transfer amounts will see the post-fee (reduced) amount. Coordinate fee rates and compliance thresholds.
  • Rate freeze timing: Leaving freezeFeeRates() uncalled allows GOVERNANCE_ROLE to raise rates after deployment. Call at launch.
  • High-frequency fee accumulation: Platforms with high transaction volume should monitor fee recipient balance; unexpected recipient addresses can drain value.

Controls & guardrails

RoleActionsRecommended guardrail
GOVERNANCE_ROLEsetFeeRates() — set fee rates per operationCall freezeFeeRates() after launch
GOVERNANCE_ROLEsetFeeRecipient() — set fee destinationMulti-sig; audit all changes
GOVERNANCE_ROLEfreezeFeeRates() — lock rates permanentlyCall at launch

Failure modes & edge cases

  • Zero-amount transfer after fee: If fee equals the full transfer amount, the recipient receives zero tokens and the fee recipient receives the full amount. No revert — check minimum transfer amounts in compliance modules.
  • Fee on minting: Minting to a holder results in holder receiving amount - mint_fee. If mint semantics require exact amounts, account for the fee in the mint call.

Auditability & operational signals

  • TransactionFeeCollected(from, to, amount, fee, recipient) — emitted per transaction. Use for reconciliation and monitoring.
  • FeeRatesUpdated(sender, mintRate, burnRate, transferRate) — emitted on rate changes.
  • FeeRatesFrozen(sender) — emitted once on freeze.

Dependencies

  • No external ERC-20 required — fee paid in the token itself.
  • supportsRewriting = true — interacts with the amount-rewriting pipeline. Must run before analytics features.

Compatibility & ordering notes

  • Must run before: Historical Balances, Voting Power (analytics hooks must see post-fee amounts).
  • Compliance module interaction: Compliance checks receive the post-rewrite amount. If any module enforces minimum amounts, ensure thresholds account for maximum fee rates.
  • Compatible with AUM Fee (both collect in-token; order doesn't matter between them, but both before analytics).
  • Compatible with External Transaction Fee (two separate fee mechanisms; External runs after).

Change impact

  • Enable after launch: Only applies to transactions from activation point forward.
  • Disable: No retroactive effect. In-flight transactions complete at old rate.
  • Rate change before freeze: Effective immediately on next transaction.
  • Recipient change: Effective immediately for all future collections.

See also

On this page