SettleMint
ArchitectureComponentsToken Features

Transaction Fee Accounting

Tracks per-transaction fees for off-chain reconciliation without collecting them on-chain. Emits events for invoicing and reporting workflows. No holder economic impact.

Purpose: Transaction Fee Accounting records fee obligations per transaction without on-chain collection. Platforms use the emitted events for invoicing, reporting, or periodic settlement workflows.


Interface (capabilities)

This feature exposes the following capabilities. Unlike Transaction Fee, it tracks fee obligations without on-chain collection — platforms use emitted events for off-chain reconciliation.

CapabilityWho can callInputsOn-chain effectEmitsNotes
Record fee on operationAutomatic (hook)Triggered on mint, burn, transferIncrements accrued counter; no token movementFeeAccruedDoes not rewrite amounts
Reconcile accrued feesGOVERNANCE_ROLENoneResets accrued counter; closes accounting periodFeesReconciledOff-chain settlement trigger
Set fee ratesGOVERNANCE_ROLERates per operation type (bps)Updates fee rate configurationFeeRatesUpdatedBlocked after freeze
Set fee recipientGOVERNANCE_ROLERecipient addressRedirects future reconciliation targetFeeRecipientUpdatedEffective immediately
Set fee exemptionGOVERNANCE_ROLEAccount address + exempt flagMarks address as exempt from trackingFeeExemptionSetFor system addresses
Freeze fee ratesGOVERNANCE_ROLENonePermanently locks all ratesFeeRatesFrozenIrreversible

Business impact

  • Holders: No on-chain economic impact — fees are tracked, not collected. Token amounts are not rewritten.
  • Issuer / platform: Fee obligations accumulate off-chain; platform must run a reconciliation workflow to actually collect.
  • Economics: Decouples fee obligation recording from settlement. Enables periodic bulk invoicing rather than per-transaction collection.

Risks & abuse cases

  • Reconciliation drift: If reconcileFees() is not called on schedule, accrued fee obligations grow without bound in accounting records. Platforms must maintain a disciplined reconciliation cadence.
  • Exemption scope creep: setFeeExemption() can exempt specific addresses from fee tracking. If over-used, fee accounting becomes incomplete.
  • No on-chain enforcement: Fee obligations are advisory. Off-chain systems must act on emitted events to collect. There is no automatic enforcement mechanism.

Controls & guardrails

RoleActionsRecommended guardrail
GOVERNANCE_ROLEsetFeeRates() — set fee rates per operation typeDocument rates and lock via process; no on-chain freeze available
GOVERNANCE_ROLEreconcileFees() — mark fees as reconciled for an address/periodAutomate via scheduled off-chain job
GOVERNANCE_ROLEsetFeeExemption(address, exempt) — exempt specific addressesAudit exemption list; restrict exemptions to system addresses only

Failure modes & edge cases

  • Accounting without collection: Recorded obligations that are never settled create audit discrepancies. Establish a settlement SLA.
  • Rate changes mid-period: If fee rates change during a billing period, events reflect the rate at the time of the transaction. Off-chain systems must handle rate changes in reconciliation logic.
  • High event volume: High-frequency tokens produce large event logs. Ensure off-chain indexing infrastructure handles the volume.

Auditability & operational signals

  • FeeAccrued(from, to, amount, fee, operationType) — emitted per tracked transaction. Primary signal for off-chain reconciliation.
  • FeesReconciled(address, period, amount) — emitted when reconcileFees() is called. Confirms settlement.
  • FeeExemptionSet(address, exempt) — emitted when exemption status changes.

Dependencies

  • No external ERC-20 required.
  • No other features required.
  • Off-chain reconciliation infrastructure required (indexer, invoicing system, or subgraph).

Compatibility & ordering notes

  • supportsRewriting = false — does not modify transfer amounts. Safe to run at any position.
  • Compatible with Transaction Fee (different collection mechanisms; can run both to track and collect simultaneously).
  • Compatible with all other features — no ordering constraints.

Change impact

  • Enable after launch: Historical transactions before activation are not retroactively tracked.
  • Disable: In-progress uncollected obligations remain in off-chain records. Reconcile before disabling.
  • Rate change: Effective immediately. Off-chain systems must handle rate history for correct reconciliation.

See also

On this page