Relative Positional Value Change in Liquidity Pools

.ali [yazdan]
4 min readJan 24, 2022

An important question arises when we yield farm with liquidity pools:

Question: How does our position in a liquidity pool change when one asset price fluctuates by δ %?

Answer: The relative positional value change is:

Proof:

Consider an arbitrary crypto token: X. For example X = ETH. Denote the quantity of X tokens we hold at time t as:

Quantity of token X at time t.

The value of the token X relative to USD ($) at time t is governed by a conversion factor:

Conversion factor = market rate $-per-X at time t.

This puts a $ value on our holding:

$ amount of token X at time t based on quantity and conversion rate.

Now consider a liquidity pool (LP) in the token pair: X — Y. This LP is governed by two rules:

  1. Constant product: at any time t we have:
LP rule #1.

2. Balanced liquidity: at any time t, the total $ value of LP tokens is balanced:

LP rule #2.

Substituting the second rule into the first rule gives a simple rule for the quantities of the tokens in the pool:

LP rule #1 & rule #2.

Here we defined the conversion factor from X to Y as:

Conversion factor from X to Y.

which can be interpreted as the conversion of X to $ followed by the conversion of $ to Y.

Now assume that at time t=1 we decide to enter a position into the X — Y LP. We provide a balanced (i.e. 50:50) set of tokens:

Our initial position consisting of equal values of X and Y.

Our position value at time t=1 is simply:

Initial position value in $.

The LP will typically have many more token than what we provide it and our position value will be a fraction of the total LP value. We can compute this value using the rules of the LP:

Initial position as a fraction of LP size.

where we used the balanced liquidity rule of the LP to reach the final equation.

Now consider the LP at time t=2 and construct the ratio of position values:

Position value at t=2 vs. t=1.

Notice how this ratio is independent of our fractional ownership and also independent of the LP liquidity k.

Assume now that the value of the Y token remains fixed between t=1 and t=2, while the value of the X token fluctuates as:

Fluctuation in value of X.

This will simplify the positional ratio we computed before:

Position ratio when the price of Y is fixed.

Stated differently, the relative positional value change is:

Relative positional value change as a function of change in value of X.

This completes the proof.

Caveat: This is an approximation as we didn’t model the nieces of a LP such as transaction fees.

Relative positional change vs. asset % change.

Bonus: The model above is most accurate when the change in the asset is small. In this scenario we can use the binomial approximation to reduce further:

Approximation for small δ.

Which gives us a simple rule of thumb: relative position value change is about half the change in the asset.

--

--