An attacker can join the game without tokens, breaking the protocol's base assumption.
Let's assume player A created a game using the createGameWithToken
function. Then, player B can bypass the validation and token transfer process using the joinGameWithEth
function since there is no preventing rule for this.
The two main threat scenarios that this vulnerability can trigger are as follows:
Player B can join any game created with the createGameWithToken
function without risk, gaining a 50% chance to seize the opponent's tokens.
Since the game can be established with only a single token and the winner receives two, if two players cooperate, they could theoretically generate an infinite number of tokens.
These could lead to the following damages:
Disrupt the protocol's functionality
Indirect fund loss (If tokens can be generated infinitely, people won't play ETH-based games, making it difficult for the Admin to earn revenue through fees.)
None
In joinGameWithEth
, add logic to check whether the game is ETH-based or token-based.
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.