DeFi exploits, explained with code

DeFi exploits kept coming in 2026: DefiLlama data show over $168.6M taken from 34 protocols in the first quarter (Cointelegraph), and on 12 June The Defiant counted about 70 exploits and $746M stolen in the second quarter, the most incidents of any quarter on record (The Defiant). This library explains notable exploits one at a time, with a UTC timeline, the loss and its source, the root cause in code and the test an auditor would write. When a new exploit over $1M hits an EVM chain, we aim to publish a sourced analysis within 24 to 48 hours.

Last updated . 5 minute read. By the QuillAudits Team.

  • Balancer V2 2025: How the November 2025 Balancer V2 exploit worked: rounding in exact out swaps, loss estimates from $94.8M to over $125M, the response and the test.
  • Cetus 2025: How the May 2025 Cetus exploit on Sui worked: a flawed overflow check in checked_shlw, about $223M taken, $162M frozen and the Solidity lesson.
  • Curve Vyper 2023: How a Vyper compiler bug broke the reentrancy lock in Curve's ETH pools on 30 July 2023: timeline, root cause, losses by source and the test to run.
  • Euler Finance 2023: How the March 2023 Euler Finance hack worked: a donation function with no health check, a self-liquidation, about $197M lost and the recovery.
  • Penpie 2024: How the 2024 Penpie exploit worked: a fake Pendle market, a harvest that counted deposits as rewards, about $27M lost and the test to write.

How many DeFi exploits have there been in 2026?

The counts below come from DefiLlama's data as two outlets reported it. They are the latest 2026 figures this page has a source for, and the second-quarter count was published on 12 June, before the quarter ended.

Period Exploits Stolen Source
January to March 2026 34 protocols Over $168.6M Cointelegraph, 3 April 2026
April to June 2026, as reported on 12 June About 70 About $746M The Defiant, 12 June 2026

The largest incidents of the first quarter were Step Finance, about $40M in January through a private key compromise, and Truebit, $26.4M in ether drained on 8 January through a smart contract manipulation (Cointelegraph). This library is for exploits with a root cause in contract code. A stolen key, like Step Finance's, is an operations failure and falls outside it.

What does each exploit page cover?

  • A timeline in UTC, with a source on every event.
  • The root cause, with the smallest code excerpt that explains it. Solidity excerpts are simplified, say so in their label, and compile with solc 0.8.28. No page carries a working exploit.
  • The loss and its source. When sources disagree, the page gives each figure with its source and what it counts.
  • What happened after: pauses, bounties, returned funds and fixes.
  • The test an auditor would write first: the invariant the attack broke and how to fuzz it.

Sources come in a fixed order: the team's own post-mortem first, then security firms such as BlockSec, Trail of Bits, OpenZeppelin and SlowMist, then rekt.news and DeFiHackLabs. Pages carry no blame and no jokes about losses, and they credit the researchers who traced each attack. No page reports a QuillShield result on an incident's code unless we ran QuillShield on that code and recorded what it found.

What happens when a new exploit hits?

This routine runs for every new incident over $1M on an EVM chain. The clock starts when the incident becomes public.

  1. Hours 0 to 2, go or no-go. We write a page when the code is Solidity on an EVM chain, the loss is $1M or more, two primary sources confirm it (the protocol's own statement and the transactions or contract on a block explorer), and the protocol has paused, fixed or redeployed. A smaller loss qualifies if its bug class is new to the library. We never publish an attack path that still works against live funds.
  2. Hours 2 to 12, facts and draft. Every fact gets its source and a time in UTC, and anything not yet confirmed is marked "not confirmed yet". The root cause gets the smallest code excerpt that explains it.
  3. Hours 12 to 18, review. A reviewer who did not write the page checks every fact against its source, compiles the code and reads the page for blame and guesswork.
  4. By hour 24, and no later than hour 48, publish. The page goes live and this hub lists it.
  5. After publishing: when the protocol releases its full post-mortem, we update the page and its date.

Because a page waits for the protocol's own statement and for a pause or a fix, some incidents take the full 48 hours, and a few take longer.

Which exploits does the library cover so far?

Incident Date Chain Loss, by source Bug class
Euler Finance 13 March 2023 Ethereum About $197M (Euler) Missing health check before a liquidation
Curve Vyper pools 30 July 2023 Ethereum $61.7M (CoinDesk) to about $69.3M (CertiK) Reentrancy lock broken by the compiler
Penpie 3 September 2024 Ethereum About $27M (The Block) Reentrancy through a fake market
Cetus 22 May 2025 Sui About $223M (The Block); about $260M (Cointelegraph) Flawed overflow check on a shift
Balancer V2 3 November 2025 Ethereum and other chains $94.8M (Balancer); above $125M with forks (BlockSec) Rounding in exact out swaps

Two of these fall outside the rule for new pages on purpose. Cetus is Move code on Sui and Curve's pools are Vyper, and both bug classes, an overflow check on a shift and a reentrancy lock that did not hold, apply to Solidity too. QuillShield supports Solidity in Foundry projects today. For other languages, request a manual audit from QuillAudits.

Where does QuillShield fit?

QuillShield is made by the audit firm QuillAudits. It runs a full audit of a Solidity codebase in a Foundry project, builds a security graph and tests its findings with proofs of concept, then checks every pull request against that graph. It does not replace a manual audit: it reviews every change between audits, and you can request a manual audit from QuillAudits. Run a full audit on your own code, or talk to an auditor. Sign-up is free, and new accounts get $50 in credit, good for up to half of an order. To get a codebase ready first, use the audit readiness checklist.

FAQ

How fast are new exploits added?

We aim for 24 to 48 hours after an incident over $1M on an EVM chain becomes public, once the protocol has paused or fixed the code and two primary sources confirm the facts.

Do these pages claim QuillShield results on real incidents?

No. A page reports a QuillShield result only if we ran QuillShield on the vulnerable code and recorded what it found. Otherwise it describes the test an auditor would write.

Where do the loss figures come from?

From the protocol's post-mortem first, then security firms, rekt.news and DeFiHackLabs. When they disagree, the page gives each figure with its source, as the Balancer and Curve pages do.

Sources

QuillShield is building the security layer between AI and money, so you can keep shipping between audits.

Sign-up is free, and new accounts get $50 in credit, good for up to half of an order.

  1. 1Sign up and import a repo
  2. 2See the exact price before anything is charged
  3. 3Approve it, and the audit starts