The withdraw() function lacks timing constraints, allowing the host to withdraw all funds at any time. This can prevent participants from getting refunds before the deadline, violating the contract's intended functionality of allowing refunds until the deadline.
The current withdraw() function has no deadline checks:
ChristmasDinner.sol#L194
Host can withdraw funds before the deadline
Participants lose their right to refund before deadline
Breaks the trust mechanism built into the contract
Violates the core business logic of the contract
Manual code review
Performing formal verification with Quint
Add an afterDeadline modifier and apply it to the withdraw() function:
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.