Users could get liquidated while the LendingPool contract is paused, and by this prevent the user from repaing the debt and closing the liqudation before the grace period ends.
Due to the reason that the LendingPool has not enforced the whenNotPaused modifier for the finalizeLiquidation a user could get liquidated without having the chance to repay his/her debt and close the liquidation before the end of the grace period.
The reason for this is because both the repay and closeLiquidation functions requiere the contract not to be paused in order to be accessed while the finalizeLiquidation function does not. This opens up a scenario when an users health factor goes bellow the liquidation threshold and somone calls initiateLiquidation for that user. If the LendingPool contract gets paused before the user is able to reapay his/her debt and close the liquidation we might end up in a scenario when the pause period of the contract is longer than the grace period for the liquidation and after the grace period has passed the Stability Pool can call finalizeLiquidation for that user and liquidate him/her even while the contract is still paused.
User could get unfairly liquidated without having the chance to repay debt and improve collaterall health.
Finalization of liquidations is possible to be called while the contract is in a paused state.
Manual Review
Unit test
Copy this test and put it in the LendingPool.test.js file inside of the <describe("Liquidation")> test suite
Console log output:
Enable user either to:
Repay debt while the contract is paused and close liquidation.
Deposit more collateral and enable partial liquidation to bring back position to a healthy state.
Pause liquidations while the contract is paused and introduce a grace period for repaymet after the contract is unpaused.
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.