RustFund

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

Immediate Refunds risk

Summary : Immediate Refunds Allowed if Deadline Is Not Set in fund_create allowing refunds to be claimed immediately.

Vulnerability Details: In the refund function, if the deadline is not set (i.e., deadline = 0), the condition deadline > current_time fails, allowing refunds to be claimed immediately. This may not align with the intended behavior where refunds should only be possible after a certain period.

Impact - Contributors can claim refunds at any time if the deadline is not set, potentially disrupting the funding process.

  • This could lead to funds being withdrawn prematurely, affecting the fund’s ability to reach its goal.

Recommendations

+ Modify the refund logic to prevent refunds if the deadline is not set or has not passed.
+ if fund.deadline == 0 || fund.deadline > current_time { return Err(ErrorCode::DeadlineNotReached.into());}
Updates

Appeal created

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

Possible refund before the deadline is initialized

Support

FAQs

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