Navigating Uniswap V3: A Comprehensive Guide to APR Estimation and Pool Risk Analysis

AlexEuler
9 min readMay 25, 2023

--

The conventional approach to APR (Annual Percentage Rate) estimation is commonly used by many liquidity providers on Uniswap V3. Namely, APR = (Expected Fees — Expected IL) / TVL. However, there is a significant problem with this methodology — it falls short in accurately reflecting the real dynamics of Uniswap V3.

This article delves into several important aspects that are critical for any liquidity provider to consider when participating in the DeFi space:

  1. Accurate Pool APR Estimation: We will delve into a more comprehensive and realistic approach to estimate APR for Uniswap V3 pools. This method takes into account the unique characteristics of Uniswap V3 and provides a more accurate picture of potential returns.
  2. Measuring Pool Risks: It’s important to understand the risks associated with each pool. Not all pools have the same risk profile, and understanding these differences can help liquidity providers manage their risk exposure more effectively. We’ll explain how to calculate and interpret important risk measures.
  3. Introducing a Helpful Tool: To make these concepts more approachable and actionable, I’ll introduce a handy tool — https://alexeuler.dev/uniearn. This online tool aids in evaluating and picking the best Uniswap pools based on risk and return parameters. It’s an invaluable resource for those wanting to navigate Uniswap V3 more confidently and profitably.

By the end of this article, you will have a greater understanding of how to navigate Uniswap V3’s complexities and how to make informed decisions to optimize your risk-return trade-offs. Ready? LFG!

Why Traditional APR Estimation Falls Short

Uniswap V3 introduced a much deeper level of complexity compared to its predecessor, Uniswap V2. To explain, let’s first look at how things worked in Uniswap V2.

In Uniswap V2, every Liquidity Provider (LP) had an identical risk and return exposure. The variations between LP positions existed in two main aspects: the pool in which they engaged and the magnitude of their investment, or position. To make an informed investment decision, an LP would study token volatility, decide the size of their position, and then proceed to invest accordingly.

In contrast, Uniswap V3 amplifies the complexity with five dimensions, adding three more layers to what existed in Uniswap V2:

  1. Size of the position
  2. Price range width of the position (exclusive to Uniswap V3)
  3. Tokens in the pool
  4. Fee tier (exclusive to Uniswap V3)
  5. Pool structure (exclusive to Uniswap V3)

The concept of Pool Structure is a dimension that is rarely noticed and thus requires further explanation. With the introduction of various width Price Ranges in Uniswap V3, pools have become heterogeneous, unlike the uniform nature in Uniswap V2. Some pools may have concentrated liquidity, while others may not.

Let’s consider an example: two pools have the same Total Value Locked (TVL) and identical fees. However, pool number 1 has higher liquidity concentration because LP providers tend to open narrower price range positions in that pool. If you, as an LP provider, open positions of the same width in both pools (thus maintaining the same risk profile), you would still achieve lower returns in pool number 1.

Typically, there are two commonly used methods to estimate pool returns:

  1. Pool APR = Fees APR / TVL (a basic approach)
  2. Pool APR = (Fees APR — expected IL) / TVL (a more advanced approach)

However, due to the diverse pool structures in Uniswap V3, neither of these methods are accurate.

To accurately estimate risk and returns, we need to accomplish three crucial steps:

  1. Neutralize the difference in pool structures by introducing the Liquidity Concentration Factor.
  2. Incorporate a risk measure for evaluating different positions.
  3. Develop a metric for identifying the most optimal pool.

Liquidity concentration factor (LCF)

In Uniswap V2, there appears to be a straightforward relationship between the TVL in your position and the fees you earn. Indeed, the more value you lock into the pool, the more fees you earn. But it’s important to understand that the actual mechanism isn’t exactly a direct TVL -> Fees Earned relationship, but rather a TVL -> Uniswap Liquidity -> Fees Earned. This subtle detail didn’t matter much in Uniswap V2 because Uniswap Liquidity was directly tied to TVL.

However, in Uniswap V3, this relationship changes. The Uniswap Liquidity -> Fees Earned relationship still exists, just as it did in Uniswap V2. However, the TVL -> Uniswap Liquidity link is no longer a direct proportion. Depending on the width of the price range you choose, you could have different TVLs for the same amount of Uniswap liquidity and vice versa.

In essence, the fees you earn are dependent on the amount of Uniswap liquidity in the pool and the amount of Uniswap liquidity in your position. Now that we understand this, we could attempt to analyze the pool returns using the Uniswap liquidity. However, the challenge arises because Uniswap’s liquidity is somewhat of an abstract number, lacking intuitive understanding — it’s not as straightforward or easily grasped as Total Value Locked (TVL). So, how can we improve our understanding of this?

The key lies in considering the TVL (we call it “Normalized TVL” further) as if it belonged to a Uniswap V2 pool but with the same amount of Uniswap liquidity as the Uniswap V3 pool. This concept allows us to better evaluate the performance and potential returns of a Uniswap V3 pool, making it more approachable and easier to understand. Here’s the formula:

