A vulnerability exists in the closeLiquidation function where users can exploit a dust threshold (DUST_THRESHOLD = 1e6) to avoid fully repaying their debt. This could result in a systematic accumulation of uncollectable bad debt, leading to protocol insolvency and preventing full withdrawals for the last users.
The closeLiquidation function allows users to exit liquidation status by ensuring their debt is below the DUST_THRESHOLD. However, due to the way this threshold is implemented, a user can intentionally leave a small portion of debt unpaid (less than DUST_THRESHOLD) and repeatedly exploit this behavior to avoid fully repaying their obligations. Over time, these small unpaid debts accumulate, creating a systemic risk where the protocol accrues bad debt.
A user accumulates a large debt and is marked for liquidation.
Before finalizing liquidation, the user repays most of their debt but ensures the remaining amount is just below the DUST_THRESHOLD.
They call closeLiquidation(), which allows them to exit liquidation status without paying off the remaining small debt.
The process repeats, allowing multiple users to accumulate unpaid small debts.
Over time, the protocol accrues uncollectable debt, leading to insolvency where the last users may be unable to withdraw funds fully.
Accumulation of Bad Debt: Malicious users can repeatedly exploit this loophole, leaving behind small unpaid debts.
Require Full Repayment Before Exiting Liquidation:
Modify the closeLiquidation function to ensure that all debt is cleared, even amounts below the DUST_THRESHOLD.
Example Fix:
The dust amount remains as debt of the user. This continues to accrue interest and will block complete NFT withdrawals if left unpaid.
The dust amount remains as debt of the user. This continues to accrue interest and will block complete NFT withdrawals if left unpaid.
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.