It is possible to join a game where the bet is with a token (createGameWithTokenwithout betting the token by calling the function joinGameWithEth.
Concerned function: joinGameWithEth
For a game created with createGameWithToken, it is possible to join without betting the token by calling the function joinGameWithEth.
The check msg.value == game.betwill not prevent the attacker to join because since game.betwill be set at zero
If the attacker loses the game, no bet token will be transfered to the game creator
PoC
a) use an enum GAME_BET_TYPE to indicate if the bet is with a token or in ether.
Advantage: can be easily extends to add new type of payment
b) Add a second require inside the function joinGameWithEth which check the game.betis equal to zero
joinGameWithEth function lacks a check to verify the game was created with ETH
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.