The startGame
function lacks a verification mechanism to ensure players have paid before starting the game. Additionally, there is no record-keeping of who paid or the amount paid, leading to potential exploitation and lack of transparency.
Unauthorized Game Access:
Players can start the game without paying since the function does not verify payment before allowing participation.
Free Prize Claims:
Players can exploit the system to claim prizes without making the required deposit.
Lack of Payment Records:
There is no mechanism to track which address paid and the amount, leading to potential disputes and lack of transparency.
Manual Review
Add a mapping that keeps a record of each address and the amount players have paid.
Add a new mapping to check if a player has paid. To implement this condition, the onlyOwner
modifier must be added so that only the owner can check if a player has paid.
With these changes:
Only the owner can verify if a player has paid to start the game.
Player payments are recorded by address and amount for transparency
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.