Intents are just…

David Ma
Alliance
Published in
10 min readJun 15, 2023

--

There’s a lot of buzz around the word “intent” lately in the blockchain world. Some hail it as the next best thing after sliced bread, while others are making fun of it saying intents are just transactions or intents are just limit orders.

First I go through some definitions, motivations, and framing of intents. Then I defend the research and word choice of intents.

This article assumes familiarity with the Ethereum blockchain and a few popular apps on it.

Intents are just transactions 🤡

Well, no. Although there is no formal specification widely agreed upon yet, intents are definitely not transactions.

There are vibe-definitions out there that we’ve agreed on: Transactions are imperative whereas intents are declarative. In other words, transactions are well-defined messages that specify how to run the EVM to produce a state change, whereas intents specify a desired state change while leaving the implementation unsolved.

The entities that ingest intents and produce valid transactions are called solvers.

Solvers aggregate intents and produce valid transactions. All transactions are intents. To see that, simply run the transaction (txn) successfully and the set of possible state changes is the intent. Some simple intents can be written as transactions, but may not be valid immediately. E.g. Limit orders are transactions that are invalid in the current state of the EVM, but become valid transactions when matched.

A swap transaction looks like this:

Transaction: swap 1 WETH for at least 1900 USDC on the 30bps fee USDC-WETH uniswap V2 pool, valid until timestamp 1685729301.

Inputting that transaction would be the worst user experience ever. Instead, the user intent was:

Intent: maximize USDC bought, constraints: 1 WETH sold

If you go on Uniswap’s front-end, it helps you translate your naive intent into a transaction.

Uniswap’s swap UI at app.uniswap.org

But actually, you didn’t care about trading on Uniswap. You just wanted to get the best deal. That’s when DEX aggregators stepped in. Paraswap takes your intent but splits the swap across multiple exchanges to get the best result:

Paraswap’s swap UI at app.paraswap.io

Transaction: swap 0.1 WETH for at least 1900 USDC on the 30bps fee USDC-WETH uniswap V2 pool, valid until timestamp 1685729301. swap 0.7 WETH … on uniswap v3 … swap 0.2 WETH … on curve …

Note that the user interface (UI) is basically the same, but the latter gives you a better transaction.

That’s because intents are captured by UIs.

In fact, web apps are primitive intent solvers. They guide the user from a fuzzy intent in their head, all the way down to a transaction.

Diagram 1. Sequence of a swap on a dex, or purely on-chain dex aggregator

But since transactions are hard to specify and web apps are a necessary component of a dApp, malicious web apps pop-up. They propose transactions to you that have nothing to do with your intents. That’s where the review txn step is supposed to help, but in practice help very little.

Intents are already in production

Or more correctly, the market is already moving away from user-submitted transactions.

As users became more discriminating and aware of the MEV they leak, they shopped around for new trading dApps like 1inch, Paraswap, and Matcha that innovated to provide better prices. First they aggregated liquidity from all the on-chain atomically composable DEXes, and then they eventually enlisted off-chain market makers.

Diagram 2. Sequence of a swap on a dex aggregator that sources liquidity from privileged market makers. E.g. Paraswap, 1inch Classic, Matcha Standard.

For less sophisticated users, Wallchain.xyz takes an interesting approach by partnering directly with popular dApps where users leak MEV. By analyzing the transactions that the app generates, and inferring the user intent, Wallchain can sometimes propose better transactions. This happens without the user having to change behavior, while protecting them of bad outcomes.

Diagram 3. Sequence of a transaction being produced by a dApp, analyzed and potentially replaced by Wallchain. The enriched transaction helps the user reclaim MEV.

The problem with building the perfect transaction for the user is that there’s a high likelihood it becomes invalid by the next block (Ethereum has 12 second blocks), either due to state changes or a market maker’s expiring offer.

This led to designs where the user submits a signed transaction to the dApp servers where it would be held until the transaction became valid (matched), or the deadline passed (unmatched). CoWSwap’s takes advantage of this relaxed deadline to run batch auctions, further improving price for the user.

Diagram 4. Sequence of a pre-signed swap on a CoWSwap, 1inch Fusion, Matcha Auto. Relaxing the deadline improves the filled price.

However, this led to a fragmentation of the market. A loss of composability.

A naive market trade on Uniswap will not hit any limit orders posted on semi-private orderbooks, and trade right through. Limit orders placed on 0x may not be seen by 1inch solvers and vice versa if they end up in different legal jurisdiction. Each dApp may censor who can connect to them, both on the retail and market maker APIs.

The same thing is happening on NFT marketplaces. So the move away from transactions is not new. These signature requests are basically application-specific intents held by a centralized party, to be turned into transactions in the future. The market preceded definitions, and we’re getting around to coin the right words.

Listing an NFT on Opensea and Blur by signing a transaction

Better user experience

Price was not the only thing that improved with a “intent-based” design. User experience (UX) also improved. In diagram 1 and 2 previously, when the user was the final party to submit a transaction, market makers have to protect themselves by offering a very short window of execution. As a result, trying to trade any real size on DEX aggregators often led to UI errors and reverted transactions as mentioned earlier.

In a multi-chain (modular chain) world, which seems more and more likely each passing day, an intent as simple as transferring some USDC from Ethereum to Solana becomes extremely cumbersome:

  1. Get native gas tokens on Solana
  2. > Swap some ETH to wrapped SOL on Ethereum.
  3. > Find the bridge that accepts wrapped SOL and gives you SOL on Solana.
  4. Bridge USDC
  5. > Choose between the multiple USDC bridges to Solana
  6. > Realize that bridged USDC is not actually “native USDC” on Solana
  7. > Find the exchange on Solana that lets you trade the bridged USDC to native USDC
  8. > And make sure that you didn’t get a bad deal at the bridge or stable swap part.
