SettleMint
ArchitectureComponentsToken Features

External Transaction Fee

Fixed fee in a separate ERC-20 token (e.g., USDC) charged on every mint, burn, or transfer. Fee is collected from the payer's allowance separately from the transferred amount.

Purpose: External Transaction Fee charges a fixed fee in a separate ERC-20 token (e.g., USDC) on every token operation. The fee is collected separately from the transferred amount — the full token amount is transferred plus an additional fee in the external token.


Interface (capabilities)

This feature exposes the following capabilities. Fees are denominated in a separate ERC-20 token (e.g., USDC) and collected from the payer's allowance — the transferred token amount is not reduced.

CapabilityWho can callInputsOn-chain effectEmitsNotes
Collect external fee on operationAutomatic (hook)Triggered on mint, burn, transferTransfers fee token from payer to recipientExternalFeeCollectedPayer must have approved fee token
Set fee amountsGOVERNANCE_ROLEFixed amounts per operation typeUpdates fee amountsFeesUpdatedBlocked after freeze
Set fee tokenGOVERNANCE_ROLEERC-20 token addressChanges fee denomination tokenFeeTokenUpdatedAll payers must re-approve new token
Set fee recipientGOVERNANCE_ROLERecipient addressRedirects future collectionsFeeRecipientUpdatedEffective immediately
Freeze feesGOVERNANCE_ROLENonePermanently locks configurationFeesFrozenIrreversible

Business impact

  • Holders / payers: Gross-based — payer must hold both the token being transferred AND sufficient balance of the fee ERC-20 token with sufficient allowance to the fee contract. Every operation has an additional cost denominated in the external token.
  • Issuer / recipient: Fee collected in a stable or known ERC-20 asset, enabling predictable fee revenue independent of the token's own price.
  • Economics: Decouples fee economics from the token's own value. Useful when fees must be denominated in a stable asset.

Risks & abuse cases

  • Transaction revert on insufficient allowance: If the payer's external ERC-20 allowance is insufficient, the entire transaction reverts. Holders who have not approved the fee token will not be able to transfer.
  • Fee token price risk: If the external fee token (e.g., a non-stable ERC-20) appreciates significantly, fee burden on payers may become prohibitive.
  • Fee lock-in after freeze: Calling freezeFees() locks fee amounts permanently. Ensure fee levels are correct before freezing.

Controls & guardrails

RoleActionsRecommended guardrail
GOVERNANCE_ROLEsetFees() — set fee amounts per operationCall freezeFees() after launch to lock
GOVERNANCE_ROLEsetFeeToken() — set the external ERC-20 fee tokenAudit carefully — changing fee token changes holder obligations
GOVERNANCE_ROLEsetFeeRecipient() — set collection destinationMulti-sig controlled
GOVERNANCE_ROLEfreezeFees() — lock fee configuration permanentlyCall at launch

Failure modes & edge cases

  • No allowance: Payer with zero allowance on the fee token will see every transfer revert. Onboarding flows must prompt users to approve the fee token.
  • Fee token contract failure: If the external ERC-20 contract is paused or fails, all token operations that trigger the fee hook will revert. Choose a battle-tested, non-upgradeable fee token.
  • Fee token address change: Changing feeToken mid-deployment requires all payers to re-approve the new token. Coordinate with holder communication.

Auditability & operational signals

  • ExternalFeeCollected(payer, feeToken, feeAmount, recipient) — emitted per operation. Use for fee revenue tracking.
  • FeesUpdated(sender, feeToken, amounts, recipient) — emitted on configuration changes.
  • FeesFrozen(sender) — emitted once on freeze.

Dependencies

  • External ERC-20 token contract — must be deployed and accessible. Payers must hold this token and approve the fee contract.
  • Payer must have granted allowance to the feature contract before any transfer.

Compatibility & ordering notes

  • supportsRewriting = false — does not modify the token transfer amount.
  • Order after Transaction Fee in the feature array (Transaction Fee rewrites the amount; External Transaction Fee collects separately and independently).
  • Compatible with compliance modules — runs after compliance checks on the token amount.
  • Compatible with all other features.

Change impact

  • Enable after launch: Immediately applies to all subsequent operations. Existing holders must approve the fee token before their next transfer.
  • Disable: No retroactive effect. Payer approvals on the fee token contract remain but become unused.
  • Fee amount change (pre-freeze): Effective immediately for all subsequent operations.
  • Fee token change: All payers must re-approve the new token address.

See also

On this page