Top 10 DeFi Hacks of 2025: Lessons Learned

June 1, 2026
9 min read
Security Intelligence
Exploits
defi hacks 2025 lessons
Top 10 DeFi Hacks of 2025: Lessons Learned

2025 was another brutal year for decentralized finance security. Nearly $4 billion vanished across web3 exploits, a 37% jump from 2024, with DeFi protocols accounting for hundreds of millions in losses.

Top 10 DeFi Hacks of 2025: Lessons Learned

2025 was another brutal year for decentralized finance security. Nearly $4 billion vanished across web3 exploits, a 37% jump from 2024, with DeFi protocols accounting for hundreds of millions in losses. From unchecked arithmetic bugs to supply chain compromises, the DeFi hacks 2025 lessons are clear: the same vulnerability classes keep resurfacing, and the cost of ignoring them keeps climbing. Below are the ten most significant DeFi exploits of the year, what went wrong, and what the industry must do differently.

1. Cetus Protocol ($223M)

What Happened

On May 22, 2025, Cetus Protocol, the largest concentrated-liquidity DEX on Sui, was drained of approximately $223 million in a single transaction. The attacker exploited a mathematical flaw in an open-source shared library used by Cetus smart contracts, specifically an unchecked integer shift operation that failed to validate bounds on tick calculations.

How It Worked

By opening a position with a carefully crafted Single Collateral Asset token, the attacker manipulated the protocol's tick math to claim far more liquidity than their collateral justified. The root cause was a u256 overflow in the shared library's get_amount_out function that never validated whether the computed amount was physically possible given the pool's state.

Prevention

  • Audit shared libraries as rigorously as protocol-specific code. A bug in a dependency is still your bug.
  • Implement invariant checks on all mathematical outputs, especially in concentrated-liquidity DEXs where precision errors compound.
  • Deploy real-time monitoring to flag transactions that claim outsized withdrawals relative to collateral.

2. Balancer v2 ($129M)

What Happened

On November 3, 2025, Balancer's v2 weighted pools were exploited for roughly $129 million. Forks including Beets and Bex were also affected. The shocking part: these pools had been live for over five years before anyone discovered the vulnerability.

How It Worked

The attacker exploited a rounding error in Balancer's weighted pool swap logic. By performing a sequence of precisely sized swaps, the attacker manipulated rounding directions to extract more tokens from the pool than they deposited. The vulnerability existed from the original deployment but required specific token configurations to become exploitable.

