Reproduced Exploit
BaseGauge — the boost basis points replace the reward share
Alice's base reward share is 100 ether and her boost is 20000, which means 2x in basis points. _calculatePendingRewards replaces the share with that 20000 instead of computing userShare * boost / WEIGHT_PRECISION. She claims 20000 wei. The gauge keeps the rest of the 200 ether it was funded with. T…
Chain
Other
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: 66157-c-03-incorrect-boost-application-leads-to-inflated-rewards-i. Standalone Foundry PoC and full write-up: 66157-c-03-incorrect-boost-application-leads-to-inflated-rewards-i_exp in the
evm-hack-registrymirror.
Vulnerability classes:
vuln/logic/reward-calculation·vuln/arithmetic/precision-loss
Key info#
| Protocol | Regnum Aurum BaseGauge |
| Finding | Pashov Audit Group C-03, AuditVault 66157 |
| Vulnerable code | _calculatePendingRewards assigns boost to userShare |
| Harm | Alice is paid 20000 wei. The control pays 200 ether. |
| Chain | local synthetic |
TL;DR#
Alice's base reward share is 100 ether and her boost is 20000, which means 2x in basis points. _calculatePendingRewards replaces the share with that 20000 instead of computing userShare * boost / WEIGHT_PRECISION. She claims 20000 wei. The gauge keeps the rest of the 200 ether it was funded with. The control multiplies and pays 200 ether.
The vulnerable code#
uint256 boost = _applyBoost(user, userShare);
userShare = boost > 0 ? boost : userShare;
_updateUserReward in the report scales with WEIGHT_PRECISION. The fix is userShare * boost / WEIGHT_PRECISION.
Root cause#
_applyBoost returns a basis-point multiplier. The pending-reward function treats that return value as the token amount.
Preconditions#
Alice's stake is the whole gauge, 1000 ether. Accrued rewards make her base share 100 ether. The boost function returns 20000. The gauge holds 200 ether of reward tokens, which is the 2x amount.
Attack walkthrough#
- The preview computes
1000 ether * 100 ether / 1000 ether, which is 100 ether. _applyBoostreturns 20000.- The assignment stores 20000 as
userShare. getRewardtransfers 20000 wei to Alice.- The control computes
100 ether * 20000 / 10000and pays the staker 200 ether.
Diagrams#
Impact#
Alice receives 20000 wei instead of 200 ether. The unpaid rewards stay in the gauge. A gauge that divides by WEIGHT_PRECISION pays the staker 200 ether.
Remediation#
Set userShare to userShare * boost / WEIGHT_PRECISION when the boost is non-zero.
How to reproduce#
cd 66157-c-03-incorrect-boost-application-leads-to-inflated-rewards-i_exp
forge test -vv
Sources#
- AuditVault finding: https://github.com/Auditware/AuditVault/blob/main/findings/66157-c-03-incorrect-boost-application-leads-to-inflated-rewards-i.md
- Pashov report: https://github.com/pashov/audits/blob/master/team/md/RegnumAurum-security-review_2025-05-06.md
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 66157-c-03-incorrect-boost-application-leads-to-inflated-rewards-i_exp (evm-hack-registry mirror).
- AuditVault finding: 66157-c-03-incorrect-boost-application-leads-to-inflated-rewards-i.
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.