The endGame function includes a mechanism to transfer 2 Ether to the winning player. However, there is no check to ensure that the contract holds sufficient Ether to fulfill this payout. If the contract's balance is less than 2 Ether, the transfer will fail, causing the function to revert. This could disrupt the game flow and lead to user dissatisfaction or mistrust
The inability to pay winners undermines trust in the game, negatively affecting its reputation and user adoption.
Manual
There shoudl be a check always in contract that there are enough ether to pay back to the winner
Step 1 : user first trigger start the game with 1 eth
Step 2 : balance of contract = 1 ETH
Step 3 : user call hit and his card count becomes 21
Step 4 : contract balance is 1 ETH so contract unable to pay the amount
there must be check for 2 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.