Player can join token game without any bet.
When player joins an Eth game, there is no validation that the game is an Eth game in function RockPaperScissors::joinGameWithEth
:
The function only has validation that sent Eth value is equal to the game bet amount. Using this function player can join a token game without any bet, because all validations will pass (since game.bet
is 0
, player just must not send any Eth when calling the function).
Player can join a token game without any bet and without any risk. having an account with 1 WinningToken
, player can mint any amount of tokens by creating a token game, joining to it using function RockPaperScissors::joinGameWithEth
and cancelling it.
I created a PoC test that can be added to RockPaperScissorsTest.t.sol
:
Manual review
Add to the function RockPaperScissors::joinGameWithEth
validation that the game is Eth game:
joinGameWithEth function lacks a check to verify the game was created with ETH
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.