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

Incorrect revert error returned

Summary

Incorrect revert error returned

Vulnerability Details

The contract uses custom error used for revert statements. The function mulWad wants return the custom error MathMasters__MulWadFailed by using the selector 0xbac65e5b. The issue is, this is the selector for error MulWadFailed() from the Solady lib, but the selector for MathMasters__MulWadFailed is actually 0xa56044f7.

cast sig "MathMasters__MulWadFailed()" => 0xa56044f7
cast sig "MulWadFailed()" => 0xbac65e5b // from solady lib

Impact

Medium impact, but off chain won't be able to decode and display the correct error, as the library does not have this selector.

Tools Used

Manual review, foundry (cast).

Recommendations

Use the correct selector 0xa56044f7 to return MathMasters__MulWadFailed error.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

Wrong error selector

Support

FAQs

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