RustFund

First Flight #36
Beginner FriendlyRust
100 EXP
View results
Submission Details
Severity: high
Valid

No Funding Goal Check in Refunds (Denial of Service on Campaign Creator)

Summary
Refunds should only be allowed if the campaign fails (amount_raised < goal)
.Currently, contributors can claim refunds even if the campaign succeeds.

Vulnerability Details
The absence of a check to monitor if Funding Goal was reached makes it possible for contributors to claim a refund even when Funding Goal was reached.

Impact
Denial of Service (DoS) on Campaign Creator as they might not receive total funds if any contributor "invokes" refund despite campaign goal being reached.

Tools Used
1. Manual Review

Recommendations

Despite not being an avenue for a direct attack, logic flaw must be patched.

Fixing this ensures contributors cannot refund themselves after a campaign succeeds.

if ctx.accounts.fund.amount_raised >= ctx.accounts.fund.goal {
return Err(ErrorCode::CampaignSucceededNoRefund.into());
}
Updates

Appeal created

bube Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

There is no check for goal achievement in `refund` function

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.