Any token with a non-18 decimal precision will result in the miscalculation of the loanRatio.
According to the project team's information, the contract supports any ERC-20 token.The contract calculates the loanRatio considering the token's decimal precision as 18. If the token's decimal precision is not 18, this will result in miscalculations, leading to issues in the contract's execution.Some tokens have low decimals (e.g. USDC has 6). Even more extreme, some tokens like Gemini USD only have 2 decimals.Some tokens have more than 18 decimals (e.g. YAM-V2 has 24).This will result in the loanRatio value being much larger or much smaller than expected, a situation the contract is not designed to encounter.
uint256 loanRatio = (debt * 10 ** 18) / collateral;
This will lead to a series of issues with the contract.
vscode
It is recommended to consider tokens with different precisions.
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.