Redundant logic in QuantAMMMathGuard._pow()
QuantAMMMathGuard._pow() checks whether _x and _y params are 0 to return one value or another. However, the first if containd redundant logic and it can be simplified in order to save gas when executing the function and make the code more legible, this is possible because in boolean logic : ```a || (a && b) = a```.
Take into account that _pow() function is called with a 'for' loop, which makes that calling this function multiple times could lead to an excessive waste of gas.
Low impact, it prevents a potential waste of gas.
Manual review
Simplify the first 'if' condition:
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.