20,000 USDC
View results
Submission Details
Severity: high
Valid

Missing checks for if caller is pool lender when buys a loan

Summary

Missing checks for if caller is pool lender when buys a loan.

Vulnerability Details

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.

Impact

Pool owner can lose money without getting a loan.

Tools Used

Manual Review

Recommendations

Add checks for if caller is pool lender to buyLoan.

Support

FAQs

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

Give us feedback!