Book a free call

What Ethereum's Biggest Hacks Teach Builders

The DAO, Parity and Ronin hacks cost hundreds of millions and changed how Ethereum is built. Here is what each incident exposed, and how to stop it happening again.

Hertiv engineering teamReviewed by a senior engineer
8 min read
What Ethereum's Biggest Hacks Teach Builders
On this page

Short answer

The biggest Ethereum hacks are the DAO exploit of 2016, the Parity wallet failures of 2017 and the Ronin bridge theft of 2022. Together they show that most large losses come from ordinary flaws — a missed check, a shared library, a stolen key — rather than new cryptography. The lesson is to treat audits, key management and monitoring as part of the product, not as extras.

What are the biggest Ethereum hacks?

The biggest Ethereum hacks are the DAO exploit of 2016, the two Parity wallet incidents of 2017 and the Ronin bridge theft of 2022. Each one drained or froze funds worth tens or hundreds of millions of dollars, and each one is still cited in security reviews today.

These three incidents matter because they were not exotic attacks. The DAO fell to a coding pattern that had been flagged before the launch. Parity fell to a shared library that anyone could reconfigure. Ronin fell to stolen keys and a validator set that was less spread out than it looked. None of the three needed a new kind of cryptography to work.

This article walks through each incident, what the attacker did, and the lesson builders took from it. The point is not to relive the losses. It is to show which ordinary practices — a check before a transfer, a library that cannot be reconfigured, keys held by separate people — would have stopped each one. For a general guide to building secure contracts, see smart contract security.

How did the DAO hack work?

The DAO was a venture fund run as a smart contract on Ethereum. In a token sale that ended in May 2016 it raised about 12 million ether from more than 11,000 people, which made it the largest crowdfunding of its time and put a huge sum under the control of a single contract.

On 17 June 2016 an attacker used a reentrancy flaw in the fund's split function. The flaw let the attacker call back into the contract before it updated its balance, so the same withdrawal could be repeated. About 3.6 million ether, roughly a third of the fund, moved into a child contract the attacker controlled.

The child contract had a 28-day waiting period before funds could be taken out, and that delay saved the rest. The community used the time to agree a hard fork, and on 20 July 2016 the network rolled the theft back. A minority kept the original chain, which became Ethereum Classic, and the split between the two chains still stands.

The lesson is small and specific: update balances before sending funds, and add a guard that blocks re-entry into a function while it is running. That pattern is now standard in contract code, and auditors check for it first. The DAO also showed that a contract holding a large share of all ether in circulation needs a review that matches the value at stake.

What went wrong with the Parity wallets?

Parity sold multisig wallets that shared one library contract. Each wallet was a small contract that forwarded its calls to the library, which held the actual logic: setting owners, confirming transfers and, importantly, a function that could destroy the library itself.

On 19 July 2017 an attacker found that the library's setup function had no check against being called again. The attacker called it on three large wallets, became their owner, and drained about 153,000 ether, worth about $30 million at the time. White-hat hackers then moved the remaining vulnerable funds to safety before more could be taken.

Parity shipped a fixed library the next day, but the fix guarded the wallets and not the library itself. The library had never been set up as a wallet, so its owner list was empty and the new guard let anyone in. On 6 November 2017 a user called the setup function on the library directly, became its owner, and then called the function that destroys it.

Destroying the library did not move any funds, but every wallet that depended on it stopped working. About 514,000 ether, worth about $280 million at the time, stayed frozen across 587 wallets, and it remains frozen. The lesson is that a shared library is itself a contract: it needs its own setup, its own access rules, and no function that can delete it.

How did the Ronin bridge lose $625 million?

Ronin is a sidechain built for the Axie Infinity game, and its bridge moves assets between Ronin and Ethereum. The bridge released funds when five of its nine validators signed a withdrawal. Four of those validators were run by Sky Mavis, the company behind the game, and a fifth signature could come from the Axie DAO.

On 23 March 2022 an attacker who had spent months inside Sky Mavis systems used the private keys of the four Sky Mavis validators, plus a signature from the Axie DAO validator that Sky Mavis could still obtain through a leftover permission, to approve two withdrawals: 173,600 ether and 25.5 million USDC, worth about $625 million.

Nothing in the bridge contracts was broken. The contracts checked the signatures, found them valid, and released the funds. The theft was only found on 29 March, six days later, when a user reported being unable to withdraw 5,000 ether. Investigators later linked the attack to the Lazarus Group, a North Korean hacking group.

The lesson is about concentration. A five-of-nine threshold sounds strong, but when one company controls four keys and can reach a fifth, the real threshold is one compromised company. Bridges also need live monitoring: a $625 million outflow should have raised an alarm within minutes, not been found by a user a week later.

What pattern connects the three hacks?

The three hacks look different — a coding flaw, a shared library, stolen keys — but they share one pattern: a single point of failure that the team treated as safe. The DAO trusted one contract with a third of its funds. Parity trusted one library with every wallet. Ronin trusted one company with most of its validator keys.

IncidentYearWhat was lostRoot causeLesson
The DAO20163.6M ETHReentrancy flawUpdate balances first; block re-entry
Parity wallets2017153,000 ETH stolen; 514,000 ETH frozenShared library anyone could reconfigureGuard the library like any contract
Ronin bridge2022$625MKeys held by one companySpread keys; watch outflows live

