I'm not sure but, IMO, this enum of MathError might be for an identification, so for example if there is an error exception of DivByZero with some number, we can easily identified which part of code raising the error by checking the id.
Assuming it is for identification, there should be different parameter for each of the enums. Means, for example the DivByZero parameter id should not duplicate.
But if we look at DivByZero, there are two 61 ids, in fees.rs, this should not be the case. Thus this is a Low issue.
Github username: -- Twitter username: -- Submission hash (on-chain): 0x1f8723a1839e4aca2cf586aa36fd70ccca364fca72be213b6369662a384c215b Severity: low
Description: Description:
There is this enum of
MathError
I'm not sure but, IMO, this enum of MathError might be for an identification, so for example if there is an error exception of
DivByZero
with some number, we can easily identified which part of code raising the error by checking the id.Assuming it is for identification, there should be different parameter for each of the enums. Means, for example the
DivByZero
parameter id should not duplicate.But if we look at
DivByZero
, there are two61
ids, infees.rs
, this should not be the case. Thus this is a Low issue.Scenario:
Impact:
Wrong logging when there is error exception raised.
Mitigation:
Change one of the
61
id to some other number