Reproduced Exploit
Duplicate ip entries take the whole even-split reward
claimReward forwards the caller's ipIds into distributeRewards. _getAvailableReward sets every entry to poolBalance / totalIps and subtracts the debt recorded so far. The debt is increased only after that whole array has been built.
Loss
One ip listed three times is paid 15. Each of the 3 members was owed 5
Chain
Ethereum
Category
logic
Date
Undated
Source
AuditVault
EVM Playground
Source-level debugger — step opcodes and Solidity in sync
The attack replays in your browser. Step through it by Solidity line or by opcode.
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: 52385-malicious-ip-owner-can-drain-rewards-via-duplicate-entries-i. Standalone Foundry PoC and full write-up: 52385-malicious-ip-owner-can-drain-rewards-via-duplicate-entries-i_exp in the
evm-hack-registrymirror.
Vulnerability classes: vuln/logic/duplicate-claim · vuln/defi/reward-drain
Key info#
| Field | Value |
|---|---|
| Loss | One ip listed three times is paid 15. Each of the 3 members was owed 5 |
| Vulnerable contract | EvenSplitGroupPool.distributeRewards |
| Attacker EOA | 0x1111111111111111111111111111111111111111 |
| Attack contract | Exploit at 0x15452ec016c4dc8c549e7fe6ff4b26324ea8b7a4 |
| Attack tx | Exploit.run() |
| Chain / block / date | Ethereum model · block 0 · 1970-01 |
| Compiler | solc 0.8.27, cancun, via IR |
| Bug class | Reward shares are computed for every array entry before that ip's debt is increased |
TL;DR#
claimReward forwards the caller's ipIds into distributeRewards. _getAvailableReward sets every entry to poolBalance / totalIps and subtracts the debt recorded so far. The debt is increased only after that whole array has been built.
A pool of 15 with 3 members owes 5 to each. Passing the same ip three times allots 5 + 5 + 5. The pool pays 15 to that ip and is left empty. The control increases debt inside the loop, pays 5 once, and leaves 10.
The finding has no month, so the date marker is 1970-01.
The vulnerable code#
uint256 per = poolBalance / totalIps;
rewardPerIpStored = per;
rewards[i] = per - rewardDebt[ipIds[i]];
rewardDebt[ipIds[i]] += rewards[i];
token.transfer(ipIds[i], rewards[i]); // @> VULN: a repeated ip was allotted a full share before debt moved
Impact#
The other two members' 10 is paid to the duplicated ip. A unique list pays each member 5.
How to reproduce#
cd 52385-malicious-ip-owner-can-drain-rewards-via-duplicate-entries-i_exp
forge test -vv
test_exploit_duplicate_ip_takes_15 asserts the duplicated ip receives 15 and the pool is empty. test_control_duplicate_ip_is_paid_once asserts that ip receives 5 and 10 stays in the pool.
Sources#
- AuditVault finding: https://github.com/Auditware/AuditVault/blob/main/findings/52385-malicious-ip-owner-can-drain-rewards-via-duplicate-entries-i.md
- Halborn report: Story Proof of Creativity Protocol
Sources & further analysis#
Reproductions & code
- Standalone PoC + full trace: 52385-malicious-ip-owner-can-drain-rewards-via-duplicate-entries-i_exp (evm-hack-registry mirror).
- AuditVault finding: 52385-malicious-ip-owner-can-drain-rewards-via-duplicate-entries-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.