Assessing the Implementation Challenges of Intent-Centric, Starting from UniSwapX and AA

IntermediateDec 06, 2023
This article starts from the business models of Web2 applications, combines UniswapX and AA accounts to examine the future development of “Intent-Centric”, and points out potential challenges.
Assessing the Implementation Challenges of Intent-Centric, Starting from UniSwapX and AA

Recently, in the article 「Intent-Based Architectures and Their Risks」by Paradigm, a well-known Web3 venture capital firm, “intent-centric protocols and infrastructure” emerged as the top trend among the ten cryptocurrency domains. This trend, combined with the efforts and exploration of projects like Bob the Solver, Anomo, and DappOs at the ETHCC conference in Paris, has sparked significant industry attention towards Intent-centric architecture and its focus. The core objective of this approach is to greatly enhance user experience by eliminating complex transaction details, making it a new engine for driving the adoption of Web3. In the recent Token2049 hackathon competition, the author, together with the AstroX wallet technical team (focusing on high ROI growth products for the ToB side), achieved the second-place project in the DeFi track based on the concept of intent: Ethtent. In this article, we will delve into the concept of “intent” starting from the journey of implementing Solver and the application of ERC4337 and UniSwapX, exploring what “intent” is, whether it can be so beautiful, its various applications, and the challenges involved in its implementation.

1. What is Intent-centric?

Just as the concept of account abstraction goes beyond the development of Ethereum itself, the specific concept of “intent” can be traced back to the design philosophy of the DEX Wyvern Protocol in 2018. The core idea of this philosophy is that, unlike traditional transactions, ordinary users are more concerned with the consistency and accuracy of the results rather than the seamless execution process. Let’s consider a scenario where I want to complete a token swap.

  • In traditional transactions: I have to perform three transactions - deposit ETH for gas, approve the token transfer, and submit the swap transaction.
  • In intent-based transactions: I only need to sign a transaction stating that I want to exchange a certain amount of Token X for as much Token Y as possible, with a 1% fee.

We can understand intent-centric protocols as a set of signed contracts that allow users to outsource the transaction process to a third party without giving up complete control. Users only need to specify their intent, and a single signature can execute the entire operation. In this case, the transaction represents how you specifically want it to be done, while the intent represents what you want to achieve without worrying about the implementation details.

Analogous to the development of the traditional internet, which has gone through a similar process, it started with service providers offering what they had, then moved to matching user needs, and finally evolved into intelligent service platforms that enhance intent accuracy through algorithmic recommendations。The core evolution of the Internet over the past 20 years can be summarized as follows:

  1. Early vertical services (various portals, where users search for phone numbers, find workers, and purchase services on their own).
  2. Mid-term service aggregation platforms (such as Craiglist.com, which aggregate traffic to match service providers with user demands).
  3. Late-stage intelligent platforms (combining algorithmic matching and recommendations to improve the accuracy of intent, such as Uber Carpool and customized services).

The concept of intent-centric is indeed promising, and the development of Web2 has also proven that it is a key path to expanding user adoption. However, let’s first examine its market application.

2. Typical Applications of Intent-centric

Although the concept of intent-centric is relatively new, there are already numerous projects involved, and many of them are centered around user intent. In Bastian Wetzel’s article, 「Intent-Based Architectures and Projects Experimenting with Them」,various mainstream projects are classified. The illustration below shows that many protocols are not actually general-purpose solutions, but rather intent-specific solutions, such as Uniswap and Seaport. This represents the natural progression of intent-centric solutions compared to the vertical solutions done by web2. And ERC-4337, on the other hand, is an infrastructure for assisting intent, where the presence of Bundler reduces the necessity for users to pay for the original gas.

However, our core goal is still to explore the business models of these projects and whether they are sufficient to support the implementation of intent. In my opinion, one of the leading intent implementations currently in operation is UniswapX, which focuses on intent implementation for trading, along with ERC4337 as a necessary infrastructure for intent.

2.1. Understanding Intent-centric through UniSwapX’s Economic Design

After the official announcement of UniSwapX, I immediately participated as a Filler and also engaged as a Quarter in the RFQ system. The reason why it is considered one of the most cutting-edge and practical Intent applications lies in its being the most mature system that directly addresses the economic incentives of counterparties in intent-based transactions.

2.1.1、Why do we need UniSwapX?

Looking back at the development of Uniswap V1-3, it can be said that existing AMM protocols faced specific issues related to user costs, execution prices, transaction paths, routing services, and LP incentives. Currently, Swap markets are almost completely surrounded by MEV, and large-scale swaps are almost always sandwiched, resulting in users always executing trades at the worst prices, with the profits being taken by MEV. The launch of UniSwapX attempts to address these problems by fundamentally changing the AMM trading mechanism. For further reading: UniswapX Research Report (Part 1): Summarizing the Development of V1-3, Exploring the Principles, Innovations, 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 AMM and other liquidity sources. In terms of the operating models for Web3 trading markets, there are generally three types, in addition to the AMM model:

UniSwapX, on the other hand, has transformed from the AMM model of Uniswap V1-3 to the off-chain order book model for on-chain matching and execution of trades.

