Possible DoS attack in refund() function due to no check for zero address
The refund() function does not check if the player's address is the zero address, which is a valid Ethereum address.
If the function is called with the zero address, it will attempt to send the entrance fee to the zero address, which is not possible because the zero address does not have a balance. This will cause the function to fail and consume all the gas available for the transaction.
Foundry, Remix, PhindAI
The refund() function should check if the player's address is the zero address before attempting to send the entrance fee. This can be done using the require statement with the condition;
This check ensures that the function does not proceed if the player's address is the zero address.
I modified the refund() function with this check
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.