joinGameWithEth
does not check whether the game the player is about to join was created with ETH.
In createGameWithToken
, game.bet
is set to 0 when creating a game with token,
In joinGameWithEth
, we do not check if the game we are joining is a game created by eth. Thus, we can use joinGameWithEth
to enter into a game created by a token.
For example,
PlayerA creates a game using createGameWithToken
using a token.
Attacker joins this game by calling joinGameWithEth
with msg.value
set to 0.
A player can join a game without paying any tokens. This eventually causes the game creator (playerA) to lose money, leading to a severe disruption of functionality.
VSCode
In joinGameWithEth
, add a check to see if the game is created with Eth,
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.