The withdraw
function in the rustfund
smart contract does not verify whether the fundraising goal has been met before allowing withdrawal. This creates a business logic flaw where fund creators can withdraw funds prematurely, even if the campaign has only raised a small fraction of the goal.
This violates the expected behavior of a crowdfunding platform, where funds should only be withdrawn if the campaign is fully funded. If exploited, donors could be misled, leading to fund mismanagement, loss of credibility, and financial fraud.
Vulnerable Code:
Issue:
There is no validation to check whether the fundraising goal has been reached.
A malicious campaign creator could withdraw funds even if only 1 SOL was raised instead of the required amount.
Donors expect that funds will only be withdrawn if the goal is met, but this assumption is broken.
Loss of donor trust – Contributors assume their money will only be used if the campaign succeeds.
Fraudulent fundraising – Scammers can withdraw funds early without delivering on their promises.
Misallocation of funds – A campaign raising only 10% of its goal can still withdraw, potentially leaving projects underfunded.
Manually
Fixed Code:
}
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.