OrderBook

First Flight #43
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: high
Likelihood: medium
Invalid

Single Point of Failure in Contract Ownership

Root + Impact

Description

The contract uses OpenZeppelin's `Ownable` pattern with a single owner address that has complete control over critical functions. This creates a single point of failure where the compromise or loss of the owner's private key can severely impact the protocol.
// Root cause in the codebase with @> marks to highlight the relevant section

Risk

Impact:

Risk scenarios include:
- Owner key compromise leading to malicious actions
- Loss of owner key resulting in inability to manage protocol
- Social engineering attacks targeting the owner
- No redundancy or recovery mechanisms

Proof of Concept

All critical functions use onlyOwner modifier
Functions controlled by single owner:
- setAllowedSellToken()
- emergencyWithdrawERC20()
- withdrawFees()
- Any future administrative functions
modifier onlyOwner() {
_checkOwner();
_;
}

Recommended Mitigation

Implement multi-signature wallet ownership using Gnosis Safe or similar
Add role-based access control with separate roles for different functions
Implement governance mechanisms for critical decisions
Add owner rotation capabilities with proper transition
Updates

Lead Judging Commences

yeahchibyke Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!