A lender can update his loans interestRate
by buying his own loans.
Currently there is no check inside buyLoan
which checks if the buyer of the loan isn't the same as lender the loan. Because of this, the loan lender can change interestRate
on old loans. The lender will only lose a few tokens as he has to pay protocolInterest
.
The malicious lender can also call updateInterestRate
before buying his loan as setPool
also changes the interestRate
.
The example is an extreme one, where the lender can set the interestRate
to a massive value.
POC:
A malicious lender can change the interestRate
of loans that were already taken out on his pool, effectively increasing his profits.
Manual review
Foundry
Don't allow the lender of the loan to buy his own loan.
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.