A malicious user can call buyLoan()
with another's pool and break the repayment mechanism.
buyLoan()
is used to buy loans under the active auction.
But it doesn't validate if msg.sender
is the pool owner and sets msg.sender
as a lender of the loan.
As a result, the loan will save the wrong address as a lender and the repaying logic won't work.
There is a normal loan between lender A
and borrower B
. And another lender AA
has a similar pool to A
's.
After A
starts an auction with B
's loan, an attacker calls buyLoan()
with AA
's pool.
Then the loan's new lender will be the attacker instead of AA
here although the attacker doesn't have any pools.
Also, when B
tries to repay using repay()
, it will revert because it generates the wrong poolId
here with the wrong lender address(attacker).
So the borrower can't repay his loan forever.
Borrowers wouldn't repay their loans forever.
Manual Review
buyLoan()
should validate msg.sender
is the pool owner.
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.