Cross-Chain Infrastructure2024 - Present / Active / Tested

Omnichain Asset Bridge

Two-Chain Trust-Minimized Asset Relayer & Bridge

Source code
01 / Context

The engineering problem.

Cross-chain bridges are frequently targeted by replay attacks, relayer desynchronization, and front-running during gas price spikes.

Overview

The Omnichain Asset Bridge facilitates decentralized asset transfers between two EVM blockchain environments. It combines on-chain escrow contracts with an off-chain TypeScript relayer that listens for emission events, collects validator signatures, and delivers verifiable mint/unlock payloads to the destination network.

EVM Chains
2
Replay Protection
100%
Confirmation Blocks
12
SolidityTypeScriptViemSQLiteFoundryEVM Protocols
02 / System design

Decentralized Lock-and-Mint with Relayer Verification

The architecture decouples the locking mechanism on Source Chain from the minting mechanism on Destination Chain through an authenticated relayer daemon.

Architecture / Two-chain asset bridge
Omnichain Asset Bridge: select an annotation below to inspect the architecture.SOURCE CHAIN01 / ESCROW02 / RELAYERDESTINATION03 / VERIFY04 / PERSIST & RETRY
[01]

BridgeVault.sol: Escrows user tokens on Source Chain, emitting an indexed BridgeDeposit event with nonce, recipient, and amount.

03 / Adversarial defense

Technical challenges & mitigations.

Preventing Cross-Chain Replay Attacks

Constructed unique domain separators per chain ID and incorporated monotonic nonces per user address, verified inside the destination smart contract before token minting.

Relayer RPC Liveness & Network Reorgs

Implemented confirmation depth requirements (e.g. 12 block confirmations) before queuing payloads, coupled with SQLite WAL logging for crash-resilient message dispatch.

04 / Implementation

Key features.

  • 01Two-way asset transfer between EVM testnets and local nodes
  • 02EIP-712 typed data hashing for tamper-proof relayer signatures
  • 03Gas-efficient batch verification algorithm
  • 04Automated confirmation depth tracker with SQLite queue
Next study / 02

Advanced NFT Card Combination System