Curriculum·G201 Invariant Thinking·about 31 min

The invariant enforced by an assumption

By the end of this lesson you can

  • →Identify the hidden assumption behind an invariant, such as an honest validator set or an uncompromised key threshold
  • →State how the Harmony Horizon bridge's two-of-five multisig made its entire backing invariant depend on two keys
  • →Compute how a signing threshold sets the number of independent compromises an attacker needs, and why two of five is not much of a threshold
  • →Rank the assumptions behind a protocol's invariants by how many independent things must hold for the invariant to hold

Graduate · enrolled learners

This lesson opens with The Harmony Horizon bridge, 23 June 2022.

What happened
The Horizon bridge between Harmony and Ethereum was secured by a two-of-five multisig: any two of five authorized addresses could authorize a transfer of the bridge's locked funds. On 23 June 2022 an attacker who had compromised at least two of those five signing keys used them to authorize eleven transactions that drained about 100 million dollars from the Ethereum side. Harmony's own incident report said its team had found evidence that private keys were compromised and no evidence of a breach in its smart-contract code; the keys were all encrypted and stored by Harmony itself. The FBI later attributed the theft to the North Korean groups Lazarus and APT38. The contracts did exactly what two valid signatures told them to do.
The decision point
The bridge's invariant was the same as every bridge's: withdrawals are backed by locked deposits, and only authorized withdrawals happen. That invariant was enforced by an assumption, that fewer than two of the five signing keys would ever be in an attacker's hands at once. The assumption was never written as a risk a user could weigh, and it was weak: two of five means an attacker needs to compromise only two things, and the five keys were not five independent parties: Harmony held and stored all of them. When the assumption failed, the invariant failed instantly and completely, because nothing else stood behind it. A user assessing this bridge needed to ask not is it audited but how many independent compromises would break its core promise, and the answer was two.
Recorded loss
$100,000,000

What you will be able to answer

  • →What enforced Harmony's backing invariant?
  • →What does a signing threshold set?
  • →The question to ask about a core invariant?
  • →What does a timelock do to a trusted assumption?

Orientation and Year One are open: anyone can read them without an account. From Year Two onward the lessons are for enrolled learners, because progress through the later years only means anything if it is tracked against a record.

It is free. We do not sell the list and there is nothing to buy at the end of it.

Sources and review

Confidence high·Volatility medium·Reviewed 2026-09-14·Owner unassigned

Contested

The exact method by which the keys were compromised was not fully disclosed publicly. Harmony's report confirmed private-key compromise, said the keys were doubly encrypted (passphrase and a key management service) and that no single machine held more than one plaintext key, and said the attacker decrypted a number of them; the FBI attributed the attack to North Korean groups. So Harmony disputes that its keys lacked separation; what the record shows is that one operator held all five.

The two-of-five threshold is from a researcher quoted by Elliptic (Mudit Gupta); Harmony's report says the bridge was moved to four of five after the incident. Harmony counted eleven transactions on its Ethereum bridge; Elliptic counted 14 across Ethereum and BNB Smart Chain and valued the theft at 99.7 million dollars.

J301-04 owns bridge trust models as an architecture question. This lesson uses Harmony only for the assumption-behind-an-invariant framing. Keep the split.