In secure smart contract design, best practices recommend an emergency stop (circuit breaker) to allow privileged users (e.g. the owner or governance) to pause critical functionality during emergencies, such as unexpected exploits or system failures.
This contract lacks any pause feature, leaving no mechanism to halt operations like withdrawals, deposits, or state updates once deployed.
Likelihood: High
Critical functions like withdraw()
or deposit()
remain active even in emergencies, and the contract has no ability to restrict usage during attacks.
In high-risk environments or during logic failures, users may continue to interact without interruption.
Impact: Medium
Funds can continue to flow during an attack or bug, potentially exacerbating loss or exposure.
Inability to pause functionality significantly hampers damage control options and may damage protocol trust.
Here’s a simplified scenario illustrating the risk without needing external data:
Explanation:
There is no paused
state variable or whenNotPaused
modifier. Therefore, critical features cannot be disabled in response to an exploit — attackers or users may continue to trigger them indefinitely.
Adopt a pause mechanism to secure critical operations during emergencies.
Alternatively, use OpenZeppelin’s audited Pausable
contract:
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.