Loan collateral may be locked as the borrower can be prevented from ever repaying
When the buyLoan function of the Lender contract is called, there is no check to assert that the caller is the owner of the pool id being passed into the function but there are assumptions in the function that the caller is the owner. This causes data corruption and the caller is set as the new loan lender and since during repayment (repay), the pool id is calculated based on the loan lender, the calculated pool id would be wrong.
Loan collateral can't be recovered by the borrower as loan can't be repaid
Foundry
Add a check at the beginning of the buyLoan function to ensure msg.sender == pools[poolId].lender
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.