buyLoan
should not be callable by anyone. It allows moving of bad loans away to other pools.
If I own a pool, and I get too many bad loans in the pool, like with bad rates, or bad borrower, then I can just start an auction on those loans, and accept it on behalf of any pool owner. That is, transfer bad loans to other pools without the explicit approval of the pool owners.
Link to code - https://github.com/Cyfrin/2023-07-beedle/blob/main/src/Lender.sol#L465
Code Review
Add a check in buyLoan
so that only the pool owner can accept the loan.
NeoCrao
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.