Division before multiplication leads to minor, yet still unnecessary precision loss.
amountOutX18 = usdAmountInX18.div(indexPriceX18).mul(premiumDiscountFactorX18);
This instance of division before multiplication will lead to minor precision loss, and although minor due to using a fixed point math library, it could still cause dust funds to be stuck in the contract so funds could be lost.
Dust funds stuck in the contract.
Manual review
Multiply before divide to reduce unneeded precision loss.
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.