The withdraw
function in the RustFund program allows the creator to withdraw all raised funds without verifying if the campaign's funding goal has been met, potentially enabling premature or unauthorized withdrawals.
In the current implementation of the withdraw
function:
There is no check to ensure fund.amount_raised >= fund.goal
before allowing withdrawal
No validation of deadline
The creator can withdraw any amount raised at any time, regardless of whether the campaign succeeded
This contradicts the crowdfunding model where funds should only be withdrawable if the campaign meets its goal.
Funds Misuse: Creators can withdraw partial funds before reaching the goal, potentially abandoning the project
Contributor Trust: Contributors may lose confidence if funds can be withdrawn without meeting stated goals
Financial Loss: Contributors might not receive refunds if funds are withdrawn prematurely
Program Integrity: Undermines the intended functionality of a goal-based crowdfunding platform
Manual code review
Modify the withdraw
function to include goal verification and deadline passed checks.
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.