The audit identified a potential loss of precision in the Lender._calculateInterest(Loan) function. To address this, the report recommends reordering the operations to perform multiplication before division. Thorough testing is advised to ensure accuracy.
Lender._calculateInterest(Loan) function in Lender.sol (lines 720-727) performs a multiplication on the result of a division:
which could lead to a loss of precision due to Solidity's integer division behavior.
Potential loss of precision due to incorrect ordering of multiplication and division.
Slither
Consider ordering multiplication before division.
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.