The LiquidationBranch.sol
contract lacks an "emergency pause" mechanism, a crucial security feature in DeFi projects. While the MarketMakingEngineConfigurationBranch
contract provides functions to pause and unpause specific markets, it may not be sufficient to address the need for a comprehensive pause system in the liquidation process, particularly during emergencies, market anomalies, or system upgrades.
The absence of an emergency pause mechanism in the LiquidationBranch.sol
contract exposes the platform to risks in case of a critical bug or unexpected market behavior. Without this feature, an attacker might continue exploiting vulnerabilities, and users may continue to lose funds.
src/perpetuals/branches/LiquidationBranch.sol#L21
The pauseMarket
and unpauseMarket
functions in the MarketMakingEngineConfigurationBranch
contract only apply to specific markets, leaving the broader liquidation process exposed. If a vulnerability is detected in the liquidation system, pausing individual markets may not be sufficient to stop the liquidation of positions in other markets.
src/market-making/branches/MarketMakingEngineConfigurationBranch.sol#L570-L578
Exploitation of Vulnerabilities: If a significant bug is discovered, but there is no way to pause the liquidation system, attackers could exploit the vulnerability and continue extracting user funds.
User Losses: Without the ability to pause all liquidations, users may continue to suffer from ongoing liquidation processes during critical situations.
Inability to Safely Upgrade: The lack of a pause mechanism prevents safe upgrades of the liquidation system, as critical changes or fixes could be applied while the system is still active.
Manual Code Review
It is recommended to implement a liquidation pause mechanism and introduce a flag to pause all liquidation operations across the system. Add checks within the liquidation functions to ensure that no liquidations occur if the system or market is paused.
For example:
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.