Risk Warning: Beware of illegal fundraising in the name of 'virtual currency' and 'blockchain'. — Five departments including the Banking and Insurance Regulatory Commission
Information
Discover
Search
Login
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt
BTC
ETH
HTX
SOL
BNB
View Market
Conversation with Uniswap founder: Handing over routing issues to the market through UniswapX
链捕手
特邀专栏作者
2023-07-24 07:20
This article is about 5353 words, reading the full article takes about 8 minutes
We are not only solving complexity problems, but also addressing other issues such as gas fees, validators, MEV, etc.

Interview: Bankless

Guest: Hayden Adams, Founder and CEO of Uniswap

Translation: Qianwen, ChainCatcher

Handing the Routing Problem to the Market

Host: Uniswap is cool because every token has its own exchange and its own pool, just like V2, V3, and V4. I call this path the "Hooks-centric roadmap," which is consistent with Ethereum's Rollup-centric roadmap where Ethereum is trying to reduce complexity and let Rollup do all the execution work.

Uniswap Hooks is also doing something similar - empowering pool builders to create and build pools in a highly expressive way. The problem now is that despite reducing complexity, the issue still remains, such as having multiple types of pools. So, can we say that UniswapX is a solution that leverages all this complexity?

Hayden Adams: We are discussing this issue today in the context of the protocol, which is highly decentralized. What we want to do is solve the routing problem, also known as AMM. Currently, exchange, routing, and liquidity provision are all bundled together in the process of trying to find the best price. But I think it can be slightly unbundled because we now have different strategies, different routing methods, and various aggregators.

So, UniswapX is a competitive routing market that achieves higher efficiency through decentralization, allowing more people to participate in finding the best routes and discovering the best pools. In the long run, users can get better prices.

Host: The coolest thing about Uniswap is that you can list any token. I think the routing problem - finding the best price for your trades in the liquidity pools of tokens - is actually a computational problem. My understanding is that through UniswapX, you want to hand the routing to the market instead of having Uniswap routers manage all this complexity, in order to ensure that traders and swappers get the best liquidity and the best quotes, is that correct?

Hayden Adams: Yes, we are not only solving complexity issues, but also other problems such as gas fees, validators, MEV, etc. For example, by competing in auctions, it incentivizes people to seek the most complex strategies, provide better price improvements, and save gas costs.

Uniswap X utilizes off-chain signatures where users do not directly send transactions to the chain but sign off-chain messages expressing their intent. Then people compete, and as long as the price reaches a certain level, someone will be willing to submit it to the chain. These submitters (fillers) are similar to today's block builders, as well as trading firms and arbitrageurs. Other benefits of off-chain signatures include that if your transaction fails, it will never be submitted. It can also extract gas fees for users.

Uniswap X is a competitive market

Hayden Adams: Traditional DEX aggregators integrate liquidity sources and cover as much liquidity as possible, manually finding the best prices. The solutions they provide are singular. But instead of calling ourselves an aggregator, it's more appropriate to call us a market, where everyone can compete and various solutions can compete with each other.

The current user experience is purely based on the gas price curve, whether your order is included or not, rather than the asset price curve. But our solution combines them. It combines gas auctions (if included) and price options to optimize your price. In contrast, in the past, it was not as efficient. For example, your transaction would wait until the gas price dropped significantly, but during this period, the tokens you were selling may have also declined, so you had to pay more gas.

Off-chain orders enhance user experience

Host: In the past, I would broadcast a transaction and the gas fee I paid was hardcoded into that transaction, unrelated to the transaction I was currently conducting. So these were two separate, completely unrelated variables. The result may not be optimal, for example, when I tried to save $2 on gas, the token price dropped.

Hayden Adams: Now, this off-chain order refers to signing a transaction off-chain without broadcasting it, waiting for the submitter (filler) and recipient (taker) to execute it. They calculate between optimizing gas fees and optimizing actual exchanges using this complexity to generate the best result. The complexity issue is left off-chain and assigned to off-chain service providers who can manage this complexity.

In this way, we solve the current suboptimal situation. For example, now the block builders are not aiming to provide users with the most money, they are aiming to earn the most money for themselves, and this money is often auctioned efficiently through MEV to eth holders. We still want to return these profits to users. Off-chain orders also make cross-chain exchanges possible. Starting on July 17th in the United States, people can choose to join the beta version on the user interface, currently targeting only a small number of tokens. But in the long run, we can truly achieve cross-chain capabilities, allowing you to sign orders and bring about a better user experience.

