Hedging Impermanent Loss with Power Perpetuals (1)

This article is for hedging impermanent loss for Uniswap-V2-style CPMM. For Uniswap V3, please refer to "Hedging Impermanent Loss with Power Perpetuals (2)"

As explained in the introduction paper, Power Perpetuals have a very special and important property: its Gamma is independent of the underlying prices:

Γ=21hT=21(r+σ22)T \Gamma =\frac{2}{1-hT} = \frac{2}{1-(r+\frac{\sigma^2}{2})T}

where

  • T: the funding period. T=1week in our implementation.

  • h=r+σ2/2h=r+\sigma^2/2

  • r: the risk-free interest rate

  • σ\sigma: the volatility

In the DeFi world, it is usually safe to assume r=0r=0. And since volatility is relatively stable for most of the time, the Gamma stays a constant for most of the time. Having an (almost) constant Gamma leads to a few handy use-cases. This article will explain how to hedge the impermanent loss of providing liquidity to CPMM (constant-product marking making) such as Uniswap or Pancakeswap.

Impermanent Loss from the Greeks Perspective

Ever since the launch of Uniswap, there have been tons of materials discussing the impermanent loss (IL) issue of CPMM. We are not repeating the discussions here but just would like to point out that the difficulty of hedging the IL is the gamma part of the liquidity providers’ positions. Let’s take the ETH-USDC pair as an example. Let’s assume you provide x0x_0 ETH and y0y_0 USDC to the CPMM when ETHUSDC=S=4000, e.g. x0=1,y0=4000x_0=1, y_0=4000. When the price of ETH SS changes, you would have xx ETH and yy USDC with xy=x0y0=K=4000x\cdot y=x_0\cdot y_0=K=4000. It’s easy to see xxand yy are functions of the ETH price SS

x=KSy=KSx=\sqrt{\frac{K}{S}}\\ y=\sqrt{KS}

The value of your provided liquidity (or the value of your LP tokens) is:

V=xS+y=2SKV=xS+y=2\sqrt{SK}

Therefore, we have the Delta and the Gamma of your LP tokens as follows:

Δ=VS=KSΓ=ΔS=K2S32\Delta = \frac{\partial V}{\partial S}=\sqrt{\frac{K}{S}}\\ \Gamma = \frac{\partial \Delta}{\partial S}=-\frac{\sqrt K}{2S^{\frac{3}{2}}}

From the Greeks’ perspective, it is the Gamma part that complicates the impermanent loss. If we hedge IL with a linear derivative such as futures, we would need to rebalance the hedging position quite frequently to adapt to the rapidly changing Delta. Such a process is called dynamic Delta hedging (DDH), causing a substantial cost. A better solution would be to adopt a Gamma tool to hedge the Gamma part specifically. And Power Perps is a perfect Gamma tool for this purpose thanks to its (almost) constant Gamma.

Hedging IL with Powers and Futures

Let’s still assume the initial liquidity you provide to a CPMM (Uniswap or Pancake) is (x0x_0 ETH, y0y_0 USDC ): x0=1,y0=4000x_0=1, y_0=4000. To hedge the Gamma, you would need ww units of ETH^2 to make the portfolio Gamma-neutral:

w21hTK2S32=0w=(1hT)K4S32w\cdot\frac{2}{1-hT}-\frac{\sqrt{K}}{2S^\frac{3}{2}}=0\\ w = \frac{(1-hT)\sqrt{K}}{4S^\frac{3}{2}}

And then you would need to take zz units of ETHUSD futures to make the portfolio Delta-neutral:

z+KS+w2S1hT=0z=32KSz+\sqrt{\frac{K}{S}}+w\cdot\frac{2S}{1-hT}=0\\ z=-\frac{3}{2}\sqrt{\frac{K}{S}}

In other words, you need to short 32KS\frac{3}{2}\sqrt{\frac{K}{S}} units of ETHUSD futures.

As a static hedge that fixes the hedging positions at the entry point, where S=S0=KS=S_0=K, we have:

w=(1hT)4S0,z=32w = \frac{(1-hT)}{4S_0},\\ z=-\frac{3}{2}

To summarize, the following portfolio has 0 Delta and 0 Gamma at the point of (x0=1,y0=4000)(x_0=1, y_0=4000):

  • Providing 1ETH+4000USDC to the ETH-USDT pair

  • Long (1hT)4S0\frac{(1-hT)}{4S_0}units of ETH^2

  • Short 32\frac{3}{2} units of ETHUSD futures

Numerically, at the point of (x0=1,y0=4000)(x_0=1, y_0=4000), assuming volatility σ=100%\sigma=100\%, this means:

  • Providing 1ETH+4000USDC to the ETH-USDC pair

  • Long 0.0000613 units of ETH^2 (equals to 0.0613 units of mETH^2 on Deri Protocol)

  • Short 1.5 units of ETHUSD futures

Please note this only ensures the portfolio has 0 Delta and 0 Gamma at the current point. Nevertheless, a portfolio with 0 Delta and 0 Gamma at (x0,y0)(x_0, y_0) would have its value stable in a very wide range of price around (x0,y0)(x_0, y_0). The figure below illustrates the PnL of the portfolio with respect to ETH price change. Please note the red curve (portfolio value) stays flat in a very wide range.

