Nomad
Abstract
Nomad is an implementation and extension of the Optics protocol (OPTimistic Interchain Communication), i.e. an optimistic cross-chain bridge.
It was hacked due to wrong initialisation parameters.
Stauts | Fixed |
Type | Contract, Cross-chain Bridge |
Date | Aug 2, 2022 |
Source | |
Direct Loss | ~$90M |
Project Repo |
Attack Vectors & Details
1)In this tx, the hacker just called process() in Replica.sol. Once you passed these three requires, the specified operations will be processed by NomadBridge.handle().
All the requires passed. The first and third ones are obvious, so check the second one: acceptableRoot(messages[_messageHash])
. messages[_messageHash] = 0x0
, because the message was forged by the hacker(non-existent in this contractâs history).
In a mapping, it will be 0 by default. LEGACY_XXXX = 1 or 2
, irrelevant here. Next is confirmAt[_root]
, as long as it != 0
and < current block time
then the check will pass. So whatâs the value of confirmAt[0x0]
?
Here is the wrong initialisation param: confirmAt[_committedRoot] = 1. They passed _committedRoot = 0x0 while initialising the contract. So confirmAt[0x0] = 1. Check passed.
Public Loot
Everyone can copy&paste the hacker's tx data and modify the receiver's address to benefit their own. It was reported there were at least 70 addresses did this, the public loot.
Last updated