Skip to content

feat: emergency pause, upgrade paths, property tests, and threat model (#211–#214) - #509

Open
princessoladele wants to merge 1 commit into
Refract-Protocol:mainfrom
princessoladele:feat/issues-211-212-213-214
Open

princessoladele wants to merge 1 commit into
Refract-Protocol:mainfrom
princessoladele:feat/issues-211-212-213-214

Conversation

@princessoladele

Copy link
Copy Markdown

Summary

This PR addresses four issues covering hardening and documentation for the backstop, bounty, and grants contracts.

Changes

#211 – Emergency Pause & Circuit Breakers

  • Added paused flag and emergency_pause / resume admin entrypoints to backstop, bounty, and grants
  • All mutating entrypoints gate on the pause flag and return an error when paused

#212 – Contract Upgrade & State-Migration Paths

  • Added upgrade entrypoint (WASM hash + optional migration payload) to all four new contracts
  • State-migration hook runs atomically within the upgrade transaction

#213 – Property-Based & Fuzz Tests for Accounting Invariants

  • Added proptest_invariants.rs modules for backstop, bounty, and grants
  • Tests cover deposit/withdraw round-trips, premium conservation, and lot-accounting consistency

#214 – Threat Model Extension

  • Extended GRIEFING_ANALYSIS.md and SECURITY.md to cover the four new contracts with attack vectors, mitigations, and residual-risk ratings

Closes

Closes #211
Closes #212
Closes #213
Closes #214

…l for backstop/bounty/grants

- Add emergency pause / circuit-breaker guard to backstop, bounty, and grants contracts (closes Refract-Protocol#211)
- Add contract-upgrade and state-migration scaffolding for all four new contracts (closes Refract-Protocol#212)
- Add property-based and fuzz tests for accounting invariants across backstop, bounty, and grants (closes Refract-Protocol#213)
- Extend GRIEFING_ANALYSIS.md and SECURITY.md threat-model coverage for the four new contracts (closes Refract-Protocol#214)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant