The current LendingPool implementation forces full debt repayment to close liquidation,
which deviates from standard practice of partial repayments.
Expected Behavior for Exiting Liquidation
Lending protocols (e.g., Aave, Compound) allow partial repayment to restore a healthy healthFactor
.
To exit liquidation, a user should:
Repay enough debt so their health factor is above 1e18
(safe zone).
Not necessarily repay the entire debt.
Potential Issue with Current Implementation
The following check in closeLiquidation ensures that the current userDebt > DUST_THRESHOLD ( = 1e6),
Meaning the user has fully paid pack the debt.
Liquidation should only prevent bad debt,
not force full repayment if the user is still within safe collateralization levels.
Even though it can be assumed as design choice,
This deserves attention because it puts the unncessary burden on the users and the system,
as there may not be enough entities left to fully repay the debt of every user under liquidation.
Requiring full repayments puts the system and users under unncessary burden
as there may not be enough entities or fund left to fully repay the debt of every user under liquidation.
Instead of full debt repayment, closeLiquidation()
should only require enough repayment to bring the health factor above the liquidation threshold (1e18
).
A reference implementation
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.