Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

mulWadUp is not always accurate

Summary

The mulWadUp is an internal function that is the equivalent of calculating (x * y) / WAD rounded down.

Vulnerability Details

The mulWadUp function gives the accurate result in most cases but upon running fuzzing on it, i discovered that the value 3323484123583475243233908 and 1661742061791737621616955 causes the function to fail as the results gives a value higher that the expected result. This brings me to the conclusion that the function is not predictable and can result in giving more value than it should when used for calculation.

Impact

The function can lead to loss of funds if used in defi contract as it is giving out more value than it should and this can lead to users losing their funds.

Tools Used

Foundry

Recommendations

The mulWadUp should be modified to work as designed

Updates

Lead Judging Commences

inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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