SNARKeling Treasure Hunt

First Flight #59
Beginner FriendlyGameFiFoundry
100 EXP
Submission Details
Impact: medium
Likelihood: high

Owner Centralization Risks

Author Revealed upon completion

Root + Impact

Description

  • The owner should not be able to circumvent the treasure hunt reward mechanism.

  • Current implementation let the owner circumvent the treasure hunt reward mechanism.

// file `TreasureHunt.sol` throughout

Risk

Likelihood:

  • Reason 1: The owner can circumvent the treasure hunt reward mechanism at his/her will.

Impact:

  • Impact 1: The owner has unilateral power to:

    • updateVerifier() when paused — can swap to malicious verifier

    • emergencyWithdraw() when paused — can drain entire contract

    • pause() indefinitely — can freeze all claims without deadline

    These centralization risks allow the owner to circumvent the treasure hunt reward mechanism.

Proof of Concept

The owner has unilateral power to:

  • updateVerifier() when paused — can swap to malicious verifier

  • emergencyWithdraw() when paused — can drain entire contract

  • pause() indefinitely — can freeze all claims without deadline

These centralization risks allow the owner to circumvent the treasure hunt reward mechanism.

Recommended Mitigation

Implement timelocks for critical operations, require multi-sig for verifier updates, and add automatic unpause deadlines.

Support

FAQs

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

Give us feedback!