A calm look at intent-centered implementation challenges based on UniswapX and account abstraction

This article is machine translated
Show original
The future Intent model will either be similar to UniswapX's willingness to create revenue from handling fees to subsidize counterparties, or from the perspective of user grading of the overall system, there will be a small number of paying users with high unit prices and a large number of users who do not pay but are an important part of the ecosystem.

Written by: Fourteen Jun

Recently, in the article "Intent-Based Architectures and Their Risks" by Paradigm, a well-known Web3 venture capital firm, "Intent-centric protocols and infrastructure" ranked first in the ten encryption fields. Combined with The Bob the Solver project and several years of precipitation and exploration of Anomo and DappOs at the ETHCC conference in Paris. It has triggered the industry's focus on Intent-centric architecture and this track. Its core goal is to greatly improve the user experience and completely hide complicated transaction details, so it is regarded as a new engine that promotes the popularity of Web3.

In this hackathon competition of Token2049, the author worked with the Card3 team (ToB-side services focus on NFT IRL social products with high ROI growth) to realize the second place project in the DeFi track based on the intent concept: Ethtent. This article will talk about Intent-centric starting from the process of implementing Solver and the two major implementation applications ERC4337 and UniSwapX.

Explore what “intent” is? Can it be so beautiful? What kind of applications are there? What are the challenges of getting it off the ground?

1. Review what is Intent-centric?

Just as the abstract concept of an account is even older than the development of Ethereum itself, in fact, the earliest concrete concept of "intention" can be traced back to the introduction of its design concept by DEX Wyvern Protocol in 18 years. The core point of its concept is that, unlike the focus of traditional transactions, what ordinary users have been pursuing is the consistency and accuracy of the results, not the perfect execution process.

Assume a scenario where I want to complete the swap of a certain Token.

  • In traditional transactions: you must first conduct 3 transactions, transfer eth as gas, grant approve to authorize the transaction, and then submit the swap transaction.
  • Intent transaction: As long as the user signs, I am willing to use X Tokens to exchange as many YTokens as quickly as possible, and I can give you a 1% handling fee

We can understand an "intent"-centered agreement as a set of signed contracts that allow users to outsource the transaction process to a third party without giving up full control of the transaction.

The user only needs to clarify the intention of what they want to do, and all operations can be completed with one signature.

That is, transaction = how you specifically want to do it; intention = you formulate what you want, but don't care about how to achieve it.

Analogous to the development process of the traditional Internet, we have the same experience. From what service providers sell and what they sell to what users need to match, and then to intelligent service platforms, looking back on the rise and fall of the Internet over the past 20 years, the core context is:

  1. Early vertical services (various portals, users can look up numbers and find workers to buy services)
  2. Medium-term service aggregation platform (58 cities, etc., matching service providers and user needs through aggregation of traffic)
  3. Later intelligent platforms (combined with algorithm matching recommendations to improve the accuracy of intentions, such as Didi cross-city rides and customized services)

It can be said that the concept of Intent-centric is indeed very beautiful, and the development process of web2 has also verified that this is the key path to expand the number of users. So can it really be so beautiful? Let's start with the market application situation.

2. Typical applications of Intent-centric

Although the concept of intention-centeredness has just been proposed, the number of projects involved is no longer a small number. In other words, many of the projects being implemented are also centered on user intentions. In this article by Bastian Wetzel, <Intent-Based Architectures and Projects Experimenting with Them>, various mainstream projects are also classified.

As can be seen from the figure below, many protocols are not actually general intent solutions, but specific intent solutions, such as uniswap and Seaport. Compared with web2, vertical solutions that are well done are also the only way to develop with intent as the center. .

ERC-4337 is an infrastructure that assists the purpose. Due to the existence of the bundler, it reduces the need for the user's original gas.

However, our core goal is to explore whether the business models of these projects are sufficient to support the implementation of intent. In the author's opinion, what is currently at the forefront of implementation is the realization of UniswapX's intention around transactions, and ERC4337 will serve as the necessary infrastructure for the intention.

