The buyLoan function allows everybody who has a loan with a started auction to grief a pool set by some lender. The loan collateral and loan tokens are not required to be the same as the collateral and loan tokens of the pool. The whole pool balance can be locked away forever for almost no cost to the attacker.
The buyLoan function allows everybody who has a loan with a started auction to grief a pool set by some lender. The loan collateral and loan tokens are not required to be the same as the collateral and loan tokens of the pool. The whole pool balance can be locked away forever for almost no cost to the attacker. The pool lender will lose all of his loan tokens supplied to the Lender contract, and won't be able to withdraw the collateral as their is another griefing attack. Loans can't be bought or seized, as the malicious borrower can always call refinance with the same parameters of his borrow, and thus only pay gas and reset the loan.auctionStartTimestamp == type(uint256).max (this is another vulnerability as the root of the issue is different). If the pool lender offers ETH for BTC the looses will be big, as there is no whitelist mechanism so an attacker can just deploy two ERC20 contracts, mint however tokens he wants to himself, set up a pool, borrow from his own pool, and then call buyLoan and give the loan to the pool lender he wants to grief. The loan.debt will be substracted from the pool.poolBalance of the pool he wants to grief.
Those are the outputs
With exact calculations almost all of the attacked pool loan tokens can be locked.
All of the supplied loan tokens of the pool lender will be locked as the loan.debt will be substracted from pool.poolBalance, due to the fact that the attacker didn't deposit any collateral required by the pool, the lender won't be able to withdraw any collateral.
Manual Review
In the buyLoan function check that the function is being called by the pool lender, and check if the loan and collateral tokens of the loan match with the ones in the pool.
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.