The contract allows players to be refunded using the refund
function. However, it does not handle cases where a player has already been refunded or is not an active player, potentially leading to undesired behavior.
In the contract, the refund
function allows players to request a refund. However, it does not check whether a player has already been refunded or whether the player is an active participant in the raffle. This could lead to unnecessary gas consumption and potentially undesirable outcomes if players who have already received refunds continue to call the function.
The lack of handling refunds for inactive players or players who have already been refunded may lead to additional gas consumption, confusion among users, and potentially undesirable contract behavior.
Manual
To address this vulnerability, it is recommended to implement logic in the refund
function that checks whether a player has already been refunded and whether they are an active participant.
Checks to verify that the player has not been refunded already and is an active participant before proceeding with the refund is being added. Additionally, marked the player as refunded to prevent double refunds. This improved logic ensures that refunds are handled more effectively and reduces the potential for gas waste and confusion among users.
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.