Mystery Box

First Flight #25
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

Centralization Risk and Single Point of Failure

Summary

The MysteryBox contract relies heavily on a single owner address, creating a significant centralization risk and a single point of failure that could compromise the entire system's integrity and functionality.

Vulnerability Details

  • The owner has unrestricted power to:

    • Change box prices (setBoxPrice)

    • Add new rewards (addReward)

    • Withdraw all funds (withdrawFunds)

    • Change ownership (changeOwner)

  • No time-locks or multi-sig mechanisms for critical operations

  • No separation of concerns between different administrative roles

Impact

  • High risk of system compromise if owner's private key is lost or stolen

  • Potential for malicious actions by a compromised or dishonest owner

  • Users must trust the owner completely, contradicting principles of decentralization

  • Possible regulatory concerns due to centralized control

Tools Used

Manual code review.

Recommendations

  1. Implement a multi-signature wallet for ownership and critical functions

  2. Introduce time-locks for significant changes (e.g., price changes, large withdrawals)

  3. Separate administrative roles (e.g., price setter, reward manager, fund manager)

  4. Consider implementing a governance system for major decisions

  5. Add emergency pause functionality with decentralized control

  6. Implement gradual power transition mechanisms for ownership changes

By implementing these recommendations, the contract can significantly reduce centralization risks, enhance security, and improve trust among users by aligning more closely with principles of decentralization.

Updates

Appeal created

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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