Mr. Fourteen: Calmly look at the intention-centered implementation challenges from the perspective of UniSwapX and AA

avatar
十四君
1 years ago
This article is approximately 2783 words,and reading the entire article takes about 4 minutes
This article will talk about Intent-centric based on the process of implementing Slover and the two major implementation applications ERC4337 and UniSwapX.

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 among the top ten trends in the crypto space. This trend combines the Bob the Solver project and the years of exploration by Anomo and DappOs at the ETHCC conference in Paris, sparking industry-wide attention to intent-centric architecture and its focus. The core goal is to significantly improve user experience by completely hiding the complexities of transactions and is therefore seen as a new engine for driving the adoption of Web3.

In this year's Token 2049 hackathon, I also collaborated with the AstroX wallet tech team (a product that focuses on high ROI growth on the ToB side) to develop the second-place project in the DeFi track based on the concept of intent: Ethtent. This article will discuss intent-centric from the perspective of the implementation of Solver and the application of ERC 4337 and UniSwapX.

What is "intent"? Can it be so beautiful? What are its applications? And what are the challenges in implementation?

1. Reviewing What Intent-centric is

Just as the concept of account abstraction goes beyond Ethereum's own development, the specific concept of "intent" can actually be traced back to the design principles of the DEX Wyvern Protocol in 2018. The core point of the concept is that, unlike traditional transactions, what ordinary users have always pursued is the consistency and accuracy of the results, not the flawless execution process. Let's assume a scenario where I want to swap a certain token.

  • In a traditional transaction: You need to make 3 transactions, transfer ETH as gas, give approval for the transaction, and then submit the swap transaction.

  • In an intent transaction: You only need the user's signature. I am willing to exchange as many X tokens for Y tokens as quickly as possible, and I can provide a 1% fee.

  • We can understand intent-centric protocols as a set of signed contracts that allow users to outsource the process of a transaction to a third party without giving up complete control over the transaction.

Users only need to clearly express their intent, and a single signature can complete all operations.

