The dismantling of Uniswap is inevitable, what does this mean for DeFi?
Editor's Note: This article comes fromChain News ChainNews (ID: chainnewscom)Editor's Note: This article comes from
Chain News ChainNews (ID: chainnewscom)Chain News ChainNews (ID: chainnewscom), Author: Haseeb Qureshi, Managing Partner of Dragonfly Capital, a blockchain venture capital institution, Compiler: Perry Wang, published with authorization.
Uniswap is currently the largest "exchange" in the decentralized finance (DeFi) space. It revolutionized DeFi, brought in billions of dollars in transaction volume, and sparked a revival of automated market maker (AMM) designs. I am here
Explains how Uniswap works and why AMMs dominate DeFi transaction volume. But I believe that the dismantling of Uniswap will be an inevitable thing.
Decentralized inventory supply
I know it's a bit shocking to say that. So, in my eyes, what kind of new things will there be after Uniswap?
To understand where the market is going, you need to understand that Uniswap binds the following four key functions:
Decentralized inventory supply
Its constant product pricing function (x * y = k)
Decentralized inventory supply
Let us analyze these functions in turn. If you study each condition carefully, you will understand that once these functions are no longer bundled together, but disassembled, the design space for on-chain market making will immediately become very broad.
Decentralized inventory supply
Let's say you want to start a new Uniswap liquidity pool. A new Uniswap pool is like a new market maker startup, and like all startups, it needs some initial capital. Therefore, if you really want to make a market, such as REN/ETH, then your capital pool needs to raise funds from decentralized investors to build inventory.
Your new pool will collect a combination of REN and ETH from anyone willing to contribute, so that the balance sheet is capitalized. If the pool is profitable, these investors can later get back their invested inventory, plus a pro-rata claim on the profits. It’s painless decentralized fundraising — awesome and totally reasonable.
image description
Uniswap acquires inventory from liquidity providers (LPs), and LPs invest capital. Source: Uniswap
But if you take off your "cool crypto-cyberpunk" glasses and put on your "market maker startup" glasses, you'll realize it's weird. Which promising market maker would sell its entire equity in exchange for inventory?AMMUnder normal circumstances, most profitable market makers obtain funds through debt financing. Think about it: if you can reliably earn a 20% ROI on market making, you'll probably want to take out a loan at 10% APR and keep the profits in your pocket. But Uniswap doesn’t keep any profits for itself — at least not yet (once it has tokens, the profits will likely be split between token holders and liquidity providers).
Assuming you know that some AMM pool you're about to create is going to make money, if you're rich enough, you can create a pool and inject it all with your own money, then lock it up and it won't accept decentralized fundraising anymore . That's reasonable, isn't it? If you know it's going to make money, why would you give equity in it to anyone who wants it?
, its liquidity provision requires permission, and only the 0x team is allowed to invest inward. This use of AMM does not change any of its core value propositions. This AMM is still permissionless as a counterparty, it still uses an on-chain pricing curve, and has all the benefits of a standard AMM. It just doesn't accept investment from anyone other than the 0x team, so its profits are exclusive to the 0x team. Balancer also supports "private pools" that require permission to provide liquidity to them.
Intuitively this makes perfect sense! If you know there is a profitable market making opportunity, why share it with others? No regular market maker would think that way. Even if market makers want to raise more inventory, it is crazy to sell inventory at a 1:1 ratio of inventory to equity. If a market maker has a really significant advantage in the space, they have an incentive to keep the equity for themselves.
Keep this in mind, as we will return to this topic later.
fee model
Regarding the elements that Uniswap bundles, the next one is the fee model. I discussed this issue in detail in a previous article, so I won't repeat it here.
image description
How temporary losses grow with rates in Uniswap, source: Charlie Noyes
That said, more professional market makers can be smarter about how they price assets, giving them room to lower fees. As competition among AMMs intensifies, fees will inevitably be compressed.
Always On Offer
Next up is the always-on feature of Uniswap.
Uniswap will always quote you no matter what the circumstances. To maintain this property, most AMMs must let their tail pricing go to infinity (note the asymptote at the end of their curve).
image description
Uniswap's constant product curve, image source: Dmitriy Berenzon
These AMMs will never stop offering offers as long as there is some stock left. This gives DApps accessing these AMMs a belief that they can always transact with the AMM. But always providing a quote is a strange promise - no regular market maker will guarantee a quote no matter what!
Consider the Black Thursday crash. Faced with a historic shock of volatility, the crypto market is crumbling, with most market makers pulling orders. They don't know what's going on and don't want to get run over, so they get out of the market and liquidity dries up. That's a bad thing for everyone else, but it's a really good thing for market makers to be able to manage risk.
Obviously, such a modification would break Uniswap's immutable x * y = k formula, because once the market maker comes back to quote, the pricing mechanism needs to be reset somehow.
You need to know what I mean: These are all the dimensions that make Uniswap different from a fully intelligent market maker. To the extent that you can imitate the behavior of a conventional market maker, your profitability will also increase to the same extent.
This naturally brings us back to the most important part of the functions bundled with Uniswap: the pricing function.
secondary title
Unbundle the pricing mechanism of Uniswap
In a previous post, we discussed how protocols such as Curve, Balancer, and Foundation implement different pricing curves. But the scope covered by the pricing function is by no means limited to curves.
As of now, almost every AMM pricing function is a continuous curve with the only input being the amount of assets in the pool. We can call them pure pricing functions, since they do not need to take into account any elements other than the inventory of a certain contract. But in fact, there are too many impure pricing functions!
Simple example: imagine some pricing function that snoops across contracts on the prices offered by Uniswap and Curve, and cuts their net prices by 10 basis points. (Depending on how you do it, this could be done with some kind of flash loan, so you need to be very careful about how you design it.)
These are just a few of the thoughts that popped into my head. To put it bluntly, both of these suggestions are premature, but in principle they work. But to be a pricing function that will determine the vast majority of DeFi spot transactions in the future, both ideas are clearly far from meeting the requirements.
Signature Based Pricing
The most disruptive of these pricing functions will be a simple, signature-based pricing function. This pricing function will serve as a bridge between DeFi and centralized finance (CeFi); it will make DeFi a shadow market for all liquidity in CeFi.
secondary title
Signature Based Pricing
Today, if you want to trade in a normal OTC (over-the-counter market), the workflow is as follows:
You ask a desk: "Hey, I want to exchange my 100 ETH for USDC." The desk makes an offer: "39,900 USDC. Take it or go away." If you like the price, you execute the trade . A large portion of cryptocurrency trading volume is actually executed through OTC desks like this every day.
Just imagine, if instead of trusting a certain OTC counter and signing a legally binding OTC agreement, a certain counter gave you a cryptographically signed quotation "39,900 USDC for 100 ETH". All of its reserves of assets are on the blockchain, ready to execute the transaction it quoted you. If you like the offer, you can submit it to their smart contract on-chain. The contract verifies its cryptographic signature, then uses its on-chain asset reserves to fulfill the order at this exact price.
This is exactly the experience at the OTC desk, only it's completely programmed. You just go to a website/API, request a quote, and send that quote to their smart contract to execute the trade. (When I say send an offer, you actually just click a button, click a Metamask popup, just like interacting with Uniswap.)
The contract is almost identical to Uniswap, except that the x * y = k pricing function is stripped and replaced with signature verification. If the signature is checked and the offer is valid, automatically transact with its inventory. (A quote may require only a few parameters: the trading pair, such as ETH/DAI, the price, the Ethereum block number, the number of blocks for which the quote is valid, and a signature.)
This "OTC counter" is an AMM. But unlike Uniswap, this AMM can use whatever pricing function it wants. It can look at other liquidity on the chain and cut prices, it can look at Binance or Coinbase order books, it can use fancy machine learning (ML) and Twitter sentiment analysis or track the flow of information on blockchain exchanges, when the market When it gets crazy, it can stop quotes or blow up spreads to minimize losses. It handles all the mess and complexity, just like a regular market maker! The market maker itself can recapitalize if the inventory of that contract goes down.
This market maker is centralized, yet atomic and trustless to its clients. Even if this market maker gives you a bad price, just don't submit it to the chain! There is no need to trust anything in this mechanism.
In fact, this market maker could even raise money from decentralized LPs if it wanted to! Of course, a centralized market maker can prey on a decentralized LP by giving itself an offer to steal all the funds. (However, this has already happened to many token projects raising funds from decentralized LPs - the founders can run away with the money). But you can mitigate this risk using trusted hardware like Intel SGX by upfront adherence to an off-chain pricing algorithm whose execution can be verified on-chain. This will make financing trustless for both LPs and clients.
Any market maker can set up its API by deploying standardized contracts and running standardized server-side code to provide services. Once their contracts are deployed to the mainnet, they are automatically indexed by the aggregator. Each contract can have a configurable IP pointer, letting users and aggregators know which IP to ping to check the current price or request a quote. Almost like magic, market makers from anywhere in the world can list for business and, within minutes, start serving DeFi streams.
source:https://www.hotels.com/
source:
Of course, many market makers cannot do this for regulatory reasons. But to get the network effect, you don't need so many market makers to participate. As long as there are a small number of well-capitalized market makers in the world operating on DeFi and competing with each other, it is possible to bridge prices and liquidity between centralized exchanges and DeFi.
We know that order book exchanges are the most efficient form of trading and price discovery. But trying to replicate the order book on-chain right now is too costly. True DeFi market makers will be the bridge that allows DeFi users to enter the world of centralized order book liquidity. It’s almost as if the order book is hosted off-chain on a centralized exchange, and DeFi becomes a shadow brokerage — a trustless front end for all liquidity in the crypto space. Binance’s quotes, assets, and liquidity will suddenly become available to anyone in DeFi.
This is not a new idea.
Kyber Network has taken the same inspiration and adopted the so-called "Fed Price Reserve" (FPR), which is essentially an interface for professional market makers to buy and sell to Kyber users. But I believe that Kyber is wrongly designed in this direction.
Kyber's method
Here’s how Kyber’s professional market-making functions work: each market maker has an on-chain inventory of assets and an on-chain price menu, plus a slippage function. Anyone can buy at these prices as long as those menus are open. As the market changes, each market maker updates its on-chain menu.
Let's say I'm a market maker and my on-chain menu is currently quoting 1 ETH / 300 DAI. If the ETH/DAI price moves to 1 ETH / 320 DAI, then it's up to me to submit an on-chain transaction to update my menu. If I don't do this in time, or my updates get stuck during periods of high congestion, my outdated old prices will be exploited by arbitrageurs (of course, any menu updates I make will probably get front-loaded immediately). With the current high gas fees, this constant maintenance and updating of menu prices means ongoing costs and risks that I have to incur to keep the service order.
text
Even with this flawed design, Kyber still ushered in the explosive growth of professional market makers! Currently two-thirds of the trading volume in Kyber comes from professional market makers.
image description
Kyber transaction volume in June 2020, source: Kyber Network
If even some market makers operate in DeFi and start offering programmatic, permissionless quotes, it will crush those simple AMMs. Over time, regular market makers will win nearly all of the retail flow, leaving most AMMs with mostly arbitrage.
aggregate market maker
secondary title
1inch, a decentralized exchange DEX aggregator, guides about 20% of the total trading volume of all DEXs, and has diverted a considerable number of orders to private market makers.
This enables better price execution of these orders than every form of on-chain liquidity. It’s not as simple or elegant as Uniswap, but it’s also trustless and could provide better price execution for almost any user of DeFi.
Today it only accounts for a relatively small part of DeFi. But I believe this is the way of the future.
Imagine a series of private market makers, each with its own small contract storefront to provide DeFi quotes, and aggregators such as 1inch automatically ping each of them to give you the best quote. It is similar to the "National Market System Rules" Reg NMS and "Best Market Price" NBBO in traditional financial markets: These rules make it necessary for US brokerage firms to obtain the lowest priced securities by pinging every exchange in the country. In DeFi, the same will inevitably happen through aggregators such as 1inch.
AMMs that are entirely algorithm-driven will always have a place in DeFi. They are critical to contract-fillable liquidity, and these AMMs have been surprisingly effective for incentivized pools and channeling liquidity for long-tail assets. But most of the transaction volume in the crypto space has always been power-law distributed in core trading pairs, and almost all traffic in DeFi today comes from those who want to buy and sell assets through a simple interface. I expect that through such a mechanism, most of the DeFi transaction volume will be dominated by professional market makers.
The future of DeFi
The future of DeFi
I have been following DeFi and DEX for a long time. But I recently had an inspired eureka moment. A friend of mine wants to invest in a newly listed token. He told me: "I can look up which exchanges have this token traded, review which exchanges have real liquidity, send my assets and execute trades, but this is too much work. I just signed up through 1inch Bought it in a few clicks and honestly, the price is good enough.”
I feel enlightened.
People don't come to trade in DeFi because it's "truly decentralized" or they believe in permissionless innovation or anything like that. They do it because they are lazy.
Once DeFi becomes a brokerage institution that can trade huge amounts of almost all assets with minimal slippage, its relative centralized exchanges will become more and more attractive. For users who are not actively trading but also want to buy and hold some cryptocurrencies, DeFi looks as good as a centralized exchange like Coinbase.
Once this situation occurs, what will be the knock-on effects? What else will these users do in DeFi?
Like centralized exchanges, DeFi also has many cross-selling services. You come to buy some tokens, but stay for a while — open a savings account, take out a loan, put some assets into yield farming, play a few games, maybe take a few bets. Everything is in one huge mall. You don’t need to take any counterparty risk, do KYC, or worry about your actions being tracked (ahem).
text


