How APR is calculated

In Liquidity, with the non-fungible liquidity and customizable price range ability. Each LP position will have its own LP fee.

The total APR is combined by the LP fee APR.

LP fee

Theoretically speaking, given a price range and liquidity user about to add, we can estimate the expected future 7 days fee as following

feenext7d=feeinΔLLin+ΔLfee_{next7d} = fee_{in} \frac{\Delta{L}}{L_{in} + \Delta{L}}
  • feein fee_{in} : Fee amount accrued in the user specified price range in last 7 days

  • Lin L_{in} : Current liquidity in the user specified price range

  • ΔL \Delta{L} : Liquidity user want to add to the price range

Fee in range

For feein fee_{in} , we use the historical trading volume data, fee tier and historical price data to estimate the price in range

feein=ftV7dTinT7d fee_{in} = f_tV_{7d}\frac{T_{in}}{T_{7d}}

  • ft f_t : Fee tier

  • V7d V_{7d} : Total trading volume of last 7 days

  • Tin T_{in} : Duration, measured in seconds, of prices staying within the price range in the past 7 days

  • T7d T_{7d} : 7 days measured in seconds

Last updated