Hedging Impermanent Loss with Power Perpetuals (2)
In the first article of this series, we explained how to hedge the impermanent loss of CFMM (of Uniswap V2 style) by power perpetuals. The idea is to hedge the Delta and Gamma to zero at the entry point (the price at which an LP deposits liquidity) so that the LP portfolio value stays flat in a reasonably wide range around the entry point. The algorithm was based on calculating the Delta and Gamma of an LP position of Uniswap-V2-style CFMM. Since the function in the CFMM of Uniswap V3 is different from that of V2, the hedging would be a bit different too. This article explains how to hedge the impermanent loss of LP position in Uniswap V3 by power perpetuals. We will skip the basic concepts (for which you can the details in the previous article) and directly start with Uniswap’s different Greek letters.
Greek Letters of Uniswap V3
Let’s still take the ETH-USDC pair as an example: provide ETH and SDC to Uniswap V3 when ETHUSDC= with the range specified as When the price of ETH changes within the range, you would have ETH and USDC following the formula:
Just like in Uniswap V2, and are functions of the ETH price (in this article we follow the denotation of Uniswap V3 whitepaper to use in place of and :
The value of your LP position is as follows, for :
Therefore, we have Delta and the Gamma of your LP tokens as follows:
Noticing is corresponding to , we can see that LP position in Uniswap V3 has a smaller Delta than V2 (with an extra term), but exactly the same Gamma. Therefore, only some small changes are needed to make the LP position Delta-neutral and Gamma-neutral.
Hedging IL with Powers and Futures
Assume you need units of ETH^2 to make the portfolio Gamma-neutral:
And then you would need to take units of ETHUSD futures to make the portfolio Delta-neutral:
In other words, you need to short units of ETHUSD futures.
In practice, as a static hedge entered at , we just need to fix and with the value at this point.
To summarize, the following portfolio has 0 Delta and 0 Gamma at the entry point of the range order:
Providing ETH+ USDC to the ETH-USDT pair
Long units of ETH^2 power perps
Short units of ETHUSD futures
Please note that the is the measure of the liquidity density provided by this range order and is determined by . Given the amount of provided liquidity (given and ), the narrower the range is (the smaller is), the bigger would be (meaning the liquidity is more concentrated). can be calculated by solving the pricing formula, which leads to:
For Uniswap V3, LP does not have to provide liquidity symmetrically (i.e., ). However, if we do follow this V2-tradition, then for 1 unit of ETH-USDC pair (i.e., 1ETH + USDC), we have
Then we can rewrite the hedged portfolio as:
Providing 1 unit (i.e., 1ETH+USDC) to the ETH-USDT pair
Long units of ETH^2 power perps
Short units of ETHUSD futures
Numerical Analysis
Assume you provide one unit of ETH-USDC pair to Uniswap V3 when ETHUSDC=2000, i.e., , with the range specified as . With the formula above we have . Assuming volatility , we can calculate the values of the portfolio:
Providing 1ETH+2000USDC to the ETH-USDC pair
Long 0.00253 units of ETH^2 (equals to 2.53 units of mETH^2 on Deri Protocol)
Short units of ETHUSD futures
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:
Every second, the cost accumulates at the speed proportional to . To figure out the average cost, we need to estimate the average . Statistics show that, for the last 12 months, for ETH. In the table above, we also show how the annualized cost varies when .
Please note the table above applies for BTC too. Statistics show that, for the last 12 months, for BTC. We also list the corresponding cost ratio in the table.
Extra Capital for the Derivative Margin
The futures and powers positions require extra capital to be held as margin.
The power position needs:
Currently, Deri required 16% as initial margin for powers on BSC and 8% on Arbitrum, which correspond to 1635U on BSC and 817U on Arbitrum respectively.
Similarly the futures position needs:
Currently, Deri required 8% as initial margin for futures on BSC and 4% on Arbitrum, which correspond to 1754 U on BSC and 877 U on Arbitrum respectively.
Therefore, the total required margin would be 3389 U on BSC and 1678 U on Arbitrum. Please note that this initial margin is sufficient to cover the price change of +/-10%, so you don’t need to worry about liquidation.
Last updated