Yearn Finance Hack

TOTAL LOST $11.5M
High Flashloan Misconfiguration Exploit / Flash Loan Attack ethereum

Summarize with AI

Affected Chain ethereum Incident surface
Recovered - No recovery reported
All-Time Rank #291 By amount stolen
Auditors 2 Prior security audits

Incident Overview

Yearn Finance and Aave Protocol were exploited via a flash loan attack, resulting in the loss of 11,512,509 $USD worth of $ETH and $DAI.

Yearn Finance is a Yield Aggregator, and Aave Protocol is a Lending and Borrowing platform. The hacker performed an attack using two malicious smart contracts. The attack started with the exploiter taking a flash loan for 2,000,000 $USDT, 5,000,000 $USDC, and 5,000,000 $DAI from Balancer.

Borrowed assets are used to exploit Yearn Finance’s USDT pool vulnerability and mint a big amount of ycUSDT (~204 billion) and yUSDT (~33 trillion) tokens then swap them for various stablecoins worth 11,512,509 $USD. Another smaller attack took place during the exploit which affected Aave’s LendingPoolCoreV1 contract. Worth noticing that the exploiter repaid all users USDT positions in the Aave V1 protocol.

During multiple transactions stolen assets were transferred to destination wallets part of which as 1,000 $ETH was bridged through TornadoCash.

Attacker address:

https://etherscan.io/address/0x5bac20be…9cdfe0

Attacker wallets with funds:

https://etherscan.io/address/0x16af29b7…2374a5

https://etherscan.io/address/0x6f4a6262…6f6ab8

Malicious transaction examples:

https://etherscan.io/tx/0x8db0ef33…053138

https://etherscan.io/tx/0xd55e43c1…cda95d

Malicious Contracts:

https://etherscan.io/address/0x8102ae88…d0579e

https://etherscan.io/address/0x9fcc1409…a0eb0f

Incident Report

Protocol / Project Yearn Finance
Date of Incident
Affected Chain(s) ethereum
Attack Technique Flashloan Misconfiguration Exploit / Flash Loan Attack
Classification Ecosystem / Yield Aggregator,Borrowing and Lending
Primary Source View Post-Mortem

Protocol Information

Protocol Type Yield Aggregator
Affected Token YFI
Smart Contract Language Solidity
Official Website yearn.finance/
Protocol Twitter/X @iearnfinance
Team Public / Doxxed
Source Code Verified On-Chain

Market Context at Time of Hack

Token Categories
DeFi DAO Ethereum Ecosystem Yield Farming Yield Aggregator Yearn Partnerships Three Arrows Capital Portfolio Polychain Capital Portfolio

What the Attacker Needed to Succeed

Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.

Technical Knowledge Deep understanding of flashloan misconfiguration exploit / flash loan attack and Solidity and EVM internals
Capital Required Flash loan capital (borrowed atomically, zero upfront cost)
On-Chain Access Ability to interact with ethereum smart contracts and deploy a custom exploit contract
Protocol Analysis Identification of the exploitable vulnerability in Yearn Finance's contract logic - root cause: ecosystem / yield aggregator,borrowing and lending
Execution Speed Precise transaction ordering and timing to exploit the vulnerability within a single atomic block
Obfuscation Plan A strategy to launder and move stolen funds - typically through mixers, cross-chain bridges, or decentralized DEX swaps to resist tracing

What Auditors Should Check

Could this have been caught in audit? Yes — skilled auditors routinely flag Flashloan Misconfiguration Exploit / Flash Loan Attack vulnerabilities in code review
Audited by MixBytes, Trail of Bits — still lost $11.5M. Prior audits don't guarantee safety, especially after post-audit code changes.

If you're auditing a protocol with similar architecture to Yearn Finance, these are the critical security checks that could have prevented this incident (April 2023).

  • Verify all logic paths related to Flashloan Misconfiguration Exploit / Flash Loan Attack are guarded by proper access controls and input validation - see the Flash Loans Attacks attack class for patterns
  • Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs

Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.

Free Trial

Security Audit History

Related Attack Classes

The technique used in this hack maps to these vulnerability classes in our security curriculum:

See all Flash Loans Attacks examples →

Sources & References

Learn to Prevent the Next Yearn Finance

The Yearn Finance hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.

Recreate exploit patterns safely Free Trial