Summary
The withdraw
function allows the creator to withdraw funds at any time, without checking if the fundraising goal has been met or if the deadline has passed.
Vulnerability Details
In the withdraw
function:
There is no validation to check if the fundraising goal has been met.
There is no check to ensure that the deadline has passed before allowing withdrawal.
This allows fund creators to withdraw even before the goal is reached or before the deadline expires, which may not align with typical crowdfunding rules.
Impact
The fund creator can withdraw contributions before the goal is reached, which may violate the fundraising intent.
Users may contribute expecting that funds will only be withdrawn if the goal is met, leading to trust issues.
If the deadline hasn’t passed, funds might be withdrawn while users are still trying to contribute.
Tools Used
Manual code review
Recommendations
Before allowing withdrawal, add validation checks:
This ensures that the creator can only withdraw if:
The fundraising goal is met and
The deadline has passed
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.