Uniswap V3 was announced yesterday and I didn’t have the opportunity to write about it, so I wanted to dedicate this newsletter to an overview of V3 and AMM in general.

My first reaction to Uniswap V3 was with one very honest word “aha”. But as he proceeds, things have improved, so let’s see what’s going on here.

Uniswap V3 is a major update and it’s clear that a lot of work has been done. But it gives less compared to the dazzling image of the new Uniswap that most of us have had. People expected Hayden Adams to bring everyone together and publish this amazing, continuous, unprofitable, and highly effective AMM that will make Uniswap dominate everyone.

Instead, V3 actually exacerbates unspecified losses, depending on your personal position and market movement.

The main innovation of V3 and the mechanism that exacerbates irreparable losses is the concept of concentrated liquidity. This means that liquidity providers can now choose which price ranges to adhere to, rather than covering the entire region from zero to infinity. To explain the mechanism, it is important to first understand how AMM works, quite simply.

Understanding AMM baskets and basins
AMM is nothing more than a set with many tokens on each side, for example 10 ETH and 20,000 DAI. The ratio between the two amounts for Uniswap 50-50 packages is the current price of ETH, or $ 2,000 in this scenario.

Suppose there is a user named Alice who wants to exchange his ETH for DAI. When you buy on Uniswap, it simply sends 1 ETH to the pool, which has been added to what was already there. The protocol then uses a formula called anchor curve to calculate how much DAI should give Alice in return.

Suppose the anchor curve is actually just a straight line, making it a fixed volume market maker, or CSMM. The price of ETH is $ 2,000, so the protocol awards 2000 DAI for this trade. Thus, the new balance will be 11 ETH and 18,000 DAI. So far so good – this is the most efficient trade AMM can ever support since there is no slippage.

However, when a dynamic market is involved in a deal, things get very frustrating for the fixed amount function. Let’s say ETH is down $ 1,800, which makes this rally an indispensable option for arbitrage because it still allows you to sell ETH for $ 2,000. A group of people use arbitrage and sell 9 ETH for 18,000 DAI. Now the pool simply does not have DAI, so no one can sell.

CSMMs are very effective, but they cannot operate in a real-world scenario because they cannot dynamically adjust the relative prices of assets. For this reason, most AMMs use curved formulas. In Uniswap V2, the price function is simply x * y = k, the mathematical formula for a hyperbola. Hyperbolas are ideal for AMM because they tend to be zero and infinity, but never reach. On true AMM pools, you can never run out of money – in the worst case, the price of an asset would be huge, and nearly infinite.

The disadvantage of using curves is slippage. The larger the trade, the more pronounced the curve, which appears as a worse price execution. Using the curved formula from our previous example, Alice would lose her big deal because the curve says she is worth, for example, only $ 1,850, not just $ 2,000.

If you add more liquidity, the curve will be “bigger” on the chart, which means that you will be able to trade more symbols before they experience a severe slippage. This is very similar to being on the surface of a planet: on Earth, you have to walk at least 20 km to notice its curve, and on a dwarf planet like Ceres, you can even notice it from ground level.

Another scenario to consider in our example is what happens if the buyers and sellers of ETH are perfectly balanced with each other and produce one volume of ETH per day? The remaining 9 ETH and 18,000 DAI are inactive and not constantly changing.

How Uniswap V3 tunes the linkage curve
Uniswap V3 understands that most of the pool liquidity remains untapped in practice. To fix this, V3 takes its previous hyperbolic formula and breaks it down into several straight lines centered around specific price ranges.

LEAVE A REPLY