https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/pools/LendingPool/LendingPool.sol#L496
https://github.com/Cyfrin/2025-02-raac/blob/main/contracts/core/pools/LendingPool/LendingPool.sol#L375
Currently key functions like repay and closeLiquidation have a `whenNotPaused` modifier while the finalise liquidate does not have the modifier, this means that the finaliseLiquidate could be called when user has no way to save themselves from liquidations when the contract is paused
```javascript
function repay(uint256 amount) external nonReentrant whenNotPaused onlyValidAmount(amount) {
_repay(amount, msg.sender);
}
function repayOnBehalf(uint256 amount, address onBehalfOf) external nonReentrant whenNotPaused onlyValidAmount(amount) {
if (!canPaybackDebt) revert PaybackDebtDisabled();
if (onBehalfOf == address(0)) revert AddressCannotBeZero();
_repay(amount, onBehalfOf);
}
function closeLiquidation() external nonReentrant whenNotPaused {} // logic omitted for simplicity
```
finaliseLiquidate below
```javascript
function finalizeLiquidation(address userAddress) external nonReentrant onlyStabilityPool {} // logic omitted for simplicity
```
# POC
* A user's loan reaches a liquidation threshold, but they cannot repay their debt due to the pause.
* The finalizeLiquidation function remains callable, allowing liquidations to proceed.
* The user’s collateral is liquidated