Reproduced Exploit
Expired veRAAC locks keep earning rewards from a stale checkpoint
The user locks 1000 ether of power with unlockTime already behind the block timestamp, so balanceOf is 0. getNewUserRewards still multiplies the checkpoint at lastUserBlock by the new reward index and claim transfers the entire 1000 ether pool. The formula that uses balanceOf pays 0.
Loss
1000 ether of reward tokens paid to a lock whose live power is 0
Chain
Ethereum
Category
logic
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. 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: 66161-c-07-users-can-accumulate-rewards-after-lock-expiry-due-to-s. Standalone Foundry PoC and full write-up: 66161-c-07-users-can-accumulate-rewards-after-lock-expiry-due-to-s_exp in the
evm-hack-registrymirror.
Vulnerability classes:
vuln/logic/reward-calculation·vuln/logic/state-update
Key info#
| Field | Value |
|---|---|
| Loss | 1000 ether of reward tokens paid to a lock whose live power is 0 |
| Vulnerable contract | VeRewards.getNewUserRewards |
| Attacker EOA | 0x1111111111111111111111111111111111111111 |
| Attack contract | Exploit |
| Attack tx | Exploit.run() |
| Chain / block / date | Ethereum model · block 0 · 2025-05 |
| Compiler | solc 0.8.27, cancun, via IR |
| Bug class | Reward power is read at lastUserBlock |
TL;DR#
The user locks 1000 ether of power with unlockTime already behind the block timestamp, so balanceOf is 0. getNewUserRewards still multiplies the checkpoint at lastUserBlock by the new reward index and claim transfers the entire 1000 ether pool. The formula that uses balanceOf pays 0.
Background#
Pashov Audit Group's May 2025 Regnum Aurum review, finding C-07 (AuditVault 66161). veRAACToken.getNewUserRewards uses balanceOfAt(user, uData.lastUserBlock) and that checkpoint is not refreshed when the lock expires.
The vulnerable code#
uint256 userPower = balanceOfAt(user, uData.lastUserBlock); // @> VULN: checkpoint power is used after the lock has expired
// FIX: userPower = balanceOf(user);
The change that removes the harm:
- uint256 userPower = balanceOfAt(user, uData.lastUserBlock);
+ uint256 userPower = balanceOf(user);
Root cause#
The reward product is checkpoint power times the increase in reward-per-token. The checkpoint is the power from before unlock. Live power is zero, so the same product with balanceOf is zero. Nothing in claim refreshes lastUserBlock.
Preconditions#
- A checkpoint at block 0 stores 1000 ether of power and
lastUserBlockis 0. unlockTimeis 0 and the block timestamp is 1, so the lock is expired.- The reward index is 1e18 and the pool holds 1000 ether.
Attack walkthrough#
- The user locks. Live
balanceOfis 0. - Rewards are notified at 1e18 per unit of power.
claimreads power at block 0 and computes 1000 ether.- The pool transfers 1000 ether to the expired lock.
currentRewardson the same user is 0.
Diagrams#
Impact#
An expired locker drains 1000 ether that should have stayed in the pool for locks that still have voting power. The control formula pays that user nothing.
Remediation#
Use the current balance, which is 0 after unlockTime, instead of balanceOfAt at lastUserBlock.
How to reproduce#
cd 66161-c-07-users-can-accumulate-rewards-after-lock-expiry-due-to-s_exp
forge test -vv
test_exploit is the harm. The control test is the guarded path. Captured output is output.txt.
Sources#
- AuditVault finding: https://github.com/Auditware/AuditVault/blob/main/findings/66161-c-07-users-can-accumulate-rewards-after-lock-expiry-due-to-s.md
- Pashov report: https://github.com/pashov/audits/blob/master/team/md/RegnumAurum-security-review_2025-05-06.md
- Quoted function:
veRAACToken.getNewUserRewards
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 66161-c-07-users-can-accumulate-rewards-after-lock-expiry-due-to-s_exp (evm-hack-registry mirror).
- AuditVault finding: 66161-c-07-users-can-accumulate-rewards-after-lock-expiry-due-to-s.
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.