Malicious lender can front-runs to set interest rate to MAX_INTEREST_RATE, results in a bad loan for the borrower.
When a borrower create a loan by calling borrow, there is no check for the pool interest rate, imagine the following scenario:
Alice submits a transaction to create a loan from a pool;
The pool lender Bob sees Alice's transaction in the mempool, and front-runs to increase the pool interest rate;
Bob's transaction gets executed, pool interest rate is set to MAX_INTEREST_RATE;
Alice's transaction gets executed, loan is created but loan interest rate is MAX_INTEREST_RATE.
More interest rate means more interest, borrower has to pay more tokens to repay.
Manual Review
When a loan is created from a pool, should check if the pool interest rate is expected.
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.