What are Intents?
Intents are the core primitive of the Eco Routes Protocol. An intent represents a complete specification for a cross-chain action, including:- What should be executed on the destination chain
- Where the execution should happen (destination chain)
- When it must be completed by (deadline)
- Who gets rewarded for fulfilling it
Intent Structure
The protocol defines intents using a composite struct that combines routing information with reward parameters:contracts/types/Intent.sol
Destination
Thedestination field specifies the target chain ID where the intent should be executed.
Route
Theroute contains all execution instructions for the destination chain:
contracts/types/Intent.sol
salt- Unique identifier provided by the intent creator to prevent duplicatesdeadline- Timestamp by which the route must be executedportal- Address of the portal contract on the destination chain that receives messagesnativeAmount- Amount of native tokens to send with route executiontokens- Array of ERC20 tokens required for executing calls on the destination chaincalls- Array of contract calls to execute on the destination chain in sequence
Reward
Thereward defines who can execute the intent and what they receive:
contracts/types/Intent.sol
deadline- Timestamp after which the intent can no longer be executedcreator- Address that created the intent and has authority to modify/cancelprover- Address of the prover contract that must approve executionnativeAmount- Amount of native tokens offered as rewardtokens- Array of ERC20 tokens and amounts offered as additional rewards
Supporting Structures
Call
Represents a single contract call to be executed:contracts/types/Intent.sol
target- The contract address to calldata- ABI-encoded function call datavalue- Amount of native tokens to send with the call
TokenAmount
Represents a token and amount pair:contracts/types/Intent.sol
token- Address of the ERC20 token contractamount- Amount of tokens in the token’s smallest unit
Intent Hash
Each intent is uniquely identified by its hash, which is computed from its components:routeHash = keccak256(abi.encode(route))rewardHash = keccak256(abi.encode(reward))
The intent hash is deterministic - the same intent parameters will always produce the same hash, enabling reliable cross-chain verification.
Intent Vault
Each intent has an associated vault contract deployed using CREATE2 for deterministic addressing:contracts/IntentSource.sol
- Holds the reward tokens until the intent is fulfilled
- Uses the intent hash as the CREATE2 salt for predictable addresses
- Can be computed before deployment
- Enables secure, permissionless reward distribution
Vaults are deployed on-demand when needed, but their addresses can be calculated in advance. This allows solvers to verify rewards are available before fulfilling an intent.