Published on

Hedging against impermanent loss with Binance perpetual futures

Authors
  • avatar
    Name
    Aaron Schmid
    Twitter

This strategy mitigates impermanent loss (or IL) for a Uniswap V2 ETH/USDC liquidity provider by using a hedging approach with Binance perpetual futures. It involves holding both a long call and a long put with strike prices set at ±10%\pm10\% of the initial ETH price, matching the liquidity pool’s ETH exposure. Similar strategies have been widely used in defi for mitigating IL.

High-level Workflow

This is a high level workflow of a potential bot implementation for this strategy.

Step 1: Initialize the Position

  • The bot monitors the Uniswap V2 ETH/USDC pool and determines the initial deposit amounts.
  • It records the initial price P0P_0 and the corresponding ETH and USDC reserves.
  • A hedge position is created by opening both a long call and a long put on ETH/USDC perpetual futures, with strike prices set at ±10%\pm10\% of P0P_0.

Step 2: Market Monitoring

  • The bot continuously tracks ETH price movements, liquidity pool balances andimpermanent loss and perpetual position value.

Step 3: Hedge Rebalancing

  • If the ETH price moves significantly, the bot evaluates whether the hedge position is still effective.
  • The hedge is adjusted periodically based on predefined rebalancing thresholds (e.g., every 5% price move).
  • The bot either closes existing options and opens new ones to maintain effectiveness of the hedge position.

Step 4: Position Settlement and Exit

  • If the LP decides to withdraw funds from the pool, the bot closes all hedge positions.

Mathematical Framework

To evaluate the effectiveness of our hedging strategy we will use a backtest which is based upon this simple mathematical model based on Uniswap V2 constant product formula.

A liquidity provider LP deposits his ETH and USDC into a Uniswap V2 pool. We will assume that this LP is the only provider in this pool for simplicity.

P0=InitalETHUSDCprice=RETH,0RUSDC,0RETH,0=Initial ETH reserve in the poolRUSDC,0=Initial USDC reserve in the poolP_0 = \frac{Inital ETH}{USDC price} = \frac{R_{ETH,0}}{R_{USDC,0}} \\ R_{ETH,0} = \text{Initial ETH reserve in the pool} \\ R_{USDC,0} = \text{Initial USDC reserve in the pool} \\ \\

In our backtest we will assume ETH returns (relative price changes) are normally distributed.

N(μ,σ2)r\mathcal{N}(\mu,\sigma^2) \sim r

Any new price Pi+1P_{i+1} is therefore given by

r=Pi+1PiPi+1=rPir = \frac{P_{i + 1}}{P_i} \rightarrow P_{i + 1} = r \cdot P_i

Uniswap V2 pools follow the constant product formula, so therefore kk is defined as

k=xy=RETHRUSDCk = x \cdot y = R_{ETH} \cdot R_{USDC}

We do not deposit or withdraw any LP during the backtest so we can assume that kk is constant.

k=RETHRUSDC=RETH,iRUSDC,ik = R_{ETH} \cdot R_{USDC} = R_{ETH,i} \cdot R_{USDC,i}

The new ETH and USDC reserves (xi+1x_{i+1}, yi+1y_{i+1}) in relation to a new price Pi+1P_{i+1} can be derived as follows.

k=xiyi=xi+1yi+1xi+1yi+1=Pi+1xi+1Pi+1=yi+1xi+1Pi+1=kyi+1xi+12=kPi+1xi+1=kPi+1xi+1yi+1=kyi+1=kxi+1k = x_i \cdot y_i = x_{i+1} \cdot y_{i+1} \\ \frac{x_{i+1}}{y_{i+1}} = P_{i+1} \\ x_{i+1} \cdot P_{i+1} = y_{i+1} \\ x_{i+1} \cdot P_{i+1} = \frac{k}{y_{i+1}} \\ x_{i+1}^2 = \frac{k}{P_{i+1}} \\ \rightarrow x_{i+1} = \sqrt{\frac{k}{P_{i+1}}} \\ x_{i+1} \cdot y_{i+1} = k \\ \rightarrow y_{i+1} = \frac{k}{x_{i+1}}

