Detailed Explanation Of Uniswap V3 | Teach You How To Earn High Profits!

KingData ·2022-08-09

Source: Talk Chain

I. Introduction

One of the most important infrastructures in the currency circle is the exchange. The focus of exchanges is liquidity, and there is enough liquidity to allow users to buy and sell tokens smoothly. Centralized exchanges (CEX) and decentralized exchanges (DEX) employ two very different solutions.

Centralized exchanges: hire specialized market makers to provide liquidity through order books. The fees paid by users are shared by the platform and market makers.

Decentralized exchanges: Generally, the AMM mechanism (automatic market maker mechanism) is adopted, and all users can invest two or two tokens for "liquid mining" and share the platform fee income.

During DeFi Summer, Uniswap V2 successfully promoted the AMM mechanism and solved the liquidity problem of decentralized exchanges.

2. Disadvantages of V2 AMM

The V2 version of the AMM mechanism has a fatal disadvantage, that is, "the capital efficiency is too low"!

Since the development of the AMM mechanism, there have been several different variants. Uniswap V2 uses the earliest and most widespread constant product market maker (CPMM) in the industry, based on the function x*y=k.

This function will determine the exchange rate and price of the token based on the liquidity of each token. When the supply of token X increases, the supply of token Y decreases, maintaining a constant product K. Therefore, this function is a hyperbola with both ends approaching infinity.

————The dividing line of human speech————

In other words, after users combine two or two tokens into an LP, the system will allocate tokens to each price according to the curve in order to ensure liquidity at each price.

For example, if I make ETH and USDC into LP, users of the exchange can exchange currency when ETH is $100,000, or they can exchange currency when ETH is $100. Because, my liquidity will be equipped in various price segments.

but! Under a normal market cycle, ETH will not rise to $100,000, nor will it fall to $100. ETH should be constantly oscillating in a fixed range.

Suppose, in this cycle, ETH is constantly fluctuating between $800-5000. Then the AMM mechanism allows LPs to allocate liquidity outside this range, which is to make this asset useless.

Normally, the APR of an LP is only about 10-20%, and the capital efficiency is very low.

Of course, the AMM mechanism of Uniswap V2 also has some other shortcomings, such as:

Users need to withdraw liquidity before they can claim fee income;

2. The fees earned by users at that time were all distributed with UNI tokens, not everyone likes UNI tokens;

3. The revolutionary advantage of V3 - custom interval

V3 improves the shortcomings of the traditional AMM mechanism, and liquidity providers do not need to allocate funds to various price ranges. Users can set a range, and if the token price fluctuates within the range, liquidity providers can earn fee income.

The picture below is the interface of V3. Everyone can set the interval by themselves, so the amount of funds in the pool at different price ranges is different. Remember three points:

The horizontal axis means the price range

The vertical axis means the amount of money at each price level

A certain amount of funds means a certain area, and if a wide price range is set, the amount of funds allocated to each price level will decrease, and vice versa.

V3 custom interval interface

So, the smaller the interval is set, the more intensively our funds are allocated. If the price really moves in a range, then we can get a very high APR.

However, if the price fluctuates beyond this range, then we cannot continue to earn fees. Therefore, conservative investors can set wide ranges, and aggressive investors can set narrow ranges. Uniswap V3 provides LPs with a very high degree of customization.

In short, the mechanism of V3 allows the three parties to benefit together. Because of the improved capital efficiency, exchanges gain more liquidity; platform users can enjoy currency exchange services with lower slippage; LP providers can enjoy higher fee sharing.

4. Other upgrades of V3

Compared with V2, Uniswap V3 version has some changes, such as:

First, liquidity providers can reap fees without withdrawing liquidity;

Second, the fee income is no longer issued with UNI tokens, but bilateral tokens. What tokens we put into LP will be used to issue our fees;

Third, users can customize the price range, so each person's LP settings are different, so the LP certificate is not a general ERC-20, but an NFT;

5. Risk Warning

The essence of Uniswap V3 is a leveraged tool that helps us improve capital efficiency. Therefore, it will also increase the original investment risk, that is, increase the risk of impermanent loss.

Simply put, impermanent loss is the impermanent loss that occurs when liquidity is provided. The reason why it is called a non-permanent loss is that if the exchange rate of the two tokens returns to the initial state, the loss will disappear.

