A Malicious Lender can increase the interest rate to a maximum and screw the borrower. This can be done through the function updateInterestRate()
.
In Lender.sol
we have updateInterestRate()
:
This function updates the interest rate for a pool and can only be called by the pool lender.
Imagine the following situation:
A borrower may find a given interest rate advantageous and decide to take out a loan.
During this time, the malicious Lender sees the borrower's transaction in the mempool and immediately makes a front-run attack and increases the interest rate.
The borrower's transaction is then minted but at a higher and undesirable interest rate.
The borrower takes an unwanted loan at the maximum interest rate.
I think you should add a parameter with which a borrower is willing to accept a given interest rate. For example maxInterestRate
.
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.