Skip to main content
For more details about how fees work, fee collection on different chains, and setting up fee wallets, see the Monetizing the integration guide.
Fees are configured via the feeConfig option, which supports both static and dynamic fee calculation.

Fee configuration

Example of the advanced fee configuration

WidgetFeeConfig interface

The WidgetFeeConfig interface provides the following options:
  • name (optional): Display name for your integration shown in fee details
  • logoURI (optional): URL to your logo displayed alongside fee information
  • fee (optional): Fixed fee percentage (e.g., 0.03 for 3%)
  • showFeePercentage (default: false): Whether to display the fee percentage in the UI
  • showFeeTooltip (default: false): Whether to show a tooltip with fee details (requires name or feeTooltipComponent)
  • feeTooltipComponent (optional): Custom React component for the fee tooltip
  • calculateFee (optional): Function for dynamic fee calculation based on transaction parameters
Only use either fee or calculateFee - not both. The calculateFee function allows for dynamic fee calculation based on factors like token pairs, transaction amounts, user tiers, or any other custom logic.