There is a precision loss issue in costInEuros
calculation.
The distributeAssets()
of LiquidationPool.sol contract calculates `costInEuros`` as below:
Notice, there is division before multiplication here:
This can cause loss of precision.
costInEuros
amount will be calculated less than it actually is. Thus, This check can never be reached:
Which results in _position not being completely removed in case that the euro cost of the portion of position stake that user should have is actually less than the euros that user active position has.
Position can never be liquidated.
Manual Analysis
The code should be modified as below:
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.