Skip to content
/ LVR Public

Calculating Historical Loss Versus Rebalancing Cost for Uniswap V3 LPs

Notifications You must be signed in to change notification settings

advaitbd/LVR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loss Versus Rebalancing (LVR) on AMMs

Loss Versus Rebalancing (LVR) is a metric designed to quantify the impact of adverse selection on AMM LPs. LVR is calculated as the difference between the value of a liquidity pool and a rebalancing portfolio. LVR can be thought of as the best case scenario for arbitrageurs.

It arises from the fact that AMMs always trade at off-market prices, leaving money to arbitrageurs trading against the AMM using a CEX. LVR is greater when prices are more volatile, and when the AMM's marginal liquidity is greater (i.e. the AMM trades more aggressivley in response to price movements).

These calculations are based on the wonderful research on Loss Versus Rebalancing found here

Link Remarks
Theoretical LVR Fetching On-Chain and External Pricing Data for Uniswap V3 Vaults
LQTY/ETH 0.3% Visualising Data for LQTY/ETH 0.3% Pair
USDC/ETH 0.05% Visualising Data for USDC/ETH 0.05% Pair
USDC/ETH 0.05% Interactive Chart LQTY/ETH 0.3% Pair
USDC/ETH 0.05% Interactive Chart USDC/ETH 0.05% Pair

Empirical formula for Total LVR accumulated after n trades on an AMM

$$ Total \ LVR = \sum_{i=1}^{n} a_i \cdot (p_i - q_i) $$

$a_i$ : Amount of Token Sold

$p_i$ : Market Price

$q_i$ : AMM Price

Theoretical Daily LVR as a function of Pool Value (for Uniswap V3)

$$ \frac{l(\sigma^2,P)}{V(P)} = \frac{\sigma^2\sqrt{P}}{4(2\sqrt{P} \ - \ P/\sqrt{P_b} \ - \ \sqrt{P_a})} $$

$l(\sigma^2,P)$ : Instantaneous LVR

$V(P)$ : Pool State

$\sigma^2$ : Daily Volatility

$P_b$ : Upper Price Bound

$P_a$ : Lower Price Bound

$P$ : Current Price

Key Assumptions in the model:

  1. There are LPs (uninformed) and Arbitrageurs who can trade without fees
  2. There is a CEX or alternate venue with deep liqudity for price discovery

About

Calculating Historical Loss Versus Rebalancing Cost for Uniswap V3 LPs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published