RustFund

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

Potential integer overflow

Summary

Lack of explicit overflow protection when updating fund amounts.

Vulnerability Details

Simple addition of fund.amount_raised += amount without explicit overflow checks.

Impact

Unexpected behavior with large contribution amounts and accounting inconsistencies

Tools Used

Manual Code Review

Recommendations

Use checked_add() instead of +=

Updates

Appeal created

bube Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

[Invalid] Arithmetic overflow in `contribute` function

The max value of u64 is: 18,446,744,073,709,551,615 or around 18.4 billion SOL, given that the total supply of SOL on Solana is 512.50M, the scenario when the `contribute` function will revert due to overflow is very very unlikely to happen. Therefore, this is informational finding.

Support

FAQs

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