SettleMint
ComponentsToken Features

External Transaction Fee

Fixed mint, burn, and transfer fees collected in a separate ERC-20 token. Covers fee token approvals, governance controls, freeze behavior, and operational failure modes.

External Transaction Fee collects a fixed ERC-20 fee whenever the asset token is minted, burned, or transferred. Use External Transaction Fee when the programme charges in a separate asset, such as a stable fee token, and the transferred asset amount must stay unchanged. The payer needs enough of the configured fee token. The payer must also approve the feature contract before the operation can complete.

Operating model

Rendering diagram...

The fee hook is gross based. It adds a separate ERC-20 transfer on top of the asset operation instead of rewriting the asset amount.

To see the feature work end to end, configure a non-zero fee, fund the payer with the fee token, approve the feature contract, and run a mint, burn, or transfer that triggers the hook. A successful operation keeps the asset amount intact and emits ExternalFeeCollected for the separate fee payment.

Interface

Fees are denominated in the configured fee token and collected from the payer's allowance.

CapabilityWho can callInputsOn-chain effectEmitsNotes
Collect external fee on operationAutomatic hookTriggered on mint, burn, transferTransfers fee token from payer to recipientExternalFeeCollectedPayer must have approved fee token
Set fee amountsGOVERNANCE_ROLEFixed mint, burn, and transfer fees in the fee token's smallest unitUpdates 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

What payers must prepare

A payer needs three things before an operation that triggers the feature:

  1. The asset token being minted, burned, or transferred, when the operation requires an asset balance.
  2. Enough balance of the configured external fee token.
  3. Enough allowance from the fee token to the External Transaction Fee feature contract.

The DALP dapp shows the payer's fee token balance and allowance in the mint, burn, and transfer sheets. The readiness panel compares both values with the fee required for that operation, including repeated charged rows in a batch submission.

Amount units

Configure mint, burn, and transfer fees in the external fee token, not in the asset token. For API calls, submit the raw smallest-unit amount for the configured fee token. In the dapp, the fee-setting form reads the fee token and scales the entered value with that token's decimals before submission.

If governance changes the fee token, review the configured fee amounts before operating the asset again. The same displayed amount can map to a different raw value when the new fee token uses different decimals.

Governance controls

ControlEffectProduction check
setFees()Updates mint, burn, and transfer fee amountsConfirm the values are expressed in the fee token's smallest unit
setFeeToken()Changes the ERC-20 token used for fee paymentsCommunicate the new token and require fresh payer approvals
setFeeRecipient()Changes the destination for future fee collectionsKeep the recipient under an approved treasury or multisig policy
freezeFees()Permanently locks fee amounts, token, and recipientFreeze only after the launch configuration is final

All four governance actions are unavailable after the fee configuration is frozen. The dapp disables the actions when the connected wallet lacks the governance role or when the feature is already frozen.

Operational impact

  • Holders and payers: Every covered operation has an additional ERC-20 cost. The operation reverts if the payer lacks fee token balance or allowance.
  • Issuer or recipient: Fee revenue is collected in the configured ERC-20 token, which can be a stable asset when the programme needs predictable fee denomination.
  • Economics: External fees keep the gross asset amount intact. Use this feature when the fee should not be taken out of the transferred asset itself.

Failure modes and edge cases

ConditionResultOperator response
Payer has no fee token allowanceThe mint, burn, or transfer revertsPrompt the payer to approve the fee token for the feature contract
Payer has too little fee token balanceThe operation revertsFund the payer wallet or lower the fee before freeze
Fee token contract pauses or failsCovered token operations can revertUse a reliable ERC-20 fee token and monitor token contract health
Governance changes the fee tokenExisting payer approvals stop applyingTell payers to approve the new fee token before their next operation
Governance freezes the configurationFee amounts, recipient, and fee token can no longer changeTreat freeze as a launch control, not as a routine update

Auditability and operational signals

  • ExternalFeeCollected(from, feeToken, feeAmount, operationType): emitted for each collected external fee.
  • FeesUpdated(sender, mintFee, burnFee, transferFee): emitted when governance changes fee amounts.
  • FeeTokenUpdated(sender, oldToken, newToken): emitted when governance changes the fee token.
  • FeeRecipientUpdated(sender, oldRecipient, newRecipient): emitted when governance changes the recipient.
  • FeesFrozen(sender): emitted when governance freezes the configuration.

Fee totals shown for the active fee token are cumulative for that fee token. If governance changes the fee token and later switches back, the displayed total for the restored token includes fees collected before the earlier change. A fee token that has not collected fees yet starts at zero.

Compatibility notes

  • External Transaction Fee does not rewrite the asset transfer amount.
  • When the asset also uses Transaction Fee, place Transaction Fee before External Transaction Fee. Transaction Fee rewrites the asset amount. External Transaction Fee collects a separate fee token.
  • Compliance checks still evaluate the asset amount. The external fee collection is a separate ERC-20 movement.
  • The feature can be attached through the configurable-token feature route when the asset supports feature attachment.

API surfaces

DALP exposes the External Transaction Fee controls through token mutation routes:

ActionMethod and pathPurpose
Create featurePOST /api/v2/tokens/{tokenAddress}/external-transaction-fee/featuresAttach the feature with fee token, recipient, and initial fee amounts
Set amountsPATCH /api/v2/tokens/{tokenAddress}/external-transaction-fee/amountsUpdate mint, burn, and transfer fees before freeze
Set recipientPATCH /api/v2/tokens/{tokenAddress}/external-transaction-fee/recipientUpdate the recipient for future collections before freeze
Set fee tokenPATCH /api/v2/tokens/{tokenAddress}/external-transaction-fee/tokenChange the ERC-20 token used for fee payments before freeze
FreezePOST /api/v2/tokens/{tokenAddress}/external-transaction-fee/rate-freezesPermanently freeze the fee configuration

The route schemas define the exact request and response fields for these controls.

See also

On this page