Solia saysA pausable contract gates every state-changing function on a `paused` flag, letting the team freeze the system mid-attack while honest withdrawals stay open.
Pausable is an emergency stop: a single boolean (paused) that, when true, causes every guarded function to revert. The pause power is locked to a PAUSER role. Done right, only state-mutating functions get the modifier — read functions stay live, and a special emergencyWithdraw often stays open even when paused.
Pausable is the simplest circuit breaker, and the right one for incident response. More sophisticated variants add automatic triggers (TVL drop > X% → auto-pause). The demo runs three transfers across paused/unpaused states.
Power-ups you unlock
A `paused` boolean gates state-mutating functions
Pause power restricted to a PAUSER role
Read functions stay live; only mutators revert
Often paired with an emergencyWithdraw that bypasses the pause
Simplest form of circuit breaker
The Reentrancy Reaper attacks — common mistakes
Pausing read functions and breaking integrations
Single EOA holds the pause key (single point of failure)
No unpause path (locked forever)
Skipping events on pause/unpause (no on-chain trail)
Boss battleBuild a transfer guarded by `whenNotPaused` and run three calls across paused/unpaused states.