2.1 Looking at intent-centricity from the economic design of UniSwapX

After the official announcement of UniSwapX, the author participated in the RFQ system as a filler and as a quoter. The reason why he is one of the most cutting-edge and implementable Intents is that he is the most mature and most direct counterparty's economic incentive problem. system.

2.1.1. Why is there UniSwapX?

To summarize the development of uniswapV1-3, it can be said that in the past, the Amm protocol has faced specific problems such as user costs, transaction prices, transaction links, routing services, LP incentives, etc. Today's Swap market situation can be said that MEV has completely surrounded the memory pool on the chain, and every large-scale Swap almost faces being pinched. Users always trade at the worst price, and the profits are divided by MEV.

The launch of UniswapX is to try to solve the above problems from another dimension by completely changing the AMM transaction mechanism.

Further reading: UniswapX Research Report (Part 1): Summarize V1-3 development links, interpret the principle innovation and challenges of the next generation DEX


2.1.2. What is UniSwapX?

By definition: UniswapX is a new permissionless, open source (GPL), auction-based routing protocol for trading across AMMs and other liquidity sources.

In fact, there are generally three types of Web3 trading market operation models. In addition to the AMM model, there are

UniswapX has changed the AMM model of UniswapV1-3 into an order book model for off-chain matching of on-chain transactions.

2.1.3. How does UniSwapX work?

From a user perspective, if the scenario is that the user wants to trade ETH<=> and USDT at a price of around 1900 (allowing 2% slippage), he only needs to:

  1. Select the order, and the price recession curve limits the order time limit (such as exchanging 1 ETH from 1950U within 1 day, the minimum is 1850U)
  2. Sign the order and publish it to the service cluster of the order book.
  3. Waiting for transaction, Filler needs to discover and complete the transaction

For the user, that's all there is to do.

From the perspective of Fillers, he is the person who actively completes user transaction orders. It is a service provider with sufficient funds, proficiency in information cross-chain services, and a full-chain DexPool status monitoring service provider. He wants to

  1. Scan the Pool of each protocol on the chain to build the basic data required for real-time order calculation
  2. Scan Mempool to predict subsequent price trends
  3. Scan the RFQ Fillers private network and obtain priority transaction rights by providing quotations.
  4. Scan the order information of Fillers public network and analyze the optimal transaction link
  5. If you meet the revenue conditions, you will participate in the bidding (every minute here needs to be fought for. In the auction mode, the later the chain is, the lower the final price will be)
  6. Analyze the bidding bottom lines of other Fillers and look for ways to prioritize their bidding in the next profitable order (even if my single profit will be reduced but I will get more orders)

So why does he have such motivation to make a deal? This goes back to the economic model of uniswapX.

2.1.4. How to evaluate the intended design of UniswapX

Solving the issue of intention itself is a key implementation issue.

In the past, DEX faced many limitations of CEX, such as transaction costs, MEV, slippage and wear, Impermanent Loss, etc. In the future, it will use more professional Filler groups to compete with the MEV group and gradually take a piece of meat in the technological competition. , and finally returned to the hands of users, forming a positive cycle of development (more users use UniswapX, and more Fillers receive handling fee dividends).

Moreover, the complexity of on-chain transaction split routing will also be dispersed to the back-end system. Users only need to place orders as Party A, without having to think about such troublesome routing issues.

Therefore, this is a virtuous economic cycle, with both parties benefiting. If the economic model is virtuous, it will always be implemented.

2.2 Looking at intent-centric from ERC4337

In the application diagram above, the bottom is the section around the account abstract AA. For systems like uniswapX, since the transaction itself is submitted by Fillers, for users, it is possible to complete cross-chain transactions without gas. .

