Skip to main content

Engineering Intentions

Intents unbundle assets from blockchain protocols.

Intents shepherd transactions between different blockchains. As an example users can express the intent to transfer a token from one chain to another and a network of solvers will find the optimal route.

Architecture

The key principle is that the user's intent is typically submitted on-chain, while the complex computation and optimization to fulfil that intent happens off-chain. The final settlement of the intent is then executed on-chain to ensure security and finality of the transaction.

On-chain Components

  1. Intent submission interface: Smart contracts that allow users to submit their intents on-chain.
  2. Settlement layer: Smart contracts that execute the final transactions to fulfil the intent.
  3. Execution layer: On-chain components that implement the winning solution from solvers.
  4. Blockchain: The underlying blockchain that processes and confirms the resulting transactions.

Off-chain Components

  1. Solver network: The network of off-chain agents (solvers) that compete to find the most efficient way to execute user intents.
  2. Solution aggregator: Off-chain component that collects and evaluates solutions from solvers.
  3. Intent protocol interface: Off-chain component that receives and formats user intents.
  4. Mempool: Off-chain storage for pending intents before they are processed by solvers.
  5. Order matching engine: Off-chain component that matches complementary intents for more efficient execution.
  6. Solver incentivization mechanism: Off-chain systems for rewarding solvers who provide winning solutions.

It's important to note that the exact division between on-chain and off-chain components can vary depending on the specific implementation of the intent-based system. Some architectures may push more functionality on-chain for increased security and transparency, while others may prioritize off-chain processing for improved scalability and efficiency.

Solver Networks

Solver networks are decentralized systems of off-chain agents (solvers) that compete to find the most efficient way to execute user intents on blockchain networks. These solvers analyze user intents, determine optimal execution paths, and submit solutions to fulfil the intents.

Key characteristics of solver networks include:

  • Multiple independent solvers competing to provide the best solution
  • Ability to search across multiple protocols, chains, and liquidity sources
  • Economic incentives for solvers to provide efficient solutions
  • Mechanisms to select winning solutions based on predefined criteria

Communication

In intent-based architectures, the off-chain components communicate intentions to the on-chain components through a multi-step process:

  1. Intent Expression: Users express their high-level intentions through an interface, often provided by a dApp or wallet. These intents are typically more abstract than traditional transactions, focusing on desired outcomes rather than specific execution steps.
  2. Intent Submission: The expressed intent is submitted to an off-chain system, often called an "intent pool" or "solver network". This submission is usually done through an API or SDK provided by the intent protocol.
  3. Solver Processing: Off-chain solvers, which are specialized algorithms or services, analyze the intent and compute optimal execution paths. They consider factors like current market conditions, gas prices, and available liquidity across multiple protocols and chains.
  4. Solution Generation: Solvers generate one or more potential solutions that fulfil the user's intent. These solutions are typically encoded as a series of on-chain transactions or function calls.
  5. Solution Selection: If multiple solutions are proposed, a selection mechanism (e.g., an auction or ranking system) determines the best solution to execute.
  6. On-chain Submission: The chosen solution is then submitted to the blockchain as one or more transactions. This is typically done through a smart contract that acts as an entry point for intent execution.
  7. Execution and Verification: The on-chain components (smart contracts) receive and execute the solution. They typically include checks to ensure the execution meets the original intent's criteria and any specified constraints.
  8. Settlement: The final state changes resulting from the intent execution are settled on-chain, updating relevant balances and states.

Throughout this process, the off-chain components use various mechanisms to instruct the on-chain components:

  • Encoded function calls within transactions
  • Signatures and permissions granted by the user
  • Metadata attached to transactions to provide context
  • Interactions with specialized on-chain contracts designed to interpret and execute intent-based solutions

Example Transaction

Following is a high-level diagram showing the major interacting components in a typical intent-based transaction flow:

  1. User: Expresses their intent (e.g., "Swap 1 ETH for the maximum amount of USDC")
  2. Intent Protocol Interface: Receives and formats the user's intent
  3. Solver Network: Broadcasts the intent to multiple solvers
  4. Solvers: Compete to find the best execution path for the intent
  5. Solution Aggregator: Collects and evaluates solutions from solvers
  6. Execution Layer: Implements the winning solution
  7. Blockchain: Processes the resulting transaction(s)
  8. Settlement Layer: Ensures the intent is fulfilled and finalizes the transaction

Source Code