Level 3 · How it worksThe village#258

Why bridges get hacked: one strongbox, a few keys, and a lot of code

Bridges get hacked because they concentrate everyone's locked coins in one place, guarded by a small set of keys or a complex contract. The big cases of 2022 broke in three ways: too few keys, a bug in signature checking, and an upgrade that let any message through.

The village notebook is hard to rob. Every house has a copy, and nobody can tear out a page. To change it, you'd have to fool most of the village at once.

The ferry office is different. All the coins that crossed the river sit in one strongbox on this bank. The box opens for whoever shows the right signatures, or whoever finds the flaw in its lock. Nobody has to fool the village. They only have to fool the box.

That's why bridges get hacked. Not because blockchains are weak, but because a bridge takes coins out of the copied notebook and puts them behind a few keys and a pile of code. The villagers can see every theft afterwards. They just can't undo it.

What it is

A bridge exploit is a theft from the coins a bridge holds, usually by faking the message that says "release these coins" or "mint these tokens". ethereum.org names the two weak points: trusted bridges ask users to assume "validators will not collude to steal user funds", and for any bridge "all it takes is one flaw in a smart contract" (ethereum.org).

The documented cases fall into three patterns.

How it works: three ways the box opened

1. Too few keys: Ronin, March 2022. Ronin was the chain behind the game Axie Infinity. Its bridge had 9 validators, and 5 signatures released funds. On 23 March 2022 "Sky Mavis's Ronin validator nodes and Axie DAO validator nodes were compromised", and the bridge "has been exploited for 173,600 Ethereum and 25.5M USDC". Nobody noticed until 29 March, when a user couldn't withdraw (Ronin).

Count the keys. One company ran 4 of the 9. 4 + 1 = 5: the attacker needed just one more signature, from a validator run by Axie DAO. On 14 April 2022 the FBI said Lazarus Group and APT38, "cyber actors associated with the DPRK", were responsible for "the theft of $620 million in Ethereum reported on March 29" (FBI). The FBI also attributed the $100 million theft from Harmony's Horizon bridge, reported on 24 June 2022, to the same group (FBI).

2. A bug in the signature check: Wormhole, February 2022. Wormhole's guardians sign messages between chains; "Interoperability: how chains talk to each other" explains the committee. Here the keys were never stolen. Wormhole's own report blames "a bug in the signature verification code of the core Wormhole contract on Solana". The attacker faked an account the contract failed to check, and minted "120,000 uncollateralized Wormhole-wrapped ETH" on Solana: paper with nothing in the box. Jump Crypto "replenished the contract with 120k ETH, restoring full collateral" (Wormhole).

3. An upgrade that let anything through: Nomad, August 2022. Nomad's root cause analysis says "An implementation bug caused the Replica contract to fail to authenticate messages properly". A contract upgrade on 21 June 2022 treated an empty value as a valid proof, so unproven messages passed (Nomad). On 1 August "the Nomad token bridge was hacked for more than $186M", and "over 300 unique addresses participated in the exploit" (Nomad). A theft by hundreds of addresses is what a lock looks like when it opens for anyone.

Three cases, three locks: stolen keys, a skipped check, a bad upgrade. One thing in common: a single box holding everyone's coins.

Why it matters

  • Users lose twice: the locked coins go, and the IOUs on the other chain lose their backing at the same moment.
  • Attackers go where the money is concentrated. A bridge holding hundreds of millions behind five signatures is a better target than thousands of separate wallets.
  • Other apps that accept the bridged token take the hit too. ethereum.org calls this systemic risk.

Where people get it wrong

  • "The blockchain was hacked." In these cases the chains worked as designed. The bridge's keys or code failed.
  • "More validators means safe." Count who runs them. Ronin's 9 were not 9 independent parties.
  • "It was audited, so it's fine." Nomad's bug came in through an upgrade. An audit checks code at a moment, not every change after.
  • "Funds were replaced, so no harm done." Wormhole's hole was filled by a company choosing to fill it. That's a rescue, not a design.

Before you cross, read the lock

Anna's rule for any bridge: find out how many keys can release the funds, who runs them, and who can upgrade the contract without delay. If one company holds enough keys on its own, you're trusting one company.

The village notebook has no strongbox. The ferry office has nothing else.

Frequently asked questions

Why do crypto bridges get hacked so often?

Bridges hold large amounts of locked coins in one place, protected by a small set of keys or by complex contracts. Stealing enough keys or finding one bug is enough to release everything. Ronin, Wormhole and Nomad in 2022 each failed in one of these ways.

What happened in the Ronin bridge hack?

On 23 March 2022, attackers gained control of five of the bridge's nine validator keys, four run by Sky Mavis and one by Axie DAO, and withdrew 173,600 ETH and 25.5 million USDC. The FBI attributed the theft to North Korea's Lazarus Group on 14 April 2022.

What happened in the Wormhole hack?

On 2 February 2022, an attacker exploited a bug in the signature verification of Wormhole's contract on Solana and minted 120,000 wrapped ETH that had no backing. Jump Crypto replenished the contract with 120,000 ETH to restore full collateral.

What happened in the Nomad bridge hack?

On 1 August 2022, a flaw introduced in a contract upgrade on 21 June let messages pass without proper proof. More than $186 million was taken, and Nomad counted more than 300 addresses taking part.

How can I tell if a bridge is risky?

Check how many keys or validators can release funds and whether they are run by independent parties, who can upgrade the contracts and with what delay, and whether the locked funds are visible on a block explorer. A bridge with few keys held by one organisation is a concentrated risk.

Sources

  1. Ronin, Community alert: Ronin validators compromised (29 March 2022)
  2. FBI, Statement on attribution of malicious cyber activity posed by the Democratic People's Republic of Korea (14 April 2022)
  3. Wormhole, Wormhole incident report 02/02/22
  4. Nomad, Nomad bridge hack: root cause analysis (August 2022)
  5. Nomad, The road to recovery (17 August 2022)
  6. FBI, FBI confirms Lazarus Group cyber actors responsible for Harmony's Horizon bridge currency theft (23 January 2023)
  7. ethereum.org, Introduction to blockchain bridges

Read next.