Discover more from Hype or Hodl
Uniswap v3 is a Big Deal - and not just for crypto
Uniswap v3 is going live on May 5th.
A summary of how non-defi exchanges work
How Uniswap v1 was radically different
Why Uniswap v3 should allow Uniswap to outperform all other decentralised exchanges
Uniswap v3 is going live on May 5th. This post describes how Uniswap v1 brought a new approach to implementing currency exchange, and how v3 takes that further and may well lead to Uniswap dominating over platforms like Curve.finance that emerged out of shortcomings of Uniswap v1.
How do traditional exchanges work?
In traditional markets, a broker/bank manages currency exchange. This is done by maintaining an order book. Market participants (buyers and sellers) submit bids and asks. Each bid (or ask) has a price and also a quantity (often called volume).
The broker matches the bids & asks together, and then allows trading to occur where there is overlap (or where there are buyers or sellers happy to execute at the "market price", sometimes the midpoint between the highest bid and lowest ask).
In this kind of a market, the "depth" of the market refers to the volume of demand there is on the bid or on the ask side. If there is a lot of "depth", this means that you can trade a large amount without moving the price too much. Take a second to reflect on this as we'll come back to "depth" in the Uniswap framework.
Side-note: With the onset of high speed trading, this order book type market has evolved. Market participants with high speed access to information can rapidly submit and withdraw transactions to somewhat control or take advantage of the shape of the order book to profit. Some see this high speed trading as a feature, some see this as a bug.
Why was Uniswap v1 a big deal?
Uniswap v1 was based on Vitalik Buterin's Reddit post describing a simple way to run an exchange without needing to manage an order book of bids and asks.
The idea was to create a pool with two tokens (e.g. x and y) - known as a liquidity pool - and allow external parties to use that pool to exchange tokens with the pool such that the product of the number of each token in the pool (Nx and Ny) is held constant between before and after the exchange. As a short example, to exchange token x for y, you contribute token y to the pool and withdraw x. As more y is contributed to the pool and x withdrawn, this drives down the price of y (in terms of x), and vice versa.
Not very obvious (at least to me) is that - through Uniswap specifying this specific function (x * y = constant) - the protocol is implicitly defining the shape of the liquidity curve. What do I mean by this? Well, if you think back to my order book example (in traditional markets), by imposing this formula, Uniswap v1 (and v2 - which is an upgraded v1) is specifying the depth of the market. I'll now say the same thing three different ways to help drive home the point:
Uniswap setting a formula for the price-volume curve is unlike an order book market, where market depth is a parameter that is determined by market participants.
Uniswap v1 is constraining certain parameters that would be set by participants in traditional markets.
We know from traditional markets that - depending on the asset type and volume traded - market depth varies. Meanwhile, Uniswap v1, is applying the same type of market depth irrespective of the asset.
Curve.finance as an embodiment of the shortcomings of Uniswap v1
The fact that Curve.finance emerged as an exchange focused on stablecoins (and now has more value locked than Uniswap) is evidence of the shortcomings of the simple formula used by Uniswap. In layman's terms, markets for stable assets typically provide much more depth in a narrow price range than unstable markets. Uniswap, which provides similar depth across all prices therefore wasn't providing enough liquidity for stable coins around the $1 price relative to what a free market would. So, Curve jumped in and flattened the portion of the x * y = constant curve right around $1 - increasing the effective market depth at that price. This has allowed Curve to provide much better prices for stablecoin exchanges than for Uniswap and to grow to a very large size.
[An example of market depth: If you exchange a large amount of one stablecoin for another on Uniswap, you are likely to drive your purchase price up above $1 (say to $1.02). On Curve, there is much more market depth, meaning that you could exchange the same amount while only driving the price up to ($1.005 - just for example).]
Side note: I say all of the above in admiration of Uniswap v1 - it was a huge first step in bringing about decentralised exchanges.
Neither Uniswap v1 nor Curve is right!
The key point here is that neither Uniswap v1 nor Curve.finance is taking the "right" approach (although Curve's function is closer to being "right"). Liquidity and depth (I use those terms interchangeably) are ultimately only "right" insofar as they reflect the views of the market. This is the core idea of Uniswap v3 (my phrasing):
"Let the market decide what the depth/liquidity should be."
Uniswap v3 allows liquidity providers to determine specific price ranges in which they want to contribute cryptos to pools. Whereas in v1 your choice was simply a yes/no choice of whether to provide BTCETH liquidity, you can now specifically provide liquidity to BTC/ETH pool, but only when the ratio of prices of BTC to ETH is in the specific range of 20:1 and 22:1, for example. If the price moves outside of that range, the liquidity you provide won't be used to support exchanges.
Why is Uniswap v3 so interesting, not just for crypto
First of all, with Uniswap v3, Curve.finance should (in theory) have no advantage over Uniswap any more. Provided there is sufficient adoption of v3, one would imagine that the liquidity curve in Uniswap v3 will be at least as good, if not superior, than the formula currently being used by curve.finance .
I would not be surprised if, over six months, Uniswap grows in total value locked by more than the current total value locked of Curve, Sushiswap and Balancer combined (all decentralised exchanges).
Stepping outside of crypto, Uniswap v3 will provide the finance community with a natural and public experiment into the shape of liquidity curves for different assets (order books are often not made public). It will be fascinating to see what market depths emerge for the different cryptos (BTC, USDC, ETH etc.) that are out there.
Some last remarks:
Kudos to Uniswap's team for keeping laser focused on a decentralised and open source approach to growth.
There is a great podcast with Uniswap founder Hayden on Bankless.
I do own a small amount of Curve and Uniswap governmance tokens (as well as larger amounts of BTC and ETH).