In function distributeAssets
of LiquidationPool.sol
contract, while calculating the costInEuros
, division is done before multiplication. So this leads to precision loss.
Though the amount of precision loss is not high, but still it will get accumulated to form a high loss.
The vulnerability is present in https://github.com/Cyfrin/2023-12-the-standard/blob/main/contracts/LiquidationPool.sol#L220-L221
This leads to precision loss, which can affect the amount of EUROs each position gets and also might affect the reward.
Manual review
Always do multiplication before division to prevent precision losses.
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.