Let’s recall that each Uniswap pool consists of two tokens, token0 and token1. By convention, token0 is the token whose Ethereum address is numerically smaller than token1’s address. Additionally, every Uniswap pool has an internal price p, which represents how many units of token1 are needed to purchase one unit of token0. The concept of Normalized TVL we’ve been discussing is expressed in terms of token1.

Now, let’s introduce a new concept, the Liquidity Concentration Factor (LCF). This is defined as the ratio of the Normalized TVL to the actual TVL. In simpler terms, it’s a measure of how concentrated the liquidity in the pool is. A higher LCF indicates a higher concentration of liquidity within a certain price range.

To make this practical and relatable, we’ll express both the Normalized TVL and actual TVL in US dollars (USD):

Now the more concentrated the pool is, the more LCF factor for it we’ll have. For example, for ETH/USDC pool LCF is approximately 2.2, while for USDC / DAI 0.05% it’s 760. This makes a lot of sense since we all know that stable pools are highly concentrated.

Calculating APR

Take a moment to consider this from the perspective of a liquidity provider. Would you really be concerned about whether the pool you’re providing liquidity to is:

  1. A Uniswap V3 pool with the exact TVL, or
  2. A Uniswap V3 pool with the normalized TVL where all liquidity providers contribute to positions with infinitely wide price ranges, effectively making it operate like a Uniswap V2 pool?

Interestingly, the answer is no, you wouldn’t really care! Regardless of the pool’s structure, you would still earn the same fees and bear the same risks.

And this is where our Liquidity Concentration Factor (LCF) comes into play. This metric allows us to greatly simplify the analysis of Annual Percentage Rate (APR) by assuming that we’re dealing with a Uniswap V2 pool, even if it’s actually a Uniswap V3 pool. By doing so, we eliminate the added complexity of price ranges and liquidity concentrations, making the APR calculation more straightforward and easier to comprehend.

So, here’s how you would calculate APR for comparing returns across different pools, taking into account our new understanding of LCF:

The calculated APR we’ve just discussed represents the returns you would earn if you were to provide liquidity within an infinitely wide price range, similar to how it works in Uniswap V2. What’s impressive about this is that it allows us to treat every Uniswap V3 pool as if it were a Uniswap V2 pool, simplifying our understanding and comparison of profitability across different pools. This APR metric, using the concept of Liquidity Concentration Factor (LCF), provides a clear picture of the potential earnings of each pool.

While we’ve made significant progress in understanding pool returns, there’s still a crucial piece of the puzzle missing — calculating the Expected Impermanent Loss (IL). Impermanent loss is a unique risk associated with providing liquidity in decentralized exchanges, and it’s important to factor it into our profitability calculations. Let’s dive into that next.

Measuring risks

We are aware of the formula used to calculate Impermanent Loss (IL), which is given as a percentage of the position:

where ‘r’ represents the relative price movement (p_1 / p_0). If we know the price volatility of one token relative to the other, and we assume that the price follows a log-normal distribution, we could theoretically calculate the expected IL. However, this approach could lead to a complex formula involving many cumulative distribution function (CDF) computations, which could be daunting and less practical to use.

An alternative, simpler approach involves leveraging the Value at Risk (VaR) measure. VaR is a widely used risk metric in the financial industry that estimates the potential loss in value of a risky asset or portfolio over a defined period for a given confidence interval. Let’s use VaR to determine the level of IL that, with a probability of µ=15.87%, would be surpassed within one year.

At first glance, the choice of µ might seem arbitrary, but it actually simplifies our risk measure. With this value of µ, we can use a simpler formula for our risk measure:

where σ is the price returns volatility.

Note is that the more volatile the assets, the larger the value of ‘R’. This is exactly what we would expect and want from a practical measure of risk. This level of risk is independent of µ, provided we use the same µ across all pools for consistency.

Selecting the best pools

Now that we have a practical method for estimating both returns and risks, we’re finally ready to devise a strategy to identify the best pools in terms of risk-return trade-offs. To do this, we’ll use an analogue of a financial metric called the Sharpe Ratio.

The Sharpe Ratio, named after economist William F. Sharpe, is widely used in finance to understand the return of an investment compared to its risk. The ratio measures the excess return (or risk premium) per unit of deviation in an investment asset or a trading strategy, typically referred to as risk (and represented by standard deviation). Essentially, the higher the Sharpe Ratio, the better the investment’s returns relative to the risk it carries.

For our specific case in evaluating Uniswap pools, the Sharpe Ratio becomes:

The logic remains the same — the higher this ratio, the better the pool in terms of risk-adjusted returns.

The beauty of this approach lies in its simplicity. It’s relatively easy to estimate each parameter in the formula, allowing for efficient and effective pool analysis.

Check this online tool that has data and metrics for all UniV3 pools: https://alexeuler.dev/uniearn.

For more insights and updates on the latest DeFi strategies and trends, follow me on Twitter at https://twitter.com/0xAlexEuler.

--

--

AlexEuler

Building Mellow protocol | Chartered Financial Analyst | Smart Contracts & Full Stack Dev | Math & Stochastic Analysis https://alexeuler.dev