Reproduced Exploit
Mellow Flexible Vaults — RedeemQueue batch vs claim timestamp mismatch
1. Batch creation excludes the last request at/before the report timestamp (index--). 2. Claim eligibility still allows any request with ts ≤ priceTimestamp. 3. User2 claims from a batch funded only by User1; User1 cannot claim.
Chain
Other
Category
dos
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: 62107-h-2-redeemqueue-accounting-mismatch-between-batch-creation-a. Standalone Foundry PoC and full write-up: 62107-h-2-redeemqueue-accounting-mismatch-between-batch-creation-a_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/dos/frozen-funds · impact/loss-of-funds/direct-drain · locked-funds
Reproduction: self-contained Foundry PoC with only
forge-std. Full trace: output.txt. PoC: test/62107-h-2-redeemqueue-accounting-mismatch-between-batch-creation-a_exp.sol.
AuditVault taxonomy: severity/high · sector/oracle · sector/token · platform/sherlock · frozen-funds · direct-drain
Key info#
| Impact | HIGH — ineligible claimer drains batch; honest redeemer locked out |
| Protocol | Mellow Flexible Vaults RedeemQueue |
| Vulnerable code | _handleReport: latestEligibleIndex-- after upperLookupRecent |
| Bug class | Off-by-one timestamp boundary mismatch |
| Finding | Sherlock 2025-07-mellow-flexible-vaults · #62107 · H-2 |
| Report | sherlock-audit/2025-07-mellow-flexible-vaults-judging |
| Source | AuditVault |
| Status | Fixed by protocol (PR #11). Reproduced as standalone local PoC. |
| Compiler | ^0.8.24 (PoC) |
TL;DR#
- Batch creation excludes the last request at/before the report timestamp (
index--). - Claim eligibility still allows any request with
ts ≤ priceTimestamp. - User2 claims from a batch funded only by User1; User1 cannot claim.
The vulnerable code#
latestEligibleIndex = uint256(timestamps.upperLookupRecent(timestamp));
if (latestEligibleIndex == 0) return;
latestEligibleIndex--; // @> VULN
// FIX: remove the decrement
Root cause#
upperLookupRecent already returns the last checkpoint ≤ timestamp. Decrementing excludes that request from the batch while claim still treats it as eligible via the price timestamp.
Attack walkthrough#
- Redeems at T, T+100, T+200 (10M shares each).
handleReport(T+150)batches only T (User1).- User2 (T+100) claims and drains the batch assets.
- User1 claim reverts — funds locked / stolen.
Diagrams#
Impact#
Broken batch accounting permanently strands later-batched shares and lets ineligible claimers take funded assets.
Sources#
- AuditVault finding #62107
- Sherlock issue #65
- Reduced source:
RedeemQueue.sol@sherlock-audit/2025-07-mellow-flexible-vaults@eca8836
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 62107-h-2-redeemqueue-accounting-mismatch-between-batch-creation-a_exp (evm-hack-registry mirror).
- AuditVault finding: 62107-h-2-redeemqueue-accounting-mismatch-between-batch-creation-a.
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.