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

Unused Error Declarations

Summary

In the MathMasters Solidity library, there are several error declarations that are defined but not utilized within the code. Specifically, the errors MathMasters__FactorialOverflow(), MathMasters__DivWadFailed(), and MathMasters__FullMulDivFailed() are declared but never thrown in any of the functions. This can lead to confusion and potential oversight in error handling mechanisms.

Vulnerability Details

The MathMasters library defines three errors: MathMasters__FactorialOverflow, MathMasters__DivWadFailed, and MathMasters__FullMulDivFailed. However, upon inspection of the library’s functions, it appears that these errors are never used to handle exceptional cases.

Impact

While this issue does not directly lead to security vulnerabilities, it does impact code clarity and maintainability. Unused error declarations can mislead developers and auditors about the potential failure modes of the library.

Tools Used

Manual revision

Recommendations

Remove Unused Errors: If these errors are truly unnecessary (i.e., the operations they would guard against are not present or are handled differently), they should be removed to avoid confusion.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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