The refund() and internal _refundETH() function in the ChristmasDinner contract fails to validate refund eligibility, allowing addresses without a deposited ETH balance in the contract to waste gas from the contract without restrictions.
Both the internal _refundETH() and external refund() function does not check if the caller (msg.sender) is eligible for a refund. For example, if their deposited ETH balance is 0 they can unconditionally transfer 0 ETH based on the etherBalance mapping, which can waste a lot of gas.
as the EVM allows for 0 value ETH transfers.
When a malicious user without a deposited ETH balance keeps calling the contract's refund() function, the contract will keep sending 0 ether and can eventually run out of gas. Making the entire contract unusable
Manual Review, Foundry
in the refund() function add a check to ensure the refundee's deposited ETH balance is greater than 0
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.