Author: 0xAlpha, Richard Chen, Daniel Fang

Last updated on 2023.03.14

Our previous articles explained a theoretical methodology for hedging impermanent loss (IL) using Power Perpetuals. However, as explained in the introductory paper of Gamma Swap, hedging IL with Power Perpetuals has an extremely low capital efficiency, which makes it not practical at all. This article explains how to hedge IL with Gamma Swap.

As mentioned in the introduction, when volatility stays still, Gamma Swap has the following theoretical price:

$$ P_{gamma}=\frac{1}{1-h_0T}(p-p_0)^2 $$

where $p$ and $p_0$ are the current underlying price and the entry price, while $h_0=r+\sigma_0^2/2$. We will see that impermanent loss has a very similar dynamic.

LP Position Value

Let’s take the ETH-USDC pair on Uniswap V3 as example. Suppose an LP position contains $x$ ETH and $y$ USDC. Then $x$ and $y$ are functions of the ETH price $p$ (in this article we follow the denotation of Uniswap V3 whitepaper):

$$ x=L\left(\frac{1}{\sqrt p}-\frac{1}{\sqrt p_b}\right)\\ y=L\left(\sqrt p-\sqrt p_a\right) $$

The value of the LP position is as follows, for $p\in(a,b)$:

$$ V=xp+y=L\left(2\sqrt p-\frac{p}{\sqrt p_b}-\sqrt p_a\right) $$

Suppose the LP position is added at $p=p_0$, with $x_0$ ETH and $y_0$ USDC. The following equation should hold with these initial variables:

$$ L=\frac{x_0}{\frac{1}{\sqrt p_0}-\frac{1}{\sqrt p_b}}= \frac{y_0}{\sqrt p_0-\sqrt p_a} $$

Hedge Impermanent Loss

Impermanent Loss refers to the loss of the LP position relative to the value of holding the original portfolio, $x_0$ ETH and $y_0$ USDC:

$$ \begin{align*} IL&=V-(x_0p+y_0)\\ &=(x-x_0)p+(y-y_0)\\ &=L\left(2\sqrt p-\frac{p}{\sqrt p_0}-\sqrt p_0\right)

\end{align*} $$

Denoting $\Delta p = p-p_0$, with Taylor expansion, we have

$$ \sqrt p=\sqrt p_0\left[1+\frac{1}{2}\frac{\Delta p}{p_0}-\frac{1}{8}\frac{\Delta p^2}{p_0^2}+O\left(\frac{\Delta p^3}{p_0^3}\right)\right] $$

$$ \begin{align*} IL&=-\frac{1}{4}Lp_0^{-\frac{3}{2}}\Delta p^2+O\left(\frac{\Delta p^3}{p_0^3}\right)\\

&\approx -\frac{1}{4}Lp_0^{-\frac{3}{2}}(p-p_0)^2 \end{align*} $$

It is very straightforward to hedge this $IL$ with Gamma Swap. We just need to long $g$ units of Gamma Swap such that