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
16 changes: 16 additions & 0 deletions docs/PiRC-228-Dispute-Resolution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# PiRC-228: Decentralized Dispute Resolution

## 1. Executive Summary
This standard establishes the "Justice Engine" interface, allowing certified sovereign entities (Judges/Arbitrators) to lock, review, and re-allocate disputed digital assets based on cryptographic consensus.

## 2. Architecture
- Asset locking mechanism via judicial multisig.
- Verifiable dispute case tracking.
- Parity-safe reallocation.

## 3. Reference Smart Contracts
**Solidity**: `contracts/PiRC228JusticeEngine.sol`
**Soroban**: `contracts/soroban/src/dispute_resolution.rs`

**Status**: Ready.

21 changes: 21 additions & 0 deletions docs/PiRC-233-Flash-Loan-Resistance-Standard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# PiRC-233: Flash-Loan Resistance Standard

## 1. Executive Summary
This standard provides mechanisms to protect Pi Network DeFi protocols from flash-loan attacks, utilizing block-delay locks and time-weighted parity checks.

**Dependencies**: PiRC-207
**Status**: Complete reference implementation

## 2. Architecture
- Block-delay locks (preventing same-block deposit and borrow/withdraw)
- Time-Weighted Average Parity (TWAP) checks
- Reentrancy guards with state-sync validation

## 3. Reference Smart Contracts
**Solidity**: `contracts/PiRC233FlashResistance.sol`
**Soroban**: `contracts/soroban/src/flash_resistance.rs`

## 4. Implementation Roadmap
- Phase 1: Same-block execution prevention
- Phase 2: TWAP integration
- Phase 3: Ecosystem-wide rollout