Reproduced Exploit
Regnum Aurum: a second notify in the first cycle replaces the reward rate (66178)
Before firstCycleStart, every notify sets rd.rate = amount / firstCycleDuration and returns. An honest notify of 1000e18 would pay 1e18 per second for 1000 seconds. A following notify of 1000 wei replaces that rate with 1. cyclePayout is then 1000 wei. The 1000e18 stays in the distributor. This pag…
Loss
Distributor holds 1000e18 plus 1000 wei. The cycle pays only 1000 wei, so the 1000e18 is not distributed
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: 66178-h-16-reward-rate-can-be-manipulated-in-first-cycle-pashov-au. Standalone Foundry PoC and full write-up: 66178-h-16-reward-rate-can-be-manipulated-in-first-cycle-pashov-au_exp in the
evm-hack-registrymirror.
Vulnerability classes:
vuln/logic/reward-calculation
Key info#
| Field | Value |
|---|---|
| Loss | Distributor holds 1000e18 plus 1000 wei. The cycle pays only 1000 wei, so the 1000e18 is not distributed |
| Vulnerable contract | GaugeRewardsDistributor._handleRewardNotification |
| 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 |
| Bug class | first-cycle rate is assigned, not accrued |
TL;DR#
Before firstCycleStart, every notify sets rd.rate = amount / firstCycleDuration and returns. An honest notify of 1000e18 would pay 1e18 per second for 1000 seconds. A following notify of 1000 wei replaces that rate with 1. cyclePayout is then 1000 wei. The 1000e18 stays in the distributor. This page is AuditVault 66178.
The vulnerable code#
rd.rate = this.quoteRate(amount, firstCycleDuration);
// quoteRate returns amount / duration and does not add to the previous rate
// @> VULN: replaces the rate; prior rewards in this cycle are not accrued
Accrue inside the first cycle:
- rd.rate = amount / firstCycleDuration;
+ rd.rate += amount / firstCycleDuration;
Root cause#
The first-cycle branch never adds the new amount onto rewards already notified. lastUpdateTime is also moved to now, so the previous rate is not settled before it is overwritten. The stored rate describes only the latest notify.
Preconditions#
block.timestampis belowfirstCycleStart.getFirstCycleDurationis 1000.- The honest amount is
1000e18and the second amount is 1000 wei.
Attack walkthrough#
- The honest notify transfers
1000e18into the distributor. quoteRatereturns1000e18 / 1000.- A second notify transfers 1000 wei and
quoteRatereturns 1. rd.rateis 1. The earlier rate is gone.cyclePayoutis1 * 1000 = 1000wei.- Balance minus that payout is the original
1000e18. - The control adds the two rates and the stored rate is
1e18 + 1.
Diagrams#
Impact#
Stakers who were owed the 1000e18 notify earn 1000 wei over the whole first cycle. The tokens sit in the distributor and are not claimable at the honest rate. Any later notify before firstCycleStart can repeat the wipe. Finding 66178 is this same H-16.
How to reproduce#
cd 66178-h-16-reward-rate-can-be-manipulated-in-first-cycle-pashov-au_exp
forge test -vv
output.txt is the captured passing run. The control test checks the recommended fix.
Sources#
- AuditVault finding: https://github.com/Auditware/AuditVault/blob/main/findings/66178-h-16-reward-rate-can-be-manipulated-in-first-cycle-pashov-au.md
- Report: https://github.com/pashov/audits/blob/master/team/md/RegnumAurum-security-review_2025-05-06.md
- Provenance: Pashov Regnum Aurum review 2025-05-06, GaugeRewardsDistributor._handleRewardNotification. The first-cycle branch is quoted in the finding.
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 66178-h-16-reward-rate-can-be-manipulated-in-first-cycle-pashov-au_exp (evm-hack-registry mirror).
- AuditVault finding: 66178-h-16-reward-rate-can-be-manipulated-in-first-cycle-pashov-au.
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.