2.1.3 How UniSwapX Operates

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 for a 2% slippage), they only need to:

  • Select an order and set a time limit for the price decay curve (e.g., exchange 1 ETH for 1950 USDT within 1 day, with a minimum of 1850 USDT).
  • Sign the order and publish it to the order book service cluster.
  • Wait for the transaction to be discovered and completed by a Filler.

For the user, that’s all they need to do. From the Filler’s perspective, they are the ones actively completing user trading orders. They have ample funds, proficient cross-chain information services, and a monitoring system for the entire chain and DexPool status. They need to:

  • Scan the pools of various protocols on the chain and build real-time basic data for order calculation.
  • Scan the Mempool to estimate future price trends.
  • Scan the dedicated network for RFQ Fillers to obtain priority trading rights by providing quotes.
  • Scan the order information on the public network of Fillers to analyze the optimal trading route.
  • If the revenue conditions are met, participate in the bidding (every minute counts, as in a Dutch auction, the later the transaction is confirmed, the lower the price ends).
  • Analyze the bottom line of other Fillers’ bids and prioritize them in the next profitable order (even if my individual profit may decrease, I will get more volume).

So why does the Filler have such 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 key issue in implementing the intent is the willingness to publish it. Previously, DEX faced many limitations compared to CEX, such as transaction costs, MEV, slippage, impermanent loss, and more. In the future, these limitations will be combated by a more professional group of Fillers against the MEV group. Gradually, they will take a piece of the pie in the technological competition and ultimately return it to the users, forming a positive development cycle (more users using UniswapX, more Fillers receiving fee dividends). Additionally, the complexity of on-chain transaction splitting and routing will be dispersed to backend systems. Users will only need to act as the first party to place orders without having to worry about the hassle of routing. Therefore, this is a virtuous economic cycle where both parties benefit, and an economic model that is virtuous will always be implemented.

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

2.2 Understanding intent-centric from ERC4337

In the diagram above, the section at the bottom represents the module centered around the account abstraction AA. For systems like UniswapX, since the transactions themselves are submitted by fillers, users are able to complete cross-chain transactions without the need for gas.However, throughout the entire transaction cycle, users still need to first submit an approve transaction to authorize the UniswapX on-chain contract to deduct the user’s funds. If you truly want a frictionless trading experience (where users don’t need to initiate transactions), the integration design of ERC4337 as the account principal and paymaster is required.Regarding ERC4337, I have had live broadcasts and summaries about what it is, its implementation principles, and its development history. For further reading, you can refer to Explain the concept of Account Abstraction in an hour.

In simple terms, ERC4337 is a set of infrastructure.

  • On-chain, user signatures are verified using the entryPoint contract for authentication, and the user’s CA account ultimately serves as the identity subject.
  • Off-chain, UserOperation is signed by the user as an instruction, which is then transmitted on the Bundlers network and batched by Bundlers for on-chain execution.

The optimization core of this mechanism is to enhance specific functions through the highly customizable ability of CA, such as social recovery wallets or project parties assisting users in paying 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. Looking back, we believe UniswapX has a good business model because it allows both parties involved in token transactions (users and fillers) to profit from it, with only MEV being the losing side. However, upon reflection, ensuring the profit and willingness of the counterparty through transaction fees is just one business model, and in the future, most “intent” applications will directly generate revenue by providing services to businesses (To B) or by charging transaction fees as their main product (To C). However, the main product’s services are not limited to satisfying the “intent” alone.

Just like payment systems such as WeChat Pay or Alipay, they do not charge fees for C2C transactions, but usually collect a 0.6% transaction fee when merchants withdraw funds (which also requires payment to the underlying transaction system). In the past decade of the mobile internet battle, the focus was mainly on achieving a high user volume, and the revenue loop could be established after reaching a certain user base.

Therefore, more Dapps will emerge in the future, and in order to provide users with a seamless experience, they will be willing to offer servers with waived gas fees. This is similar to the Lens social protocol, where on Polygon, they are willing to advance tens of thousands of dollars in transaction fees on behalf of users each week to foster user adoption and content ecosystem. Compared to the subsidy costs that used to amount to millions of dollars per day during the ride-hailing wars (Didi vs Uber China), this is just a drop in the bucket.

Therefore, the most standardized and widely applicable escrow mechanism, as well as the most trusted platform credit system, will inevitably be built on the ERC4337 paymaster system.(Derived from MetaTransactions but goes beyond MetaTransactions). It is a special smart contract account that can pay Gas fees on behalf of others. The main contract for payment requires some verification logic for each transaction and checks 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. (To understand the specific execution logic, please refer to the Bilibili live recording mentioned in the further reading section above.) Overall, this is a more universal gas-free solution compared to Meta-Transactions. It eliminates the confusion of non-standard assets and does not have any forward compatibility issues (Meta-Transactions require contract modifications for support).

3. What are the challenges of implementing Intent?

In summary, intent is indeed wonderful, and it is also a direction that must continue to develop and optimize. Apart from the challenges of the business model, what are the core technical difficulties for its implementation?

