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.
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.
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.
Manual revision
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.