Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt

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

DAMM v2 dynamic fees are an optional fee layer that responds to market volatility. When price movement is higher, the dynamic fee can increase. When the market calms down, the dynamic fee decays. This gives pools a way to charge more during turbulent periods without permanently raising the base fee.

How It Fits With Base Fees

Every DAMM v2 pool has one base fee mode. Dynamic fees sit on top of that base fee: Total Trading Fee=Base Fee+Dynamic Fee\text{Total Trading Fee} = \text{Base Fee} + \text{Dynamic Fee} If dynamic fees are disabled, the dynamic fee is zero.

How It Works

DAMM v2 tracks recent price movement through a volatility accumulator. The accumulator rises when price changes and can decay or reset over time. Key settings include:
SettingProduct Meaning
Bin stepPrice sensitivity used by the volatility calculation; currently fixed to 1 bps
Filter periodVery short-term window that helps smooth noisy updates
Decay periodTime window after which volatility can decay or reset
Reduction factorHow much of the previous accumulator becomes the next volatility reference
Max volatility accumulatorCap that prevents the volatility measure from growing without bound
Variable fee controlHow strongly volatility affects the final dynamic fee numerator
The dynamic fee numerator is: (Volatility Accumulator×Bin Step)2×Variable Fee Control100,000,000,000\left\lceil \frac{(\text{Volatility Accumulator} \times \text{Bin Step})^2 \times \text{Variable Fee Control}}{100{,}000{,}000{,}000} \right\rceil

Validation Limits

The current implementation enforces:
ParameterConstraint
bin_stepMust equal 1
bin_step_u128Must equal the default fixed-point value for 1 bps
filter_period and decay_periodfilter_period < decay_period
reduction_factorAt most 10000
variable_fee_controlAt most 0xffffff
max_volatility_accumulatorAt most 0xffffff
Operators can enable or update dynamic fees with non-default dynamic fee parameters. Passing default dynamic fee parameters disables dynamic fees, but only if dynamic fees are already enabled.

Why Use Dynamic Fees

Volatility Response

Fees can increase when market movement becomes more intense.

LP Compensation

LPs can earn higher fees during periods where price risk may be higher.

Temporary Protection

The fee can decay as volatility settles instead of staying elevated forever.

Works With Base Modes

Dynamic fees can be paired with DAMM v2 base fee modes for more adaptive fee design.

Product Examples

A launch pool can use a time scheduler or market cap scheduler as the base fee, then add dynamic fees to react to sudden price movement.
A long-term pool can keep a moderate base fee and let dynamic fees increase only when trading becomes volatile.
Launchpads can create fee presets with different dynamic fee sensitivity for different token categories.

Important Takeaway

Dynamic fees are not a replacement for the base fee. They are an adaptive layer. The base fee defines the pool’s default fee behavior, while the dynamic fee responds to recent market movement.