However, throughout the entire transaction cycle, users still need to submit an approve transaction to allow uniswapX’s on-chain contract to withhold the user’s amount. If you really want a purely intentional transaction model (without the user initiating a transaction at all), you still need ERC4337 As the account main body and the integrated design of paymaster.

Regarding what ERC4337 is, its implementation principles, development history, etc., Mr. Shishi has had live broadcasts and summaries in the past. Extended reading: Explain account abstraction clearly in one hour.

Simply put, ERC4337 is a set of infrastructure

  • The entryPoint contract is used on the chain to verify the user's signature for authentication, and ultimately drives the user's CA account as the identity subject.
  • Off-chain, users sign UserOperation as instructions, which are passed on the Bundlers network, and Bundler packages them in batches and uploads them to the chain for execution.

The optimization core of this mechanism is to improve local functions through CA's highly customizable capabilities, such as social recovery wallets, or the project party helping users advance gas fees, supporting USDT as a gas payment method, etc.

But today we analyze the value of 4337 to intent from a business model perspective.

Looking back, we see that the reason why UniswapX thinks its business model is good is because both parties to the Token transaction (users and fillders) will benefit from it, and only mev is the loser. But looking back, ensuring the profits and willingness of the counterparty through handling fees is actually just one type of business model. In the future, the model of most "intended" applications will be direct To B for revenue or the main product To C Take the book and renew it, but the services of the main product are not only services that meet the "intent".

Just like as a payment system, WeChat Pay or Alipay will not charge in the C2C flow, but will generally charge a 0.6% handling fee when the merchant pays and withdraws funds (you also need to pay the underlying transaction system).

In the mobile Internet war of the past ten years, the goal was basically to increase the number of users, and the closed loop of revenue can be placed after the user base.

Therefore, more Dapps will appear in the future, and in order for users to experience and use their Dapps, they will be happy to provide users with Gas-free servers, similar to the Lens social protocol. In order to cultivate user usage and content ecology, Polygon will first Behavioral users pay hundreds of thousands of dollars in advance fees every week, and this is just a drop in the bucket compared with the tens of millions of subsidy costs that were consumed every day in the taxi-hailing war.

Then the most standard-compliant, most universal payment mechanism, and the most trustworthy platform credit system will inevitably be the paymaster system based on ERC4337 (originating from meta-transactions but exceeding meta-transactions).

It is a special smart contract account that can pay gas fees for other people. The payment master contract needs some kind of validation logic for each transaction and checks as the transaction proceeds. The Paymaster contract can check if there is enough approved ERC-20 balance in the "validatePaymasterUserOp" method, and then use "transferFrom" in the "postOp" call to extract it. (For specific execution logic interpretation, please refer to the live broadcast screen recording of station b in the extended reading above)

In short, this is a more general Gas-free solution than meta-transactions, which means there is no non-standard confusion and no forward compatibility issues (meta-transactions require contract modification support)

3. What are the challenges in implementing Intent?

To sum up, the intention is indeed very good, and the intention must be the direction of continuous development and optimization. Apart from the challenges of the business model, what are the technical details that are the core problems of its implementation?

3.1. Contradictions in combining with AI

Although many intent analysts believe that the transaction intention analysis capability provided by AI is the optimization point of the experience, the author once worked in the security policy industry, and one of my insights during the period is that explainability and reducibility are key to the application of AI in policy scenarios. The most important link, such as account ban, if the accurate reason for the policy hit cannot be provided, it will be difficult to justify once the user initiates a complaint. Similarly, for any financial system, the pursuit of stability and consistency is the top priority. No institution can guarantee that AI will not do evil after taking control of assets.

Therefore, AI can only be used as an auxiliary tool for intent analysis for a long time, and on-chain data analysis requires a deep understanding of the operating principles of the blockchain, otherwise false alarms will easily occur.

Extended reading: In-depth EVM-risks behind the trivial matter of contract classification

3.2. IntentPool’s anti-DoS risk and Solver matching issues


