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-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
21 changes: 21 additions & 0 deletions docs/PiRC-234-Synthetic-RWA-Generation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# PiRC-234: Synthetic RWA Generation

## 1. Executive Summary
This standard defines the minting of synthetic digital derivatives backed by the yield and value of physical Real-World Assets (RWAs), utilizing PiRC-214 Oracles.

**Dependencies**: PiRC-213, PiRC-214
**Status**: Complete reference implementation

## 2. Architecture
- Synthetic asset minting engine
- Oracle-driven price and yield feeds
- Over-collateralization requirements for synthetics

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

## 4. Implementation Roadmap
- Phase 1: Synthetic minting logic
- Phase 2: Oracle integration for price feeds
- Phase 3: Yield distribution mechanisms