Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.arc.network/llms.txt

Use this file to discover all available pages before exploring further.

This guide explains which fees apply when performing a swap, how funds move through a swap transaction, and best practices for implementing custom swap fees.

Fee breakdown

Two fees can apply to a swap:
FeeWhen it appliesAmountRecipient
Custom feeConditionally. When you configure custom swap fees.Percentage you define on the swap amount; collected before the swap executes.90% to your fee recipient; 10% to Arc
Provider feeAlways. On every swap.2 basis points (0.02%) of the swap amount after any custom fee (1 bp = 0.01%).Swap service provider (third-party liquidity service that executes the swap)
Your end user pays the swap amount plus all applicable fees.

How funds flow through a swap

This example traces a 1,000 USDT-to-USDC swap with a 1% custom fee:
1

User requests the swap

The user requests a swap of 1,000 USDT to USDC.
2

You add the custom fee

You add a 1% custom fee. On 1,000 USDT, this equals 10 USDT.
3

Source wallet signs

The source wallet signs a transaction authorizing 1,000 USDT.
4

App Kit collects and splits the custom fee

App Kit collects the 10 USDT custom fee and splits it:
  • Arc receives 1 USDT (10% of the custom fee).
  • Your fee recipient receives 9 USDT (90% of the custom fee).
5

Swap service provider applies the provider fee

The swap service provider deducts a provider fee of 2 basis points (0.02%) from the remaining 990 USDT. This equals 0.198 USDT.
6

Provider executes the swap

The provider executes the swap with 989.802 USDT and the user receives the equivalent output in USDC.
Net result: Of the original 1,000 USDT, 10 USDT goes to custom fee recipients, 0.198 USDT goes to the swap service provider, and the remaining 989.802 USDT is swapped for USDC. This flow is illustrated in the following diagram:

Best practices for custom fees

Follow these best practices when implementing custom fees for swaps:
  • Use a fee recipient address in the same network context where the swap originates.
  • Return fee amounts in human-readable decimal format (for example, 0.20 instead of 200000 for 0.20 USDC). App Kit handles base-unit conversion internally.