The second shared pattern is time. The DAO's 28-day lock gave the community room to respond. Parity's second incident happened because a fix was checked against the wallets and not against the library it protected. Ronin's theft sat undiscovered for six days because nobody watched the bridge's outflows. In each case, a slow response made a bad incident worse, and a fast one would have limited the damage.

The third pattern is that the fix was ordinary in every case. No new cryptography was needed. A balance update before a transfer, an access check on a setup function, keys spread across separate organisations and an alarm on large withdrawals would each have stopped the incident they belong to. That is why these hacks are still taught: the lessons are cheap, and skipping them is not.

How do you apply these lessons to a new project?

Build the checks into the project from the start, not after the code is written. These steps work for a contract, a wallet or a bridge, and each one maps to a failure in the three incidents above.

  1. List what one failure can take: the largest sum one bug, key or library could move. Design so no single failure reaches it.
  2. Update state before sending funds. Make every transfer follow one order: change the balance first, then send, and block re-entry while the function runs.
  3. Give shared code its own access rules. If several contracts share one library, treat the library as a contract, with owners and no way to delete it.
  4. Spread keys across separate people and systems. Count who really holds the keys, not how many signatures the design asks for, and revoke old permissions the day they end.
  5. Watch money leaving the system. Set alarms on large outflows, and give one person the job of checking them every day.
  6. Get an independent audit before launch, and fix what it finds. Auditors find the flaw your team stopped seeing, and a second review after fixes is part of the job.

None of these steps costs much next to the sums. A team that writes them into its launch checklist can say which incident each one answers.

For the audit step, an independent smart contract audit before mainnet is the usual route.

A guide to how to audit a smart contract shows what the review covers.

Example (hypothetical): a lending protocol checks itself before launch

Example (hypothetical): a small team is about to launch a lending protocol that will hold user deposits. Before launch it runs through the three incidents as a checklist. The contract holds about 40,000 ether in deposits, so a single bug could move a large sum.

First the team checks the withdrawal code: balances update before funds move, and a re-entry guard blocks a second call while the first is running. Then it checks the shared price-feed library: the library has its own owner list, its setup function cannot be called twice, and it has no function that can delete it.

Then the team counts the keys. The protocol's admin keys sit with three people in different cities, on separate hardware wallets, and the emergency pause needs two of the three. Finally the team sets an alarm on any withdrawal above 500 ether, with one engineer on duty to check it each morning.

The audit still finds two issues: a rounding error in the interest calculation and a missing check on a new collateral type. Both are fixed and re-checked before launch. The team spends three weeks on these checks. Against 40,000 ether of deposits, that is time the team is glad it spent.

What are the common mistakes?

The most common mistakes repeat the three incidents in smaller form. Teams trust a shared component without checking who can change it, count signatures instead of counting who holds the keys, and set up monitoring only after the first incident.

  • Treating an audit as a pass or fail. An audit finds issues; the work is fixing them and getting the fixes checked again before launch.
  • Guarding the wallet but not the library. Every shared component needs its own setup and access rules, including the code other contracts call.
  • Counting signatures instead of key holders. Five signatures from one company is one point of failure, not five.
  • No alarm on large outflows. A bridge or vault without live monitoring can lose its funds days before anyone notices.
  • Assuming the code is the whole system. Keys, permissions and people are part of the system, and the Ronin theft attacked those, not the contracts.

Key takeaways

  • The DAO fell to reentrancy: update balances before sending funds and block re-entry.
  • Parity fell to a shared library anyone could reconfigure: guard shared code like any contract.
  • Ronin fell to concentrated keys: five signatures from one company is one point of failure.
  • Slow detection made each incident worse: watch large outflows live, every day.
  • Every fix was ordinary: a check, a guard, spread keys and an alarm, applied before launch.

Frequently asked questions

Which Ethereum hack lost the most money?

The Ronin bridge theft of March 2022, at about $625 million in ether and USDC. The DAO hack took about 3.6 million ether, worth about $50 to $60 million at the time, and the Parity incidents stole about $30 million and froze about $280 million.

Was the DAO hack a flaw in Ethereum itself?

No. The flaw was in The DAO's own contract code, in the way its split function sent funds before updating balances. The Ethereum network itself worked as designed, which is why the community had to agree a hard fork to reverse the theft.

Are the Parity frozen funds ever coming back?

No. The funds frozen in November 2017 are still frozen, because destroying the shared library removed the code every affected wallet needed to move funds. No fix short of another hard fork could restore them, and none was agreed.

Could a Ronin-style hack happen today?

Yes, if a bridge still concentrates its validator keys with one company and has no live monitoring of outflows. Modern bridges spread keys across independent parties, use hardware signing and watch withdrawals in real time, but the design has to be checked, not assumed.

Do audits stop these hacks?

Audits reduce the risk a lot, but they do not remove it. The DAO code had been reviewed, and Parity's library was fixed once and broken again by the same kind of flaw. Audits work best alongside the practices in this article: state updates before transfers, guarded libraries and spread keys.

Where should a new project start on security?

Start with the launch checklist in this article: list what one failure can take, update state before sending funds, guard shared libraries, spread keys and watch outflows. Then get an independent audit and fix what it finds before launch.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: blockchain systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Building on Ethereum and want the security review done right? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Smart Contract Audit service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call