Reproduced Exploit

StakeDAO — [C-01] Missing extra reward per token update on deposit

First user deposits and extra rewards are funded. Second user deposits a huge amount without the index updating first, then withdraws/claims — receives ~100k/100001 of rewards that should all go to the first user.

Jul 2025Otheruntagged2 min read

Chain

Other

Category

untagged

Date

Jul 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. No backend, no live RPC.

Loading fork state…

Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 63598-c-01-missing-update-of-extra-reward-per-token-during-deposit. Standalone Foundry PoC and full write-up: 63598-c-01-missing-update-of-extra-reward-per-token-during-deposit_exp in the evm-hack-registry mirror.


Vulnerability classes: reward-calculation · reward-theft · reward-accounting

Reproduction: self-contained Foundry PoC, forge-std only.

AuditVault taxonomy: severity/high · sector/staking · platform/pashov · reward-calculation · reward-theft


Key info#

ImpactHIGH — new depositor steals nearly all pending extra rewards
ProtocolStakeDAO StrategyWrapper
Vulnerable code_deposit checkpoints extraRewardPerToken without _updateExtraRewardState
Bug classStale reward index on deposit
FindingPashov · StakeDAO 2025-07-21 · #63598

TL;DR#

First user deposits and extra rewards are funded. Second user deposits a huge amount without the index updating first, then withdraws/claims — receives ~100k/100001 of rewards that should all go to the first user.

The vulnerable code#

SOLIDITY
// missing: _updateExtraRewardState(rewardTokens);
checkpoint.rewardPerTokenPaid[t] = extraRewardPerToken[t]; // @> VULN stale

Diagrams#

sequenceDiagram participant First participant Wrapper participant Vault participant Second First->>Wrapper: deposit 1e18 Vault->>Vault: depositRewards 1e20 Second->>Wrapper: deposit 100000e18 Note over Wrapper: no updateExtraRewardState Second->>Wrapper: withdraw plus claim Note over Second: gets nearly all rewards First->>Wrapper: claim dust

Impact#

Existing depositors lose fair share of extra rewards to flash depositors.

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.