Volatility-Based Fee Calculation
The dynamic fee system adjusts based on market volatility using the following formula
feedynamic=feebase+α⋅σmarket+β⋅ΔP
Where:
feebase (minimum fee rate)
α (volatility sensitivity parameter)
σmarket (market volatility measure)
β (price change sensitivity)
ΔP (recent price change)
Volatility Estimation
Market volatility is calculated using a rolling window approach:
σmarket=n−11∑i=1n(ri−rˉ)2
Where:
ri=ln(Pi−1Pi) are the logarithmic returns,
rˉ is the mean return over the period,
n is the window size (number of returns).
The specific fee adjustment can be expressed as:
feerate=min(feemax,feebase+volatilitycomponent)
Where:
volatilitycomponent=min(maxvolatility_fee,volatilityfactor×recentprice_volatility)
And:
recentprice_volatility=PavgPmax−Pmin
Over the last N observations.