The King of DeFi, Uniswap, its V3 version and its pros and cons

AMM stands for Automated Market Maker, which is the Chinese name for automatic market maker. To put it simply, it is a platform where an algorithm takes the place of a traditional centralized platform and provides liquidity for exchanges in the market.

The King of DeFi, Uniswap, its V3 version and its pros and cons

AMM stands for Automated Market Maker, which is the Chinese name for automatic market maker. In simpler terms, it is a platform where an algorithm takes the place of a traditional centralized platform to provide liquidity for the exchange in the market.

Traders in the market have different expectations of the market and hold different assets in their hands, and each trader has different needs. We all know that to become a traditional market maker one needs to have very strong capital in order to constantly consolidate exchanges by becoming a seller and a buyer of pairs of transactions in the market, thus allowing retail investors to not have to constantly wait for counterparties to appear when exchanging.

01
Constant Product Principle

The exchange of various virtual Tokens on the blockchain also initially started with a centralized delivery platform. All this calm was broken by UNISWAP, and the method applied by UNISWAP is so simple that it is astonishing – the constant product principle.

x * y = k

In human terms, it is the multiplication of two variables to obtain a fixed constant. How can such a simple multiplication formula accomplish such an esoteric financial business as “market making”?

There are three roles behind the proper functioning of this mechanism, which are as follows

  1. The deal maker: exchanging one asset for another.
  2. Liquidity providers (LPs): willing to contribute their own portfolio of assets to help others exchange them for a fee.
  3. Arbitrageurs: find value depressions, such as buying from UNISWAP at low prices to sell in the market to earn some profit.

The relationship between the three is described in detail in a diagram on the UNISWAP website.

The King of DeFi, Uniswap, its V3 version and its pros and cons

Of course there is no arbitrageur in the graph, because from the platform’s point of view, both generated belong to the act of exchange.

Let’s assume that UNISWAP is an ETH-DAI exchange pool, and the first liquidity provider puts in a ETH and b DAI, both of which are of equal value.

The initial value of this exchange pair is x = a and y = b; the initial value of K = a * b.

At this point the price of the ETH is b/a and the price of the DAI = a/b.

With K constant, if this exchange pool has Trader T coming in and wants to exchange w EHTs for DAIs, how many DAIs will he get at what price?

Under the constant product principle, this operation goes like this

y’=K/(x+w).

where y’ is equal to the number of DAIs in the exchange pool after this exchange. It follows that the number of DAIs T gets = y – y’; the price of these DAIs = w/(y – y’).

So did you find out? There is no certainty about what price the trader will get until he tells the platform the number he wants to redeem. This sets UNISWAP’s price acquisition completely apart from centralized platforms and platforms that make use of price prediction machines.

02
K-value change

And don’t forget that we assume the precondition that K is constant, so which cases are K values to change? There are two answers, one is the exchange fee and the other is liquidity.

1、Exchange fee

For each exchange, users need to pay 0.3% commission. Take the above exchange example, we ignore the fee to simplify the calculation, the real situation is that the Uniswap platform will deduct 0.3% y’ fee after calculating y’, after completing the exchange, this 0.3% y’ will be added to the liquidity pool, at this time the K value becomes xy+ x0.3%y’=x*(y+0.3%y’).

So, did you notice that the K-value becomes larger? And vice versa, reducing mobility reduces the value of K. In other words, the K-value of the constant product algorithm is not constant, and every exchange affects the K-value.

  1. Liquidity

How does liquidity change the K-value? When a second person increases the number of ETH and DAI in an exchange pair proportionally, X and Y increase at the same time, obviously, the value of K increases; if the first person takes his exchange pair, the value of K decreases, very simple.

In short, the “constant” product is for the case of constant overall liquidity, and assumes that K is constant when there is no commission, just like when calculating physics problems assuming that there is no friction in a certain state. By simplifying the premise, making such a simple multiplication achieves the economic principle that price is inversely proportional to supply, which is really a genius design.

But those of you who are used to the traditional market maker model may be uncomfortable with the fact that this way of pricing two assets is not only rare but also too arbitrary. Why does letting the product obtained by multiplying the number of stocks of the two Tokens remain fixed ensure the correct quote? Because the designers believe that there will always be smart arbitrageurs in the market who will exchange repeatedly until the platform price matches the real price unprofitably.

Admittedly, the constant product market maker model appears slightly passive and isolated because of the lack of linkage to the outside world, always requiring arbitrageurs to smooth out the difference between the platform price and the true price; and the much-criticized exchange slippage and LP (liquidity provider) unearned losses discourage more conservative traders from entering the space.

