# š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 $V_0$ and the geometric mean grows at a constant rate, *Ī±,* the total value at any time $t$ can be calculated as shown:

$V_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 $t$

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

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

$R_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 \cdot y$

Where $V$is the value of the liquidity in the pool dependent on price, and $x$ and $y$ 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 \cdot y = L^2$

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

$R = \frac{y}{x}$ ; therefore ; $x = \frac{y}{R}$

Substituting the values of $x$ and $y$ into the equation for the geometric mean of the reserve quantities, we can derive:

$y = L \cdot \sqrt{R}$

Hence,

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

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

$V = x\cdot p +y = 2L \sqrt{R}$

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

$R = \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:

$\delta_{LP} = \frac{\partial P_{LP}}{\partial R} = \frac{1}{2 \sqrt{R}}$

Last updated