The LendingPool contract's liquidation mechanism becomes unfair when the contract is paused, as users cannot repay their debt or close liquidations during the pause period, yet their grace period continues to elapse. When the contract is unpaused, users might immediately face liquidation without having had a fair chance to resolve their position.
The issue manifests in several connected parts of the code:
The vulnerability arises from:
The whenNotPaused
modifier on both closeLiquidation()
and repay()
functions
The grace period timer (liquidationStartTime + liquidationGracePeriod
) continues counting during pause
No mechanism to extend grace period to account for pause duration
Users must repay almost all debt (below DUST_THRESHOLD) to close liquidation
Users could lose their collateral unfairly due to protocol pause
Grace period becomes meaningless if significant portion is during pause
Creates systemic risk during market stress when protocol might be paused
Violates principle of fair liquidation mechanics
Manual code review
Add pause duration compensation to grace period checks.
Add minimum grace period after unpause.
Alternative: Pause liquidation timers during protocol pause.
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.