20,000 USDC
View results
Submission Details
Severity: medium

buyLoan function doesn't check min loan and collateral ratio

Summary

buyLoan function doesn't check min loan and collateral ratio for the pool

Vulnerability Details

Each pool has min loan amount and min collateral ratio allowed. This is needed in order to not receive unwanted loans.
However, buyLoan function doesn't check that variables and as result it's possible that loan will be bought with debt that is less than pool's min loan amount or collateral will be provided not enough according to the pool's collateral ratio.

Impact

Unwanted loan can be purchased.

Tools Used

VsCode

Recommendations

Add such checks as it's done here

Support

FAQs

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