DeFiFoundry
50,000 USDC
View results
Submission Details
Severity: medium
Invalid

Incorrect exponentiation

Summary

Math.mulDiv in libraries/gmx/MarketUtils.sol uses bitwise XOR (^) instead of exponentiation (**), it can lead to incorrect mathematical computations, potentially causing miscalculations

Vulnerability Details

In libraries/gmx/MarketUtils.sol file MarketUtils::applyFactor function uses Math.mulDiv. This mulDiv function uses bitwise xor ^ instead of exponential **

Impact

It can lead to incorrect mathematical computations, potentially causing miscalculations.

Tools Used

Slither

Recommendations

Avoid using Math.mulDiv and use the correct operator ** for exponentiation.

Updates

Lead Judging Commences

n0kto Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Out of scope

Support

FAQs

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

Give us feedback!