Skip to main content

Overview

The Intent Executor is a modular smart contract that executes user intents across multiple protocols and chains. It implements ERC-7579 for smart account compatibility and supports Compact, Permit2, and standalone execution patterns.
The Intent Executor acts as the final execution layer for target operations after settlement validation and resource unlocking are complete.

Architecture

IntentExecutor

The main executor contract unifies multiple execution mechanisms:
IntentExecutor.sol
Execution Types:

Compact Intents

Cross-chain intents using The Compact protocol

Permit2 Intents

Gasless token approvals via Permit2

Standalone Intents

Independent execution without external protocols

Trusted Execution

Whitelisted execution without signature validation

ERC-7579 Integration

The executor implements the ERC-7579 module standard for smart account compatibility:
IntentExecutor.sol
ERC-7579 Benefits:
  • Smart account compatibility
  • Modular execution patterns
  • Standard installation/uninstallation
  • Account-specific initialization tracking

Module Lifecycle

1

Install Module

Smart account calls onInstall() to enable executor
2

Execute Intents

Account can now execute intents through the module
3

Uninstall Module

Account calls onUninstall() to disable executor

Execution Patterns

Compact Intent Execution

Executes intents using The Compact protocol:
CompactIntentExecutor.sol
Flow:

Permit2 Intent Execution

Executes intents with Permit2 token approvals:
Permit2IntentExecutor.sol
Permit2 execution is more gas-efficient than Compact as it doesn’t require pre-claim operations or gas stipends.

Standalone Intent Execution

Executes intents independently without external protocols:
StandaloneIntentExecutor.sol

Trusted Execution

Executes operations from whitelisted contracts without signature validation:
TrustedExecution.sol
Trusted Execution Security:Only whitelisted contracts can call executeOpsWithoutSignature. This pattern is used by arbiters that have already validated signatures in the pre-claim phase, avoiding redundant validation and saving gas.Trusted contracts:
  • SameChainArbiter
  • CrossChainArbiter
  • Other verified settlement contracts

Operation Structure

Target operations are encoded using the Types.Operation structure:
OrderTypes.sol

Signature Modes

Target Operation Execution

The core execution logic handles various operation types:
Operation Types:

Adapter Integration

The IntentExecutorAdapter forwards calls from Router to IntentExecutor:
IntentExecutorAdapter.sol

Execution Path

1

Router Receives Fill

User/solver submits fill operation to Router
2

Adapter Delegatecall

Router delegatecalls IntentExecutorAdapter
3

Forward to Executor

Adapter forwards call to IntentExecutor
4

Validate & Execute

Executor validates signatures and executes operations

Gas Optimizations

Transient Storage

The executor uses transient storage for reentrancy protection:

Batch Execution

Multiple operations execute in a single transaction:

Trusted Execution Bypass

Skips signature validation for trusted callers:
Gas Savings: Trusted execution saves ~5,000-10,000 gas per operation by avoiding redundant ECDSA signature recovery.

Security Model

Critical Security Features:
  • Signature Validation: All operations require valid signatures (except trusted execution)
  • Reentrancy Protection: NonReentrant modifier on all entry points
  • Atomic Execution: All operations succeed or entire batch reverts
  • Trusted Whitelist: Only approved contracts can bypass signature validation
  • ERC-7579 Compliance: Standard module interface for smart accounts

Signature Validation

ValidateSignature.sol

Trusted Contract Whitelist

TrustedExecution.sol

Arbiters

Learn how arbiters coordinate with intent execution

Fill & Claim

Understand fill and claim operation types