Different market conditions can cause liquidation to happen at any point, but this contract cannot liquidate users if the contract is paused. Even when the liquidation bots are active, I believe this should be amended
//@audit-issue cannot liquidate user when contract is paused
function liquidate(address account, IProduct product)
external
nonReentrant
notPaused
isProduct(product)
settleForAccount(account, product)
Impact
Liquidation fails and protocol looses funds that could have been protected if liquidation was possible.
josephdara
medium
Liquidation Reverts
Summary
Liquidation cannot occur when contract is paused
Vulnerability Detail
Different market conditions can cause liquidation to happen at any point, but this contract cannot liquidate users if the contract is paused. Even when the liquidation bots are active, I believe this should be amended
Impact
Liquidation fails and protocol looses funds that could have been protected if liquidation was possible.
Code Snippet
https://github.com/sherlock-audit/2023-05-perennial/blob/main/perennial-mono/packages/perennial/contracts/collateral/Collateral.sol#L108-L135
Tool used
Manual Review
Recommendation
Enable liquidation even with a paused contract