Using different decimal loan-collateral token may lead to wrong ratio calculation
For example
uint256 loanRatio = (debt * 10 ** 18) / collateral;
if (loanRatio > pool.maxLoanRatio) revert RatioTooHigh();
with 10^8 decimal token may lead wrong calculation and lead to revert...
(500 * 10 **18 * 10 **18)/(500 * 10 **8)=> even if the ratio is 1 this calcuation will revert by ratio too high
test suit for the malfunction
Cant use tokens with low decimals in protocol for example USDC.
Foundry test suit
Using tokens with same decimals or creating decimal scaling logic
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.