Conceptualizing Uniswap v3 LP profit and loss

Atis E
11 min readJan 16, 2023

--

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 .

Misinterpretation Risks

What can, and what cannot be said about LP profitability using the existing analyses?

Most of them focuses on the WETH/USDC pairs, for instance:

0xfbifemboy’s ETH/USDC analysis showing big losses for the 0.05% pool’s LPs, close-to-neutral results for 0.3% pool’s LPs

One immediate conclusion from the figure above is that even for ETH/USDC, the expected PnL is very different depending on the pool.

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.

Speaking about concrete examples of misconceptions / mis-phrasings: for instance, take this: “liquidity provision in Uniswap and in similar decentralized exchanges is loss-making in the absence of subsidies” from here (hope the author does not mind me randomly picking him). The ETH/USDC analyses does not imply that this is the case in general.

Nor are the profits of the arbitrageurs stolen from the LPs in some mysterious ways. 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 (Section 6 in the LVR paper) is useful in particular when the LP cannot predict the price evolution of the assets.

LP profitability condition from the LVR paper.

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 Flipside 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 Flipside 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.

Payoff function of a partially hedged (H=0.45) Uniswap position

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.

³ —It has also been compared with by “giving options away for free” by 0x94305.

⁴ — Otherwise, insurance companies and lottery organizers would not exist.

What can be improved in future analyses?

Summing up these ideas, I would like to see more of the following:

  • As a preliminary step of any LP PnL analysis, filter out range orders, JIT liquidity, and potentially other atypical LP positions.
  • Be careful with generalizations of the conclusions.
  • Distinguish between profits in HODL terms, USD terms, and ETH terms (already done in the Flipside study), since different LP may be optimizing for different goals: for instance, they may want to accumulate more ETH, or may be using borrowed funds to LP.
  • Empirical PnL analysis in some specific market conditions is great because it provides the ground-truth data. However, due to the large number of factors affecting these real-life results, they should be extended with price path simulations. As a minimum, they should be parametrize with the price action (bull/bear/crab) during the analysis period.
  • Recognize that under certain assumptions LP positions can be used as insurance against sideways markets, not expected to be profitable on their own.
  • Have more open discussion and research on LP’ing strategies and optimal parameter selection methods.

--

--