Introducing ERC-7521: Generalized Intents for Smart Contract Wallets

ERC-7521 introduces a single common interface for intent-based projects in the Ethereum ecosystem, unlocking future-proof access to the evolving intent landscape and securing long-term composability.

Introducing ERC-7521: Generalized Intents for Smart Contract Wallets

In the ever-evolving landscape of blockchain and decentralized applications, more and more attention has been drawn to the concept of users defining their intents rather than pure transactions. This enables users to not have to worry about navigating the increasing complexity of DeFi and unlocks a whole range of added use cases that are only now being conceived of.

With individual apps already utilizing their own different and incompatible intents structures, it makes sense to create a single generalized intent standard which can be shared and understood by all users, apps, wallet software, solvers, searchers, and more.

To aid composability and reduce barriers to entry, we propose ERC-7521, a standard supporting generalized intents for smart contract wallets.

Add EIP: General Intents for Smart Contract Wallets by pixelcircuits · Pull Request #7739 · ethereum/EIPs
A generalized intent specification for smart contract wallets, allowing authorization of current and future intent standards at sign time.

In this post, we will delve into the intricacies of this new standard, its comparison to ERC-4337, and its potential to revolutionize how users interact with blockchains.

Account Abstraction Intents Spec: Unleashing Generalized Intents

What is a User Intent?

Since the space is so new, the definition of an intent is currently a little ambiguous. As an overall concept, the term is generally used to refer to a user’s expression of a desired on-chain outcome or end state. For the purpose of this specification, an Intent is defined as a set of operations and expectations set by a user. These operations and expectations can be mixed with other intents’ operations and expectations in an effort to mutually and maximally satisfy all participants.

A combination of on-chain operations that result in all parties being satisfied is referred to as a Solution. Specialized solvers (akin to bundlers in ERC-4337) will compete to find solutions that provide the highest satisfaction level to users. This may be done for example by finding the best/most efficient on-chain pathway, leveraging off-chain sources of liquidity, combining different users’ intents to leverage coincidences of wants, and even including their own intents.

Adding User Intents to Account Abstraction

The key to enabling generalized intents is through the use of smart contract-based abstract accounts. Similar to ERC-4337, intents are signed as messages that are then ultimately verified on-chain through a separate transaction. These signed messages are then gossiped around in their own mempool.

The goal of this spec is not to get too technical in terms of how an intent should exactly be processed, structured or managed off chain, but to instead create a framework for smart contract wallets to integrate with and automatically support a wide range of possibilities defined by the signed intents themselves. This framework therefore needs to also allow for a seamless and permissionless upgrading and code expansion process as new use cases for intents pop up.

User Intents alongside ERC-4337 Account Abstraction

A Single Entry Point and Infinite Intent Standards

To help facilitate this seamless and permissionless upgrade and expansion process, the EntryPoint contract from ERC-4337 has been mimicked but also split into two distinct parts. The first part, referred to as the Entry Point, is the main point of entry for submitting intent solutions and is responsible for validating intent signatures as well as running the high level intent processing logic.

The specifics of the intent handling logic are defined in separate contracts, referred to as Intent Standards, which is specified by the signed intent itself. The Entry Point calls out to these contracts in order to process an intent. It is the Intent Standard that defines how additional intent data and execution should be handled, as well as basic off-chain rules such as how messages are to be communicated to solvers and protection mechanisms against DoS attack vectors inherent with intents.

Core Contract Interactions for Generalized Intents

These Intent Standards should be established on their own, separate from this spec. We anticipate that the development of new Intent Standards with additional functionality will grow as the intent landscape becomes more mature, with optimized niches and new emerging use cases. Adoption and support of these standards will be driven by social consensus among wallet developers and intent solvers, as well as the demands of end users.

In order to ensure our proposed ERC has significant functionality from the early stages, we have developed an Asset Based Intent Standard to support the majority of current blockchain use cases. We will be refining this standard in the open (along with this ERC) in order to suit the ecosystem’s needs, and we encourage members of the intents community to engage with us and provide comments and suggestions. Check out our other post to learn more about this Intent Standard.

Asset Based Intent Standard: An Intent Standard for the World of Digital Assets
Introducing the Asset Based Intent Standard, an extension of the generalized intents framework of ERC-7739 to support intents for major digital asset use cases.

An Ambiguous but Powerful Intent Structure

User Intents contain data that can be broken down into two main parts:

  1. Essential verification data which is used by the Entry Point contract to verify messages with their senders before executing them.
  2. Additional data specific to the Intent Standard specified by the intent.

The Intent Standard data can be anything, but is always broken down into individual pieces, which are referred to as intent Segments.

The Entry Point contract does not understand what the data is exactly, but does recognize the breakdown into segments. The Entry Point contract calls to the Intent Standard contract to process each segment one at a time and enforces that the segments of an intent are always processed in the order they are specified. However, the Entry Point does allow for other intents to be processed in between the execution of segments.

These intent segments will typically consist of user-defined operations they wish to process or checks that certain conditions are met. Additionally, a Segment can pass along data to the next Segment during processing. This data is referred to as the intent Context Data and is useful to verify changes occurring in between segments and to avoid recalculating useful data. Again, it is up to the Intent Standard specs to take full advantage of this data.

User Intent Data Structure and Processing Routine

Combining Intents for Maximum Satisfaction

During intent processing, an intent has the ability to claim dissatisfaction over any sort of condition, whether it be an unexpectedly low balance or whatever the Intent Standard may be looking for, that evaluates to false. When this happens, the entire transaction is rolled back, including the processing of unrelated intents that may have come before.

Only when a group of intents are submitted and processed in an order that leaves all parties satisfied are the intents considered spent and the resulting state is allowed to persist on the chain. It is these groupings of intents that make up Solutions and are passed to the Entry Point contract to process.

However, it's not enough to just submit a list of intents, because the segments of different intents can be arranged in different orders. Therefore a Solution also specifies how the segments of different intents should be ordered during processing (how segments of different intents are interleaved).

Bundling Intents into a Solution

Part of the solving process will typically consist of the solver crafting an intent that helps to facilitate satisfaction of a group of other intents, enabling them to maximize user satisfaction while also generating some profit.

Conclusion: Empowering Intent-Driven Blockchain Interactions

The focus of this spec is to define the basic framework for smart contract wallets to connect to and unlock powerful intent expression for their users even as the landscape continues to evolve. Defining an intent as a collection of smaller intent Segments provides a good user experience with a reduction in the amount of signing users need to do. The intent Segmenting and shared Context Data also helps to unlock powerful features without high gas usage. Intents can trust that all their Segments will be processed in order without having to manually check.

Generalized user intents unlock a whole new world that is just now starting to be tapped into. From something as simple as gasless token swaps to things even more complex like conditional intents to automate processes like moving funds from cold to hot wallets or doing daily coin purchases through a single signed message, the possibilities of intents are huge! Our specification of an Asset Based Intent Standard is the first of many iterations that will enable the community to take advantage of this new framework.

Get Involved

This generalized intent standard is for everyone. As with all ERCs, community participation and feedback are crucial for ensuring the standard meets the needs of all stakeholders.

The world of intents is intensifying….

About Essential

Essential is building intent-based infrastructure & tooling to accelerate the transition from value extraction to intent satisfaction. With a growing team of global contributors building several core pieces of intent-centric infrastructure, Essential is committed to supporting ecosystem-wide composability to ensure the intent paradigm reaches its full potential to minimize extractive behavior and maximize user satisfaction.

To join us on this journey and contribute to the intent-centric future, follow us on Twitter and stay tuned for future updates.

Follow Essential

Follow Us on Twitter