Finance Redefined is Cointelegraph’s weekly DeFi newsletter, which is delivered to subscribers every Wednesday.
Uniswap V3 was announced publicly yesterday and I really haven’t had a chance to write about it, so I wanted to dedicate this newsletter to the V3 revision and the AMM space in general.
My first reaction to Uniswap V3 in one brutally honest word was “meh”. But it got better as I read on, so let’s unpack what’s going on here.
Uniswap V3 is a solid upgrade and it is clear that there was a lot of work on it. However, compared to the improved image most of us had about the new Uniswap, it is insufficient. People expected Hayden Adams to silence everyone and introduce this amazing volatile and extremely effective loss-protected AMM that Uniswap would read above all others.
Instead V3 worsens volatile loss, depending on your personal position and movement in the market.
The key innovation of V3 and the mechanism that exacerbates permanent loss is the concept of concentrated liquidity. This means that liquidity providers can now choose the price ranges in which they provide liquidity, instead of covering the entire range from zero to infinity. To explain the mechanism, it is important to first understand very simply how AMMs work.
Understanding AMM curves and files
The AMM is nothing more than a fund containing a series of tokens on both sides, say 10 ETH and 20,000 DAI. The ratio of the two amounts for Uniswap 50-50 funds is the instantaneous price of ETH, or $ 2,000 in this scenario.
Let’s say there is a user named Alice who wants to exchange 1 ETH for a DAI. When trading on Uniswap, he simply sends her 1 ETH to the fund, which adds to what was already there. The protocol then uses a formula called the binding curve to calculate how much DAI Alice should give in return.
Assume that the coupling curve is actually just a straight line that would make it a Constant Sum Market Maker or CSMM. The price of ETH is $ 2,000, so the protocol gives 2,000 DAI for this trade. The new balance would therefore be 11 ETH and 18 000 DAI. So far, that’s fine – it’s by far the most efficient deal AMM could ever support because it has zero slippage.
However, if a dynamic market is involved in trade, the situation is really ugly for the constant sum function. Suppose ETH has dropped to $ 1,800, which will make this fund an insignificant arbitrage opportunity because it still allows you to sell ETH for $ 2,000. Many people participate in the arbitration and sell 9 ETH for 18,000 DAI. Now the fund simply has no DAI, so no one can sell anymore.
CSMMs are extremely efficient, but they cannot operate in a real-world scenario because they cannot dynamically adjust relative asset prices. For this reason, most AMMs use curved formulas. In Uniswap V2, the price function is only x * y = k, the mathematical formula of the hyperbola. Hyperboles are ideal for AMM because they have an asymptotic tendency to zero and infinity, but they never reach them. In the real world, AMM funds never run out of money – in the worst case, the price of one of the assets becomes a huge, almost infinite number.
The disadvantage of using curves is the slip. The larger the trade, the more visible the curvature of the price, which is reflected in poorer price execution. By applying a curved formula to our previous example, Alice would lose out of her big deal because the curve would say she is only entitled to, say, $ 1,850 DAI and not the entire $ 2,000.
By adding more liquidity, the curve in the chart “widens”, which means that you will be able to trade more chips before there is a serious slip. It’s really similar to the surface of a planet: You have to go up at least 20 km on Earth to really notice its curvature, while on a dwarf planet like Ceres, you can also notice it from Earth.
Another scenario to consider in our example is what happens when ETH sellers and buyers are fully balanced with each other and produce 1 ETH volume per day? The remaining 9 ETH and 18,000 DAI sit idly by and do not actually participate in the constant switching.
How Uniswap V3 improves the bonding curve
Uniswap V3 comes from the realization of it a lot of liquidity in the funds remains unused in practice. To correct this, V3 takes its previous hyperbolic formula and segments it into many straight lines centered around specific price ranges.
Liquidity providers can choose the ranges where they want to provide liquidity, concentrate it and lead to a much more direct price curve. This allows for much higher capital efficiency, as you may only need 10% of previous liquidity to facilitate the same trading volume with the same slip parameters.
However, the disadvantages are quite obvious. The official blog post is in the hands of these trade-offs, but defining liquidity in a certain final range means that if the price moves away from it, the LP position will become 100% composed of a loss-making asset. This is the most extreme form of volatile loss, similar to the example of CSMM. The tighter the range, the faster the loss. Uniswap downplayed this problem by saying that because capital efficiency is higher, you can invest less capital to get the same fees as before, thus “reducing” your volatile loss.
Finally, Uniswap V3 is another attempt to optimize the bonding curve. It’s a very cool and comprehensive optimization, but it’s still just about that. It is in the same category as Curve’s StableSwap, which significantly flattens the binding curve because it expects it to contain only different packages of the same asset, whether USD or BTC. V3 is also similar Design of a dynamic market maker from Kyber and Bancor.
Other advantages and disadvantages of V3
Uniswap V3 introduces a limited form of limit orders thanks to the provision of liquidity at a distance. Uniswap calls this a “range order,” where an LP intentionally defines an extremely tight liquidity range that quickly changes one asset to another as the price moves down the corridor. This may act as a limit order, but liquidity needs to be withdrawn immediately to complete the swap. Since you are buying an asset that is losing value, it can be useful for “buying a dip”, but in itself will not allow you to fine-tune trading tactics such as catching the exact bottom.
One of the serious disadvantages of V3 is the fact that it no longer has fund tokens. The comprehensive mechanism of liquidity ranges means that it now has an NFT representing a specific position of the user. This is a huge blow to the composition that would instantly portray concepts like Aave’s Uniswap Markets or builder pool token store unusable. In practice, it is likely that someone will come up with ERC-20 packages for the NFT set representing the entire price range. Yet it is an unfortunate element of friction. A related disadvantage is that fees are no longer automatically reinvested. Speaking of fees, they are now dynamic depending on the fund and offer three options: 0.05%, 0.30% and 1%. V3 also has some improvements to the Uniswap price oracle in the chain, which are largely uninteresting for the average user.
In short, the Uniswap V3 is not strictly better than the current V2. It chose the path of capital efficiency, exacerbated the volatile loss in many scenarios and significantly complicated the “passive income” aspect of providing AMM liquidity. It weakens to some extent the “automated” part of the “automated market maker”, as LPs will have to constantly adjust their liquidity ranges to monitor prices.
The V3 offers some very interesting features for super efficient trading, but “average Joe” liquidity providers would probably prefer the V2 because of its simplicity. It was probably wrong to expect too much from this upgrade, because AMMs are already quite sleek and many “enhancements” are actually a complicated design compromise.
We’ll see which version of Uniswap wins – like previous upgrades, it’s a separate protocol that is deployed at the same time as the old iterations. I would expect the adoption to be a little more rocky than before, although most likely the community will still move to a new version over time.