Missing checks for if caller is pool lender when buys a loan.
User is expected to own a pool to buy a loan, however, such check is missing in buyLoan(uint256 loanId, bytes32 poolId).
buyLoan can be called by anyone without owning the pool assoicated with the poolId parameter, results in anyone can get a loan for free.
Pool owner can lose money without getting a loan.
Manual Review
Add checks for if caller is pool lender to buyLoan.
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.