The zoo of bridged USDC on Solana. This is not the complete list.

Extrapolate this to when every dApp has their own bridge. Hackers will be very motivated to impersonating bridge UIs as it becomes a big market, and users become reliant on trusted parties (aggregators) to carry out their intents. This brings us to the next section: the semantics debate is missing the point.

Intents are just limit orders 🤡

Some discerning individuals (especially trader types, I’m a trader type too) look at the intents in ERC-20 swaps, NFT trades, asset bridging, and even ERC-4337 UserOps, and they notice that all these intents are actually just limit orders.

  • ERC-20 DEX aggregators are limit order pools
  • NFT marketplaces are pool of limit orders that a bit funky
  • Asset bridges are pools of limit orders across more than one chain
  • Paymasters basically treat UserOps as limit orders between the gas fee token (ETH) and other assets.

Why are we suddenly calling limit orders, intents? I argue that this question is missing the point. Sure we can reuse old words, but old words come with baggage. People tend to have preconceived ideas of the world and take old problems as given.

If you look at ERC-4337’s discussion on UserOps pools, Flashbot’s SUAVE architecture, and Anoma’s tagline, the common thing you find is that they are all trying to figure out how to let users submit data that’s not yet a transaction, into a common pool for anybody to resolve into valid transactions.

Although the data is different, the problems around decentralizing that pool’s operation remain the same. Intent solvers can get DDoSed if the cost to submit an invalid intent is lower than the cost of verifying it. Solvers have the incentive to not propagate (censor) intents that contain capturable MEV.

In fact, ERC-4337 is the only attempt at intents that is decentralized and in production. The way it achieves this is to 1) limit the VM opcodes allowed, 2) limit the storage that is accessible, and 3) introduce a reputation system with staking. This is despite the ERC being somewhat specialized in scope. This points to the difficulty in finding a system that achieves both a message format that is more general than a transaction, and permissionless solvers.

So it doesn’t matter if you want to call that data UserOps, intents, or limit orders. The point is that intents are hard to decentralize and therefore are increasingly silo’ed in centralized servers with permissioned reads and writes. None of the silos have incentive to share the information with each other. Instead, they have the incentive to extract rent from users once they have a monopoly on the limit orders (I mean, intents).

Anoma’s tagline

Anoma: The 3rd Gen Protocol

In this video, Anoma labels themselves as a 3rd generation protocol after Bitcoin and Ethereum. That’s definitely setting high expectations. Adrian holds no punches to post-Ethereum protocols, by calling them Gen 2.X.

Usually, chest-thumping is a bad sign, but I’m not going to bet against them. Instead, to illustrate why Anoma is “Gen 3”, let’s take the humble limit order and reframe large innovations in crypto as major steps in its decentralization:

Limit order: Trade asset ABC for asset XYZ for price of 0.6=XYZ/ABC, valid for the next 5 minutes.

Problem 1, ownership risk: Is asset XYZ own-able? As in it’s not a counterfeit, it hasn’t been double-spent, it’s credibly scarce, it’s resistant to thieves, etc. If XYZ is the USD, we trust the US government to give it those desirable properties. If XYZ is equities, a central securities depository is in charge. But Bitcoin was the first to enable decentralized ownership.

Problem 2, counterparty risk: Is my trading partner going to run away with my ABC if I hand it over first? In centralized systems, exchanges take on the role of the trusted central counterparty clearing system to enable trade. Escrow companies do it for homes. But Ethereum was the first to enable decentralized trades.

Problem 3, trade execution (or price discovery) risk: Is my price of 0.69 actually good? Is the price of this particular trading venue the best price I can get?

Right now on-chain trading is fragmented. We can trade directly against liquidity on automated market makers, we can use DEX aggregators, and we can trust these new private RPC trusted entities (cowswap, bloxroute, mistX, rook, flashbots) that that advertise best price, MEV protection, and gas refunds. To the best of my knowledge, they all do a decent job for now, but there is always the nagging feeling that these entities have the incentive to sometimes give you a slightly worse price. The only way to know is to do statistical post-trade analysis on each venue. The game theory is simply not in the retail user’s favor.

This is exactly why traditional (centralized) markets came up with the National Best Bid and Offer (NBBO) system. The SEC requires brokers to guarantee at least the NBBO to their customers at trade time. Of course, in practice the NBBO doesn’t come close to best theoretical execution. But it does make it harder to scam retail outright. The fact that the SEC needed to put in this regulation shows the inherent problems of a privileged party that gets to know your trade intentions before the trade executes. I’ve said before and still believe that US systems in-principle promote decentralization.

So back to intents, yes, you could say they are just generalized limit orders. But the process of matching orders still suffers from centralization. Uniswap is a marvel, but DEX aggregators still win on price. Also ironically, Uniswap V3 itself provides a centralized router. While DEX aggregators are unapologetically centralized. And if you look at NFT trading, bridges, and rollup-sequencing, you’ll see even more centralization.

Uniswap’s (optional-ish) centralized router

Will UserOps, SUAVE, Anoma, or other projects succeed in furthering the ideals of decentralization? It remains to be seen. Solving trust problems is simply really really hard. It took decades of innovation to convincingly solve ownership and counterparty trust.

A lot of new things will look like old things, but they are different. The gigabrains working on intents are not mentally masturbating on semantics. They are blueprinting an ecosystem where participants are propelled by game theory, their behaviors aligned with invisible hand — the beating heart of decentralization.

The word “intent” is a meme that coordinates people to build. All so you can confidently yeet your limit order into the world.

--

--