An erroneously multiplication with liquidationThreshold
allows borrowers to borrow more than the value of collateral deposited.
Borrowers can deposit RAACNfts as colateral in LendingPool
and borrow against them.
borrow function has the following check: if(collateralValue < userTotalDebt.percentMul(liquidationThreshold))
liquidationThreshol
is initialized to BASE_LIQUIDATION_THRESHOLD = 80 * 1e2;
and can't be set to a value bigger than 1e4
Going back to borrow
's check and using the initialization's value for liquidationThreshold
, we have the following:
This means that borrower can borrow an amount up to 25% greater than the collateral's value.
Repeating this cycle (buy NFT, deposit it as colatereal, borrow), anyone can drain the pool.
There's a second instance of this erroneously multiplication in withdrawNft function.
Anyone can drain the LendingPool
.
Multiply liquidationThreshold
by collateralValue
, not userTotalDebt
.
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.