But its advantages are also obvious – efficiency, transparency, low maintenance costs, and lower market making barriers make its disadvantages seem less important.

To sum it up in one sentence – “Leave everything to the market”.

Since UNISWAP pioneered the AMM automatic market maker model, as if it opened the brain of blockchain bigwigs, more and more refined projects have come in the market maker track. Although decentralized finance has not been created for a long time, there are memory points and projects that have taken off in the DEFI wave are coming and going.

With the arrival of UNISWAPV3, the creativity of this unicorn outbreak has again given a wonderful lesson to the later: it turns out that by deep capital utilization can also play a flower.

03
The pros and cons of UNISWAP V3

What are the changes of UNISWAP V3?

1、Capital utilization rate

The lock-up volume has always been the focus of competition, but V3 has brought about a rapid increase in volume, which is due to the “concentration of liquidity” to improve capital utilization.

How to concentrate liquidity? By limiting the trading range, it increases the depth of liquidity around the tradable price. If you imagine V2 as an infinitely wide sink, then V3 is a sink composed of a very small unit (TICK) sink side by side, you can spread your liquidity (Token) into the price range you are interested in, if your range covers the transaction price, you can get a share of the exchange fee, otherwise you are disqualified.

The King of DeFi, Uniswap, its V3 version and its pros and cons

Driven by interest, most people will choose to invest their liquidity near the deal price, so that the water near the deal price is also the deepest, this is very similar to the bill book centralized trading platform.

In this way LPs are concentrated in the range where they are more likely to be traded and capital utilization is greatly improved, as can also be seen from the latest V3 volume and lockup ratios. Especially for the exchange between stable, the efficiency is greatly improved.

2、The risk of LP

Compared to the more conservative and passive V2, V3 has higher requirements for LPs, requiring LPs to choose their strategies carefully based on their own judgment of the market. Because the liquidity invested in V2 LPs will not be at risk, the removal of liquidity or when they put in 1:1 assets, while V3 is different, not only released the 1:1 requirements, if the price fluctuations exceed their own locked interval, the LPs will be converted into one of the assets, the timing of the removal determines the number of assets they can take out.

There is no doubt that V3 has become more complicated, which also makes the speculation of air people to be more cautious, for example, after you provide the mainstream value Token and an air Token “exchange pair”, your value Token may be instantly sucked dry, the position into 100% of the junk Token is no room for maneuvering.

3、Limit order mode

If we take DAI/ETH as an example, in order to understand the definition of ETH as an expensive asset, DAI as a cheap asset; according to experience, the price of ETH may fluctuate significantly, and the price of DAI is relatively stable.

Several different patterns of orders can be achieved using a good V3 pricing range.

Take profit (YES), where you want to sell the expensive asset at a price above spot is feasible.

A low take (YES), where you wish to buy your asset at a price below the spot price, is feasible.

The King of DeFi, Uniswap, its V3 version and its pros and cons

(Stop-go order schematic)

Of course, there are some order patterns that are not feasible, such as

Stop Loss (NO), where you want to sell your asset at a price lower than the “spot price”, commonly known as a cut. Or it is not feasible to continue to add to your position at a price higher than the spot price (this step of setting up an order will not pass).

4、Prophecy machine

UNISWAP function as a prophecy machine is named by V God, V3 version of each individual pool will be used as a prophecy machine to provide data on exchange pairs. Historical transaction prices in blocks can be tracked, and the number of tracking observations (up to 65535) can be increased for a redemption fee, extending the period of data availability to 9 days or more. This will undoubtedly make prophecy machine attacks more difficult.

  1. Redemption fees

A major change in V3 is that redemption fees are no longer automatically added to the flow pool, and human-initiated collection commands are required to collect them. In addition, because the exchange fee must be obtained within the transaction interval, the calculation process becomes much more complex, according to the unit TICK rate multiplied by the total liquidity.

Of course, according to V3 user feedback, GAS fees rose significantly, is still friendly to large capital accounts, which can only look forward to layer2 after the launch of a major improvement.

UNISWAPV3 was launched after mixed reviews, but overall from the data, the recognition is still very high. Been imitated, has not been surpassed is the main string law of UNISWAPV3 at present, UNISWAP also gave a lesson to the imitation plate, the code can be FORK, but the creativity of thinking can not be imitated.

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/the-king-of-defi-uniswap-its-v3-version-and-its-pros-and-cons/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Like (0)
Donate Buy me a coffee Buy me a coffee
Previous 2021-06-30 04:26
Next 2021-06-30 04:31

Related articles