Borrowers may lose their entire collateral when a lender initiates a refinancing auction, and anyone matches an auction with a newly created pool containing worthless tokens.
When a lender no longer desires to continue lending, and there is no lending pool available to provide the loan, they can send the loan to a liquidation auction. Anyone is then able to match an arbitrary pool with a live auction when the parameters of that pool match those of the auction or are more favorable to the borrower. This assumption can lead to a situation where the borrower, immediately after receiving the loan, is unable to repay it and loses their collateral.
Let's assume the following example situation:
The borrower requests a loan from an arbitrary pool X.
Immediately after the loan execution, the lender starts a refinance auction.
The attacker creates a pool by providing some worthless, previously deployed ERC20 tokens as loanToken and collateralToken, and then buys a loan, passing the newly created pool as a function argument. The lender's pool receives back the debt and accrued interest.
The borrower cannot repay their loan, as the function reverts since it tries to subtract the repaid debt from outstandingLoan, which in the newly created pool is equal to 0.
Borrowers may lose their collateral immediately after receiving a loan.
Manual review
Rethink the design of refinance auctions.
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.