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…

May 2025•Other•logic•2 min read

Chain

Other

Category

logic

Date

May 2025

Source

AuditVault

EVM Playground

Source-level debugger — step opcodes and Solidity in sync

evm-hack-analyzer

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.

Loading fork state…

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-registry mirror.


Vulnerability classes: vuln/logic/reward-calculation · vuln/arithmetic/precision-loss

Key info#

ProtocolRegnum Aurum BaseGauge
FindingPashov Audit Group C-03, AuditVault 66157
Vulnerable code_calculatePendingRewards assigns boost to userShare
HarmAlice is paid 20000 wei. The control pays 200 ether.
Chainlocal 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#

SOLIDITY
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#

  1. The preview computes 1000 ether * 100 ether / 1000 ether, which is 100 ether.
  2. _applyBoost returns 20000.
  3. The assignment stores 20000 as userShare.
  4. getReward transfers 20000 wei to Alice.
  5. The control computes 100 ether * 20000 / 10000 and pays the staker 200 ether.

Diagrams#

flowchart TD A["Base share is 100 ether"] --> B["Boost returns 20000"] B --> C["VULN: share is replaced by 20000"] C --> D["Alice is paid 20000 wei"] D --> E["Scaled boost pays 200 ether"]

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#

BASH
cd 66157-c-03-incorrect-boost-application-leads-to-inflated-rewards-i_exp
forge test -vv

Sources#


Sources & further analysis#

Reproductions & code

Alerts & third-party analyses

  • Web3Sec X hacked database: search.
  • Rekt leaderboard: search.
  • Solodit incident search: search.

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.