3.1 Contradictions in the integration of AI

Although many opinions on intent analysis believe that the transaction intent analysis capability provided by AI is an optimization point for user experience, I have previously worked in the Security Policy industry, and during that time, I came to the realization that interpretability and reproducibility are the most important aspects of AI’s application in policy-making scenarios. For example, in the case of account suspension, if accurate reasons for the policy violation cannot be provided, it becomes difficult to justify when users file complaints. Similarly, for any financial system, the pursuit of stability and consistency is paramount, and no institution can guarantee that AI will not engage in malicious activities once it has access to asset permissions. So AI can only serve as an auxiliary tool for intent analysis in the foreseeable future, and the on-chain data analysis requires a deep understanding of the operating principles of blockchain. Otherwise, false positives are highly likely to occur. Further reading: The Risks Behind Categorizing Contracts in EVM

3.2. The resilience of intentPool against Dos attacks and the issue of matching with Solver

For IntentPool, similar to the memory pool of ERC4337, it will also be a major challenge. Firstly, intentPool cannot reuse the memory pool mechanism of current Ethereum clients (Geth, Eirgon), and it must be built separately. Even though there is BundlerPool of ERC4337 as a reference, the design of memory pools has their own pros and cons.

  • Decentralized Memory Pool Mode: There is a propagation problem because for many applications, executing intents is a profitable activity. Therefore, nodes operating the intent pool have an incentive not to propagate in order to reduce competition when executing intents.
  • Centralized Memory Pool Mode: Solves the propagation problem but cannot avoid centralization auditing and intervention issues.

Anyway, designing an intent discovery and matching mechanism that is both compatible with incentives and not centralized is a challenging task.

3.3 Risk of Intent Privacy

Signature has an irrevocable nature, even if an expiration time is added to the signature content, there is still a problem of being unable to revoke the signature at a low cost before this expiration time (any revocation must be done through on-chain transactions). Therefore, some standardized and privacy-focused universal intent solutions such as Anomo have emerged. Privacy protection is difficult to achieve through the EVM system, so there are currently more cutting-edge developments around new privacy-focused intent languages, such as Juvix, which is used to create privacy-focused dapps. It can be compiled to WASM or compiled to circuits through VampIR for private execution on Anoma or Ethereum using Taiga.

4. Summary

Actually, it’s very exciting to see the concept of Intent gaining popularity. Finally, web3 is no longer self-indulgent and is starting to explore ways to break through the bottleneck and cater to real users. Only by focusing on the most practical needs of users, instead of indulging in high-level narratives, and providing thoughtful services, can we gradually gain the favor of a wide range of users. In the future, the model of Intent will either be similar to UniswapX, which generates revenue by subsidizing the counterpart’s transaction fees, or it will involve a small number of high-paying customers and a large number of non-paying but important ecosystem users from a user classification perspective. Therefore, the concept of intent itself is about optimizing the user experience of the products, not just for the sake of intent. Additionally, DeFi will also be the first stage for Intent to flourish. More than 20 DeFi protocols have already partnered with DappOS, and Brink Trade has developed an Intent Engine, which allows operations such as Bridge, Swap, and Transfer to be contained in a single intent through one signature. Furthermore, well-established protocols such as CowSwap, 1inch, Uniswap, and LlamaSwap are continuously expanding their functionalities to meet the diverse intents of users. In the hackathon competition at Token2049, I participated in the DeFi track and developed an Intent solver for a cross-chain Swap + strategy-assisted DCA (Dollar Cost Averaging) scenario (Ethtent system operates as shown in the diagram below).

In fact, it is not difficult to achieve the intent of vertical-specific fixed requirements on the existing infrastructure of EVM. The real challenge is the emergence of an intent solver market or a collaborative framework known as a collaborative standard in the future. This would allow different solvers to further combine and reuse to implement a universally standardized intent resolution solution, and also allocate economic models to resolve the intents of both parties. Standardization often requires top-down standard definitions. Currently, DappOs and Anomo are at the forefront of this path, which is worth looking forward to.。

Appendix: Intent-Centric Track: Can the Architecture of “Intent-Centric” Become a New Engine for Web3’s Large-Scale Adoption? https://research.web3caff.com/zh/archives/11091#comment-1393?ref=shisihttps://github.com/neeboo/ethtenthttps://www.paradigm.xyz/2023/06/intents#the-middlemen--their-mempoolshttps://www.xiaoyuzhoufm.com/episode/64eca0013fa4090b747de18fhttps://bwetzel.medium.com/intent-based-architectures-and-projects-experimenting-with-them-c3ee63ae24c

Disclaimer:

  1. This article is reprinted from [shisi_eth]. All copyrights belong to the original author [shisi_eth]. If there are objections to this reprint, please contact the Gate Learn team, and they will handle it promptly.
  2. Liability Disclaimer: The views and opinions expressed in this article are solely those of the author and do not constitute any investment advice.
  3. Translations of the article into other languages are done by the Gate Learn team. Unless mentioned, copying, distributing, or plagiarizing the translated articles is prohibited.
Start Now
Sign up and get a
$100
Voucher!
Create Account