The refund function contains a logic error in its deadline check: if fund.deadline != 0 && .... This specifically excludes the case where deadline is 0, which allows refunds to be processed even if the deadline has not technically passed (since 0 is usually in the past, but the check is != 0). If a campaign is initialized with a deadline of 0 (or default), this check is bypassed entirely, allowing immediate refunds.
Severity: High
Likelihood: Medium
Impact: High
Impact Details:
Premature Refunds: Contributors can withdraw funds immediately, draining the campaign before it has a chance to succeed.
Logic Bypass: The intended temporal lock on funds is nullified.
Test demonstrating refund validity despite "active" (but zero-deadline) state.
Ensure the deadline check applies to all values, or enforce non-zero defaults.
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.