Skip to content

[NF-07] [CONTRACT] Emergency Pause / Circuit Breaker #82

Closed

Description

@wumibals

Overview

There is no way to halt user-facing operations during an active incident (e.g. a discovered bug being actively exploited). This issue adds a Guardian-multisig-gated pause switch.

Problem

VaultRouter.deposit/withdraw/early_exit have no paused/unpaused check anywhere. If a critical bug were discovered in production, the only mitigation available today is the 72-hour Governance timelock (too slow for an active exploit) — there is no fast-acting stop mechanism at all, for any role.

Proposed Solution

  • Add DataKey::Paused (bool) to VaultRouter.
  • Add pause() / unpause(), both requiring auth from the Guardian address (the same address registered in Governance, ideally the multisig from NF-06 so no single key can pause/unpause unilaterally).
  • Add a require_not_paused() internal check called at the top of deposit, withdraw, and early_exit. Deliberately do not gate read-only functions like position() — users must still be able to see their funds while paused.
  • Emit a contract event on pause/unpause transitions for off-chain monitoring/alerting.

Acceptance Criteria

  • deposit/withdraw/early_exit all revert with a clear ProtocolPaused error while paused
  • position() and other read-only calls continue to work while paused
  • Only the Guardian address can call pause/unpause
  • Pause/unpause emits an event
  • Unit tests cover: deposit rejected while paused, deposit succeeds after unpause, pause call from non-Guardian address rejected

Activity

  1. Leothosine commented on Jul 16, 2026

    @Leothosine
    Contributor

    Please can i work on this issue. I will deliver beyond expectations. ETA is 1 day/ A well structured, modular and maintainable pr.

  2. grantfox-oss commented on Jul 16, 2026

    @grantfox-oss

    🦊 GrantFox — @Leothosine has been assigned to this issue as part of the Official Campaign | FWC26 campaign!

    Next steps:

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

    Good luck! Track your progress on GrantFox.

  3. grantfox-oss commented on Jul 21, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox as part of the Official Campaign | FWC26 campaign!

    @Leothosine's PR #134 was approved and merged by @wumibals.

    🏆 @Leothosine: You earned 35 FoxPoints for this contribution! Your current tier: Explorer (764 total points). Track your full progress on GrantFox.

    👏 Great work, @Leothosine! Keep contributing to LadderMine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions