RustFund

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

Contribution Amount Not Updated During Contributions

Summary : When a user contributes to a fund, the contribution's amount field is never updated.

Vulnerability Details: In the contribute function, the contribution account is properly initialized, but after the SOL transfer, only the fund's amount_raised is updated. The contribution's amount is never incremented

Impact: This issue causes the refund functionality to fail entirely. Since refunds are based on the amount stored in the contribution account (which remains at 0), contributors will never receive their funds back, effectively losing all contributions if a campaign fails.

Tools Used

Recommendations : Add the following line after updating fund.amount_raised:

contribution.amount += amount;
Updates

Lead Judging Commences

bube Lead Judge
5 months ago

Appeal created

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

Contribution amount is not updated

Support

FAQs

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