Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions docs/PiRC-254-Ultimate-Circuit-Breakers.md
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
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