For IntentPool, the memory pool similar to ERC4337 will also be a big stuck point. First of all, intentPool cannot reuse the MemPool memory pool mechanism of the current Ethereum client (Geth, Eirgon), etc., and the intentPool must be built separately.

Even with ERC4337's BundlerPool as a reference, MemPool designs have their own advantages and disadvantages.

  • Decentralized memory pool model: There is a propagation mechanism problem because executing intents is a profitable activity for many applications. Therefore, nodes operating an intent pool have an incentive not to propagate to reduce contention when executing intents.
  • Centralized memory pool model: solves the problem of propagation mechanism, but cannot avoid the problems of centralized auditing and intervention.

In summary, designing an intent discovery and matching mechanism that is both incentive-compatible and decentralized is not an easy task.

3.3. Intent privacy risks

Signatures are irrevocable. Even if an expiration time is added to the signature content, there is still a problem that the signature cannot be canceled at low cost before the expiration time (any cancellation must be done by sending a transaction to the chain).

Therefore, there are currently some general intention solutions such as Anomo that try to solve the standardization and privacy of wishes.

Privacy protection is difficult to achieve through the EVM system, so there are currently more cutting-edge developments around the development of new privacy protection intent languages, such as juvix, which is used to create privacy-focused decentralized applications. It can be compiled as WASM, or as a circuit via VampIR, for private execution using Taiga on Anoma or Ethereum.

4. Summary

In fact, it is very gratifying to see that the concept of Intent is becoming popular. Finally, web3 is no longer so closed-minded and self-indulgent, and has begun to try to break the situation for the stuck points popularized by real users. It can only focus on the most practical needs of users, rather than Only by being intoxicated with the high-level narrative excitement and putting down your body and providing considerate services can you gradually win the favor of a wide range of users.

The future Intent model will either be similar to UniswapX's willingness to create revenue from handling fees to subsidize counterparties, or from the perspective of user grading of the overall system, there will be a small number of paying users with high unit prices and a large number of users who do not pay but are an important part of the ecosystem.

Therefore, intention itself is optimizing the experience of the product itself, rather than intention for the sake of intention.

Moreover, DeFi will also be the first stage for Intent to bloom. There are already more than 20 DeFi protocols cooperating with DappOS. Secondly, Brink Trade has developed the Intent Engine (Intent Engine), which can perform operations such as Bridge, Swap and Transfer through A signature is contained within an intention. In addition, established protocols such as CowSwap, 1inch, Uniswap, and LlamaSwap are also constantly expanding their functions to meet more user intentions.

In this hackathon competition of Token2049, the author also participated in the DeFi track and solved an Intent solver for the cross-chain Swap+ strategy-assisted fixed investment scenario (the operation of the Ethtent system is as shown below).

I can’t help but sigh. In fact, it is not difficult to realize the intention of vertical classes with fixed requirements on the existing EVM infrastructure. What is really difficult is that in the future, there will be a market for intent solvers or a collaboration framework called collaboration standard. How to make it happen? Different solvers can be further combined and reused to achieve universal and standardized intent solutions, and can also deploy economic models to solve the wishes of both parties.

Standardization often requires top-down standard definition. Currently, DappOs and Anomo are at the forefront of this path, which is worth looking forward to.

appendix

"Intent-Centric Track Wanzi Research Report: Can the "intent-centered" architecture become a new engine for the large-scale adoption of Web3? 》
https://research.web3caff.com/zh/archives/11091#comment-1393?ref=shisi
https://github.com/neeboo/ethtent
https://www.paradigm.xyz/2023/06/intents#the-middlemen--their-mempools
https://www.xiaoyuzhoufm.com/episode/64eca0013fa4090b747de18f
https://bwetzel.medium.com/intent-based-architectures-and-projects-experimenting-with-them-c3ee63ae24c

Source
Disclaimer: The content above is only the author's opinion which does not represent any position of Followin, and is not intended as, and shall not be understood or construed as, investment advice from Followin.
Like
Add to Favorites
Comments