Skip to main content

What is Intent Fulfillment?

Intent fulfillment is the process by which solvers execute user intents on destination chains. Solvers:
  1. Monitor published intents across chains
  2. Evaluate profitability based on rewards vs. execution costs
  3. Provide required tokens/assets on the destination chain
  4. Execute the intent’s calls on the destination chain
  5. Prove fulfillment to claim rewards on the source chain

Fulfillment Contract

The Inbox contract (contracts/Inbox.sol) handles intent fulfillment on destination chains.

Key Functions

Inbox.sol

Fulfillment Process

Here’s a complete guide to fulfilling intents as a solver.
1

Monitor Published Intents

Listen for IntentPublished events on source chains:
Filter for intents on chains you support:
2

Evaluate Profitability

Calculate if the intent is worth executing:
3

Verify Intent is Funded

Check that the reward vault has sufficient funds:
4

Approve Required Tokens

The Portal needs approval to pull tokens for execution:
5

Fulfill the Intent

Execute the intent on the destination chain:

Complete Fulfillment Example

Here’s a complete Solidity example of fulfilling a token transfer intent:

Fulfill and Prove in One Transaction

For faster reward claiming, use fulfillAndProve to combine fulfillment and proof initiation:
Domain ID vs Chain ID: The sourceChainDomainID parameter is NOT necessarily the same as the chain ID. Different bridge protocols use different domain ID systems:
  • Hyperlane: Custom domain IDs (e.g., Ethereum mainnet = 1, but Polygon = 137)
  • LayerZero: Uses endpoint IDs that differ from chain IDs
  • Polymer: Uses chain IDs directly
Always consult your bridge provider’s documentation for the correct domain ID mapping.

Real-World Examples

Example 1: Simple Token Transfer

Example 2: DeFi Interaction

Example 3: Cross-Chain Swap

Handling Fulfillment Results

The fulfill function returns execution results for each call:

Claimant Identifiers

The claimant parameter is a cross-VM compatible identifier:
For EVM chains, convert your address to bytes32:

Intent Validation

The Portal validates intents before execution:
Inbox.sol
This ensures:
  • Intent hasn’t expired
  • Intent is for the correct portal
  • Intent hash is valid
  • Intent hasn’t been fulfilled already
  • Claimant is valid

Gas Optimization Tips

Batch Processing: Monitor multiple intents and fulfill them in batches using multicall patterns to save gas.
Token Approval: Use approve(type(uint256).max) for tokens you frequently use to avoid repeated approval transactions.
Fulfill and Prove: Use fulfillAndProve instead of separate fulfill and prove calls to save one transaction.

Error Handling

Common errors and their solutions:

Next Steps

After fulfilling an intent, you need to prove the fulfillment to claim rewards:

Proving Intents

Learn how to prove fulfillment and claim your rewards

Creating Intents

Understand the user perspective of creating intents

ERC-7683 Integration

Use the standardized interface for fulfillment