20,000 USDC
View results
Submission Details
Severity: low

You can buy loan less than minLoanSize specified by the pool

Summary

You can buy loan less than the minLoanSize specified in the pool in the buyLoan function of Lender contract.

Vulnerability Details

There is a minimum limit to which you can buy a loan from a pool which is set as pool.minLoanSize. But while buying loan from the auction, there is no check for this case.

Impact

The pool.minLoanSize is set in the first place to prevent griefing as mentioned in the Structs.sol for struct Pool.

Tools Used

Manual Analysis

Recommendations

Add the following check if (totalDebt < pools[poolId].minLoanSize) revert LoanTooSmall(); after the line:

/src/Lender.sol
486: if (pools[poolId].poolBalance < totalDebt) revert PoolTooSmall();

Support

FAQs

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