Skip to main content

What is Intent Proving?

After a solver fulfills an intent on the destination chain, they must prove the fulfillment on the source chain to claim their rewards. This proof validates that:
  1. The intent was executed on the destination chain
  2. The correct claimant fulfilled it
  3. The execution matches the original intent hash
Eco Routes supports multiple cross-chain messaging protocols for proving, including Hyperlane, LayerZero, Polymer, and Metalayer.

Proving Architecture

Prover Interface

All prover contracts implement the IProver interface:
IProver.sol

Proving Methods

There are two ways to prove intent fulfillment:

Method 1: Fulfill and Prove Together

Use fulfillAndProve to atomically fulfill and initiate proving:

Method 2: Separate Fulfill and Prove

Fulfill first, then prove separately (allows batching multiple proofs):

Proving Function

From contracts/Inbox.sol:
Inbox.sol
This function:
  1. Verifies all intents are fulfilled
  2. Encodes chain ID + intent hash + claimant pairs
  3. Calls the prover contract to relay the proof message

Bridge-Specific Proving

Hyperlane uses the Mailbox pattern for cross-chain messaging:

Claiming Rewards

After the proof is delivered to the source chain, solvers can withdraw rewards.

Withdraw Function

From contracts/IntentSource.sol:
IntentSource.sol

Withdrawal Process

1

Wait for Proof Delivery

The proof must be delivered and processed on the source chain. Timing varies by bridge:
  • Hyperlane: 1-5 minutes typically
  • LayerZero: 2-10 minutes depending on confirmations
  • Polymer: 10-30 minutes (IBC relay)
  • Metalayer: 5-15 minutes
2

Call Withdraw

Anyone can call withdraw once the proof exists:
3

Receive Rewards

The vault automatically transfers rewards to the claimant:

Complete Proving Example

Here’s a complete example using Hyperlane:

Batch Proving

Prove multiple intents in one transaction to save gas:

Batch Withdrawal

Withdraw multiple rewards in one transaction:
IntentSource.sol
Usage:

Monitoring Proof Status

Check if a proof has been delivered:

Proof Challenges

If an intent is proven on the wrong destination chain, it can be challenged:
IntentSource.sol
This prevents fraudulent claims from intents fulfilled on the wrong chain.

Important Considerations

Bridge Fees: Always include sufficient value to cover bridge messaging fees. Insufficient fees will cause the proof to fail.
Domain IDs: Different bridges use different domain ID systems. Always verify the correct domain ID for your source chain.
Proof Timing: Proof delivery time varies by bridge. Don’t attempt withdrawal until the proof is confirmed on the source chain.
Batch Operations: Use batch proving and batch withdrawal to significantly reduce gas costs when handling multiple intents.

Troubleshooting

Proof Not Appearing

Withdrawal Reverts

Next Steps

Creating Intents

Learn how users create and publish intents

Fulfilling Intents

Understand the fulfillment process

ERC-7683 Integration

Use standardized proving interfaces