ðŸĪĐv2: DMM

Concentrated Liquidity ++ with volatility adjusted fees.

v2: DMM*

*in development*

Derp Market Maker (DMM) with volatility-adjusted fees. DerpDEX CLAMM with concentrated liquidity introduces a flexible and efficient way that can significantly improve capital efficiency and help LPs customize with range orders.

While CLAMM concentrated liquidity gives LPs granular control over what price ranges their capital is allocated to, it introduces potentially bigger impermanent loss should there be any large one-way price action.

Gen 2: Concentrated liquidity ++

This is where DMM, given its significant outperformance over CPAMM in protecting P&L for LPs, can be perfectly combined with CLAMM. In detail look, the HMM combination with CLAMM can be easily adopted only with changes made to the swapping process within each active tick interval.

if P1P_1 is NOT between P0P_0 and PiP_i (oracle price): ​

if P1P_1 is between P0P_0​ and PiP_i(oracle price):​

  • If input token is X,

  • If input token is Y,

Volatility adjusted fees

LPs providing liquidity in an AMM pool experience a volatility drag on their position i.e. they have volatility exposure. When markets are moving a lot, LP profits are eroded away by higher impermanent loss.

Sophisticated LPs that dynamically rebalance their token inventories bleed more money doing these rebalancings in volatile markets. Conversely, AMMs accumulate profits in calm markets when there is trading activity around a stable price.

Constant fee fails to reflect these market dynamics. This means LPs will be more inclined to take away liquidity from AMMs in volatile markets thus exacerbating market moves. In stable times, traders will be less inclined to pay the high fees on DEXes. This is the exact opposite of the desired dynamic!

Volatility sensitive pricing is needed for incentivising LPs to keep funds during volatile times and traders to continue using DEXes in stable times. LPs should earn higher fees in turbulent times and lower fees in calmer markets. This would lead to a fairer and a more robust trading ecosystem.

We present the heuristic for pricing AMM fee below.

Assuming an LP provides liquidity in a 2-asset constant product market making pool composed of tokens X and Y.

Treating Y as numeraire, we have marginal price P0​=Y0/X0​P_0​=Y_0/X_0​ and Xt​Yt​=k=L2X_t​Y_t​=k=L^2

The value of LP assets follow a square root price process.Assuming geometric brownian motion for price PP ,we have:​

dP=ΞPdt+σPdzdP = \mu Pdt + \sigma Pdz

​​Square root price process is given by:​​

The above can also be modelled by explicitly calculating the delta-hedging p&l of an LP that constantly hedges its delta to stay hedged in numeraire. This negative gamma pnl experienced by LPs between 2 periods is given by:

Where W0W_0 is the initial value of the LP deposit and denotes the annualized volatility of log returns.

Considering a single day time frame, the expected value of LP loss equates to

We want the expected fee earned from AMM to exceed that of the LP loss.

So:

Here ADV represents the average daily volume, TVL is the total value locked in the pool and Îą\alpha is the fee rate.

We define velocity as a measure of ADV / TVL. i.e. what multiple of the TVL does the AMM trade daily on average. This gives us the below heuristic for setting min AMM fee.

Last updated