RustFund

First Flight #36
Beginner FriendlyRust
100 EXP
View results
Submission Details
Severity: medium
Invalid

No upper limit on the deadline of a fund

Summary

The function validates that the deadline is in the future but doesn’t enforce an upper limit, potentially allowing deadlines far beyond reasonable use cases.

Vulnerability Details

Fund creator sets deadline = u64::MAX;

Contributors might not realize the fund is effectively permanent.

Impact

Contributors can never get refunds because the creator set a deadline that's unrealistic and the goal will never be reached in many scenarios.

Tools Used

Manual review

Recommendations

Add an upper bound (e.g., 1 year from now).

`let clock = Clock::get()?;

let max_deadline = clock.unix_timestamp as u64 + 31_536_000; // ~1 year

require!(deadline <= max_deadline, ErrorCode::DeadlineTooFar);`

Updates

Appeal created

bube Lead Judge 2 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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