Skip to main content

Bridge Module

Cross-chain token and NFT migration with oracle-verified consensus.


Purpose

The Bridge module enables bidirectional asset movement between two EVM or EVM-compatible chains. It exists because:

  • Games may need to migrate from a legacy chain to a new settlement chain
  • Players need to move tokens and NFTs across chains without trusting a centralized custodian
  • The bridge must work with any ERC-20 token, not just a specific gameplay currency

Components

ComponentDescriptionDoc
Token BridgeBidirectional fungible token transfer with oracle consensusToken Bridge →
NFT BridgePhased NFT migration strategy (lock, map metadata, mint on target)NFT Bridge →
Oracle NetworkDecentralized attestation layer that verifies cross-chain eventsOracle Network →

Architecture

┌─────────────────────────────────────────────────────────────┐
│ SOURCE CHAIN │
│ │
│ Player deposits tokens ──► Bridge Contract (lock/burn) │
│ │ │
│ emits event │
└────────────────────────────────────┼────────────────────────┘

┌──────▼──────┐
│ ORACLE │
│ NETWORK │
│ │
│ ┌────┐ │
│ │ O1 │ ──► signs attestation
│ ├────┤ │
│ │ O2 │ ──► signs attestation
│ ├────┤ │
│ │ ON │ ──► signs attestation
│ └────┘ │
└──────┬──────┘
│ threshold met

┌────────────────────────────────────▼────────────────────────┐
│ TARGET CHAIN │
│ │
│ Player calls claim() with signatures ──► Bridge Contract │
│ (mint/unlock) │
│ │
└─────────────────────────────────────────────────────────────┘

Key Properties

PropertyDetail
BidirectionalTokens can flow in both directions between chains
Oracle consensusRequires configurable threshold of independent oracle signatures
Replay-protectedClaim hashes prevent double-processing
Chain-verifiedPackets include chain ID; wrong-chain submissions revert
Time-boundedClaims expire after a configurable window (default: 30 days)
Token-agnosticBridge contracts work with any ERC-20; token address is a parameter

Reference Implementation

The first deployment bridges between WAX (EOSIO) and Avalanche (EVM):

ContractChainPurpose
teleporteosWAXLock/release tokens, store oracle signatures
FadedMonsutaTHCAvalancheMint/burn tokens, verify oracle consensus

While the reference uses WAX ↔ Avalanche, the bridge pattern is chain-agnostic. Any source chain that can emit events can serve as the source side.


When to Use This Module

Your SituationUse Bridge?
Migrating from another chain✅ Token bridge + NFT bridge
Game is already on the target chain❌ No bridge needed
Want to support multi-chain tokens✅ Deploy bridge between each chain pair
Need a DEX or AMM❌ That's not what this module does