Malicious lender can increment the loan interest using the auction process making the borrower to pay more interests from his loan.
The malicious lender can abuse of the auction process in order to increment the borrower loan interests. Please see the next scenario:
Malicious lender create the pool1 and borrower borrows 100 debt token from the pool at 0.1% interest.
Malicious lender starts an auction for the loan using the startAuction() function.
Now, anybody can buy the auctioned loan using the buyLoan() function. If there is an intention from someone to buy the auctioned loan, the malicious lender frontrun the transaction and cancel the auction via the giveLoan() function, so now the buyLoan() will be reverted because the loan is NOT in auction.
The malicious lender repeat the process until nobody cares about the auctioned loan. So now the malicious lender can wait until the end of the auction process and get the maximum possible interest.
Now, the malicious lender can call buyLoan() and assign the loan to a malicious pool which has an maximum possible interest.
The borrower loan interest has increased by a malicious lender.
I created a test where the malicious lender1 increments the loan interest rate from 0.1% to 1000%. Test steps:
Lender1 creates a pool with 1000 balance, 0.1% interest rate and auction length 1 days.
Borrower borrows 100 debt and put 100 collateral.
Lender1 starts an auction
There is an interested pool in buying the loan but Lender1 frontrun an restart the
auction via giveLoan(), so the loan is not possible to buy.
Auction is restarted. Debt is the same 100 tokens, collateral balance is the same 100 tokens
and Pool balance is the same 900 tokens.
It is not possible to buy the loan since the auction was restarted in the step 3.
Lender1 creates a malicious pool in coalition with a malicious actor.
The malicious pool will have the maximum interest 1000%. This new pool can be a pool from the same lender using
another private key.
Lender1 starts the auction again and warp to the end of the auction.
Lender1 buys the auctioned loan to his malicious pool. Now the loan has a 1000% interest.
The lender1 maliciously increments the loan interest.
Malicious lender can make the borrower to pay more interests for the loan without the borrower's consent. Since the interests can be incremented to 1000% the borrower may not be prepared to this increment and lost his collateral.
Manual review
Don't allow the lender to set the same pool the loan has in the giveLoan() function so the auction can not be restarted and a malicious lender can not restart the auction and benefit from this process.
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.