MyCut

First Flight #23
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

Lack of access control on `Pot::claimCut`.

Description: The Pot::claimCut function allows any player to claim their reward, but there is no mechanism to prevent re-entrancy or multiple claims by the same player.

Impact: A player could potentially call claimCut multiple times if there were a re-entrancy vulnerability in the token contract, leading to multiple claims.

Recommended Mitigation: Although Solidity 0.8+ prevents re-entrancy by default, consider using a re-entrancy guard pattern or ensuring that the state is updated before any external calls:

playersToRewards[player] = 0;
remainingRewards -= reward;
_transferReward(player, reward);
claimants.push(player);
Updates

Lead Judging Commences

equious Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.