Whenever someone creates a game and becomes playerA, anyone can join the game and become playerB. However, there is no check to see if someone has already joined as playerB. As a result, it is possible for multiple users to join the game and send ETH or the winning token to the contract, but only the last user who joined will be set as playerB. The other users’ tokens or funds will get stuck in the contract.
In the RockPaperScissors::joinGameWithEth
or RockPaperScissors::joinGameWithToken
there is no check to determine if the PlayerB has already already joined:
Anyone can join as playerB, even after someone else has already joined. As a result, the previous user will be replaced, and their funds or tokens will remain locked in the contract.
Users who have joined a game may be removed from the game without knowing that they are no longer part of it. Their funds will be locked in the contract, with no function available to withdraw or refund them.
Manual review
Add a check to ensure that a user cannot join as playerB if playerB has already been set.
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.