Architecture
Purpose
Local Prover enables intents to be fulfilled on their origin chain:- No cross-chain messaging required
- Zero additional fees beyond gas
- Instant proof availability
- Useful for same-chain swaps, transfers, or operations
Configuration
inbox
: Portal contract address (provides Inbox functionality)
- Stores Portal reference as immutable
- Records chain ID for proof data validation
- Validates chain ID fits in uint64
How It Works
Immediate Proof Creation
Unlike cross-chain provers, Local Prover doesn’t create proofs—it reads them:- Intent fulfilled on Portal → claimant stored in
Portal.claimants
mapping provenIntents()
queries Portal’s claimant mapping directly- Returns proof data with current chain ID and claimant address
Proof Lookup
claimant
: Address that fulfilled the intent (converted from bytes32)destination
: Current chain ID
- Returns
ProofData(address(0), 0)
No-Op Functions
prove()
- Claimant already stored by Portal during fulfillment
- No cross-chain message to send
- Proof is immediately available
fulfillAndProve()
pattern.
challengeIntentProof()
- Same-chain intents cannot be proven on wrong chain
- No cross-chain discrepancy possible
Usage Patterns
Creating Same-Chain Intent
Fulfilling Same-Chain Intent
prove()
is a no-op.
Claiming Rewards
Fee Structure
Zero additional fees:- No cross-chain messaging costs
- No bridge fees
- Only standard gas costs for fulfillment and withdrawal
When to Use Local Prover
Ideal Use Cases
Same-Chain Operations:- Token swaps on same chain
- Transfers between accounts
- DeFi operations on single chain
- Testing and development
- Instant settlement (no message delays)
- Zero bridging costs
- Simpler integration
- No external dependencies
Not Suitable For
- Cross-chain transfers
- Multi-chain operations
- Bridging assets between chains
HyperProver
(Hyperlane)LayerZeroProver
(LayerZero)MetaProver
(Metalayer)
Integration Example
Comparison with Cross-Chain Provers
Feature | LocalProver | Cross-Chain Provers |
---|---|---|
Proof Availability | Immediate | After message delivery |
Additional Fees | None | $5-50 per message |
Message Delays | None | Seconds to minutes |
Infrastructure | None required | Bridge dependencies |
Complexity | Minimal | Domain IDs, hooks, etc. |
Use Case | Same chain only | Cross-chain operations |
Best Practices
Intent Creation
Set destination correctly:Fulfillment
Either pattern works:Validation
Check destination matches:Error Handling
ChainIdTooLarge(uint256)
: Chain ID exceeds uint64.max during construction
prove
, challengeIntentProof
) never revert—they are intentionally no-ops.
Technical Notes
Why prove() is Empty
Theprove()
function is empty because:
- Portal stores claimant in
claimants
mapping during fulfillment provenIntents()
queries this mapping directly- No cross-chain message needed
- Proof is instantly available
Why No Fees
No fees because:- No cross-chain message to send
- No bridge infrastructure to pay
- No external services required
- Only standard EVM gas costs