Reproduced Exploit
Mellow Flexible Vaults — protocol fee multi-accrual in submitReports
1. Each handleReport accrues protocol fees from last timestamp → now. 2. updateState only writes the timestamp when the asset is the base asset. 3. Non-base-first batch re-accrues the same year three times → >300e18 fees vs 100e18 fair.
Chain
Other
Category
logic
Date
Jul 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: 62109-h-4-protocol-fee-multiple-accrual-in-oraclesubmitreports-she. Standalone Foundry PoC and full write-up: 62109-h-4-protocol-fee-multiple-accrual-in-oraclesubmitreports-she_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/logic/fee-calculation · wrong-state · fee-accounting
Reproduction: self-contained Foundry PoC with only
forge-std. Full trace: output.txt. PoC: test/62109-h-4-protocol-fee-multiple-accrual-in-oraclesubmitreports-she_exp.sol.
AuditVault taxonomy: severity/high · sector/oracle · platform/sherlock · fee-calculation · fee-accounting
Key info#
| Impact | HIGH — same time window charged once per asset report; LPs diluted |
| Protocol | Mellow Flexible Vaults Oracle / FeeManager / ShareModule |
| Vulnerable code | FeeManager.updateState returns early for non-base assets |
| Bug class | Fee timestamp not advanced per report / only on base asset |
| Finding | Sherlock 2025-07-mellow-flexible-vaults · #62109 · H-4 |
| Report | sherlock-audit/2025-07-mellow-flexible-vaults-judging |
| Source | AuditVault |
| Status | Fixed by protocol (PR #6). Reproduced as standalone local PoC. |
| Compiler | ^0.8.24 (PoC) |
TL;DR#
- Each
handleReportaccrues protocol fees from last timestamp → now. updateStateonly writes the timestamp when the asset is the base asset.- Non-base-first batch re-accrues the same year three times → >300e18 fees vs 100e18 fair.
The vulnerable code#
function updateState(address asset, uint256 priceD18) external {
if ($.baseAsset[vault] != asset) {
return; // @> VULN — timestamp not advanced
}
$.timestamps[vault] = block.timestamp;
}
Root cause#
Fee accrual is per-report, but the clock only advances on the base asset. Non-base reports leave timestamps[vault] unchanged, so each subsequent report in the same batch recharges the full elapsed interval.
Attack walkthrough#
- 1000e18 shares, 10% protocol fee, last timestamp = now − 365 days.
submitReports([nonBase, nonBase, base]).- Fee recipient receives >300e18 shares (finding threshold); fair single accrual is 100e18.
Diagrams#
Impact#
Protocol fees can be charged N times per batch of N assets when non-base assets are ordered first, diluting LPs by minting excess fee shares.
Sources#
- AuditVault finding #62109
- Sherlock issue #167
- Reduced source:
FeeManager.sol/Oracle.sol@eca8836
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 62109-h-4-protocol-fee-multiple-accrual-in-oraclesubmitreports-she_exp (evm-hack-registry mirror).
- AuditVault finding: 62109-h-4-protocol-fee-multiple-accrual-in-oraclesubmitreports-she.
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.