All Guides
SecuritySecurityDeFi

DeFi Security: The Biggest Exploits and What They Teach Us

A review of DeFi's most significant hacks — The DAO, Poly Network, Ronin, Euler Finance — and the security lessons each teaches.

Updated February 7, 2026 8 min read

DeFi has collectively lost billions of dollars to smart contract exploits. Each major hack reveals a fundamental pattern. Studying them is one of the most efficient ways to build secure protocols.

The DAO Hack (2016) — $60M — Reentrancy

The original cautionary tale. A reentrancy vulnerability in The DAO's splitDAO function allowed an attacker to recursively drain ETH before the contract's internal balance was updated. This led to Ethereum's hard fork and the creation of Ethereum Classic. Lesson: Always update state before making external calls. The Checks-Effects-Interactions pattern is named after this incident.

Poly Network (2021) — $610M — Access Control

An attacker found a function that allowed them to replace the 'keeper' address — the privileged role that controlled cross-chain message passing — with their own address. Once they had the keeper role, they could authorize transfers of any amount. Lesson: Critical access control decisions should require multi-sig and time-locks, not a single function call.

Ronin Bridge (2022) — $625M — Key Compromise

The Ronin bridge (used by Axie Infinity) was secured by 9 validator nodes requiring 5 signatures. An attacker compromised 5 private keys — 4 from Ronin Labs and 1 from Axie DAO that had been granted signing privileges without anyone noticing. The theft went undetected for 6 days. Lesson: Multisig security is only as strong as key storage. Hardware security modules, geographic separation, and signing ceremony protocols are non-optional for large treasuries.

Nomad Bridge (2022) — $190M — Initialization Bug

A routine upgrade introduced a bug where a zero-value root was set as trusted, meaning any message could be proved with an empty proof. Once one attacker exploited this, hundreds of copy-cats replayed the same transaction pattern within hours. Lesson: Protocol upgrades need the same security scrutiny as the original code. Changes should be re-audited.

Euler Finance (2023) — $197M — Flash Loan + Logic Bug

Euler had a function that allowed users to donate collateral to the protocol. Combined with Euler's leverage mechanism and a flash loan, attackers could create a position where the protocol's health check passed while their actual position was insolvent. The attacker then liquidated themselves and stole the difference. Lessons: Flash loan composability creates non-obvious attack surfaces. Logic bugs in health factor calculations are catastrophic for lending protocols. Code4rena's competitive audits found this vector — it wasn't in the original audit.

Curve Finance (2023) — $70M — Compiler Bug

A reentrancy vulnerability in Vyper compiler versions 0.2.15–0.3.0 allowed reentrancy attacks on Curve pools that should have been protected by the built-in reentrancy guard. Lesson: Even 'safe' constructs in higher-level languages can have compiler-level bugs. Keeping compilers updated and formally verifying critical invariants reduces this risk.

The Pattern Across All Major Hacks

Nearly every major DeFi exploit falls into one of five categories: reentrancy, access control failures, oracle manipulation, flash loan logic bugs, and upgrade/initialization mistakes. All are preventable with proper design, testing, and auditing. The projects that got hacked weren't negligent by traditional software standards — they were negligent by DeFi security standards, which are much stricter because the stakes are higher and errors are irreversible.

Before launching any DeFi protocol on mainnet, get a professional audit from a firm with a track record in your protocol type. Budget $20,000–$80,000 for the audit and at least 2–4 weeks for remediation.

Ready to build your Web3 project?

Tell us about your project and get a precise quote.

Get a Project Quote