Available Bridge Provers
The protocol implements five distinct bridge integrations:Hyperlane
HyperProver - Cross-chain messaging via Hyperlane mailbox
LayerZero
LayerZeroProver - V2 endpoint integration for cross-chain proofs
Chainlink CCIP
CCIPProver - Decentralized oracle network for reliable cross-chain proving
Metalayer
MetaProver - Caldera Metalayer router-based proving
Polymer
PolymerProver - Event-based proving with CrossL2ProverV2
Architecture Overview
All message-based provers (Hyperlane, LayerZero, CCIP, Metalayer) extend from a common base:Common Base Functionality
All provers inherit fromBaseProver.sol which provides:
- Proof Storage: Mapping from intent hash to proof data (claimant + destination)
- Challenge Mechanism: Anyone can invalidate proofs with mismatched destination chain IDs
- Portal Integration: Immutable reference to the Portal contract
contracts/prover/BaseProver.sol
Domain IDs vs Chain IDs
When calling prover functions, you must use the bridge-specific domain ID:- Hyperlane: Custom domain IDs (e.g., Ethereum = 1, Polygon = 137, but check Hyperlane docs)
- LayerZero: Endpoint IDs (EIDs) that differ from chain IDs
- Chainlink CCIP: Chain selectors (unique 64-bit identifiers per chain)
- Metalayer: Metalayer-specific domain IDs
- Polymer: Uses actual chain IDs
Inbox.sol:144-151:
contracts/Inbox.sol
Common Prove Function
All message-based provers implement this signature fromMessageBridgeProver.sol:112-117:
contracts/prover/MessageBridgeProver.sol
Parameters
Address that initiated the proving request (receives refunds)
Bridge-specific domain ID of the source chain (where intent was created)
Encoded (intentHash, claimant) pairs. Format: 8-byte chain ID + (32-byte hash + 32-byte claimant) pairs
Bridge-specific encoded data for message formatting. Structure varies by prover implementation.
Fee Calculation
All provers implementfetchFee() to calculate cross-chain messaging costs:
prove() function automatically:
- Calculates required fee via
fetchFee() - Validates
msg.value >= fee - Refunds excess payment to sender
Message Flow
- Destination Chain: Intent is fulfilled via
Inbox.fulfillAndProve() - Proof Encoding: Intent hash and claimant are encoded with chain ID prefix
- Bridge Dispatch: Prover sends message to source chain via bridge
- Source Chain: Prover receives message and stores proof
- Reward Claim: Portal validates proof and distributes rewards
Security Features
Whitelist Protection
All message-based provers use whitelisting to prevent unauthorized proof submissions:contracts/prover/MessageBridgeProver.sol
Proof Challenge
Anyone can challenge invalid proofs (fromBaseProver.sol:112-129):
contracts/prover/BaseProver.sol