The total value of the LP (VLPV_{LP}) can be calculated trivially.

VLP,i=RETH,iPi+RUSDC,iV_{LP,i} = R_{ETH,i} \cdot P_i + R_{USDC,i}

The value if we holded (VhodlV_{hodl}) the assets instead of depositing them can be also derived easily.

Vhodl,i=RETH,0Pi+RUSDC,0V_{hodl,i} = R_{ETH,0} \cdot P_i + R_{USDC,0}

Now we can calculate the impermanent loss LL as a ratio between VLPV_{LP} and VhodlV_{hodl}. Positive values correspond in money lost and negative values to money gained.

Li=1VLPVhodlL_i = 1 - \frac{V_{LP}}{V_{hodl}}

For our simple backtest we will ignore fees, time decay, any rolling effects, etc. Therefore we can define the profit from a long position pnlpnl based on the current price PiP_i, strike price SlongS_{long} and size QQ.

pnl(Pi)long=max(0,PiSlong)Qpnl(P_i)_{long} = \max(0, P_i - S_{long}) \cdot Q

Analog is the pnlpnl function for short positions.

pnl(Pi)short=max(0,SshortPi)Qpnl(P_i)_{short} = \max(0, S_{short} - P_i) \cdot Q

In out strategy we will use a constant QQ of the inital ETH deposit to simplify.

Q=RETH,0Q = R_{ETH,0}

The total value of the portfolio with the correcting hedge position VhedgeV_{hedge} and corresponding impermanent loss LhedgeL_{hedge} is as follows.

Vhedge,i=VLP,i+pnl(Pi)short+pnl(Pi)longLhedge,i=1Vhedge,iVhodl,iV_{hedge,i} = V_{LP,i} + pnl(P_i)_{short} + pnl(P_i)_{long} \\ L_{hedge,i} = 1 - \frac{V_{hedge,i}}{V_{hodl,i}}

Results

We will confirm the effetiveness of our strategy with several backtest simulating different market conditions. Please note that not all features have been implemented in the backtest. For example rebalancing has been left out.

The first backtest simulates a market with volatility of 2%2\% per tick. In this market we see that our strategy seems to work and hold the portfolio value around 9500 USDC9500\space\text{USDC}. The hedge significantly reduces max drawdown from 17.2%-17.2\% to 9.97%-9.97\%, improving worst-case losses, but it also increases return volatility, as seen in the higher standard deviation of IL. But the hedge is still statistically significant (p-value ≈ 0), confirming its impact.

survival-probability-surface.png

The next backtest simulates a downwards drift in ETH price. LP suffers from significant impermanent loss (10.6%10.6\% mean IL) with high volatility (8.98%8.98\% std dev), while the hedged strategy not only mitigates ILIL but results in an overall gain (20.9%-20.9\% mean IL). The hedge also reduces max drawdown considerably from 58.7%-58.7\% to 23.4%-23.4\%, suggesting better downside protection. But we see in the end even the hedge position suffers from loss. Here would rebalancing come into play, but this has not been implemented in this simulation.

survival-probability-surface.png

Discussion

The backtests indicate the the proposed hedging strategy using Binance perpetual futures could effectively reduces impermanent loss for Uniswap V2 liquidity providers. We saw the hedge minimize maximum drawdowns, particularly in high-volatility and declining markets, and demonstrates statistically significant improvements.

Several key features are missing from the backtest, potentially affecting real-world performance. The model lacks a rebalancing mechanism, which is crucial for maintaining hedge effectiveness over time. It also does not account for trading costs, liquidity constraints, or funding rates, all of which could erode profits. Additionally, time decay and execution slippage are ignored, making the simulated results more optimistic than practical outcomes.

To enhance reliability, the strategy requires further risk management measures. Dynamic position sizing, stop-loss mechanisms, and optimized hedge execution timing could improve performance. A structured rebalancing approach, triggered by price thresholds or volatility changes, is essential to maintain hedge efficiency. While the results confirm the potential of perpetual futures for mitigating IL, further refinements and real-world testing are necessary before deploying the strategy in live markets.