Prevention

  • Re-audit mature contracts when market conditions or token compositions change.
  • Use conservative rounding (round in the protocol's favor) for all fee and swap calculations.
  • Implement circuit breakers that halt pools when withdrawal amounts exceed expected thresholds.

3. GMX ($42M)

What Happened

In July 2025, the GMX decentralized exchange on Arbitrum was exploited for approximately $42 million. The attacker manipulated the protocol's oracle price feed to extract funds from the GLP pool.

How It Worked

The exploit targeted GMX's reliance on a single price oracle. By manipulating the oracle feed through a series of leveraged trades, the attacker created a price discrepancy that allowed them to profit at the expense of liquidity providers. A significant portion of stolen funds was held in USDC, prompting criticism of Circle for not freezing the tokens quickly enough.

Prevention

  • Use multiple oracle sources with deviation checks; never trust a single feed.
  • Implement time-weighted average prices (TWAPs) to dampen short-term manipulation.
  • Establish rapid-response agreements with stablecoin issuers for emergency asset freezes.

4. Abracadabra ($13M + $1.7M)

What Happened

Abracadabra's lending protocol was hit twice in 2025: first in March for $13 million and again in October for $1.7 million. Both incidents exploited weaknesses in the protocol's collateral and liquidation logic.

How It Worked

The March attack manipulated the price of the protocol's MIM token through a flash loan, allowing the attacker to borrow more collateral than justified. The October incident exploited a separate logic flaw in the liquidation engine that allowed undercollateralized positions to escape liquidation.

Prevention

  • Use flash loan-resistant price feeds for all collateral valuation.
  • Test liquidation edge cases with formal verification, not just unit tests.
  • A second exploit on the same protocol signals insufficient post-incident review. Conduct thorough re-audits after every incident.

5. Loopscale ($5.8M)

What Happened

On April 26, 2025, the Solana-based lending protocol Loopscale lost $5.8 million in a price manipulation attack targeting its PT (Principal Token) collateral pricing mechanism.

How It Worked

The attacker exploited a vulnerability in how Loopscale priced Pendle PT tokens used as collateral. By manipulating the on-chain price of these tokens, the attacker could borrow significantly more than their collateral warranted, draining the protocol's lending pools. Loopscale later recovered $2.8 million through bounty negotiations with the attacker.

Prevention

  • Validate all external price inputs against independent sources before using them for lending decisions.
  • Implement borrowing caps per collateral type to limit blast radius.
  • Maintain a white-hat bounty channel so attackers have an off-ramp that does not involve laundering funds.

6. Garden Finance ($11.4M)

What Happened

On October 30, 2025, cross-chain bridge Garden Finance lost $11.4 million after an attacker compromised one of its independent solver operators. The hack bore the hallmarks of North Korea's Lazarus Group.

How It Worked

Rather than attacking the smart contract directly, the threat actor targeted the off-chain infrastructure of a solver operator, gaining access to their signing keys. With those keys, the attacker authorized fraudulent bridge transfers. The incident illustrated that DeFi security extends well beyond smart contract code.

Prevention

  • Enforce hardware key signing (HSM or air-gapped devices) for all solver operators.
  • Implement multi-signature requirements with geographic separation for bridge operations.
  • Conduct regular penetration testing of off-chain infrastructure, not just contracts.

7. Zoth ($8.7M)

What Happened

In March 2025, the real-world asset (RWA) platform Zoth suffered two separate hacks totaling $8.7 million. Both incidents exploited access control vulnerabilities in the protocol's token contracts.

How It Worked

The attacker gained unauthorized access to administrative functions in Zoth's smart contracts, allowing them to mint and drain tokens. The first hack on March 6 exploited a flaw in the protocol's access control list, and a second hit on March 20 targeted a separate but related vulnerability.

Prevention

  • Use role-based access control with time-locked execution for all privileged functions.
  • Deploy monitoring tools that alert on any call to admin-restricted functions.
  • Two hacks in two weeks on the same protocol means the first fix was incomplete. Conduct comprehensive access control audits after any privilege escalation incident.

8. Yearn Finance ($9M)

What Happened

On November 30, 2025, the yETH weighted stableswap pool on Yearn Finance was exploited for approximately $9 million through a precision error that turned 16 wei into infinite tokens.

How It Worked

The attacker deposited a minimal amount (just 16 wei) into the yETH pool, triggering a calculation edge case in the stableswap invariant. This precision error allowed the attacker to withdraw a disproportionately large share of the pool. Approximately $2.4 million was later recovered when the attacker's wallet was burned through a separate incident.

Prevention

  • Enforce minimum deposit thresholds to prevent dust-amount edge cases.
  • Use higher precision (e.g., 256-bit math) for all stableswap invariant calculations.
  • Run fuzz testing with extreme boundary values, not just typical transaction sizes.

9. USPD Stablecoin ($1M)

What Happened

On September 16, 2025, the USPD stablecoin protocol lost $1 million in stETH after an attacker front-ran the protocol's proxy initialization, a classic "shadow proxy" attack.

How It Worked

USPD used an upgradeable proxy pattern but failed to properly initialize the proxy before it went live. The attacker deployed their own logic contract and pointed the uninitialized proxy at it, giving themselves full control over the protocol's funds. It is one of the oldest attack patterns in the book, yet it still works.

Prevention

  • Always initialize proxies in the same transaction as deployment, or use CREATE2 with deterministic addresses.
  • Use OpenZeppelin's Initializable mixin and verify initialization state in every function call.
  • Add a proxyAdmin guard that prevents the implementation from being changed after initialization.

10. Ribbon Finance, Rari Capital, and iEarn ($5M Combined)

What Happened

In December 2025, three legacy DeFi protocols, Ribbon Finance, Rari Capital, and iEarn (a Yearn predecessor), were hit in what appeared to be a coordinated AI-assisted hacking spree, collectively losing around $5 million.

How It Worked

All three protocols shared a common trait: they were old, largely unmaintained codebases with known but unpatched vulnerabilities. The attacker (or an AI tool they used) systematically scanned for deprecated contracts with publicly disclosed flaws and exploited them in quick succession. On-chain messages from the attacker even taunted audit firms.

Prevention

  • Decommission and withdraw funds from deprecated contracts immediately; unpatched code is a target.
  • Monitor security disclosures for all dependencies, including those in inherited codebases.
  • Recognize that AI-assisted vulnerability scanning lowers the cost of finding old bugs, making every unpatched contract a sitting duck.

Key Takeaways from 2025

Rounding and Precision Errors Are the New Reentrancy

Three of the ten hacks above (Balancer, Yearn, Cetus) stemmed from mathematical precision bugs. As DeFi protocols grow more complex with concentrated liquidity and stableswap curves, rounding errors become high-value attack surfaces. Audit every arithmetic operation with the assumption that an attacker will find the edge case you missed.

Old Code Is Not Safe Code

Balancer's v2 pools survived five years before being exploited. Ribbon, Rari, and iEarn were decommissioned but still held funds. Protocols must treat maturity as a risk factor, not a safety indicator. Re-audit aging contracts when token compositions, market conditions, or tooling capabilities change.

Off-Chain Infrastructure Matters

The Garden Finance and ByBit hacks proved that targeting operators, solvers, and key holders is often easier than breaking smart contracts. DeFi security is only as strong as the weakest key-management practice in the system.

Shared Libraries Are Shared Risk

Cetus's $223M loss originated in an open-source library that multiple protocols used. When a bug lives in a dependency, every project depending on it inherits the vulnerability. Audit your dependencies with the same rigor you audit your own code.

Conclusion

The DeFi hacks 2025 lessons boil down to a handful of recurring themes: unchecked math, unpatched legacy code, insecure key management, and over-reliance on single data sources. The industry lost billions to problems that were, in principle, already well understood. The gap is not knowledge; it is execution. Protocols that invest in rigorous re-audits, multi-source oracle designs, hardware key enforcement, and real-time anomaly detection will survive. Those that treat security as a one-time checklist will not. The question for 2026 is not whether new exploit classes will emerge, but whether the industry will finally internalize the lessons it has already paid so dearly to learn.