Fee Structure

Understand how trading fees work in DLMM's bin-based system, including fee accumulation, distribution to liquidity providers, and protocol revenue sharing.

How Fees Work in DLMM

Trading fees in DLMM:

  • Charged on each swap

  • Accumulate in the bins used

  • Distributed proportionally to LPs

  • Include base + variable components

Swap → Fee charged → Stored in bins → LPs collect share

Fee Components

Base Fee

interface PairParameters {
  base_factor: string;     // Base fee rate (e.g., 3000 = 0.3%)
  protocol_share: string;  // Protocol's share (e.g., 1000 = 10%)
}

// Example: 0.3% base fee
const baseFeePercent = Number(pair.parameters.base_factor) / 10000;

Variable Fee

Adjusts based on volatility:

Fee Accumulation in Bins

LP Fee Share Calculation

Protocol Revenue

Fee Tiers by Pair Type

Common configurations:

Pair Type
Base Fee
Typical Range

Stable

0.01%

0.01-0.05%

Correlated

0.05%

0.05-0.10%

Blue-chip

0.20%

0.20-0.30%

Volatile

0.30%

0.30-5.00%

Viewing Pair Fees

Fee Collection Process

Fees are collected automatically when:

  1. Removing liquidity - Proportional share included

  2. Closing position - All fees withdrawn

  3. No separate claim - Unlike some protocols

Estimating Fee Income

Key Points

  • Fees accumulate in bins, not positions

  • Automatically collected on withdrawal

  • Base + variable fee structure

  • Protocol takes percentage of fees

  • Higher volatility = higher fees

Last updated