Home/Projects/Omnichain Asset Bridge
GitHub Repository
Web3 / Cross-Chain Infrastructure2024 - Present · Active / Tested

Omnichain Asset Bridge

Two-Chain Trust-Minimized Asset Relayer & Bridge

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
Applied Stack
SolidityTypeScriptViemSQLiteEVM Protocols
Context & Threat Vector

The Engineering Problem

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

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.

1

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

2

TypeScript Relayer Daemon: Listens to RPC logs via WebSocket filters, buffers events, and verifies chain confirmations.

3

On-Chain Nonce & Signature Registry: Validates EIP-712 structured signatures and marks sequential nonces to prevent double-spending.

4

Exponential-Backoff Retry Queue: SQLite-backed persistent state store ensures zero message drop during RPC downtime.

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.

Verified Guarantees & Features

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