# DeFi exploits, explained with code

URL: https://shield.quillaudits.com/exploits/

DeFi exploits kept coming in 2026: DefiLlama data show over $168.6M taken from 34 protocols in the first quarter ([Cointelegraph](https://cointelegraph.com/news/defi-hacks-169m-q1-2026-crypto-exploits-decline)), 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](https://thedefiant.io/q2-2026-most-hacked-quarter-defi-70-exploits-746m)). 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 3 December 2026. 5 minute read. By the QuillAudits Team.

- [Balancer V2 2025](https://shield.quillaudits.com/exploits/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](https://shield.quillaudits.com/exploits/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](https://shield.quillaudits.com/exploits/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](https://shield.quillaudits.com/exploits/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](https://shield.quillaudits.com/exploits/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](https://cointelegraph.com/news/defi-hacks-169m-q1-2026-crypto-exploits-decline) |
| April to June 2026, as reported on 12 June | About 70 | About $746M | [The Defiant, 12 June 2026](https://thedefiant.io/q2-2026-most-hacked-quarter-defi-70-exploits-746m) |

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](https://cointelegraph.com/news/defi-hacks-169m-q1-2026-crypto-exploits-decline)). 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](https://shield.quillaudits.com/exploits/euler-finance-2023/) | 13 March 2023 | Ethereum | About $197M ([Euler](https://euler.finance/blog/war-peace-behind-the-scenes-of-eulers-240m-exploit-recovery)) | [Missing health check before a liquidation](https://shield.quillaudits.com/learn/vulnerabilities/liquidation-logic-bugs/) |
| [Curve Vyper pools](https://shield.quillaudits.com/exploits/curve-vyper-2023/) | 30 July 2023 | Ethereum | $61.7M ([CoinDesk](https://www.coindesk.com/markets/2023/08/04/looter-behind-61m-curve-hack-starts-returning-assets-raising-hope-for-recovery/)) to about $69.3M ([CertiK](https://www.certik.com/resources/blog/2qbPMcyJpR5UfoKrcjWxlQ-vyper-incident-anaylsis)) | [Reentrancy lock broken by the compiler](https://shield.quillaudits.com/learn/vulnerabilities/reentrancy/) |
| [Penpie](https://shield.quillaudits.com/exploits/penpie-2024/) | 3 September 2024 | Ethereum | About $27M ([The Block](https://www.theblock.co/news/regulation/2024-09-04-pendle-says-it-saved-105-million-that-could-have-been-further-drained-amid-penpie-hack-314616)) | [Reentrancy through a fake market](https://shield.quillaudits.com/learn/vulnerabilities/reentrancy/) |
| [Cetus](https://shield.quillaudits.com/exploits/cetus-2025/) | 22 May 2025 | Sui | About $223M ([The Block](https://www.theblock.co/post/355795)); about $260M ([Cointelegraph](https://cointelegraph.com/explained/how-220m-was-stolen-in-minutes-understanding-the-cetus-dex-exploit-on-sui)) | [Flawed overflow check on a shift](https://shield.quillaudits.com/learn/vulnerabilities/integer-overflow-underflow/) |
| [Balancer V2](https://shield.quillaudits.com/exploits/balancer-v2-2025/) | 3 November 2025 | Ethereum and other chains | $94.8M ([Balancer](https://medium.com/balancer-protocol/nov-3-exploit-post-mortem-51dcbeb6b020)); above $125M with forks ([BlockSec](https://blocksec.com/blog/in-depth-analysis-the-balancer-v2-exploit)) | [Rounding in exact out swaps](https://shield.quillaudits.com/learn/vulnerabilities/rounding-precision-errors/) |

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](https://www.quillaudits.com/smart-contract-audit).

## 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](https://shield.quillaudits.com/register) on your own code, or [talk to an auditor](https://calendly.com/akshadh-a-quillaudits/30min). 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](https://shield.quillaudits.com/tools/smart-contract-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](https://shield.quillaudits.com/exploits/balancer-v2-2025/) and [Curve](https://shield.quillaudits.com/exploits/curve-vyper-2023/) pages do.

## Sources

- [Crypto hackers steal $169M from 34 DeFi protocols in Q1: DefiLlama, Cointelegraph](https://cointelegraph.com/news/defi-hacks-169m-q1-2026-crypto-exploits-decline) · checked 3 December 2026
- [Q2 2026 Sets All-Time High for DeFi Hack Count With \~70 Exploits, $746M Stolen, The Defiant](https://thedefiant.io/q2-2026-most-hacked-quarter-defi-70-exploits-746m) · checked 3 December 2026
- [War & Peace: behind the scenes of Euler's $240M exploit recovery, Euler Labs](https://euler.finance/blog/war-peace-behind-the-scenes-of-eulers-240m-exploit-recovery) · checked 3 December 2026
- [Looter Behind $61M Curve Hack Starts Returning Assets, Raising Hope for Recovery, CoinDesk](https://www.coindesk.com/markets/2023/08/04/looter-behind-61m-curve-hack-starts-returning-assets-raising-hope-for-recovery/) · checked 3 December 2026
- [Vyper Incident Analysis, CertiK](https://www.certik.com/resources/blog/2qbPMcyJpR5UfoKrcjWxlQ-vyper-incident-anaylsis) · checked 3 December 2026
- [Pendle says it saved $105 million that could have been further drained amid Penpie hack, The Block](https://www.theblock.co/news/regulation/2024-09-04-pendle-says-it-saved-105-million-that-could-have-been-further-drained-amid-penpie-hack-314616) · checked 3 December 2026
- [Sui DEX Cetus says overlooked flaw in open-source library used by smart contract led to $223 million exploit, The Block](https://www.theblock.co/post/355795) · checked 3 December 2026
- [When liquidity attracts attackers: what went wrong on Cetus?, Cointelegraph](https://cointelegraph.com/explained/how-220m-was-stolen-in-minutes-understanding-the-cetus-dex-exploit-on-sui) · checked 3 December 2026
- [Nov 3 Exploit Post-Mortem, Balancer](https://medium.com/balancer-protocol/nov-3-exploit-post-mortem-51dcbeb6b020) · checked 24 November 2026
- [In-Depth Analysis: The Balancer V2 Exploit, BlockSec](https://blocksec.com/blog/in-depth-analysis-the-balancer-v2-exploit) · checked 24 November 2026
