This model incorporates the possibility of suspending the execution of all the functions in the contract in the event of a problem. Since contracts are immutable once deployed; if there are bugs in the contract, the pause feature can be activated to prevent further damage.
The emergency pause functionality must be under the control of the owner or an authorized address. The emergency stop pattern should be avoided at all costs as it goes against the spirit of decentralization, but in cases where centralized control is required, it could be a valid model to include in your contract.
Adding EmergencyStop Solidity pattern.
EmergencyStop pattern
This model incorporates the possibility of suspending the execution of all the functions in the contract in the event of a problem. Since contracts are immutable once deployed; if there are bugs in the contract, the
pause
feature can be activated to prevent further damage.The emergency pause functionality must be under the control of the owner or an authorized address. The emergency stop pattern should be avoided at all costs as it goes against the spirit of decentralization, but in cases where centralized control is required, it could be a valid model to include in your contract.