Swap Meet
What’s good, my people? Crypto prices for one. But today we’ll dive into what is one of the most successful and most significant projects in crypto: Uniswap, the NYSE of the blockchain.
Some quick notes first:
I’ve moved to Substack. Hopefully you’re still getting this, but, hey, let me know if you didn’t, m’kay. Unsubscribe link is at the bottom should you choose that instead.
After my Solana tutorial last time, none of you asked me to send you some Solana so I’m impressed that every one of you were able to make it all the way through the tutorial on your own. Oh, wait, hold on a sec. I’m being informed that perhaps that’s not the appropriate conclusion. Well, maybe tell me here how it went for you:
The Bitcoin ETF continues to crush all expectations:
Total net inflows since launch are now over $7 billion.
The Blackrock ETF now has over $10 billion in AUM and is doing a billion in trading volume per day.
Daily net inflows are actually growing rather than slowing down.
Not surprisingly, the price of Bitcoin is up ~35% since launch. This image from Matt Hougan sums up the situation pretty well (and keep in mind that the Bitcoin being produced every day will get cut in half in roughly a month):
Not investing advice, but it’s not too late.
🟢 Uniswap > Unibrow
Uniswap is a Decentralized Exchange (DEX). It serves the same use case as the NYSE, Nasdaq, Coinbase or really any other exchange: let me swap one asset for another. It’s just the “how” that is different.
Digital exchanges (excluding orange futures) operate via a central limit order book: here’s a list of price and size of the buy orders and here’s a list of all of the sell orders. The exchange maintains that list then market makers come in to (roughly) match up the orders. But traditional order books are a) data intensive (every time a buy or sell order is changed, you have to rewrite everything) and b) highly time sensitive (if you are off by half a second, things break down).
Neither of these attributes are great fits for most block chains so Uniswap and most other DEXs use liquidity pools driven by a “constant product formula.” Liquidity providers (the closest DEXs have to market makers) provide equal values of two different assets. For example, the largest Uniswap pool pairs Ethereum with USDC (a stablecoin worth $1) so a liquidity provider might put in $10,000 of USDC and 2.87 Ethereum ($10,000 worth). Aggregated with other liquidity providers, this creates a pool to trade from ($253 million worth in our example). Each trade then gets charged a fee (0.05% in this case) and those fees get passed on pro rata to the liquidity providers.
As the price moves, the constant product formula kicks in: X * Y = K. Here X is the price of one asset (Ethereum here) and Y is the price of another (USDC), but the product of them must always stay the same. This just means that as the price of one goes up, the price of the other pair must go down. The details, pros and cons are much more detailed (this is a good write-up), but the take-away is that in practice it just works.
In fact, it works to the tune of $450 billion in trading volume on Uniswap in the last year. For much of the year, Uniswap was doing essentially the same volume as Coinbase, but Coinbase has started to pull away, especially since the ETF launches. For global context, Uniswap trades as much in a year as what the Toronto Stock Exchange does in a month. Not insignificant, eh, but still small on the global scale.
For crypto, however, Uniswap is the biggest application/protocol there is. Uniswap has roughly 50% market share among DEXes and is consistently the single biggest user of gas fees on Ethereum.
🟦 What Makes Uniswap Different?
While the core user experience of interacting with a DEX isn’t all that different from trading on a centralized exchange, there are some differences. For example, limit orders don’t work directly without an order book. Fees are usually substantially lower than centralized exchanges, 1/10th the cost or even less sometimes, but you have to pay gas fees separately so, depending on the chain and the size of the trade, total fees are generally less except for small trades.
Rather, it is the implications and second order effects of the DEXes that make them significant and demonstrate both the power and some of the challenges of crypto.
Decentralized and Permisionless.
At Coinbase, there is “someone” there. Someone that controls who can open an account (i.e. KYC), how you fund your account and how much you can remove (i.e. AML), what tokens get listed, etc. Uniswap is really just a smart contract, some code that makes it work. There may be people that write the code, but there is no one “there”: no help desk, no compliance department. If you just launched Cline Coin and you want it to trade directly with Shiba Inu, great, you can set up a brand new liquidity pool in minutes within the bounds of the code.
This is where it makes more sense to think of Uniswap as a protocol instead of an application. For example, SMTP is a protocol: It describes how e-mail messages get sent and received across different servers. Outlook and Gmail are applications that use SMTP, make it accessible to users and let you get weekly 10% off coupons from that e-commerce site you ordered from two years ago.
If you go to Uniswap.org and swap some USDC for Etheruem, that is merely one of a literally unlimited number of ways to execute a trade on a Uniswap pool. That site is a front end that interacts with the protocol and, therefore, can have its own rules, design, user experience, etc. If you want to create a site that only allows KYCed users you could do that.
Extensibility.
This flows into the next significant difference between Uniswap and Coinbase. Because it is an open-source protocol rather than a closed application, virtually anything can be built on top of it. Coinbase has 100% control on how it is used. There may exist APIs that allow users to submit trades directly, but those APIs are subject to approval, change and permitted functionality. With Uniswap, developers can build whatever they can imagine and know that it will be accessible.
Some applications of this extensibility are clear already. You can seamlessly build asset swaps in the middle of other applications or tools (imagine building a Twitter plug-in that would let you connect with any brokerage to buy (or sell) any stock that Elon mentions). Last time we talked a little about aggregators that automatically search all DEXes, instantly splitting trades across various pools for the best execution saving on fees and slippage.
But it’s the known unknowns and unknown unknowns that may be the most interesting. The history of the Internet and open-source technology in particular show that technology normally evolves in ways that we would not have originally expected. And when developers are able to build across a suite of open-source tools, these gains tend to be geometric rather than linear.
Open.
Since all trades happen onchain, everything that goes on in Uniswap is visible to anyone who wants to go look. If you want to know Uniswap’s volume yesterday, you don’t have to ask Uniswap nicely to share that information, you can just look it up (BTW, it was $1.8B on a Saturday). Moments ago (as I write) this wallet just swapped 56 million Mog for $45,000 worth of ETH. Go figure.
Maybe it turns out that this wallet is a Mog insider who is currently touting that Mog is about to Moon while he is dumping as much as he can. Or perhaps it is a sophisticated trading algorithm that has identified leading indicators and we should all be copying their trades. But either way it is open, auditable and secure.
◆ Uniswap Grows Up
What makes Uniswap especially relevant right now is a new proposal a week ago to change their fee structure. To date, only the liquidity providers, i.e. the people that put up the assets to trade receive fees from trades. This proposal would introduce a new layer of fees that would be distributed to people that own and stake the Uniswap token.
You know how I said there wasn’t anyone there at Uniswap? OK, well, there kind of is and kind of isn’t. It is true that once a specific version of the protocol is launched, it runs on its own. But there is a for-profit company, Uniswap Labs, that builds these protocols. There is also a non-profit, Uniswap Foundation, that works on governance and community development. The exact mechanism of how all of this works is well beyond this issue, but it is the Foundation that is submitting this proposal so it carries a lot of weight and is considered likely to pass.
This is move, called the “fee switch”, has long been anticipated. Like many venture-backed startups that subsidize usage in their early days, Uniswap chose not to have any protocol fees to encourage usage and capture market share. Now that it is more mature, the calculation is that the market will accept the additional fee. Token Terminal estimates that Uniswap would have generated $58 to $147 million in protocol revenue last year. That probably wouldn’t be enough for a traditional start-up to go public (Reddit did $800 million in revenue last year and is about to IPO), but it is a large number, considering that crypto companies have fewer operating expenses since those are all borne on chain.
As one of the more mature and best known protocols in crypto, studying Uniswap provides some insight into how crypto works, what makes it unique and how it continues to evolve. The landscape for NFT exchanges has been highly volatile, but Uniswap has been much more consistent. It will be interesting to see if that lasts with these new changes.
This Week’s Freezing Cold Take
Tom Lee in 2019: “We think the best approach is to put 1% or 2% [in Bitcoin].”
Becky with the good hair: “That’s crazy. You might as well throw it away…”
As always, thanks for reading. Send me questions and please share with your crypto curious friends.