The contract risks failing to pay winners if its balance is insufficient, causing transaction reverts and denial of service. This medium-level vulnerability affects user trust and can be mitigated with balance checks and better fund management
The contract assumes it will always have enough ether to pay out winners, specifically 2 ether per win. However, if the contract's balance is insufficient to cover these payouts, the transfer
operation will fail, causing the entire transaction to revert. This can lead to a denial of service for players expecting a payout.
Players may not receive their winnings if the contract balance is too low, leading to transaction reverts.
This become evident after testing the following function in test script.
Foundry Test
Add balance check in startGame function which will resolve the issue.
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.