IL & Real Gains : Uniswap Story
Introduction
Are Uniswap v3 liquidity providers (LP) profitable ?
Recent research shows that at least in the most popular Uniswap v3 pool (USDC/WETH 0.05%), LPs have been suffering large losses. Is Uniswap¹ liquidity provisioning an irrational behavior that is expected to disappear with time? Not necessarily.
To show why, I will make the following arguments:
1. The published LP profit-and-loss analyses are sometimes misinterpreted to apply more broadly than they actually do. Additionally, the LVR idea itself provides a way how to identify +EV (positive expected value) pools.
2. It is not realistic to select a single, one-size-fits-all LP profitability metric. LPs have different goals when depositing to Uniswap. Currently, the most widely used metric is “EV in USD terms compared to HODL”. However, it is not always the right one to measure what “success” means for an LP; for example, range orders, just-in-time liquidity, and potentially also hedging, can all lead to incorrect conclusions when this metric is used.
¹ — I’ll skip “v3” further in this article.
Background
Feel free to skip this if you’re familiar with the context and existing discussions.
A decentralized exchange (DEX) can only be attractive to traders if its price impact and fees are low enough to be competitive with centralized exchanges or other alternatives. In order to have a low price impact, a DEX requires deep liquidity to be present near the current price. Low fees are only possible if liquidity providers (LP) price this liquidity cheaply enough.
These actors have conflicting interests:
- Traders: want fees to be small and liquidity highly concentrated relative to volatility
- LPs: want fees to be big and liquidity concentration low relative to volatility
Given these pressures, is realistic to expect that LPs deposit large amounts of non-incentivized liquidity? Or is the current state a historical aberration that will be corrected when the markets become more rational? Are liquidity providers expected to be profitable, on the average?
These are not new questions: doubts on Uniswap LP profitability have been showing up since at least January 2019 (for Uniswap v1 at the time). But at the moment, mostly thanks several recent analyses by several researchers that look at impermanent/divergence loss (IL), markouts and Loss versus Rebalancing (LVR)², as well as increased conceptual awareness of the order flow toxicity, a consensus seems to be forming that Uniswap LP is highly unprofitable.
Perhaps at this point the community’s opinion risks shifting too much in this direction. Certainly there is a lot of room for improvements in DEX design, but they are either yet to be tested in the real world, or come with their own limitations (e.g. small number of tradable assets in GMX).
² —Further in this article I don’t always distinguish between LVR and IL analyses. Under certain assumptions, they result in the same expected value of PnL .
In quantitative finance, we assume that market trends are unpredictable, and asset price behavior follows a Geometric Brownian Motion. We simulate the future random walk based on historical returns and volatility, which is also known as a price random walk.
So how do we describe a random walk? The variation in asset prices follows a stochastic differential equation, which is a historical expected return μ and a historical volatility σ:
Here, St represents the price of the asset at time t, dSt represents the change in the asset within an infinitesimal time interval, and Wt~N(0,1) follows a normal distribution with a mean of 0 and a standard deviation of 1, representing the random component in the asset price movement.
The random walk is an ideal framework for liquidity providers to assess asset price trends. As opponents of trend bettors, LPs must assume that the asset will not deviate from a specific trend and focus only on the fluctuations within a certain range. Their profits come from this range, and they welcome bettors to participate. Let’s look at the following graph to understand the concept of a random walk and price intuition.
Next, let’s solve the above geometric Brownian motion equation accurately to obtain the analytical expression of the asset at time t. Let’s assume the current price of ETH is 1800, and we simulate the asset’s price movement for the next 90 days without deviating from a specific trend, using μ=0.1 and σ=0.2 as parameters.
The graph above shows a sample path of asset price variation that follows a geometric Brownian motion. We expect that, given the parameters of expected returns and volatility, after simulating hundreds of paths, the prices will converge to a specific range at a given future time t. We performed 200 random walk simulations, and based on the
terminal prices, approximately 70% of the paths eventually returned to the range between 1610.87 and 1980.13. You may have already guessed the connection between this range and the LP’s market-making range, but let’s first consolidate some intuitions about LP strategies before we quickly link them to practical applications.
Let’s review the thinking process of a robust LP strategy to help with further discussions in the next sections:
- LP opposes trend bettors.
- Assume that the asset will not deviate from a specific trend.
- Use a stochastic model to assess the asset’s price movement.
- Evaluate LP market-making strategies.
The parameters in the Brownian motion, such as expected returns (μ), historical volatility (σ), and time (t), directly affect the LP’s market-making strategy. To assist decision-making, we abstract these parameters. According to the formula, for assets with high returns, the opportunity cost for LPs is too high, so it is better to hold these assets directly rather than invest in the liquidity pool.
Similarly, high volatility assets increase the LP’s risk because there is a higher probability that the asset’s price movement will deviate from the average path, increasing the possibility of LP’s exposure to one-sided risk.
Lastly, the mathematical meaning of time in the Brownian motion suggests that as time goes on, the asset price is more likely to return to the profitable range. Therefore, it is advisable to avoid frequent adjustments of the market-making range.
Based on these intuitions, LPs should try to avoid participating in high-risk liquidity pools that may bring high returns, such as meme-meme or meme-USDC pools. Although these pools may offer high annual percentage yields (APY) in the short term due to abundant liquidity, in the long run, the price movements of these assets often deviate from a robust LP strategy.
Furthermore, why do many experts recommend deploying LPs in the BTC-ETH trading pool? Despite BTC and ETH individually offering higher returns, their return ratio in the liquidity pool remains relatively stable. This allows high returns to increase liquidity and balance the deviation from the LP range. The stability of this return ratio also validates our theoretical assumption that even if asset prices temporarily exceed the normal range, over time, they are likely to return to the LP’s profitable range because BTC and ETH tend to rise together in the long term. The delta of BTC-ETH hedges the potential losses from high volatility and impermanent loss (IL).
Qualitative screening for LP trading pools:
Quantitative evaluation of LP trading strategies:
I must emphasize that the purpose of the above analysis is to provide investors with a concise and intuitive thinking model and method framework. You have complete freedom to apply various assumptions and mathematical tools. Mathematics and tools are only aids to help investors abstract quality investment intuitions. However, the key is to gain a deep understanding of the market-making range through these tools, enabling you to make the best investment decisions.
Misinterpretation Risks
What can, and what cannot be said about LP profitability using the existing analyses Let us focus on the WETH/USDC pairs
Other analyses focus on ETH/stablecoin or large-asset pairs. Mid-cap asset pairs have been much less studied, and long-tail asset pairs almost not at all: the only paper that I know is about Uniswap v2, and analyses three “exotic” v2 token pairs (the paper from ETH Zurich). This focus is understandable because a large part of Uniswap liquidity belongs to the larger pairs. However, generalizations between different-sized pools should be done cautiously, because small-cap token dynamics are very different from ETH/USDC dynamics.
The LPs are still expected to have all of their principal back if the price reverts to the starting point. The problem is in the assumption that the price is going to revert at some point. This assumption is not true in general for volatile assets. Mean-reverting price action for volatile assets is an exception, not the norm. And if the LP believes that it is true for their particular pair of assets, then why not trade these assets instead of LP’ing? (Buy low, sell high.) The LVR approach to predict expected profitability is useful in particular when the LP cannot predict the price evolution of the assets.
Furthermore, the performance of the LP positions does, obviously, depend on the price action in the analysis period. It is really surprising that WETH/WBTC pairs have been performing better than WETH/USDC? In my opinion, not at all, because the WETH/WBTC price dynamics since Uniswap v3 launch date have been nearly ideal for LPs: range-bound and with almost no expected IL. Meanwhile, ETH is down nearly 50% since June 2021, when significant amounts of liquidity was first added to the WETH/USDC pools.
Which pools are profitable (against HODL)?
The LVR idea describes how arbitragers extract value from LP. Arbitrage order flow is considered “toxic”, as it forces the LPs to buy or sell against the market. The other flow, presumably mostly retail driven, is considered “uniformed”. If the uniformed flow dominates over the toxic flow, the pool does not suffer from the LVR problem.
The mechanics of LVR require the presence of another, more liquid market. However, for many assets, this is not the case. Initial DEX Offerings (IDO), airdrops, the latest and hottest meme coins, and various other long-tail assets may be traded predominantly on DEXes, including Uniswap. If liquidity on Uniswap is deeper than the liquidity elsewhere, the DEX price determines the “market” price, not the other way around. As a result, the toxic flow is smaller than the uninformed flow.”
LP’ing these assets are certainly not risk-free, on the contrary. However, they are likely to avoid the problem of LVR, and thus beat the HODL strategy. The main issue for LP here is the need to guess whether HODLing these assets is likely to give a positive EV in dollar or ETH terms; but at least they are relatively safe from LVR.
Range orders as LP positions
In Uniswap v3, creating and closing LP positions can be a form of trading. Range orders can be used as either buy-limit or take-profit orders. The fact that the order earns fees is a nice side effect, but typically not critical for traders. From an analytical perspective, it’s important to note that traders are expected to close their LP position as soon as the order is filled. Furthermore, the LP position is expected to be highly concentrated, and during its lifetime, the price action is expected to be directional, not mean-reverting. Both of these features imply high IL.
Let’s show the math on an example. Let’s consider a range order that buys WETH. The order is 1% wide and set to begin exactly at the current price P. This implies that the average buy price of WETH is equal to sqrt(0.99 P * 1.0 P) = 0.994987 P. At the moment when the order is filled, the price of ETH is just 0.99 P, and the value of the position is just to be 99.4987% of the original position’s value. Hence, the IL of the position is going to be slightly above 0.5%. Unless this is the 1% fee-tier pool, the fees are likely to be lower than that; the position is in loss.
Mind that this is an idealized example; in the real life, due to Uniswap v3 tick math limitations, the loss is likely to be higher:
- its usually not possible to open an LP position perfectly close to the current price;
- 1% wide LP positions may not be possible in the higher fee tiers;
- opening and closing the position is not instantaneous.
All this means that range orders generate significant negative EV from the IL perspective even if they are successful.
Just-in-time (JIT) liquidity
JIT liquidity is a form of MEV, so the mechanics and intentions of its actors are typically not openly discussed. One can guess, though, that JIT LPs would use some form of hedging. Or maybe JIT is combined with arbitrage trading. For instance, consider a JIT LP that has ETH and USDC both in a wallet and in a CEX. When the LP observes a large ETH -> USDC swap in the mempool, they deploy a LP position on Uniswap, and at the same time submit an ETH buy order on the CEX. After both trades, the LP has the same total amount of ETH and USDC as before. Assuming that the following holds, the LP are also profitable:
fees_DEX + price_impact_DEX > fees_CEX + price_impact_CEX.
According to the analysis as much as 37% of all JIT LP positions were not profitable, and the average JIT LP loses to the basic HODL strategy. Many other JIT LP positions have profits that are very low, likely below the “risk free” DeFi rates of e.g. staking ETH or supplying stablecoins in Aave. However, I’d argue that these results are likely to underestimate the profitability of JIT LP, due to two methodological problems described further: the lack of transparency on other arms of the trade, and potential issues with computing the closing price.
Two potential problems are present when analyzing the Uniswap JIT data.
The first problem is that it’s impossible to say what exactly happens from the LP’s point of view and thus compute their PnL accurately: only one part of the trade is recorded in the blockchain as a Uniswap swap, there may be other part(s) on other CEX and DEX. The second problem is related to the closing price, used to compute the JIT LP’s divergence loss. If the price after the swap is used to compute the IL, then higher price impact implies higher expected divergence loss. But clearly, price impact is a good thing for the LP, so using this closing price to compute IL is totally wrong! The analysis partially avoids this problem by using the average price “in the N blocks after the swap”. However, it still might not be the right one to use: Uniswap pools are not arbitraged back instantly due to the fee payment causing a “liquidity gap” next to the pool’s price. A market price from multiple other exchanges, not directly affected by the swap, should be used instead.
On the other hand, perhaps there is a real problem with JIT LPs, because they may be more exposed to toxic order flow compared with other types of LPs. Research shows that most of swaps are actually profitable for LPs; only swaps above a certain size have negative EV.
This suggests a new kind of strategy: inverse-JIT. An LP could monitor the mempool, and remove their liquidity whenever a swap over the size threshold appears in the mempool. When the swap is executed, the LP adds their liquidity back, likely in a different range. In L2 chains, the gas fees could be low enough for this to work.
Hedging for sideways markets
“How to hedge an Uniswap position to make it delta-neutral” is something of a holy grail topic in the LP community. Many have attempted this, few if any of those I have talked to have succeeded.
The payoff function of a LP position is concave. LP’ing with borrowed assets does not change this. As this demo shows, hedging via borrowing still leaves the exposed to unlimited downside risk, while limiting the max payoff.
Since Uniswap LP payoff function is similar to the payoff function of option sellers, another natural way to hedge would be to buy options. Buying both put and call option for the same asset results in a long straddle position. It has a highly concave payoff function; when combined with a partially hedged LP position, as shown in the figure, it can result in a delta-neutral (flat) total payoff. To put it in another way, Uniswap LPs are selling volatility, straddles are buying volatility, added together they may cancel out.
In any case, Uniswap positions can effectively function as hedges, generating good returns in case the market goes sideways.
As a philosophical aside: providing liquidity on Uniswap has been compared with selling options³. While it’s a debatable topic, it’s interesting to consider that buying options can be used either as a hedge (insurance), or for leverage (gambling).
Buying insurance and buying lottery ticks are two very different actions, but they do have one thing in common — negative expected value⁴. With insurance, one sells large, unpredictable loss and buys a small, predictable loss. With lottery tickets, one incurs some small fixed costs, and buys a large, unpredictable win. Most people would agree that at least one of them (buying insurance) is a rational action. Hence, not all finance-related actions need have a positive EV in monetary terms in order to appear rational.
Often, reducing risks and having a peace of mind and are often more important in crypto than maximizing one’s perceived EV. The real discussion here should about exactly how expensive it is to hedge through Uniswap LP, and how to select the right parameters for one’s goals: pool’s fee tier, position’s range, duration etc.