Skip to content

[CRITICAL] No pause/circuit-breaker mechanism — cannot halt system in emergency #171

Description

@grantfox-oss

Summary

None of the four contracts (prediction_market, pulse_token, referral_registry, leaderboard) implement an emergency pause or circuit-breaker. If a vulnerability is discovered or a dependency is compromised, there is no way to halt risk-creating operations until a code fix is deployed.

Impact

  • During an active exploit, new bets, mints, and referrals continue to flow in, amplifying losses.
  • Users cannot exit safely — cancel_refund and claim may depend on compromised state.
  • The only mitigation is an upgrade, which itself requires an admin key (see issue: arbitrary WASM replacement).

Fix

  • Add a Pausable trait to every contract with a set_paused(bool) admin entry point.
  • Block all state-mutating entry points while paused: place_bet, create_market, resolve_market, cancel_market, mint, transfer, burn, register_referral, credit.
  • Keep read-only and recovery paths open: balance, total_supply, get_payout, claim (so users can still exit).
  • Emit a Paused / Unpaused event for off-chain monitoring.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSThird CampaignCampaign: Third CampaigncriticalCritical severity - funds at riskhardExtremely difficult to resolvesecuritySecurity vulnerability

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions