Reproduced Exploit
Majority Protocol: An attacker's referrer claims 10 MJT of unbacked referral rewards (5 sock-puppets join+lea
Chain
Other
Category
untagged
Date
Jan 1970
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. No backend, no live RPC.
Source & credit. Reproduction of a public audit finding curated by AuditVault — the original finding: 65372-depositmanager-refundentryfee-doesnt-deduct-referral-rewards. The historical source/toolchain is unavailable; this entry is documentation only and claims no executable Forge PoC.
Vulnerability classes: vuln/theft · vuln/reward-accounting
Reproduction: a faithful minimal reproduction of the vulnerable finding — the vulnerable function is reproduced verbatim (marked
@>) with faithful minimal doubles; local deploy, no fork.
Root cause#
An attacker's referrer claims 10 MJT of unbacked referral rewards (5 sock-puppets join+leave a game at net-zero token cost while _refundEntryFee omits the referralRewards decrement), draining tokens honest players contributed to the pool and leaving it insolvent (290e18 < 300e18 owed to winners).
);
pool.totalCollectedAmount += pool.ticketPrice;
// @> _payEntryFee CREDITS the referrer on every join (paired with the omission below):
referralRewards[gameId][Registry(registry).referrers(player)] += pool.ticketPrice * REFERRER_FEE;
SafeERC20.safeTransferFrom(IERC20(pool.token), player, address(this), pool.ticketPrice);
}
Why it's exploitable here#
An attacker's referrer claims 10 MJT of unbacked referral rewards (5 sock-puppets join+leave a game at net-zero token cost while _refundEntryFee omits the referralRewards decrement), draining tokens honest players contributed to the pool and leaving it insolvent (290e18 < 300e18 owed to winners).
Attack path#
Marked-line walkthrough (Playground)#
The EVM Playground pins each step to the exact executed source line in 0xce01759b82…:
- L45 — Token transferFrom helper: Setup: helper that pulls
valuebetween accounts and requires the transfer to succeed. - L52 — Token symbol field: Setup: token metadata storage.
- L120 — Game pools mapping: Setup: maps each
gameIdto its prize-pool accounting. - L156 — Load pool on join: Loads the game's pool when a player joins and pays the entry fee.
- L168 — Referral credited on join: Root cause: credits the referrer on join but
_refundEntryFeenever reverses it, so a join-then-leave leaves an unbacked reward the referrer still claims. - L172 — Refund omits referral decrement: The leave-time refund returns the entry fee but skips the matching
referralRewardsdecrement. - L194 — Leave triggers refund: Setup:
leave()lets a player exit and invokes the flawed refund path.
PoC#
Registry (Foundry, local deploy — verbatim vulnerable source + harm-asserting test + negative control):
cd 65372-depositmanager-refundentryfee-doesnt-deduct-referral-rewards_exp
forge test -vvv
The browser Playground replays the same synthetic opcode-for-opcode and measures the harm: An attacker's referrer claims 10 MJT of unbacked referral rewards (5 sock-puppets join+leave a game at net-zero token cost while _refundEntr. Both gates are green (registry forge test PASS + Playground _verify-poc VERDICT: PASS).
Sources & further analysis#
Reproductions & code
- No executable Forge reproduction is claimed; the historical source/toolchain was unavailable for this finding.
- AuditVault finding: 65372-depositmanager-refundentryfee-doesnt-deduct-referral-rewards.
- Upstream DeFiHackLabs PoC directory: src/test.
Alerts & third-party analyses
- DeFiHackLabs incident explorer: [search "Majority Protocol: An attacker's referrer claims 10 MJT of unbacked referral rewards (5 sock-puppets join+lea"](https://defihacklabs.io/explorer/index.html?q=Majority%20Protocol%3A%20An%20attacker's%20referrer%20claims%2010%20MJT%20of%20unbacked%20referral%20rewards%20(5%20sock-puppets%20join%2Blea).
- Web3Sec X hacked database: search.
- Rekt leaderboard: [search](https://rekt.news/?s=Majority%20Protocol%3A%20An%20attacker's%20referrer%20claims%2010%20MJT%20of%20unbacked%20referral%20rewards%20(5%20sock-puppets%20join%2Blea).
- Solodit incident search: [search](https://solodit.xyz/issues?search=Majority%20Protocol%3A%20An%20attacker's%20referrer%20claims%2010%20MJT%20of%20unbacked%20referral%20rewards%20(5%20sock-puppets%20join%2Blea).
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.