I found that anyone ( let call it player X ) can replace player B that join the game with token
when player A created the game, and player B joins, there's no any state update that determines player B has join and no one can join this game which will make player X to join and replace player B
in https://github.com/CodeHawks-Contests/2025-04-rock-paper-scissors/blob/25cf9f29c3accd96a532e416eee6198808ba5271/src/RockPaperScissors.sol#L170
Attacker can join and replace player B which will make him to lose his fee and lost the chance of winning the game
Manual review
Use the below function and add to /test/RockPaperScissorsTest.t.sol
then run the test with foundry
using
If the test pass then it is vulnerable
Add state update after playerB joins the game and check for it whenever the function was called with the same gameId
Game state remains Created after a player joins
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.