The protocol is only operating with tokens that has 18 decimals
Using tokens like: USDC,Yam-v2, Gemini USD
Are not going to cooperated with the protocol
Incorrect calculation of the LTV ratio, potentially allowing borrowers to take more loans than they should based on their provided collateral.
Incorrect calculation of fees and repayments, leading to incorrect amounts being transferred.
Inaccurate representations of loan and collateral values, leading to incorrect assessments of loan health and potential liquidations.
Manual Review
To handle tokens with different decimal precisions correctly, the lending protocol's smart contract should perform conversions to ensure that all amounts are consistent and represented in the same decimal precision. This includes converting the loan amount to match the collateral token's precision before calculating the LTV ratio and performing any other token operations.
For example, if the loan amount is represented with 18 decimals, and the collateral token is represented with 6 decimals, the loan amount would need to be multiplied by 10^12 (10^18 - 10^6) to convert it to a value compatible with the collateral token's precision.
Additionally, it's essential to use standardized libraries or data structures that handle decimal arithmetic correctly, such as using SafeMath for arithmetic operations to prevent overflows or underflows.
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.