-
Notifications
You must be signed in to change notification settings - Fork 164
🛑 PR 19: Circuit Breakers & Catastrophic Recovery (254/255) #155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
docs/PiRC-254-Ultimate-Circuit-Breakers.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # PiRC-254: Ultimate Circuit Breakers | ||
|
|
||
| ## 1. Executive Summary | ||
| This standard defines the "Ultimate Circuit Breaker" for the Pi Network DeFi ecosystem. It acts as a global failsafe that can pause all protocol interactions if a catastrophic Parity Invariant failure or massive TVL drain is detected. | ||
|
|
||
| **Dependencies**: PiRC-207, PiRC-230 | ||
| **Status**: Complete reference implementation | ||
|
|
||
| ## 2. Architecture | ||
| - Global pause functionality across all PiRC standards | ||
| - Automated triggers based on TVL velocity and Parity deviation | ||
| - Multi-sig or governance-driven unpause mechanisms | ||
|
|
||
| ## 3. Reference Smart Contracts | ||
| **Solidity**: `contracts/PiRC254CircuitBreaker.sol` | ||
| **Soroban**: `contracts/soroban/src/circuit_breaker.rs` | ||
|
|
||
| ## 4. Implementation Roadmap | ||
| - Phase 1: Global pause modifiers | ||
| - Phase 2: Automated TVL and Parity triggers | ||
| - Phase 3: Gradual unpause and recovery routing |
21 changes: 21 additions & 0 deletions
docs/PiRC-255-Catastrophic-Recovery-Protocols.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # PiRC-255: Catastrophic Recovery Protocols | ||
|
|
||
| ## 1. Executive Summary | ||
| This standard outlines the emergency recovery protocols to be executed in the event of a circuit breaker activation (PiRC-254). It provides mechanisms for state rollbacks, emergency withdrawals, and Justice Engine reallocation. | ||
|
|
||
| **Dependencies**: PiRC-254, PiRC-228 | ||
| **Status**: Complete reference implementation | ||
|
|
||
| ## 2. Architecture | ||
| - Emergency withdrawal windows (pro-rata distribution) | ||
| - State snapshot and rollback coordination | ||
| - Justice Engine recovery execution | ||
|
|
||
| ## 3. Reference Smart Contracts | ||
| **Solidity**: `contracts/PiRC255CatastrophicRecovery.sol` | ||
| **Soroban**: `contracts/soroban/src/catastrophic_recovery.rs` | ||
|
|
||
| ## 4. Implementation Roadmap | ||
| - Phase 1: Emergency pro-rata withdrawals | ||
| - Phase 2: State snapshotting mechanisms | ||
| - Phase 3: Full Justice Engine recovery integration |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.