Skip to main content
Trading fees are distributed to liquidity providers and optionally to registered hosts and integrators. This page explains fee types, how they accrue, and how to withdraw them via the SDK.

Fee Types

  • LP Fee: Paid by traders to liquidity providers in the asset being swapped in.
  • Host Fee: Optional fee paid in Asset B when a pool is created with a hostNamespace.
  • Integrator Fee: Optional fee charged at swap time by integrators, paid in Asset B.
All fees for hosts and integrators are assessed and accrued strictly in Asset B of the pool. LP fees are accrued in the asset that the trader provides for the swap. Withdrawals for hosts and integrators are also only in Asset B.

Configuration

  • LP Fee: Set per pool via lpFeeRateBps.
  • Host Fee: Set per pool via totalHostFeeRateBps when using a hostNamespace.
    • Hosts register a minFeeBps; pools using that namespace must set totalHostFeeRateBps >= minFeeBps.
    • Default split of host fees: Flashnet 60%, Host 40%.
  • Integrator Fee: Set per swap via integratorFeeRateBps and optional integratorPublicKey.
    • Sharing rule: if integratorFeeRateBps ≤ 30 BPS, 0% is shared with Flashnet; above 30 BPS, 30% of the integrator fee is shared with Flashnet.

Accrual

  • Per Trade: Fees are computed and accrued on each swap.
  • Asset B Only: Fees accrue only in Asset B.
  • Real-Time Updates: Accruals update immediately with executions.

Querying Accrued Fees

Withdrawing Fees (Asset B Only)

Hosts

Integrators

Best Practices

  1. Surface net amounts in your UI: amounts shown in simulations and executions are already post‑fee.
  2. Host compliance: Ensure totalHostFeeRateBps meets the host’s minFeeBps when using a namespace.
  3. Integrator fee disclosure: Display integratorFeeRateBps transparently to users.