The mulWad() function has a condition where it reverts with a custom error, but the returned signature is incorrect.
According to the documentation, the custom error should be MathMasters__MulWadFailed() with signature 0xa56044f7, but the returned signature is 0xbac65e5b, which corresponds to MulWadFailed()
In addition, the mstore opcode is overriding the free memory pointer (0x40), which and lead to serious errors. The revert is finally returning 0x00000000 because the first 32-byte slot is not being written.
Dapps or contracts that interact with the contract implementing this library will get incorrect information about the error, and may malfunction.
Foundry, Manual review
This is a test that triggers the revert and expects the custom error signature 0xa56044f7.
Test passes, confirming that the returned signature is empty.
Correct the custom error and memory location.
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.