Note 1: Depending on how strictly flat you would like to keep the portfolio value, you can choose your price range to leave the portfolio unchanged. For example, for not-so-strict use cases, you can choose the range to be (2000, 6000) and only rebalance the portfolio when ETH price moves out of this range. For more demanding use cases, you can narrow the range to (3000, 5000). However, please note that the more strict requirement you put, the more frequently you would need to rebalance the portfolio.

Note 2: the portfolio above was constructed to keep the dollar value of your LP pair to stay constant (4000U + 4000U = 8000U). However, if you want to keep the value at par with (4000U + 1ETH) (i.e. you want to keep your risk exposure of 1ETH), then you just need to hedge less Delta. That is, instead of short 3/2 units of ETHUSD futures, you just need to short 1/2 units (just to hedge the Detal of the power perps).

Cost vs Income

Constructing the portfolio above comes at a cost. Usually, both the futures and powers positions would incur funding fees. However, the expectation of the futures funding fee is 0. Therefore, we only consider the funding fee of the powers. Per the pricing of powers, the theoretical funding fee of 1 unit of powers for one funding period is:

F=PS2=S2hT1hTF=P-S^2 = S^2\frac{hT}{1-hT}

This leads to an annualized cost in terms of a ratio of the LP value:

wF/(T/1year)2S=h8(SS0)2=σ216(SS0)2\frac{w\cdot F/(T/1year)}{2S}=\frac{h}{8} \left(\frac{S}{S_0}\right)^2 =\frac{\sigma^2}{16} \left(\frac{S}{S_0}\right)^2

Let’s put this annualized cost into numerical scenarios:

ETH Price

Volatility

-20% 3200

-10% 3600

0% 4000

+10% 4400

+20% 4800

75%

2.25%

2.85%

3.52%

4.25%

5.06%

100%

4.00%

5.06%

6.25%

7.56%

9.00%

125%

6.25%

7.91%

9.77%

11.82%

14.06%

150%

9.00%

11.39%

14.06%

17.02%

20.25%

Now this business turns into a very simple math problem: would the income of liquidity-providing cover the cost of hedging?

As long as the income from liquidity-providing is greater than the cost, the portfolio is making profits.

The income of liquidity providing depends on the transaction volume of the CPMM. On Uniswap, as of today, the annualized income ratio for the ETH-USDC pair is:

532.68m0.3%/7365380.04m=21.93%\frac{532.68m\cdot0.3\%/7*365}{380.04m}=21.93\%

So the short answer to the question: it’s profitable indeed. As of the last 7 days, this income ratio beats even the most costly scenario in the table above.

Please note the trading volume of last 7 days has been at a relatively low level. For most of the time, the trading volume has been higher than the current level.

Other Examples

WBTC-USDC @Uniswap

Now let’s look at the case of providing liquidity to the WBTC-USDC pair, it is easy to have a similar numerical analysis. Assuming the entry point of liquidity providing is BTCUSD = 40000, we have the following annualized cost ratio in different scenarios:

BTC Price

Volatility

-20% 32000

-10% 36000

0% 40000

+10% 44000

+20% 48000

75%

2.25%

2.85%

3.52%

4.25%

5.06%

100%

4.00%

5.06%

6.25%

7.56%

9.00%

125%

6.25%

7.91%

9.77%

11.82%

14.06%

150%

9.00%

11.39%

14.06%

17.02%

20.25%

As of last 7 days, the annualized income ratio is:

248.16m0.3%/7365114.85m=33.80%\frac{248.16m\cdot0.3\%/7*365}{114.85m}=33.80\%

WBNB-BUSD, BTCB-BUSD @Pancakeswap

Now let’s look at 2 sample pairs from another CPMM, Pancakeswap: WBNB-BUSD and BTCB-BUSD. For the most active trading pair WBNB-BUSD, assuming the entry point of liquidity providing is BNBUSD = 400, then we have the following annualized cost ratio in different scenarios:

BNB Price

Volatility

-20% 320

-10% 360

0% 400

+10% 440

+20% 480

75%

2.25%

2.85%

3.52%

4.25%

5.06%

100%

4.00%

5.06%

6.25%

7.56%

9.00%

125%

6.25%

7.91%

9.77%

11.82%

14.06%

150%

9.00%

11.39%

14.06%

17.02%

20.25%

As of last 7 days, the annualized income ratio is 16.35%, still profitable for most of the scenarios.

427.24m0.25%/7365340.59m=16.35%\frac{427.24m\cdot0.25\%/7*365}{340.59m}=16.35\%

As for the BTCB-BUSD pair, as of last 7 days, the annualized income ratio is:

45.76m0.25%/736564.39m=9.30%\frac{45.76m\cdot0.25\%/7*365}{64.39m}=9.30\%

This income is profitable at the current market condition (volatility ~ 80%), but would become unprofitable for some of the worse scenarios (e.g. volatility turns into 150%). So liquidity providers adopting this strategy would need to keep a closer watch on the market condition change for providing liquidity to the BTCB-BUSD pair on Pancakeswap.

Note 1: The extra CAKE reward by Pancakeswap has not been taken into account in this analysis.

Note 2: In practice, the transaction volume on CPMM and the volatility are positively correlated. In a more volatile market condition, even though you are paying a higher funding fee for the powers, most likely you would also earn more income from the CPMM due to a higher trading volume. In other words, the strategy would still very likely be profitable in such scenarios.

Last updated