liquidity
liquidity copied to clipboard
dynamic swap fee mechanism
There exists multiple generalization design space for swap fee.
- liquidity pools with different swap fees
- liquidity pools with dynamic swap fees
- decided by governance
- decided by predefined algorithm
- swap fees sponsored by funds
dynamic swap fee algorithm
- based on volatility : higher volatility, higher fee
- fee = 0.03 % + 0.4% * volatility
- if volatility = 0%, then fee = 0.03%
- if volatility = 60%, then fee = 0.27%
- if volatility = 150%, then fee = 0.63%
- volatility can be calculated from min/max price in a period
(https://www.eurexchange.com/resource/blob/43140/47ca53f0178cec31caeecdf94cc18f6e/data/volatility_and_its_measurements.pdf.pdf) - n = 30days, H,L for each 24 hours (1day high/low)
this algorithm automatically allocate 0.03% fee for stable pairs, higher fee for higher volatility pairs