AMM can serve as a way to create liquidity and build and integrate on-chain liquidity. But in the long run, this solution is not entirely feasible because we need to consider factors such as MEV. We now have multiple routing options, such as client-side routing, and there are smarter routing options that are faster and can discover more routes, but they use open-source APIs underneath. I consider the latter as a protocol in this field, rather than a protocol like AMM. So, in fact, we already have these routing solutions, and we update them as a protocol. We also have on-chain smart contracts to settle orders, and they are immutable and open source (based on GPL). Here's how it works: first, the front end broadcasts the order, then the submitter needs to discover these broadcasted orders and submit them directly to the smart contract.

We now have traders, liquidity providers, and Uniswap is the stage for submitters (fillers). They already exist, and we're just giving them more attention and restrictions. You can imagine them as people using the most advanced trading strategies today, conducting a lot of arbitrage, block builders, and MEV extractors, and what we need to do is restrict them, make them compete with each other, and return value to the traders.

Host: So, people who used to trade on Uniswap will now be directed to UniswapX, so the future is to trade on UniswapX, right?

Hayden Adams: More precisely, over time, there may be more trading volume flowing to UniswapX, and users can choose to use UniswapX. But if there are better pricing methods and better resources, people will definitely choose them.

Uniswap is committed to building a better ecosystem

Hayden Adams: The purpose of Uniswap is to promote the development of the Uniswap ecosystem, surpassing AMM in the strict sense. But what I want to say is that routing through AMM is still a good way.

Returning to Hook's question, a concern for many people is that they create a Hook, but people may worry about its security, etc. So how can we ensure that people will find my liquidity?

The solution is this, if someone creates a new custom pool and a new custom Hook, they don't need the Uniswap Labs team to review their Hook and integrate it into our frontend. Because there are so many Hooks, we can't do that.Instead, what they need to do is find a submitter (filler) willing to integrate your Hook. Once they find one, the liquidity they represent will immediately enter the Uniswap user interface.

How does UniswapX operate?

Hayden Adams: Starting from the frontend, the trading experience for frontend users is basically the same: select tokens and make exchanges. The first major difference is that you will find that your exchanges have no gas fees. But what I want to point out is that each token still has an initially approved allowance contract, and based on this contract, you can make signings. Every once in a while, you need to approve transactions for new tokens that you haven't traded yet, which requires gas fees and cannot be avoided, unless the token itself includes gasless signatures or you use a smart contract wallet.

Then, it's time to make the exchange without paying gas fees. You sign the signature and the order goes into processing. The difference is that when you sign a transaction, you can immediately go into Etherscan and start waiting. Here it is just an off-chain signature, so the order has not been executed yet, it is not even in the memory pool, but in the pre-memory pool.

At this point, the order will be broadcasted to the submitter's network from the frontend, and this process is basically like a Dutch auction, where you set the starting price higher than your expected price, and then this price gradually decreases. Once someone is interested, it creates a competition, which theoretically results in the best outcome.

If a submitter submits a transaction, it means they will pay gas, and then they will take out your tokens from your wallet. Because you have approved this process beforehand, and there is a smart contract that enforces the rules, they can only take out the tokens from your wallet if they send the specified tokens. So it acts like a timestamp component.

Some people may be concerned about transaction delays, and personally, I think auctions must be fast. So we provide optional components that allow you to add an RFQ. This basically means that you use an RFQ quoting system, so when you parameterize the auction, you don't have to guess anymore, but directly ask others for their best price. If you want to incentivize people to give you the best offer, you have to give them some incentives. For example, in the smart contract, if you use the optional RFQ parameterization, in the first few blocks, the RFQ winner will have a slight priority.

For example, I signed an order, and if someone can offer a better price, they can fill in their quote, so there is still an element of public auction. In this way, you can achieve very efficient and fast price discovery. If you use RFQ, it may only take one or two blocks, otherwise it may take five to ten blocks. This component is optional, so if users are willing to wait a minute or two, they can choose not to use it, which is very flexible. Just to say, if you are willing to wait, you may need to bear some price risks, such as significant price fluctuations during this period.

How does Uniswap change MEV attacks?

Hayden Adams: What we want to do is to channel value through the MEV market to the block builders and validators. When someone makes a transaction, it is actually publicly broadcasted. Just like now. Users make a transaction on Uniswap, and people compete with each other, but their competition is not to provide the best price for users, but to extract the maximum value from users exchanging on Uniswap. This is the current MEV market, this is the current block-building network.

Can we change the way we encode transactions? For example, instead of allowing a group of clever people to compete with each other to extract value from the exchange, why not let them compete with each other to extract as much value as possible? For example, some value always has to be given to Ethereum miners, validators, and block builders, but how can we maximize the percentage of MEV that goes back to the traders' hands?

They compete with each other and take away all the money. Now, we want them to continue competing with each other, so that most of the value goes back to the traders. So, this is related to how you encode transactions, and auction is one option.

