
Briefing
The Yearn Finance ecosystem was targeted via a critical logic flaw in a deprecated token contract, enabling an attacker to execute a sophisticated economic exploit against associated liquidity pools. The primary consequence is a direct, unrecoverable loss of user-deposited liquid staking tokens and Ether from the affected pools, underscoring the enduring risk of technical debt in DeFi. The attacker leveraged a mathematics bug in the older token’s minting function to generate a near-infinite supply of the asset, which was then immediately used to drain real collateral from a Balancer StableSwap pool and a Curve pool. Total quantified losses across the two pools are estimated at approximately $9 million.

Context
The prevailing attack surface for established protocols includes legacy smart contracts that are no longer actively maintained but remain on-chain and hold value or retain critical permissions. This specific exploit leveraged a known class of vulnerability → a design flaw in the token’s internal accounting logic that failed to correctly validate the collateral required for minting. The protocol’s core V2 and V3 vaults, which operate under modern security standards, were not compromised, but the existence of this retired, vulnerable contract created an open dependency that an adversary could exploit for financial gain.

Analysis
The attack vector was a multi-step, single-transaction exploit chain targeting the older yETH token contract. The attacker first utilized a mathematical flaw within the token’s mint function to create an enormous, unauthorized supply of over 235 trillion yETH tokens without providing adequate collateral. This hyper-inflated token balance was then deposited into the associated Balancer StableSwap pool, which was designed to facilitate swaps between yETH and other liquid staking derivatives (LSDs) like wstETH and rETH. Due to the pool’s invariant logic, the massive influx of ‘fake’ yETH allowed the attacker to withdraw all real, underlying assets from the pool, effectively draining the entire liquidity.

Parameters
- Total Funds Drained → ~$9 million (The total value of assets siphoned from the affected pools).
- Exploited Component → Legacy yETH token contract (The specific contract containing the infinite mint logic flaw).
- Unauthorized Tokens Minted → 235 trillion yETH (The sheer scale of the malicious token inflation used to manipulate the pool).
- Funds Laundered → ~$3 million ETH (The amount of stolen assets immediately moved to Tornado Cash for obfuscation).

Outlook
The immediate mitigation step for all protocols is a comprehensive audit and definitive decommissioning of any legacy smart contracts that retain critical minting or administrative privileges, even if they are considered “retired.” This incident establishes a new security best practice → all code, regardless of its operational status, must be formally verified to ensure it cannot be leveraged as an attack vector against active financial primitives. The contagion risk remains low as the vulnerability was isolated to a custom token implementation, but the systemic threat of technical debt in multi-generational DeFi architectures is now materially elevated.
