RockPaperScissors.sol::joinGameWithEth()
& RockPaperScissors.sol::joinGameWithToken()
allow joining multiple times as Player B, resulting in the loss of the participation funds for the past Player(s) B.
joinGameWithEth()
& joinGameWithToken()
allow joining multiple times as Player B
, the problem is that Player B
has to send ETH
or Tokens
to be able to join.
When another player joins, now the former one is erased he no longer is the "Player B", instead a new player is taking his place. But his participation in the game
(ETH
or Tokens
) is still locked in the contract with no way to recover the funds.
Loss of participation funds for player B if someone else joins after him. No way to recover the funds stuck in the contract.
Github, manual review.
When the second player joins (Player B), the contract should not allow another player to take his place, it should check if there is already a Player B : require (game.playerB != address(0));
Or it should refund the former one before accepting another player to take his place.
The first solution seems fairer.
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.