We should integrate OpenZeppelin’s Pausable contract into the system.
This enables an off-chain monitor to pause the protocol when invariants are being violated. Particularly useful for detecting and mitigating non-atomic, multi-transaction exploits.
Motivation
- Many attacks occur across multiple transactions (non-atomic), giving external monitors time to detect anomalies.
- By importing:
import { Pausable } from "@openzeppelin/contracts/utils/Pausable.sol";
we can empower an off-chain agent to pause the system quickly if invariants appear to be breaking.
Pausing helps protect funds and halts state-changing operations until investigation or remediation.
Proposed Implementation
- Inherit
Pausable in core protocol contracts.
- Guard critical state-changing functions with
whenNotPaused.
- Provide a restricted
pause() method controlled by an authorized off-chain agent or guardian role.
References
We should integrate OpenZeppelin’s
Pausablecontract into the system.This enables an off-chain monitor to pause the protocol when invariants are being violated. Particularly useful for detecting and mitigating non-atomic, multi-transaction exploits.
Motivation
we can empower an off-chain agent to pause the system quickly if invariants appear to be breaking.
Pausing helps protect funds and halts state-changing operations until investigation or remediation.
Proposed Implementation
Pausablein core protocol contracts.whenNotPaused.pause()method controlled by an authorized off-chain agent or guardian role.References