Token movements should either succeed or revert, so that the bookkeeping matches real balances.
fundContest, claimCut (via _transferReward) and closePot call transfer / transferFrom and ignore the returned bool. ERC20 tokens that signal failure by returning false instead of reverting are allowed by the standard; with such a token a failed transfer is treated as success.
Likelihood:
Only with a token that returns false on failure; scope is limited to standard ERC20, and some standard tokens behave this way.
Impact:
In claimCut the player's allocation is zeroed and remainingRewards reduced even if nothing was sent, so the player loses the claim; a failed transferFrom leaves a Pot unfunded while looking funded.
The test uses a minimal ERC20 whose transfer returns false instead of reverting (allowed by the standard). The player calls claimCut while transfers fail: the call succeeds, the player receives nothing, their allocation is wiped, and any later claim reverts with Pot__RewardNotFound. The reward is lost to that player even though the tokens are still in the Pot.
The same pattern in fundContest lets a failed transferFrom leave a Pot unfunded while the contest looks funded, and in closePot lets the manager / claimant payouts silently fail.
Apply the same to closePot and fundContest (safeTransferFrom). SafeERC20 reverts when a token returns false and also handles tokens that return nothing, so the bookkeeping (playersToRewards, remainingRewards) is only updated when the tokens really moved.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.