Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: high
Valid

Unsafe Casting

Summary

Incorrect type casting or type mismatch while calculating total fees as total fees uint256 and fee is uint64.

Vulnerability Details

TO calculate totalfees, totalFees = totalFees + uint64(fee); is used and as mentioned in summary it is a type mismatch, it can result in unintended behavior.

Impact

If the fees came out to be more than what uint64 can hold, totalfees can be miscalculated.

Tools Used

Manual Review

Recommendations

Use safemath libraries.

Updates

Lead Judging Commences

Hamiltonite Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

unsafe cast of fee to uint64

Support

FAQs

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