The GMXProcessWithdraw.sol contract performs division before division before multiplication in some instances.
In the following instances the contract contains scenarios where there is divisions before multiplications instances that might lead to issues in the contract"
GMXManager.calcBorrow(GMXTypes.Store,uint256) (contracts/strategy/gmx/GMXManager.sol#70-112)
GMXManager.calcMinTokensSlippageAmt(GMXTypes.Store,uint256,address,address,uint256) (contracts/strategy/gmx/GMXManager.sol#170-214)
GMXManager.calcMinMarketSlippageAmt(GMXTypes.Store,uint256,uint256) (contracts/strategy/gmx/GMXManager.sol#138-156)
GMXManager.calcMinTokensSlippageAmt(GMXTypes.Store,uint256,address,address,uint256) (contracts/strategy/gmx/GMXManager.sol#170-214)
GMXManager.calcBorrow(GMXTypes.Store,uint256) (contracts/strategy/gmx/GMXManager.sol#70-112)
GMXManager.calcMinTokensSlippageAmt(GMXTypes.Store,uint256,address,address,uint256) (contracts/strategy/gmx/GMXManager.sol#170-214)
In the above highlighted codes, there is performance of multiplication on the result of a division. Solidity's integer division truncates. Thus, performing division before multiplication can lead to precision loss.
Manual Review
Consider ordering multiplication before division.
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.