Strategy Design

Uniswap v3 Stable LP Strategy

Introduction

What makes Uniswap v3 different than other automated market makers (AMM) is that one can provide concentrated liquidity. The liquidity provider can make the highest profit if they provide the liquidity in the exact and tightest range of the pool price on Uniswap v3 compared to other AMMs. Hence Uniswap v3 is the best protocol for active liquidity providers, and we decided to develop a strategy on it.

Each pool on Uniswap v3 has a minimum tick spacing, representing the minimum price range to put in liquidity. We provide liquidity in the minimum tick spacing range to best use the concentrated liquidity feature. Therefore, capital efficiency is guaranteed. The cost of being a liquidity provider is the divergent loss and rebalance fee when changing the liquidity range. Therefore, we divide our liquidity position into two parts to reduce the cost.

Liquidity Strategy

  1. Add liquidity in two ticks: one is the tick just below to current tick, the other is the tick just above to the current tick.

  2. When the price moves into one of the liquidity position after the rebalance time, we remove the other liquidity position, and add liquidity to the tick just below or above to the current tick. The choose of below or above is determined by historical data to predict the trend of the price.

  3. When the price moves outside the current tick after the rebalance time, if the prediction is true, then we redo step 2.

  4. Otherwise, we redo from step 1.

Prediction of the trend of the price

To be an active liquidity provider, we need to capture the price movement to replace our liquidity, so we need to predict the price.

Dividing the tick range by the minimum tick spacing, we get tick intervals [i0, i1, . . . , in] for the pool. To model the price in the pool with time T , we separate the period T into [t1, t2, . . . , tN ], where tk denotes the time when the price move outside its current tick interval i. We estimate the price movement by the following conditional probability.

Thus, the expected return of providing liquidity has the following two relations.

Thus, if the current price is in is, we can determine to put our liquidity in is+1 or is−1 by the estimated return.

Analysis

We need to choose the rebalance time t and the training period T to collect historical data. We use the sUSD/USDC 0.05% pool to do the backtest. Figure 1. is the backtest result of the profit with respect to the rebalance time and training period. We can see that the strategy makes a profit in most cases. Figure 2. is the strategy performance with rebalance time 0.45 day and training period 27 days. Figure 3. is the performance of providing constant liquidity between the first and third quantiles of the price as a benchmark to compare.

Figure 1: The performance of the strategy from 2022/06 to 2022/12. The y-axis is the profit and loss. The x-axis is the rebalance time. The color of the dots represents the training period.

Figure 2: The performance of the strategy from 2022/06 to 2022/12. The y-axis is the profit and loss in red line, and the pool price in blue line. The x-axis is the time. The green and red intervals are the liquidity provided.

Figure 3: The performance of the benchmark from 2022/06 to 2022/12. The y-axis is the profit and loss in red line, and the pool price in blue line. The x-axis is the time. The brown intervals is the constant liquidity between the first and third quantiles of the price.

Last updated