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.
Two-Chain Trust-Minimized Asset Relayer & Bridge
Source codeCross-chain bridges are frequently targeted by replay attacks, relayer desynchronization, and front-running during gas price spikes.
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.
The architecture decouples the locking mechanism on Source Chain from the minting mechanism on Destination Chain through an authenticated relayer daemon.
BridgeVault.sol: Escrows user tokens on Source Chain, emitting an indexed BridgeDeposit event with nonce, recipient, and amount.
Constructed unique domain separators per chain ID and incorporated monotonic nonces per user address, verified inside the destination smart contract before token minting.
Implemented confirmation depth requirements (e.g. 12 block confirmations) before queuing payloads, coupled with SQLite WAL logging for crash-resilient message dispatch.