A malicious lender can call seizeLoan()
as many times as he wants and charge more collaterals than expected.
After a failed refinance auction, the lender can seize the loan using seizeLoan()
.
And the lender can charge more collaterals from the contract like this.
Alice
knows the contract has 100 ERC777
tokens for other pools.
She creates a pool with collateral = ERC777, loanToken = USDC
and deposits 20000 USDC.
Using other accounts like Alice1
and Alice2
, she creates 2 loans. Alice1
borrows 10000 USDC by providing 100 ERC777
and Alice2
borrows 10000 USDC by providing 1 ERC777
from Alice
's pool.
After that, Alice
starts an auction with Alice1
's loan and calls seizeLoan()
after the auction is failed.
Then Alice
receives 100 ERC777
(assume govFee = 0) instead of 10000 USDC which is profitable for her.
Inside the transfer hook, she calls seizeLoan()
again and receives 100 ERC777
again for Alice2
's loan(10000 USDC).
Totally, Alice
gets 200 ERC777
after providing 20000 USDC.
Alice1
gets 10000 USDC by providing 100 ERC777
.
Alice2
gets 10000 USDC by providing 1 ERC777
.
So Alice group
's total profit will be 99 ERC777
.
A malicious lender can steal more collateral from the contract.
Manual Review
We should add a nonReentrant
modifier to seizeLoan()
.
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.