The current situation is that as long as I can get the lowest tolerated slippage, I can make the trade, then the validator can preemptively make the trade, reach the lowest tolerated slippage, and take the money. Through auctions, the price decays over time, and during this process, as long as someone believes that including this transaction is profitable, they will submit the auction, and the transaction is executed before the tolerance bottoms out, and at that time the transaction has made a profit. This way, you won't be able to front-run on the trading subject like before. This system can ensure that someone completes the order when the first profitable opportunity arises, which is itself a MEV protection mechanism.

Another example is if you have a bunch of off-chain transactions at the same time, then one submitter can discover all the transactions and complete them all at once – this means that they will submit the orders early in the entire cycle. In a price auction, the earlier you auction, the higher the price and the less value leakage.

Cross-Chain Transactions

Orders are represented as off-chain signatures, which means you don't need to sign orders specifying the exchange of token A for token B, but sign orders specifying the exchange of token A on Ethereum for token B on Optimistic. From the perspective of the exchange, the user experience is exactly the same, and the user experience can actually feel very fast. The submitter will handle the complexity and delay of using cross-chain bridges and figure out settlements, etc.

Another benefit is that it allows for native asset swaps. When people move funds between chains and perform cross-chain transactions, what you usually do is bridge your assets. Then, you have bridged tokens of that asset on another chain, and the funds passively exist in the cross-chain bridge, and we have also seen many cross-chain bridge hacking incidents.

Using UniswapX, users first indicate their exchange intentions and then conduct a price markdown auction. Once a submitter has an acceptable price, they initiate the transaction, which is completed on the input chain. They transfer the user's input to a custody contract and are responsible for sending the tokens to the output chain. Afterward, they must prove that they have performed such an operation in order to request the user to input tokens on the input chain. This proof can be an optimistic proof, which means that they assume they have indeed done so without needing to prove it, making cross-chain swaps very fast. Alternatively, if someone questions whether the submitter has actually transferred the tokens, there will be a seven-day asset lock-up period during which the submitter must provide proof.

Offline signed orders not only solve the complexity problem of the pool but also the complexity problem of bridging. Both complexities are resolved by the same service provider and submitter. They can manage time and delays, as well as complexity. It all seems to be determined by the free market and the submitter, with smart contracts supervising the process to ensure that the submitter provides what the trader needs.

In the future, I believe that most assets will exist on their native chains, or on the chains where they are the most secure, or on the chains where they are the typical asset chains, rather than on bridges. In other words, if a submitter conducts a cross-chain swap, they will definitely receive the tokens on the native chain of the tokens. In this way, the use of bridges seems to be truly minimized, and it is more accurate to say that in this model, cross-chain bridges are only used to transmit the final information. You don't even need that packet of data unless the submitter is lying.

This can be called minimum viable bridging, where users only bear bridging risks when they transact across bridges. Once the trader obtains the output tokens and the submitter obtains the input tokens, neither party will have any bridging risks, unless these tokens happen to be wrapped bridge assets, but they don't have to be.

Therefore, we have minimized the degree to which people need to use bridges, and we have also abstracted them, such as this system can support any possible bridging. You can think of it as a bridge aggregator where submitters can use any bridges, but each transaction has a specific cross-chain bridge, which is the "settlement oracle". It can be any bridge or any other system. You can also use a multi-signature system, governance system, or unilateral system, or trust the submitter.

Leveraging Complexity

Hayden Adams: I think this should be a crucial moment, indicating the cutting-edge development of the Uniswap ecosystem. People are looking forward to using decentralized markets, but there are still areas for improvement, such as efficiency and insufficient liquidity.

In the long run, decentralized markets will actually become more powerful and robust, with a better user experience and more efficient market structure. Things will be handled based on a market-oriented approach rather than the operations of a single company.

With this philosophy in mind, leveraging the new skills we have learned in blockchain and cryptocurrency, I believe we can begin the first chapter of our story. We want to establish an ultimate centralized order flow network, and we also hope to collaborate with other teams to address these issues, such as other teams researching how to decentralize order flow. In short, I believe this is a very important moment for the entire industry.

In terms of trading volume and user count, of all the gas on Ethereum, more than 30% may be from Uniswap transactions, and I can guarantee that the proportion will be even higher when looking at MEV. I believe our work in this field is very important, as it helps drive the development of the industry, and we have users from whom we can learn, optimize, and improve the experience for those engaging in real transactions.

On July 17th, Uniswapx launched its mainnet test version, which is just an early version and only open to a limited number of tokens and transactions. During the trial, you will see new features such as no gas fees and the use of signatures instead of transactions, among others. This is a gradual release process. There are still many issues to consider, such as parameterization, and how long it will take to start integrating cross-chain, and so on.

Video Link

Uniswap
founder
Welcome to Join Odaily Official Community