Dividing cause numbers to be truncated, reducing calculation precision.
When calculating in the _calculateHealthFactor function, if the ending digit of collateralValueInUsd is 1 (ex. 1001), 1 is truncated during calculation. This can result in a calculation error of $1.
Calculation precision is reduced.
vscode
Change the order of calculation to avoid truncating numbers. Since LIQUIDATION_PRECISION is 100, instead of dividing by LIQUIDATION_PRECISION, change the multiplication number 1e18 to 1e16.
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.