# 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:

where

*T:*the funding period.*T*=1week in our implementation.$h=r+\sigma^2/2$

*r:*the risk-free interest rate$\sigma$: the volatility

In the DeFi world, it is usually safe to assume $r=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 $x_0$ ETH and $y_0$ USDC to the CPMM when ETHUSDC=S=4000, e.g. $x_0=1, y_0=4000$. When the price of ETH $S$ changes, you would have $x$ ETH and $y$ USDC with $x\cdot y=x_0\cdot y_0=K=4000$. Itâs easy to see $x$and $y$ are functions of the ETH price $S$

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

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

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 ($x_0$ ETH, $y_0$ USDC ): $x_0=1, y_0=4000$. To hedge the Gamma, you would need $w$ units of ETH^2 to make the portfolio Gamma-neutral:

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

In other words, you need to short $\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=S_0=K$, we have:

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

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

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

Short $\frac{3}{2}$ units of ETHUSD futures

Numerically, at the point of $(x_0=1, y_0=4000)$, assuming volatility $\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 $(x_0, y_0)$ would have its value stable in a very wide range of price around $(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:

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

Letâs put this annualized cost into numerical scenarios:

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:

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:

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

#### 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:

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

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

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