The general AMM mechanism has impermanent losses, but the AMM mechanism of V3 limits the funds within a certain range, which plays a leverage role and increases the risk of impermanent losses.

For example, we make token A and token B into LP. Under the traditional AMM mechanism, only when Token A is reset to zero, all of our Token B will be replaced by Token A. We will not have Token B in our hands, nor can we enjoy the increase of Token B.

However, under V3, as long as token A falls below the range (maybe below $10), then token B in our hands will all be exchanged for token A. At this time, we will no longer enjoy the increase of token B.

In conclusion, the V3 mechanism will make the ratio of the two tokens in the LP change faster, and the risk of impermanent loss will increase. But, it doesn't matter, the handling fee of V3 is very high, and the handling fee can easily make up for impermanent losses.

6. Practical teaching

First, enter the Uniswap official website and select the public chain you want to use.

Official website link: https://app.uniswap.org/

Public chain options: ETH mainnet, Polygon, Optimism, Arbitrum, Celo

There is no difference in Uniswap V3 operation opportunities on each public chain

Second, select "Liquidity" and "New Position" in the picture to enter the interface for adding LPs

V3 interface

Third, customize the relevant parameters

First, choose two tokens to combine into one LP. Note that these two tokens must be what you like, and you don’t mind being full of a certain token, because after falling below the range, you will be full of a certain token.

V3 Interface for adding liquidity

Secondly, select the fee level, the fee is 0.05%, 0.3%, 1%. Different fees are different pools, and you can choose which pool to add liquidity to. Different token pairs are suitable for different fee models. The system will display which trading pair most of the liquidity is in, for reference.

There are three modes of handling fee

Again, choose a range, assuming that I think ETH and USDC will likely fluctuate between 1500-1800, then I set the range like this. As long as the ETH price fluctuates in this range, then I can get a fee. However, if ETH falls below 1500, all the USDC I invested will be replaced by ETH; on the other hand, if ETH rises above 1800, the ETH I invested will be replaced by USDC one after another.

set price range

Finally, put the tokens you want to invest into the pool. However, V3 can customize the interval, and the size of the left and right intervals is different, so the two tokens we want to invest will be adjusted according to the interval ratio, not 50:50.

The system will calculate the proportion of funds that need to be invested

Fourth, interval setting tips: V3 can not only help us earn high fee income, but also allow us to gain additional income in the process of bottom-hunting and profit-taking.

Bottom-hunting: If we think that the short-term price of ETH will get lower and lower, we hope to buy ETH one after another in the process. We set a range in the ideal price, and as long as the ETH price falls to this price range, we will continue to buy. If it falls beyond the limit of this range, it means that the bottom-hunting bullets are used up.

Take Profit: If we think the price of ETH will be higher and higher in the short term, and this is the high range in the short term. We can set a range in the price where we want to take profit. As long as the price rises to this range, we will sell them one after another. If the price rises beyond the limit of this range, it means that the profit is complete.

Range examples for bottom-hunting and take-profit settings

Fifth, the recommended tool: Revert Finance

Official website: https://revert.finance/

Use 1: Simulate LP income

Because the interval set by each person is different, Uniswap does not provide a unified APR to users. Generally, users can only throw their own money to test different LP settings to see which one has higher returns.

This Revert Finance provides a simulator. After we enter the public chain, token type, and range price, the system will display the APR of revenue in the past period. Very helpful for setting the interval!

V3 Earnings Simulator

Use 2: Copy homework artifact

Revert Finance has counted the V3 data of each public chain. We can view other people's APRs, and we can look at the parameters set by others in detail. We can openly copy the homework of outstanding students!

V3 LP High Yield Ranking

Use 3: Asset Management Tool

Compared with Uniswap's official website, Revert Finance provides more detailed asset data. In addition to checking the LP price and fee income, we can also see data such as the efficiency of capital use and the size of impermanent losses, which is very useful!

Asset management interface

7. Conclusion

The tools of Uniswap V3 are very powerful and can greatly increase LP income. If you also want to try liquidity mining, then be sure to try this artifact tool! The text version may have missed some practical details. TalkChain has produced a teaching video, and you can view the detailed teaching on Youtube.

© The copyright of this article belongs to KingData, and can't be reproduced and used without KingData's permission.

TAGSDEFI