Finance Redefined is Cointelegraph’s weekly DeFi-centric newsletter, delivered to subscribers every Wednesday.
Uniswap V3 was publicly announced yesterday and I didn’t really get a chance to write about it, so I wanted to dedicate this newsletter to a review of V3 and the AMM space in general.
My initial reaction to Uniswap V3 in one, brutally honest word, was “meh.” But it got better when I read further into it, so let’s unpack what’s happening here.
Uniswap V3 is a solid upgrade and it’s clear that a lot of work went into it. But it under-delivers compared to the hyped up picture most of us had of the new Uniswap. People expected Hayden Adams to silence everyone and roll-out this amazing impermanent loss-protected and super efficient AMM that would leave Uniswap towering over everyone else.
Instead, V3 actually worsens impermanent loss, depending on your personal position and market movement.
The key innovation of V3, and the mechanism that worsens impermanent loss, is the concept of concentrated liquidity. This means that liquidity providers can now choose the price ranges in which they commit liquidity, instead of covering the entire zero-to-infinity range. To explain the mechanism, it’s important to first understand how AMMs work, in very simple terms.
Understanding AMM curves and pools
An AMM is nothing more than a pool containing a number of tokens on either side, let’s say 10 ETH and 20,000 DAI. The ratio of the two amounts for Uniswap’s 50-50 pools is the instantaneous price of ETH, or $2,000 in this scenario.
Let’s say there is a user named Alice who wants to trade her 1 ETH for DAI. When she trades on Uniswap, she simply sends her 1 ETH to the pool, which is added to what was already there. The protocol then uses a formula, called the bonding curve, to calculate how much DAI it should give Alice in return.
Let’s assume that the bonding curve is actually just a straight line, which would make this a Constant Sum Market Maker, or CSMM. The price of ETH is $2,000, so the protocol gives 2000 DAI for this trade. The new balance would thus be 11 ETH and 18,000 DAI. So far so good — this is by far the most efficient trade an AMM could ever support, as it has zero slippage.
However, when there is a dynamic market involved in the trade, things get really ugly for the constant sum function. Let’s assume that ETH has dumped to $1,800, making this pool a no-brainer arbitrage opportunity, since it still lets you sell ETH for $2,000. A bunch of people take the arbitrage, selling 9 ETH for 18,000 DAI. Now the pool just doesn’t have any DAI, so nobody can sell anymore.
CSMMs are extremely efficient, but they cannot work in a real world scenario because they can’t dynamically adjust the relative prices of assets. For this reason, most AMMs are using curved formulas. In Uniswap V2, the price function is just x * y = k, the mathematical formula of a hyperbola. Hyperbolas are perfect for AMMs because they tend asymptotically to both zero and infinity, but they never reach them. Real world AMM pools can never run out of money — at worst, the price of one of the assets will become a huge, almost infinite number.
The downside of using curves is slippage. The larger the trade, the more noticeable the curvature of the price becomes, which manifests itself as worse price execution. Applying the curved formula to our previous example, Alice would lose from her large trade, as the curve would say she is only entitled to, say, $1,850 DAI and not the full $2,000.
Adding more liquidity makes the curve “larger” on the graph, meaning that you’ll be able to trade more tokens before incurring serious slippage. It’s really similar to being on the surface of a planet: On Earth you need to go at least 20km up to seriously notice its curvature, while on a dwarf planet like Ceres you may be able to notice it even from the ground level.
Another scenario to consider in our example is, what happens if ETH sellers and buyers are completely balanced with each other, producing 1 ETH of volume per day? The remaining 9 ETH and 18,000 DAI are sitting idle, not really participating in the constant switcheroo.
How Uniswap V3 tweaks the bonding curve
Uniswap V3 comes from the realization that a lot of liquidity in the pools remains unused in practice. To fix this, V3 takes its previous hyperbolic formula and segments it into many straight(er) lines concentrated around specific price ranges.
Liquidity providers can choose the ranges where they want to provide the liquidity, concentrating it and resulting in a much straighter price curve. This allows achieving much higher capital efficiency, as you may need only, say, 10% of the previous liquidity to facilitate the same trading volume at the same slippage parameters.
But the downsides are quite obvious. The official blog post kind of handwaved on these tradeoffs, but defining liquidity over a certain finite range means that if the price moves away from it, the LP’s position will become 100% composed of the losing asset. This is the most extreme form of impermanent loss, similar to the CSMM example. The tighter the range, the faster the loss. Uniswap downplayed this issue by saying that since the capital efficiency is higher, you can put less capital to receive the same fees as before, thus “lowering” your impermanent loss.
Ultimately, Uniswap V3 is yet another attempt at optimizing the bonding curve. It’s a very cool and complex optimization, but it’s still just that. It’s in the same category of Curve’s StableSwap, which significantly flattens the bonding curve because it expects to only hold different wrappers of the same asset, be it USD or BTC. V3 is also similar to Dynamic Market Maker proposals by Kyber and Bancor.
Other benefits and drawbacks of V3
Uniswap V3 introduces a limited form of limit orders thanks to its ranged liquidity provision. Uniswap calls it the “range order,” where an LP intentionally defines an extremely tight liquidity range that quickly converts one asset into another as the price moves through the corridor. It can work as a limit order, but you’d need to immediately take out the liquidity once the swap is complete to make it so. Since you’re buying the asset that’s losing in value, this can be useful for “buying the dip,” but on its own it won’t let you do fine-tuned trading tactics like catching the precise bottom.
One serious drawback of V3 is the fact that it no longer has pool tokens. The complex mechanism of liquidity ranges means that it now has NFTs representing the user’s particular position. This is a huge blow to composability that would instantly render concepts like Aave’s Uniswap markets or Maker’s pool token vaults unusable. In practice, it is likely that someone will come up with ERC-20 wrappers for a set of NFTs representing the entire price range. Still, this is an unfortunate element of friction. A related drawback is that fees are no longer automatically reinvested. Speaking of fees, they are now dynamic depending on the pool, offering three options: 0.05%, 0.30% and 1%. V3 also has some improvements to Uniswap’s on-chain price oracle, which are largely uninteresting to the average user.
In summary, Uniswap V3 is not strictly better than the current V2. It chose the path of capital efficiency, worsening impermanent loss in many scenarios and significantly complicating the “passive income” aspect of AMM liquidity provision. To some extent, it waters down the “automated” part in “automated market maker,” as LPs will need to constantly adjust their liquidity ranges to follow prices.
V3 offers some very exciting features for super efficient trading, but “average Joe” liquidity providers would probably prefer V2 due to its simplicity. It was perhaps wrong to expect too much from this upgrade, as AMMs are already quite elegant and many “improvements” are actually complex design trade-offs.
We’ll see which version of Uniswap wins — just like previous upgrades, this is a separate protocol that is deployed simultaneously with the old iterations. I’d expect adoption to be somewhat rockier than last time, though most likely the community will still move to the new version over time.
In other news
- Teller Finance opens public alpha for its no-collateral lending protocol
- A former Bitcoin Core developer launched an immediately successful DeFi protocol.
- No loss lottery PoolTogether gains significant traction.
- Covalent raises $2M to build a multi-chain blockchain data aggregation network.
Source: Read Full Article