Loss of precision
DSCEngine._calculateHealthFactor(uint256,uint256) (src/DSCEngine.sol#324-332) performs a multiplication on the result of a division:
- collateralAdjustedForThreshold = (collateralValueInUsd * LIQUIDATION_THRESHOLD) / LIQUIDATION_PRECISION (src/DSCEngine.sol#330)
- (collateralAdjustedForThreshold * 1e18) / totalDscMinted (src/DSCEngine.sol#331)
slither
I suggest calculating with maximal possible precision.
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.