Special thanks to Awa Sun Yin. for feedback on this piece. All potential misunderstandings are mine.
Any seasoned crypto user has experienced a moment when it “clicked”, mostly by using different apps with the same wallet. This type of intuition helps to understand the potential of a permissionless and open distributed ledger. Though, it can make us biased toward the idea of transactions as the main way to interact with a blockchain’s state. This is what we call transaction-based flow, which implies an imperative paradigm. Luckily, it’s not the only way, there are also intents.
When a user signs a transaction, it determines the expected result and the specific steps to get there. The what and the how are determined. But what if the user wants to define the end goal, without specifying the steps to get there, then we are pursuing an intent. Intents follow a declarative paradigm.
Transactions are like Uber, where you know exactly the path the driver should take, and intents are like a taxi, where you select the destination without caring about the route, and the driver defines how to get you there. For an intent to be filled, it has to go through a matchmaking process that defines the computational path to be taken.
Let’s jump into a real-life example to compare each paradigm. For this, we can take a look at how a DEX (Decentralized Exchange) works for each case. Uniswap is imperative and follows the transaction-based model, where the user defines the steps to get there.
On the other side, 0x Protocol works as an intent-based DEX. If you’re not familiar with 0x, I like to think of it like the Stripe of DeFi. It does not seem for the end user, but it’s massive. It serves 6 million users, trading on apps like Coinbase Wallet, Robinhood Wallet, Metamask, Zerion, Zapper, and more.
The protocol uses an off-chain ordering relay with on-chain settlement. Actors that host and propagate off-chain order books in the 0x protocol are known as Relayers. End users define the maximum amount they are willing to pay and don’t care which pool they take part in, or if tokens are “triangulated” to achieve their desired goal. They just express their intent. This example focuses on an opinionated protocol to solve a specific use case which is trading. An intent-centric protocol for generalized intents is in the works, as we will see later.
What are these good for?
Besides the DEX example, we have other use cases:
NFT DEX: OpenSea’s Seaport Protocol can be considered a specific use case for this.
Public good funding: Quadratic Funding with Gitcoin
Every person signs an intent of who to fund, and then when the funding period is over, you batch all intents and redistribute the tokens accordingly.Private DAOs: enable private voting.
Private auctions
Runtime rollups: State changes are netted out.
Private games: keep individual moves private
Multiparty, multivariate private bartering: people set their expected outcome and the algorithm can match with very specific rules.
Gassless transactions
Yield Aggregators: funds are staked on the highest yield. Relayers must prove the optimal path was taken.
Ethereum, AA, and Intents
The current implementation of Account Abstraction’s implementation is based on EIP-4337. This approach doesn’t implement AA directly on the core protocol, but it’s abstracted one layer up as shown in the diagram below. This made it easier to implement since it didn’t require revamping the core type of accounts: EOA (Externally Owned Accounts) and Contracts.
Instead of having Relayers as 0x, the matchmakers are called Bundlers. They grab a User Operations (an intent) from the Alt-Mempool to make the most profitable bundle, which is submitted to the network as a single transaction.
While this new architecture can be used to implement intent-based applications, it doesn't inherently enable the expression of intents. A Bundler’s logic determines when a transaction is included in the block, which could potentially create an avenue for Bundlers to censor transactions or prioritize based on factors outside the intent of the users.
For blockchains to reach mass adoption, intents, and settlements should be maintained private. This isn’t a focus on the current architecture.
Cypherpunk intents
The Heliax team is developing an ecosystem of protocols to enable generic intents with embedded privacy. It’s refreshing to see some cypherpunk energy on the crypto scene. The main protocols to reach their goal are Anoma and Taiga. Let’s take a peek at each of them.
Anoma is an intent-centric protocol for declarative privacy, decentralized counterparty discovery, solving, and atomic multi-chain settlement. There’s a lot to unpack from that definition. To get a sense of what we are talking about, we can use Cosmos as an analogy but focused on privacy and intents. It’s multi-chain with homogeneous architecture and security.
If we think about blockchains as settlement layers, we can think of three paradigms:
Scriptable Settlement: Bitcoin which relies on UTXO.
Programmable Settlement: Ethereum. Here parties know who they are and what they want. Signed messages for intent can’t be general purpose, each app develops its own.
Intent-centric and settlement agnostic: Anoma. Intents are composable and general purpose. Many intents which satisfy each other can be bundled together.
The problem Anoma is trying to solve is counterparty discovery. In Ethereum, many apps solve this by either centralization or onchain logic through Smart Contracts.
Solvers perform counterparty discovery, which is similar to what we saw as matchmaking for Ethereum’s AA.
Many centralize part of their stack to perform counterparty discovery. Dapps like 0x Relayers, Opensea’s Seaport, and Flashbots fall into this category. Most of the time solvers can’t rug people, but certainly, they can exclude people (they aren’t permissionless). On the other side, many protocols make the logic fully onchain. This approach to matching supply and demand is more restrictive. AMMs are a good example of these since they fall into the imperative paradigm, which doesn’t allow for intent,
Founders of Anoma, consider the protocol a L1.5, where final transactions still get settled on Ethereum. It’s intended for apps like Opensea (counterparty discovery), Gitcoin (many things), L2 (sequencers), etc. It opens the potential to decentralize a specific part of the application.
Private intents
Taiga is the protocol that enables the user’s intent to perform counterparty discovery. Intents can be transparent (public), shielded, or private. Technically, these are partially shielded. Since the requirement of the intent must be readable by solvers to be able to do their job, this part of the intent can’t be totally private. I will write more about how intents are realized in the follow-up post: “Intents Part II: Counterparty discovery”.
Where the result is settled will also define if the process is private (using Anoma or Aztec as settlement layers) or public (using any EVM chain).
I imagine a future where a combination of ZK proofs and FHE can be computed and matched in a way that enables 100% private intents. But not in the near term.
Sources: