UniswapV3 Explanation │ double jump.tokyo

Natsune
double jump.tokyo
Published in
5 min readJul 24, 2024

In this article, we explain the Uniswap V3-type liquidity provision used in various decentralized exchanges (DEXs), including Teal Swap. We will cover the fundamentals of how liquidity provision works and important points to consider.

This article aims to explain the mechanics of DEXs and liquidity provision. It is not intended to encourage readers to involve themselves with liquidity provision or investment activities.

Summary:

Liquidity Provision: This involves depositing a pair of tokens into a DEX. In V3, you specify a price range.

Benefits: Increased liquidity helps ensure that DEX users get more favorable rates during transactions.

Advantages: You can earn a portion of the trading fees and receive special campaign rewards.

Disadvantages: The ratio of the token pair you deposit can change due to price fluctuations. When you withdraw your liquidity, you might receive a different number of tokens than you initially deposited. This mechanism, where the number of tokens increases for the falling price and decreases for the rising price, can potentially lead to losses.

Unlike traditional exchanges where trades are made directly between buyers and sellers, DEXs (Decentralized Exchanges) operate without direct counterparties. They feature automatic price determination and allow trading at any time.

In the context of a DEX, liquidity refers to the reserve of tokens available for trading. For example, to trade ETH and USDC, there needs to be liquidity in the ETH-USDC pair. Providing liquidity means depositing token pairs into the DEX. Transactions require fees, a portion of which is distributed to liquidity providers based on their share of the liquidity pool.

From the perspective of DEX users, sufficient liquidity ensures more favorable rates during transactions. Let’s compare trades with low liquidity versus those with high liquidity to illustrate this point.

if you try to swap $10,000 worth of USDC for USDT in a pool with low liquidity, you might only receive $6,463 worth of USDT due to the poor rate. On the other hand, in a pool with high liquidity, you could receive $9,328 worth of OAS.

As you can see, increased liquidity allows for smoother transactions. Therefore, campaigns and other initiatives are often implemented to encourage liquidity provision.

What is Liquidity Provision (V3)?

Depositing a token pair that serves as liquidity with the DEX is called liquidity provision.

There are two main types of liquidity provision: Uniswap V2 and V3. V2 provides token pairs for the entire price range, while V3 provides token pairs for a specific price range.

If V2 and V3 offer the same amount of liquidity, V3 can increase liquidity more efficiently. This is a little confusing, so we will use a diagram to explain.

When providing liquidity with V3, you often see graphs like the one above showing price and liquidity. It helps to think of the provided funds as the area of liquidity times the price range. The narrower the price range, the higher the liquidity within that range, while a wider range means thinner liquidity. V2 provides liquidity across the entire price range, offering the thinnest and widest spread.

By concentrating liquidity within a narrower price range, V3 allows for more liquidity within that range compared to V2. This results in smaller rate changes during transactions, making unfavorable rates less likely.

Points to Consider for Liquidity Provision

Tokens Returned May Not Be the Same Amount as Deposited

In liquidity provision, the tokens you deposit do not necessarily return in the same amount, unlike staking.

The ratio of the token pair you deposit will change due to trading activities. For example, if you initially deposit ETH and USDC at a 50:50 ratio, and then a lot of ETH is bought with USDC, the liquidity pool will have more USDC and less ETH. If you withdraw your liquidity in this state, you will receive more USDC and less ETH compared to what you originally deposited.

Impermanent Loss

The contents of the liquidity pool will change such that the number of tokens whose price has increased will decrease, and the number of tokens whose price has decreased will increase. This can lead to a potential loss compared to simply holding the tokens outside the liquidity pool. This phenomenon is known as impermanent loss.

Impermanent loss will inevitably occur if there is a price difference between the time you provide and withdraw liquidity. Therefore, the key factor in deciding to provide liquidity is whether the potential earnings from fees and campaigns will exceed the impermanent loss.

Understanding impermanent loss is easier when you consider it in the context of price fluctuations.

The greater the deviation in the price ratio of the token pair from the time you deposited it, the larger the impermanent loss will be. This is because you end up with a higher proportion of the token that has depreciated in value.

If, during trading, the price ratio at the time of withdrawal is not significantly different from when you deposited, the impermanent loss will be minimal, and you will also earn transaction fees. This represents a successful outcome for liquidity provision.

Setting Price Ranges

In V3, one key point to be aware of is that if the price moves outside the specified price range, you will not receive any trading fees. Additionally, depending on the campaign, you might also miss out on other rewards, so make sure to check the details carefully.

Furthermore, in V3, the ratio of the deposited token pair can vary from 100%:0% to 0%:100% based on the price range and the current price. If the price moves outside the specified range and one token appreciates, the token that did not appreciate will make up 100% of your holdings. Conversely, if the price moves outside the range and the token depreciates, the depreciated token will become 100% of your holdings.

Understanding this mechanism is crucial when setting your price range.

Summary

In this overview, we have discussed liquidity provision using Uniswap V3.

Liquidity provision plays a crucial role in DEXs, but it’s essential to thoroughly understand its mechanisms and risks. V3’s liquidity provision allows for efficient liquidity increases by specifying a price range, which helps mitigate rate fluctuations during trades.

However, there are several important considerations, including impermanent loss and price range settings. It is crucial to carefully weigh these risks and benefits before engaging in liquidity provision.

--

--