Skip to content

Wormhole arbiter#10

Draft
christianangelopoulos wants to merge 88 commits intomainfrom
wormhole_arbiter
Draft

Wormhole arbiter#10
christianangelopoulos wants to merge 88 commits intomainfrom
wormhole_arbiter

Conversation

@christianangelopoulos
Copy link
Copy Markdown
Collaborator

Wormhole Arbiter for The Compact

Overview

This PR implements a cross-chain arbiter contract that enables communication of fill status across EVM chains using Wormhole, built on V1 of The Compact protocol.

Key Features

Flexible Relay Mechanisms

This implementation exposes two distinct relay methods to accommodate different cost/UX tradeoffs:

  • SEND Operations: Automatic cross-chain delivery via Wormhole Executor with upfront gas payment and guaranteed execution
  • POST Operations: User self-relay via Wormhole Core for lower costs with manual VAA relay

Tribunal Integration

Implements IDispatchCallback to integrate with Tribunal's post-dispatch callback hooks, enabling automatic cross-chain claim transmission immediately after fills are completed on the source chain.

Implementation Details

Core Components

  • WormholeArbiter.sol: Main contract handling bidirectional message flow and Tribunal callbacks
  • BaseArbiter.sol: Abstract base providing claim validation and ETH refund mechanisms
  • Message.sol: Encoding/decoding library with assembly optimizations for gas efficiency
  • WormholeExecutor.sol: Wormhole SDK integration for automatic relay operations

Supported Chains

  • Ethereum (Mainnet)
  • Arbitrum
  • Base
  • Unichain

Message Types

  1. SINGLE_SEND: Individual claim with automatic relay
  2. BATCH_SEND: Multiple claims to single chain with automatic relay
  3. SINGLE_POST: Individual claim with user self-relay
  4. BATCH_POST: Bitmap-compressed batch with user self-relay (max 120 claims)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant