A vulnerability stems from the lendingPool and stabilityPool contracts where there is no effective incentive mechanism to encourage the liquidation of small positions. These small positions become uneconomical to liquidate due to high gas costs relative to potential profit. This could lead to unliquidatable positions that accrue interest indefinately, posing a risk of accumulating bad debt and threatening the protocol's solvency. The current liquidation process lacks an explicit bonus, and an apparent profit from transferring scaled amounts is a bug rather than a designed incentive.
The LendingPool contract allows users to deposit NFTs of any value as collateral and borrow against them without a minimum size requirement. The liquidation process, executed via finalizeLiquidation and triggered by StabilityPool.liquidateBorrower, involves the StabilityPool paying the user's debt in crvUSD and receiving the NFTs as collateral. However no additional reward or incentive is attached to offset the gas cost for liquidation, particularly for small positions.
. Transfers amountScaled (incorrectly less than user's debt) and NFTs with no bonus.
. should transfer userDebt to maintain solvency.
. No logic to claim or calculate a liquidation incentive
. Approves an inflated scaledUserDebt instead of userDebt.
Small positions remain open as liquidation cost exceed rewards accruing intrest via reserve.usageIndex and increasing DebtTokenBalances.
Over-collateralised debt grows, potentially leading to the protocol's insolvency.
Manual review
Add a liquidation bonus in LendingPool
In finalizeLiquidation, transfer userDebt instead of amountScaled to maintain protocol solvency.
In liquidateBorrower, approve userDebt instead of scaledUserDebt.
Add checks in depositNFT to avoid low-value NFTs.
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.