In the LendingPool contract, when the protocol is paused, users cannot close their liquidation positions, but the grace period timer continues to count down. This can result in users losing their opportunity to close their position if the grace period expires during the pause, leading to unfair liquidations.
In LendingPool.sol:
Attack Scenario:
Alice's position becomes liquidatable at T=0
Grace period is 3 days (liquidationGracePeriod = 3 days)
At T=1 day, protocol is paused for emergency for 3 days
When protocol unpauses at T=4 days:
4 days > liquidationStartTime + 3 days grace period
Grace period has expired
Alice never had a real chance to close her position during the 3-day pause
Position is now vulnerable to immediate liquidation
High severity. Users can unfairly lose their positions without having the full promised grace period to act:
Grace period expires while users are unable to take action
Users lose their rightful window to save their positions
Can lead to forced liquidations immediately after unpause
Breaks core protocol fairness assumptions about grace periods
Manual Review
Add pause time tracking and adjust grace period checks:
This ensures each user gets their full grace period opportunity regardless of protocol pauses, maintaining fairness in the liquidation process.
Consider also making closeLiquidation() callable during pause as an additional safety measure:
This allows users to close their positions even during protocol pauses, providing additional protection against unfair liquidations.
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.