šŸ”™Variation and Returns

Uniswap and similar protocols use the product of the reserves to determine quotes for traders. Fortunately, when calculating the square root of this product, the geometric mean, we can measure the growth of the LP reserves. Since liquidity shares from the pool increase only when LPs add additional liquidity to the pool, the growth of the geometric mean of the reserves due to trading fees belongs completely to LPs.

Therefore, assuming there is no change in the ratio of the reserves of the pool, the value of the LPs stake grows at an exponential rate from trading fees. Assuming the initial value of a LPs stake is V0V_0 and the geometric mean grows at a constant rate, Ī±, the total value at any time tt can be calculated as shown:

VT=V0ā‹…eĪ±tV_T = V_0 \cdot e^{\alpha t}

In which,

  • Ī±\alpha represents the growth rate of the LPs reserves from trading fees per unit of time tt

  • We assume an exponential function because we assume continuos compounding interest.

To calculate our return we must derive the previous equation and subtract 1:

Rt=eĪ±tāˆ’1R_t = e^{\alpha t}-1

Price Variation Ī”\Delta

As explained on Staking & Impermanent Loss, the position value at any point on time is given by the following equation:

V=x+Pā‹…yV = x+ P \cdot y

Where VVis the value of the liquidity in the pool dependent on price, and xx and yy are the quantities of tokens X and Y, respectively, held in reserve. However, we do not want to have a function depending on those values. Hence, as stated on the Uniswap Whitepaper, we can assume that:

xā‹…y=L2x \cdot y = L^2

And, also, according to Related Pricing, the ratio of the two reserve quantities can be obtained by:

R=yxR = \frac{y}{x} ; therefore ; x=yRx = \frac{y}{R}

Substituting the values of xx and yy into the equation for the geometric mean of the reserve quantities, we can derive:

y=Lā‹…Ry = L \cdot \sqrt{R}

Hence,

x=LRx = \frac{L}{\sqrt{R}}

Therefore, using the original formula from Staking & Impermanent Lossin function of the previous equations we can obtain:

V=xā‹…p+y=2LRV = x\cdot p +y = 2L \sqrt{R}

To derive the return of the stake in the LP on an initial time V0V_0, i.e., the initial value of the liquidity stake is 2L2L. Then calculate the return from 2L2L:

R=V1āˆ’V0V0=2LRāˆ’2L2LR = \frac{V_1 - V_0}{V_0}=\frac{2L\sqrt{R}-2L}{2L}

The returns of the LP with respect to price variation Ī”\Delta move at a sublinear rate with respect to price. This relationship is obvious since the return grows as the square root of price. Calculating the first derivative with respect to price yields:

Ī“LP=āˆ‚PLPāˆ‚R=12R\delta_{LP} = \frac{\partial P_{LP}}{\partial R} = \frac{1}{2 \sqrt{R}}

Last updated