If deadline = 0
(never set), the logic in contribute
and refund
incorrectly bypasses normal checks. It effectively allows sponsors to deposit and immediately get a refund.
When fund.deadline = 0
, the check is skipped, enabling immediate refund
calls without waiting for any actual time-based condition.
No Real Commitment: Sponsors can trivially deposit and then withdraw.
Unstable Funding: The campaign can never hold onto funds if deadline = 0
, undermining the entire crowdfunding model.
Analysis of logical conditions in the contribute and refund functions.
Comparison with the protocol's business logic described in the documentation.
Define explicit behavior for companies with deadline = 0
: either ban such campaigns, or treat them as indefinite, but without the possibility of refund.
Add a check so that when deadline = 0
, the rand function returns an error, or change the condition to check that deadline must be a positive value.
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.