The issue is about a miscalculation in loan ratio due to decimal ignorance, has been identified where the calculation of the loan ratio does not take into account the decimal difference of the loan token and the collateral token.
The vulnerability arises from the miscalculation in the loan ratio. The current calculation is: uint256 loanRatio = (debt * 10 ** 18) / collateral;
. This calculation does not consider the decimal difference of the loan token and the collateral token, leading to potential inaccuracies in the loan ratio which can result in significant loss to the borrower or the lender depending the decimal of the two tokens.
This vulnerability can lead to significant inaccuracies in the calculation of the loan ratio, which can affect the fairness of the loan terms and potentially lead to financial losses for either the borrower or the lender.
Manual Review
To mitigate this vulnerability, it is recommended to revise the loan ratio calculation to take into account the decimals of the loan token and the collateral token.
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.