The lender and borrower may be colluding in order to extract value from the protocol using the buyLoan()
function.
The buyLoan() function helps to buy a loan using the specified pool. The problem is that buyLoan()
function does not validate that the loan tokens (loanToken, collateralToken) are the same that the pool tokens (loanToken, collateralToken) who will take the loan.
Please see the next test where the lender, borrower and the attacker can be colluded or be the same person and extract value from the protocol. At the end the borrower will not repay the debt, the lender will extract money from the protocol and the debt will be acquired by the malicious pool which has worthless tokens:
Lender1
(malicious actor) creates the legitimate pool with initial 1000 token balance. Borrower
(malicious actor) borrows 100 token debt.
Attacker
creates his pool using malicious tokens (tokens that may be worth nothing).
Lender1
(malicious actor) kicks off the auction.
The Attacker
call the buyLoan()
function using his malicious pool
.
The Lender1
(malicious actor) pool has the loaned amount + interests. Lender1
(malicious actor) can withdraw all his pool balance money.
The malicious pool
has the debt. 1000 initial pool balance - 100 debt tokens - borrow interests.
The lender1
(malicious actor) withdraw his initial deposit (1000 legitimate tokens).
The borrower
(malicious actor) does not repay the debt (100 legitimate tokens).
The malicious pool
has the debt with custom (malicious) tokens that may be worth nothing.
At the end lender1 and borrower maliciously extract 100 tokens from the protocol.
The protocol will lost money by malicious actors who can extract value using malicious pool.
Manual review
Validates that the pool, whoever is assigned the debt, is using the same loanToken
and collateralToken
tokens that the loan has.
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.