In the early hours of August 2, Nomad bridge posted an alert that it was aware of an ongoing exploit. In the following hours, the entire protocol’s funds of more than $190 million were drained.

Crypto community developer and white hat ‘samczsun’ broke down the chain of events, explaining what happened. He labeled the attack as “one of the most chaotic hacks that Web3 has ever seen.”

1/ Nomad just got drained for over $150M in one of the most chaotic hacks that Web3 has ever seen. How exactly did this happen, and what was the root cause? Allow me to take you behind the scenes

— samczsun (@samczsun) August 1, 2022

Nomad is a token bridge for cross-chain transfers between Ethereum, Avalanche, Milkomeda, and Moonbeam.

Nomad Funds Drained

Researchers shared a tweet in the ETHSecurity Telegram channel showing multiple transactions of funds leaving the bridge. At first glance, it appeared to be a misconfiguration in token decimals, but samczsun discovered:

“However, after some painful manual digging on the Moonbeam network, I confirmed that while the Moonbeam transaction did bridge out 0.01 WBTC, somehow the Ethereum transaction bridged in 100 WBTC.”

What makes this exploit different is that the transactions were not ‘proved’ and executed directly. “Being able to process a message without proving it first is extremely Not Good,” said samczsun. The coder did some more digging and found a fatal flaw in the ‘Replica’ smart contract initialized during a routine Nomad upgrade.

He added that this was chaotic because the crypto thieves did not need any technical knowledge. They just needed to find a transaction that worked, replace the target address with their own, and rebroadcast it.

“A routine upgrade marked the zero hash as a valid root, which had the effect of allowing messages to be spoofed on Nomad. Attackers abused this to copy/paste transactions and quickly drained the bridge in a frenzied free-for-all,”

TVL to Zero

Nomad has even discovered fraudulent addresses attempting to steal funds returned to the bridge.

We’re aware of impersonators posing as Nomad and providing fraudulent addresses to collect funds. We aren’t yet providing instructions to return bridge funds. Disregard comms from all channels other than Nomad’s official channel: @nomadxyz_

— Nomad (⤭) (@nomadxyz_) August 2, 2022

According to DefiLlama, Nomad’s total value locked has crashed from $190.38 million to $5,336 over the past few hours.

Nomad is the latest token bridge attack this year following the high-profile exploits of the Ronin Bridge, Wormhole, and Harmony.