Skip to content

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

Closed

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.

Activity

  1. added
    criticalCritical severity - funds at risk
    securitySecurity vulnerability
    hardExtremely difficult to resolve
    GrantFox OSSIssue tracked in GrantFox OSS
    on Aug 23, 2026
  2. Killerjunior commented on Aug 23, 2026

    @Killerjunior
    Contributor

    Hi maintainer, I have read and understood the issue requirements and checked the necessary documentation. I’m confident I can work on this task effectively and deliver a proper solution.

  3. Samaro1 commented on Aug 23, 2026

    @Samaro1

    Gm gm boss. I would like to take this one on. I can add a Pausable trait with a set_paused admin entry point to each of the four contracts, block the listed state-mutating entrypoints while paused while keeping balance, total_supply, get_payout, and claim open so users can still exit, and emit the Paused/Unpaused events for off-chain monitoring. Please assign it to me.

  4. grantfox-oss commented on Aug 23, 2026

    @grantfox-oss
    Author

    🦊 GrantFox — @Killerjunior has been assigned to this issue as part of the Third Campaign campaign!

    Next steps:

    1. Open a Pull Request referencing this issue (e.g., Closes #171)
    2. Your PR will be reviewed by the SPulse-Org maintainers

    Good luck! Track your progress on GrantFox.

  5. grantfox-oss commented on Aug 30, 2026

    @grantfox-oss
    Author

    🎉 This issue has been marked as completed on GrantFox!

    @Killerjunior's PR #199 was approved and merged by @Muyideen-js.

    🏆 @Killerjunior: You earned 45 FoxPoints for this contribution! Your current tier: Specialist (3,248 total points). Track your full progress on GrantFox.

    👏 Great work, @Killerjunior! Keep contributing to SPulse-Org.

  6. added a commit that references this issue on Aug 30, 2026
    b14640c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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