DAMM v2 fees are configurable, but they are not arbitrary. TheDocumentation Index
Fetch the complete documentation index at: https://docs.meteora.ag/llms.txt
Use this file to discover all available pages before exploring further.
cp-amm program combines one base fee mode, an optional dynamic fee layer, a protocol fee split, an optional referral split, and a collect fee mode that determines which token pays the fee.
Fee Layers
DAMM v2 first calculates the total fee numerator: The denominator is1,000,000,000. A fee of 1 bps is 100,000 in numerator units.
After the trading fee is calculated, DAMM v2 splits it:
| Component | Program Behavior |
|---|---|
| Protocol fee | Defaults to 20% of the trading fee |
| Referral fee | Defaults to 20% of the protocol fee when a referral is present |
| LP fee | Trading fee after protocol fee |
| Compounding fee | In compounding mode only, a share of the LP fee added back to reserves |
| Claimable fee | LP fee remaining after the compounding share |
Base Fee Modes
DAMM v2 has five base fee modes, where Time Scheduler and Market Cap Scheduler each have linear and exponential curves.Time Scheduler
Fee is fixed or decays over time using a linear or exponential curve.
Market Cap Scheduler
Fee decreases as the square-root price moves above the initial price, using a linear or exponential curve.
Rate Limiter
Fee increases with buy size during a bounded launch window.
Dynamic Fees
Dynamic Fees
Optional volatility-based fee layer on top of the selected base fee mode.
Collect Fee Modes
Collect fee mode determines which token pays LP and protocol fees.| Mode | A-to-B swap | B-to-A swap | Notes |
|---|---|---|---|
BothToken | Fee taken from token B output | Fee taken from token A output | Fees can accrue in both tokens |
OnlyB | Fee taken from token B output | Fee taken from token B input | Quote-token fee collection |
Compounding | Fee taken from token B output | Fee taken from token B input | Token B fees, with atomic LP fee compounding |
Rate limiter mode is only valid with
OnlyB collect fee mode. Compounding pools use Compounding collect fee mode and require a non-zero compounding_fee_bps.Fee Caps and Updates
The current pool version supports total fee caps up to99%. Older version 0 pools are capped at 50%. The minimum fee is 1 bps.
Choosing a Fee Design
I want fees to decay over time after launch
I want fees to decay over time after launch
Use a time scheduler. Linear decay changes by a fixed amount each period; exponential decay changes by a percentage-style factor each period.
I want fees to decay only if price grows
I want fees to decay only if price grows
Use a market-cap scheduler. Fees stay elevated until the square-root price advances through configured steps, or until the scheduler expires.
I want large launch buys to pay more
I want large launch buys to pay more
Use the rate limiter with
OnlyB collect fee mode. It only applies to B-to-A buy-side swaps during the configured limiter window.I want fees to react to volatility
I want fees to react to volatility
Add dynamic fees. They sit on top of the base fee and rise when recent price movement increases the volatility accumulator.

