Description:
Multiple functions in RockPaperScissors.sol update contract state after calling external contracts. This breaks the Checks-Effects-Interactions (CEI) pattern, which is critical for preventing reentrancy attacks.
Impact: Affected Lines / Instances:
Line 125 & 131
Function: createGameWithToken()
Calls winningToken.balanceOf(...) and transferFrom(...) before setting game state like game.playerA, game.timeoutInterval, etc.
Line 177 & 180
Function: joinGameWithToken()
Calls winningToken.balanceOf(...) and transferFrom(...) before setting game.playerB.
Recommended Mitigation:
Rewrite functions to follow CEI pattern
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.