20,000 USDC
View results
Submission Details
Severity: gas
Valid

MaxLoanRatio is not configured properly.

Summary

MaxLoanRatio is the ratio of debt to collateral and should always be multiplied by 10**18. But while setting or updating maxLoanRatio there are no checks.

Vulnerability Details

Pool lender can mistakely or unknowingly set pool.maxLoanRatio more than what it should be when multiplied by 10**18 or while updating maxLoanRatio, pool lender can set it more than what it should be. For example a 200% collateralization is, 5*10**17 but lender can mistakely set/update it to 5*10**18 which is only 20 percent collaterization.

Impact

  1. It causes borrowers to borrow more debt with less collateral.

  2. It may be impossible to give loan to another pool or refinance a loan to another pool.

Tools Used

Manual Analysis

Recommendations

Instead of using ratio multiplied by 10**18 set by the lender, use collateralization percentage and calculate ratio in the contract.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.