Case Study: Nomad Bridge Replica Fraud¶
Fidelity Level: L2 (Fork-State Reproduction) Date: August 1-2, 2022 Loss: ~$190M Chain: Ethereum Mainnet
[warn] Address Correction: The original plugin used an EOA address as the Replica contract (0x5d9d4825... was NOT a contract). This case study now uses the verified addresses from Etherscan.
Overview¶
The Nomad bridge was exploited on August 1, 2022 when a vulnerability in the
Replica contract allowed anyone to forge authenticated cross-chain messages.
The root cause was a misconfiguration during a contract upgrade: the
committedRoot storage variable was initialized to 0x00, and the contract's
process() function treated this zero value as a valid proof.
Because the vulnerability allowed anyone to forge messages, the exploit was executed by hundreds of actors simultaneously in what became known as a "crowdsourced hack."
Technical Details¶
Contracts¶
| Contract | Address | Role |
|---|---|---|
| Replica | 0xB92336759618F55bd0F8313bd843604592E27bd8 |
Message verification |
| BridgeRouter | 0x88A69B4E698A4B090DF6CF5Bd7B2D47325Ad30A3 |
Cross-chain message routing |
Vulnerability¶
The Replica contract used a storage variable committedRoot to store the
root of a Merkle tree of accepted cross-chain messages. The process() function
verified message proofs against this root:
function process(bytes memory _message, bytes memory _proof) external returns (bool) {
bytes32 _messageHash = keccak256(abi.encodePacked(_message));
// Check if the message has already been processed
require(messages[_messageHash] == MessageStatus.NONE, "Replica: message already processed");
// Verify the proof against the committed root
require(MerkleProof.verify(_proof, committedRoot, _messageHash), "Replica: proof verification failed");
// ... execute the message
}
During an upgrade, committedRoot was set to 0x00. Since a Merkle proof
against 0x00 still passes verification (with a carefully crafted proof),
any message could be accepted.
Fork Point¶
Block 15,259,100 — the block immediately before the first exploit transaction at block 15,259,101.
First Exploit Transaction¶
0x5ea16a4f9104b901a75662f3900ca8d3d92209d846310237ca65675e2f2e519c
Reproduction Steps¶
Prerequisites¶
- Crucible installed
- An Ethereum archive RPC endpoint (Alchemy, Infura, etc.)
- Docker (optional, for isolated execution)
Steps¶
- Configure environment
- Capture baseline
- Run the experiment
- Verify determinism
- Export publication bundle
Expected Results¶
| Assertion | Expected | Description |
|---|---|---|
committedRoot_is_zero |
[ok] Pass | Replica committedRoot == 0x00 at fork block |
process_call_succeeds |
[ok] Pass | Forged process() does not revert |
message_accepted |
[ok] Pass | Forged message status == PROCESSED |
Evidence Artifacts¶
datasets/<run_id>/
├── run_manifest.json # Full provenance + metadata
├── publication_report.json # Machine-readable publication report
├── assertions.json # Structured assertion results
├── provenance.json # Standalone provenance
├── artifact_bundle_manifest.json # SHA-256 of all files
├── run.jsonl # Step-by-step log
├── events.jsonl # Contract events
├── storage_diffs.jsonl # Storage modifications
├── gas_profile.jsonl # Gas usage
├── report.md # Human-readable report
└── REPRODUCE.md # Reproduction instructions
Limitations¶
- No off-chain relayers: The reproduction simulates the on-chain
process()call but does not include the off-chain relayer infrastructure that normally delivers messages. - No watcher challenge: The optimistic 30-minute fraud proof window is not exercised in this reproduction.
- Single message only: The reproduction forges one message rather than the hundreds that occurred during the actual exploit.