Curriculum·G201 Invariant Thinking·about 30 min
The invariant nobody wrote down
By the end of this lesson you can
- →Explain why the most dangerous invariant is the one no one stated, using the Parity library freeze
- →State how a shared library contract's ownership being unclaimed let one user destroy it and freeze 513,000 ETH
- →Compute what was lost and why it was unrecoverable, and why a deployment step, not a hack, caused it
- →Produce the implicit invariants a protocol relies on but never states, for a contract you use
Graduate · enrolled learners
This lesson opens with The Parity multisig library freeze, 6 November 2017.
- What happened
- Parity's multisig wallets shared a single library contract that held the wallet logic. The library was deployed on 20 July 2017 but was never initialized, so its own ownership was unclaimed. A user known as devops199 called the library's initWallet function and became its owner, then called its self-destruct function, which was present because the code had been copied from a wallet meant to be retirable. Destroying the library removed the code every dependent multisig wallet relied on through delegatecall, so about 513,000 ETH, worth roughly 280 million dollars at the time, became permanently frozen in wallets that could no longer move funds. There was no theft; the money is still there and still unreachable.
- The decision point
- Every Parity multisig depended on an invariant nobody wrote down: the shared library will always exist and will always be owned by no one who can destroy it. It was never stated because it seemed too obvious to state, and it was false, because the library was deployed uninitialized and carried a self-destruct function from the code it was copied from. A user, apparently exploring rather than attacking, claimed the unclaimed ownership and destroyed the shared dependency. The lesson is that the invariants a protocol never mentions are the ones that break it, because nobody guards a promise nobody knows they are making. Finding the unstated invariants is harder than reading the stated ones, and it is where the largest surprises live.
- Recorded loss
- $280,000,000
What you will be able to answer
- →What unstated invariant broke in the Parity freeze?
- →How did one user freeze 513,000 ETH?
- →Why are unstated invariants the most dangerous?
- →How do you find the unstated invariants?
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
- https://www.openzeppelin.com/news/on-the-parity-wallet-multisig-hack-405a8c12e8f7
- https://coingeek.com/another-slip-accidental-kill-command-freezes-285-million-ethereum-multi-sig-wallets/
- https://techcrunch.com/2017/11/07/a-major-vulnerability-has-frozen-hundreds-of-millions-of-dollars-of-ethereum
Confidence high·Volatility low·Reviewed 2026-09-14·Owner unassigned
Contested
The dollar figure moved with the ETH price and is quoted between about 150 and 300 million dollars across sources; 513,000 ETH is the load-bearing figure and roughly 280 million the commonly cited value at the time.
F103-04 and F103-05 own smart-account risk from the user's custody angle. This lesson uses Parity only for the unstated-invariant framing. Keep the split.
