The startGame()
function allows the player to send exactly 1 Ether to initiate the game. However, the test suggests that this function does not restrict the maximum amount of Ether a player can send, leaving the contract open to the possibility of arbitrary Ether contributions. Even if the player sends more than 1 Ether, the game logic in endGame always transfers a fixed 2 Ether reward, regardless of the player's original deposit. This creates an imbalance in the payout system, where the payout does not scale with the player's contribution.POC:
or Adjust Reward Mechanism: Modify the endGame function to make the reward proportional to the player's contribution, ensuring fairness. Example:
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.