The withdraw
function does not check whether the deadline has passed before allowing the host to withdraw funds. This allows the host to withdraw funds before the deadline, potentially preventing participants from claiming refunds.
The host calls the setDeadline function.
Before the deadline passes, the host calls the withdraw function.
Funds are withdrawn, and participants cannot get refunds.
This test was added to the ChristmasDinnerTest.t.sol
and it reverts with ERC20InsufficientBalance()
error when the participant called refund
Participants who decide not to attend may lose their deposits if the host withdraws the funds before the deadline. This breaks trust and the integrity of the contract.
Manual Review
Add a deadline check to the withdraw function to ensure funds are only accessible after the event signup period ends:
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.