Dynamic Fees
Last updated
Last updated
Available on DLMM and DAMM v2.
Creators have the option to use a pool with a dynamically changing fee structure that capitalizes on launch volatility to maximize yield for LPs while protecting against sniper activity.
Dynamic Fee acts as a form of surge pricing based on market fluctuations and volatility.
Since demand for tokens and price volatility are often the highest at launch, Dynamic Fee would also be high. This both mitigates against aggressive sniper bot purchases while capturing more fees for the token creator and LPs in the pool.
LPs earn a swap fee from traders when they perform a swap. The total swap fee will have two components: a base fee and a variable fee .
Total swap fee
The variable fee is a function of real-time price volatility. The fee rate will be applied to the swap amount in each liquidity bin and distributed proportionally to the LPs in that bin.
For more information, please visit .
dynamic_fee_numerator = ((volatilityAccumulator*binStep)^2 * variableFeeControl + 99_999_999_999) / 100_000_000_000
dynamic_fee_percent = (dynamic_fee_numerator / 1_000_000_000) * 100
By default
binStep = 1
variableFeeControl
: This value will be set in dynamic fee params when a creator creates a pool. It is a constant value stored inside poolState.
volatilityAccumulator
: This value is inside the program and stored in the poolState. For more info, read .
Max Dynamic Fee on DAMM v2
Currently, the max Dynamic Fee is ~20% of the Base Fee. It will always be <= Base Fee
Example:
Base Fee = 0.25%
Dynamic Fee = 0.0499%
Total LP Fee = 0.2999%
All DLMM Launch Pools have Dynamic Fees enabled by default, while creators have the option to use (or don’t use) Dynamic Fee on DAMM v2 Launch Pools, based on their requirements.