Reproduced Exploit
Yearn yBOLD — Deposit after loss report free-rides collateral recovery
1. Victim deposits into the strategy. 2. Stability Pool liquidation burns BOLD; collateral gains are unrealized. 3. Keeper report() books a loss (PPS drops) because harvest only counts free BOLD. 4. Attacker deposits at the depressed PPS (mints excess shares).
Chain
Other
Category
untagged
Date
May 2025
Source
AuditVault
EVM Playground
Source-level debugger — step opcodes and Solidity in sync
The attack is replayed in an in-browser EVM preloaded with the exact dumped fork state. The execution tree shows every call; step by Solidity line or by opcode across all depths — source, Stack, Memory, Storage, Balances (native / ERC-20 / NFT), Transient storage and Return value stay in sync. Click a tree node, opcode, or source line to jump. No backend, no live RPC.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 57687-h-2-attacker-can-deposit-after-the-keeper-reports-a-loss-but. Standalone Foundry PoC and full write-up: 57687-h-2-attacker-can-deposit-after-the-keeper-reports-a-loss-but_exp in the
evm-hack-registrymirror.
Vulnerability classes: frontrun-exposure · direct-drain · liquidation-logic
Reproduction: self-contained Foundry PoC with only
forge-std— no fork. Full trace: output.txt. PoC: test/57687-h-2-attacker-can-deposit-after-the-keeper-reports-a-loss-but_exp.sol.
Key info#
| Impact | HIGH — attacker free-rides recovery for ~33% of prior depositor funds (finding PoC ~32.5%) |
| Protocol | Yearn yBOLD Liquity v2 Stability Pool strategy |
| Vulnerable code | report() / harvestAndReport books loss from free BOLD only while unrealized coll gains exist |
| Bug class | Temporary PPS depression between loss report and coll auction |
| Finding | Sherlock 2025-05-yearn-ybold · #57687 · H-2 · reporters 0x15, Obsidian |
| Report | sherlock-audit/2025-05-yearn-ybold-judging |
| Source | AuditVault |
| Status | Valid high; management can enable the loss path via health-check settings |
| Compiler | ^0.8.24 (PoC) |
TL;DR#
- Victim deposits into the strategy.
- Stability Pool liquidation burns BOLD; collateral gains are unrealized.
- Keeper
report()books a loss (PPS drops) because harvest only counts free BOLD. - Attacker deposits at the depressed PPS (mints excess shares).
tendauctions coll → BOLD; nextreportbooks profit; attacker redeems more than deposited.
The vulnerable code#
function report() external returns (uint256 profit, uint256 loss) {
// @> VULN: free BOLD only — unrealized coll gains ignored → temporary loss
uint256 newTotalAssets = harvestAndReport();
// FIX: mark coll to market, or delay loss until auction settles
...
}
Management can disable health checks / set a high loss limit so the temporary loss is accepted.
Root cause#
Strategy accounting is BOLD-only between liquidation and collateral auction. A report in that window socializes an unrealized loss into PPS. Late depositors mint cheap shares that claim the recovery when coll is sold.
Preconditions#
- Prior depositors in the strategy.
- A Stability Pool liquidation that reduces BOLD while leaving coll gains.
- Management allows the loss to report (
setDoHealthCheck(false)or non-zero loss limit). - Attacker can deposit after the loss report and before tend/report of the recovery.
Attack walkthrough#
- Victim deposits 100e18.
- Simulate liquidation: −50e18 BOLD, +50e18 unrealized coll value.
report()→ totalAssets = 50e18 (loss booked).- Attacker deposits 100e18 → mints 200e18 shares at half PPS.
tend+reportrestore 50e18; attacker redeems ~133e18 → +33e18 profit, victim −33e18.
Diagrams#
Impact#
Prior depositors permanently lose a large fraction of assets to a well-timed deposit between loss report and collateral realization. Finding PoC shows >30% theft of a depositor's funds.
Taxonomy#
genome: frontrun-exposure,direct-drain,liquidation-logicseverity/high·sector/vault·sector/yield-aggregator·platform/sherlock
Sources#
- AuditVault finding #57687
- Sherlock judging issue #155
- Vulnerable source:
sherlock-audit/2025-05-yearn-ybold→yv3-liquityv2-sp-strategyStrategy harvest/report path vs Liquity SP coll gains
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 57687-h-2-attacker-can-deposit-after-the-keeper-reports-a-loss-but_exp (evm-hack-registry mirror).
- AuditVault finding: 57687-h-2-attacker-can-deposit-after-the-keeper-reports-a-loss-but.
Alerts & third-party analyses
These dashboards index community alerts tweets, post-mortems, and independent write-ups. Reach them through the protocol name above to cross-check this reproduction against other analyses.