Specifically, a transaction represents how you will do something, while intent represents what you want, without needing to be concerned with how it will be achieved.
By analogy, the development process of the traditional internet has followed a similar path, transitioning from service providers selling what they have to matching what users need, and then to intelligent service platforms. Looking back at the evolution of the internet over the past 20 years or so, the core trend is:

  1. Early vertical services (various portals, users searching for numbers or workers to buy services themselves)

  2. Mid-term service aggregation platforms (e.g. 58.com, aggregating traffic to match service providers with user needs)

  3. Later intelligent platforms (using algorithmic matching and recommendations, improving the accuracy of intent, such as Didi's intercity carpooling, customized services)

We can say that the concept of intent-centric is indeed ideal, and the development process of web 2.0 has also verified that it is a key path to expanding user base. But is it really that ideal? Let's start by looking at its market applications.

2. Typical Applications of Intent-centric

Although the concept of intent-centric has just been proposed, there are already numerous projects involved, and many of these projects themselves are also centered around user intent. In Bastian Wetzel's article "Intent-Based Architectures and Projects Experimenting with Them", various mainstream projects are also classified.

In the following diagram, it can be seen that many protocols are not actually universal intent solutions, but rather specific intent solutions, such as Uniswap and Seaport. This comparison also demonstrates that for vertical solutions, following an intent-centric approach is a necessary path, just like what was done in web 2.0.

ERC-4337, on the other hand, is an infrastructure that assists with intent, and the existence of bundlers reduces the necessity of gas fees for users.

Mr. Fourteen: Calmly look at the intention-centered implementation challenges from the perspective of UniSwapX and AA

But our core goal is still to explore the business models of these projects and whether they are capable of supporting the implementation of intent. In my opinion, the most advanced implementation of intent at the forefront is UniswapX, which focuses on transactional intent realization, as well as ERC 4337, which will serve as the necessary infrastructure for intent.

2.1 Examining intent-centric through UniSwapX's economic design

After the announcement of UniSwapX, I participated as a filler and a quote provider in the RFQ system. The reason why I consider it one of the most advanced and implementable intents is that it is the most mature system that directly solves the problem of economic incentives for intent.

2.1.1 Why do we need UniSwapX?

Summarizing the development of Uniswap V1-3, it can be said that previous AMM protocols faced specific problems such as user costs, transaction prices, trading paths, routing services, and LP incentives. Nowadays, the market situation of swaps can be described as being completely surrounded by MEV in the on-chain memory pool. Almost every large-scale swap is at risk of being sandwiched. Users always trade at the worst price, and the profits are taken by MEV.

The launch of UniSwapX aims to fundamentally change the AMM trading mechanism and attempt to solve the above problems from another perspective.

Further reading: UniSwapX Research Report (Part 1): Summarizing the development of V1-3, interpreting the principle innovation and challenges of the next generation DEX

2.1.2 What is UniSwapX?

From a definition standpoint: UniswapX is a new permissionless, open-source (GPL), auction-based routing protocol for trading across AMMs and other liquidity sources. In fact, there are three types of trading market operation models for Web3, besides the AMM model:

UniswapX has changed the AMM model of Uniswap V1-3 and transformed it into an off-chain matching and on-chain execution order book model.

2.1.3, How does UniSwapX work?

From the user's perspective, if the scenario is that the user wants to trade ETH and USDT at a price of around 1900 (allowing a 2% slippage), they just need to:

  • Select an order and limit the order duration with a price decay curve (e.g., exchange 1 ETH for 1950 U within 1 day, with a minimum of 1850 U)

  • Sign the order and publish it to the service cluster of the order book.

  • Wait for the transaction to be discovered and completed by the filler

That's all users need to do.

From the perspective of Fillers, he is the person who actively completes user transaction orders. He has ample funds, skilled information cross-chain services, and builds a service provider with full-chain and full DexPool state monitoring. He needs to:

  • Scan the pools of various protocols on the chain and build the basic data required for real-time order calculation.

  • Scan the Mempool to estimate the future price trend.

  • Scan the RFQ Fillers dedicated network and obtain priority transaction rights by providing quotes.

  • Scan the order information on the public network of Fillers and analyze the optimal transaction path.

  • If the revenue conditions are met, participate in bidding (every minute here needs to be fought for, the later the on-chain, the lower the ending price in the Dutch auction mode).

  • Analyze the bidding bottom line of other Fillers and prioritize their bidding in the next profitable order (even if my single transaction income may be reduced but will get more order volume).

So why does he have such a motivation for transactions? This brings us back to the economic model of UniswapX.

2.1.4, How to evaluate the intent design of UniswapX

The willingness to publish the intention itself is the key issue for implementation.

In the face of many limitations of CEX, such as transaction costs, MEV, slippage erosion, impermanent loss, etc., DEX will rely on a more professional group of Fillers to confront with the MEV group, gradually nibble a piece of meat in the technical competition, and finally return to the hands of users, forming a virtuous development cycle (more users use UniswapX, more Fillers get fee dividends).

Moreover, the complexity of on-chain transaction routing will also be distributed to the backend system. Users only need to submit orders as the first party without thinking about such troublesome routing issues.

So this is a virtuous economic cycle, both parties benefit, and the economic model will always be implemented if it is sound.

Mr. Fourteen: Calmly look at the intention-centered implementation challenges from the perspective of UniSwapX and AA

Further reading: https://research.web3 caff.com/zh/archives/10004? ref=shisi

2.2, Looking at intent-centric from ERC 4337

In the application diagram above, the bottom section represents the module centered around the account abstraction AA. For systems like uniswapX, since the transactions themselves are 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 first submit an approve transaction to allow the on-chain contract of uniswapX to deduct user funds. If you really want a pure intention transaction mode (completely without requiring user-initiated transactions), ERC 4337 is still needed as the account entity and paymaster integration design.

Regarding what ERC 4337 is, its implementation principles, development history, etc., there have been live broadcasts and summaries by Fourteen Lords in the past. For further reading, please see: Explaining the concept of account abstraction in one hour.

In simple terms, ERC 4337 is an infrastructure.

  • On-chain, it verifies the user's signature and authorizes it through the entryPoint contract, ultimately driving the user's CA account as the identity entity.

  • Off-chain, it uses the user's signed UserOperation as an instruction, which is transmitted across the Bundlers network and batched by Bundlers for on-chain execution.

The core optimization of this mechanism is to enhance local functions through the highly customizable ability of CA, such as social recovery wallet or project backing users for Gas fees, supporting USDT as a Gas payment method, and other functions. However, today we will analyze the value of 4337 to intent from a business model perspective. When we look back, the reason why we believe UniswapX has a good business model is because both parties involved in the Token transaction (users and fillders) benefit from it, with only mev being the losing side. However, looking at it again, ensuring the profit and willingness of the counterparty through transaction fees is actually just one type of business model. In the future, most "intent" applications will directly generate income for To B or use the main product for To C subscription fees, but the main product's services are not limited to fulfilling "intent".

Just like payment systems such as WeChat Pay or Alipay, they do not charge fees in C2C transactions, but generally charge a 0.6% fee when merchants withdraw funds (also requiring payment to the underlying transaction system). In the past decade of the mobile internet war, the focus was mainly on achieving high user numbers, and the closed loop of revenue could be placed after the user base.

Therefore, there will be more Dapps in the future, and in order for users to experience and use their Dapps, they will be willing to provide users with server services with free Gas. This is similar to the Lens social protocol, where in Polygon, they are willing to cover hundreds of thousands of dollars in Gas fees for users each week. Compared to the subsidy cost of tens of millions of dollars consumed daily during the ride-hailing war in the past, this is still just a small amount.

So the most standardized and widely used payment mechanism, and the most trusted platform credit system, will inevitably be the paymaster system on ERC 4337 (originating from meta transactions but beyond meta transactions).

It is a special smart contract account that can pay Gas fees for others. The main payment contract needs to perform some verification logic for each transaction and check it during the transaction. The Paymaster contract can check if there is enough approved ERC-20 balance in the "validatePaymasterUserOp" method, and then extract it using "transferFrom" in the "postOp" call (for the specific execution logic, refer to the live recording on B station mentioned in the previous expanded reading).

In short, this is a more universal gas-free solution compared to the yuan transaction, which means there is no confusion about non-standard bids and no forward compatibility issues (yuan trading requires contract modifications for support).

3. What are the challenges of implementing intent?

In conclusion, intentions are indeed beautiful, and intentions are bound to be continuously developed and optimized. Apart from the challenges of the business model, what are the key technical difficulties in implementing it?

3.1. Contradictions with AI integration

Although many analysis views of intents believe that the transaction intent analysis capability provided by AI is an optimization point for user experience, the author has worked in the field of security strategy and realized that interpretability and reproducibility are the most important aspects for the application of AI in strategy scenarios. For example, if a user is banned, it is difficult to justify without providing accurate reasons for the strategy's decision. Similarly, for any financial system, pursuing stability and consistency is a top priority, and no institution can guarantee that AI will not behave maliciously once it has control over asset permissions.

Therefore, AI can only serve 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 blockchain; otherwise, false reports are highly likely.

For further reading: The risks behind the classification of contracts in the EVM

3.2. intentPool's anti-Dos risk and Solver matching problem

For the memory pool similar to ERC 4337, such as IntentPool, it will also be a major obstacle. Firstly, intentPool cannot reuse the memory pool mechanism of Ethereum clients (Geth, Eirgon), so it must be built separately. Even with BundlerPool as a reference, the design of MemPool has its own advantages and disadvantages.

  • Decentralized memory pool model: There is a problem of propagation mechanism because for many applications, executing intent is a profitable activity. Therefore, nodes operating the intent pool have the incentive not to propagate in order to reduce competition when executing intent.

  • Centralized memory pool model: It solves the problem of propagation mechanism, but cannot avoid centralized auditing and intervention issues.

In short, designing an intent discovery and matching mechanism that is both compatible with incentives and not centralized is not easy.

3.3, Privacy Risks of Intent

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

Therefore, there have also emerged some standard and privacy-aware general intent solutions such as Anomo.

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

4, Conclusion

Actually, it's really gratifying to see the concept of Intent becoming popular. Finally, web3 is not just indulging in its own world, but starting to break through the obstacles and trying to cater to the real needs of users. Only by starting from the most practical needs of users, rather than being immersed in high-level narratives, and providing intimate services with a down-to-earth attitude, can we gradually gain the favor of a wide range of users.

The future pattern of intent either resembles UniswapX, which generates revenue by subsidizing counterparties through fees, or focuses on classifying users into a small group of high-paying customers and a large group of non-paying but important ecosystem users.

Therefore, the purpose of intent is to optimize the product experience itself, rather than having intent for the sake of intent.

Furthermore, DeFi will be the first stage for intent to shine. More than 20 DeFi protocols have collaborated with DappOS, and Brink Trade has developed an intent engine that allows operations such as bridging, swapping, and transferring to be included in a single intent. In addition, well-established protocols such as CowSwap, 1inch, Uniswap, and LlamaSwap are continuously expanding their functionalities to satisfy users' intents.

In the Token 2049 hackathon competition, the author participated in the DeFi track and solved the intent solver (Ethtent system) for a cross-chain swap+strategy-assisted DCA scenario.

Mr. Fourteen: Calmly look at the intention-centered implementation challenges from the perspective of UniSwapX and AA

It is also worth mentioning that implementing specialized intents with fixed requirements on the existing EVM infrastructure is not difficult. The real challenge lies in the emergence of a market or cooperative standard framework for intent solvers in the future. This framework should enable different solvers to further combine and reuse their solutions to achieve standardized intent resolution, while also addressing the economic motives of both parties.

Standardization often requires top-down definition of standards. Currently, DappOs and Anomo are at the forefront of this path, and it is something to look forward to.

Appendix

"Intent-Centric: Can the Architecture Centered Around Intent Become the New Engine Widely Adopted in Web3?" (Research report, over 10,000 words)

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/ 64 eca 0013 fa 4090 b 747 de 18 f 

https://bwetzel.medium.com/intent-based-architectures-and-projects-experimenting-with-them-c3ee63a e 24 c

Original article, author:十四君。Reprint/Content Collaboration/For Reporting, Please Contact report@odaily.email;Illegal reprinting must be punished by law.

ODAILY reminds readers to establish correct monetary and investment concepts, rationally view blockchain, and effectively improve risk awareness; We can actively report and report any illegal or criminal clues discovered to relevant departments.

Recommended Reading
Editor’s Picks