As the title suggests, the buyLoan function is missing a minLoanSize check on the totalDebt.
Functions like giveLoan have the following check:
if (totalDebt < pool.minLoanSize) revert LoanTooSmall();
Basically, if the totalDebt is smaller than the minLoanSize, the transaction should revert. But, buyLoan function lacks this check. This means a lender will be able to buy a loan, whose debt is smaller than the pool's minimum size.
This is not consistent with other functions.
A lender is able to buy a loan that is smaller than their pool's minLoanSize.
Manual review
Please mention the following check in the buyLoan function:
if (totalDebt < pool.minLoanSize) revert LoanTooSmall();
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.