Reproduced Exploit
Regnum Aurum: a withdrawal can be queued before the tokens exist
requestWithdraw stores timelock.amount without reading the caller's RToken balance. Bob queues 1000 while holding nothing. Thirty minutes later Alice deposits 1000 crvUSD, receives RToken, and transfers it to Bob. Bob's depositBlock is still 0, so the same-block flash-loan check does not see Alice'…
Loss
Bob withdraws Alice's 1000 crvUSD in the same block she deposited it
Chain
Ethereum
Category
governance
Date
Jun 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. Query opens a search over the trace: previous and next writes, balance changes and calls, breakpoints, and a diff of everything that changed between two steps. No backend, no live RPC.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 66506-h-05-bypassing-withdrawal-timelock-via-pre-requests-and-tran. Standalone Foundry PoC and full write-up: 66506-h-05-bypassing-withdrawal-timelock-via-pre-requests-and-tran_exp in the
evm-hack-registrymirror.
Vulnerability classes:
vuln/governance/timelock-bypass·vuln/logic/missing-validation
Key info#
| Field | Value |
|---|---|
| Loss | Bob withdraws Alice's 1000 crvUSD in the same block she deposited it |
| Vulnerable contract | LendingPool.requestWithdraw |
| Attacker EOA | 0x1111111111111111111111111111111111111111 |
| Attack contract | Exploit |
| Attack tx | queue at t=1000, then complete at t=2801 |
| Chain / block / date | Ethereum model · block 0 · 2025-06 |
| Compiler | solc 0.8.27, cancun, via IR |
| Bug class | Timelock queued with no balance check |
TL;DR#
requestWithdraw stores timelock.amount without reading the caller's RToken balance. Bob queues 1000 while holding nothing. Thirty minutes later Alice deposits 1000 crvUSD, receives RToken, and transfers it to Bob. Bob's depositBlock is still 0, so the same-block flash-loan check does not see Alice's deposit. His timelock is already mature, and he withdraws her 1000 crvUSD immediately. A request made in that same block is not mature and the withdraw reverts.
Background#
Pashov Audit Group's Regnum Aurum review of 26 June 2025, finding H-05. The withdrawal timelock and the same-block deposit check are both keyed to the address that calls withdraw, not to the address that just received the RToken.
The vulnerable code#
function requestWithdraw(uint256 amount) external {
Timelock storage t = timelock[msg.sender];
t.amount = amount; // @> VULN: no RToken balance check
t.readyAt = uint64(block.timestamp + parameters.withdrawTimelockDuration);
t.expireAt = uint64(block.timestamp + parameters.withdrawTimelockDuration + parameters.withdrawTimelockDelay);
}
withdrawTimelockDuration is 30 minutes and withdrawTimelockDelay is 7 days. withdraw reverts when depositBlock[msg.sender] == block.timestamp.
The fix is require(rToken.balanceOf(msg.sender) >= amount) inside requestWithdraw.
Root cause#
The right to withdraw later is granted before the tokens exist. A transfer after the wait gives the queued address a balance the same-block check never recorded.
Preconditions#
- Bob's RToken balance is 0 when he calls
requestWithdraw(1000). - 30 minutes pass.
readyAtis now behindblock.timestamp, andexpireAtis still ahead. - Alice deposits in the later block and transfers the RToken to Bob before he withdraws.
Attack walkthrough#
- At timestamp 1000, Bob queues 1000.
readyAtbecomes 2800. - At timestamp 2801, Alice deposits 1000 crvUSD. Her
depositBlockis 2801. Bob's stays 0. - Alice transfers 1000 RToken to Bob.
- Bob withdraws. The same-block check compares his
depositBlockof 0 with 2801 and passes. The timelock is mature. - He receives 1000 crvUSD. The control queues and withdraws at the same timestamp and reverts
timelock.
Diagrams#
Impact#
Alice's 1000 crvUSD, which should have been locked behind a fresh 30 minute timelock and a same-block deposit ban, is withdrawn by Bob in the deposit block. His depositBlock is still 0. A request that has not aged reverts, so the pre-queue is what makes the withdrawal possible.
How to reproduce#
cd 66506-h-05-bypassing-withdrawal-timelock-via-pre-requests-and-tran_exp
forge test -vv
test_exploit_prequeue_bypasses_timelock warps from 1000 to 2801 and asserts Bob received 1000 crvUSD. test_control_fresh_request_is_not_ready asserts an immediate withdraw reverts. Output is output.txt.
Sources#
- AuditVault finding: https://github.com/Auditware/AuditVault/blob/main/findings/66506-h-05-bypassing-withdrawal-timelock-via-pre-requests-and-tran.md
- Report: https://github.com/pashov/audits/blob/master/team/md/RegnumAurum-security-review_2025-06-26.md
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 66506-h-05-bypassing-withdrawal-timelock-via-pre-requests-and-tran_exp (evm-hack-registry mirror).
- AuditVault finding: 66506-h-05-bypassing-withdrawal-timelock-via-pre-requests-and-tran.
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.