20,000 USDC
View results
Submission Details
Severity: high

Check for pool.maxLoanRatio is wrong

Summary

Check for pool.maxLoanRatio is wrong and can cause issues.

Vulnerability Details

In setPool of Lender.sol the check for maxLoanRatio is not done correctly, which can enable the borrower to borrow funds greater than the collateral as long as the loanRatio is below pool.maxLoanRatio.

Suppose Alice sets the pool with pool.maxLoanRatio greater than 1 then Bob can deposit 10 ETH as collateral and get 10 * loanRatio as debt which in this case can enable Bob to have debt greater than the deposited collateral.

Impact

Borrower can put down less collateral and can withdraw more debt.

Tools Used

Manual review

Recommendations

pool.maxLoanRatio can be set to be between 0-1.

Support

FAQs

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