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
15 changes: 15 additions & 0 deletions PI_RC_OFFICIAL_SUBMISSION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Official Proposal Submission: PiRC-101 Protocol

**Date:** March 13, 2026
**Lead Architect:** Muhammad Kamel Qadah
**Target Implementation:** Mainnet V2 Transition

## Summary
PiRC-101 introduces the **Reflexive Economic Controller** to stabilize the Pi ecosystem.
By anchoring Mined Pi to a 2.248M USD/REF purchasing power, we protect Pioneers from external volatility.

## Direct Asset Links
- **Logic**: `contracts/`
- **Simulations**: `simulations/`
- **Verification**: `scripts/full_system_check.sh`

191 changes: 190 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
@@ -1 +1,190 @@
See [PiRC1: Pi Ecosystem Token Design](./PiRC1/ReadMe.md)
**# PiRC: Pi Requests for Comment**
**Sovereign Monetary Standard & Long-Term Utility Economy Framework for the Pi Network**

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Netlify Deploy](https://img.shields.io/badge/Deploy-Netlify-blue)](https://app.netlify.com)
**Stars:** 6 | **Forks:** 2 | **Language Breakdown:** Python • Rust • HTML • JavaScript • Solidity

---

## 🌟 Overview

**PiRC** is a professional research and prototyping repository for modeling the **long-term utility-driven economy** of the Pi Network ecosystem.

It combines:
- **Rust-based smart-contract prototypes** (liquidity bootstrap, reward engine, governance, treasury vaults, etc.)
- **Python economic simulation engines** (50-year macroeconomic models, AI-driven stabilizers, agent-based simulations)
- **A live simulated economic dashboard** (Vanguard Bridge – Weighted Contribution Factor telemetry)
- **Formal PiRC proposals** (PiRC-101 Sovereign Monetary Standard, adaptive allocation, engagement oracle, etc.)

The framework studies decentralized exchange liquidity, application growth, human-in-the-loop digital labor, and macroeconomic stability over decades while protecting pioneer contributions through the **Weighted Contribution Factor (WCF)** and **System Efficiency Factor (Φ)**.

**Core Thesis (PiRC-101):**
Create a non-inflationary “Walled Garden” where external speculative IOU prices are decoupled from internal utility-backed Macro Pi, enforced by dynamic quadratic guardrails and Justice-Mined equity ($REF).

**Live Demo** (Netlify deployment): The repository is configured for instant deployment — the **index.html** interface functions as the official **Vanguard Bridge Dashboard** when served via Netlify.

---

## 📊 Core Indicators (Vanguard Bridge)
![1000097918](https://github.com/user-attachments/assets/2da73897-d73d-49c8-ae94-aa77d59b17ec)

PiRC Vanguard Bridge — NOW WITH REAL BUY/SELL DATA!

Live Order Book + Recent Trades from OKX (PI-USDT), MEXC (PIUSDT) & Kraken (PIUSD)
Professional Warehouse Mechanism — full transparency + formulas
Real-time indicators: Spread %, Mid Price, Buy/Sell Imbalance
All formulas displayed:
Mid Price = (Best Bid + Best Ask) / 2
Spread % = ((Best Ask - Best Bid) / Mid Price) × 100
Buy Imbalance = Buy Volume / Total Volume × 100
WCF Parity = Macro Pi × 10,000,000 × IOU Price

Live Demo (100% free, no registration):
https://c5d0b78a-8ece-460f-b8b4-64709c799a5e-00-3ag91petmaehl.pike.replit.dev

GitHub (full source + warehouse data):
https://github.com/Ze0ro99/PiRC

One click — everything works. Fully professional. Zero cost.

| Metric | Description | Purpose |
|-----------------|--------------------------------------------------|--------|
| **WCF** | Weighted Contribution Factor | Protects long-term pioneers |
| **Φ (Phi)** | System Efficiency Factor | Measures network liquidity health |
| **$REF** | Circulating Pioneer Equity (Justice-Mined) | Backed internal credit |
| **πUSD** | Fixed Consensus Stability peg | Pegged at $3.14 |

**Micro-Pi Compression Logic**
External CEX IOUs show raw Micro-Pi (1 Pi = 10,000,000 Micros).
Internal ecosystem compresses to 1 Macro Pi → prevents hyper-inflation while maintaining utility parity.
This design allows for a better understanding of the mechanism for developers and pioneers, making it simpler both inside and outside the system.
![1000098014](https://github.com/user-attachments/assets/460a53c7-422a-477c-b839-ebfa4d6f3b4d)

---

## 🗂 Repository Structure (Professional Organization)

```
PiRC/
├── index.html ← Vanguard Bridge Dashboard (fully functional on Netlify)
├── assets/js/
│ ├── constants.js
│ ├── calculations.js
│ └── explorer-core.js ← Core logic: real-time ledger, multi-language (EN/AR/ZH/ID/FR/MS), WCF parity charts
├── netlify.toml ← Zero-config deployment + API redirects
├── netlify/functions/ ← Serverless price/trade/orderbook endpoints
├── contracts/ ← Rust + Solidity reference implementations
├── simulations/ ← Agent & liquidity stress tests (.py)
├── economics/ ← Full AI economic models (pi_whitepaper_economic_model.py, RL governors, etc.)
├── docs/ ← Whitepapers, architecture, merchant integration guides
├── scripts/ & automation/ ← Deployment & testing utilities
├── tests/ & security/ ← Unit tests + formal verification
├── diagrams/ & results/ ← Visual models & simulation outputs
├── .github/ ← Workflows & issue templates
├── LICENSE, Dockerfile, .gitignore
└── PiRC-1xx/*.md ← Official proposals (PiRC-101, PiRC-201, etc.)
```

**Note:** All Rust prototypes (`pi_token.rs`, `reward_engine.rs`, `liquidity_bootstrapper.rs`, etc.) and Python models are production-ready references. The repository follows clean separation of concerns for research, simulation, and deployment.

---

## 🚀 Quick Start & Usage

### 1. Web Dashboard (index.html) – Functions Correctly on Netlify
```bash
# Clone & deploy (one-click)
git clone https://github.com/Ze0ro99/PiRC.git
cd PiRC
# Push to your Netlify account or use the "Deploy to Netlify" button
```
- **Real-time telemetry** (WCF parity, $REF ledger, IOU vs Macro Pi charts)
- **Multi-language support** (English, Arabic, Chinese, Indonesian, French, Malay)
- **Live API integration** via Netlify Functions (`/api/prices`, `/api/trades`, `/api/orderbook`)

**Local preview** (after deployment or with any static server):
```bash
npx serve .
```
The interface loads `assets/js/explorer-core.js` automatically and renders the full Vanguard Bridge experience.

### 2. Run Economic Simulations (Python)
```bash
pip install numpy pandas matplotlib scipy # (or use the included Dockerfile)
python economics/pi_whitepaper_economic_model.py
# or
python simulations/pirc_economic_simulation.py
```
Runs 50-year projections with AI adoption curves, liquidity stress tests, and equilibrium pricing.

### 3. Rust Contract Prototypes
```bash
cargo run --manifest-path contracts/Cargo.toml # (when ported to full workspace)
```
Reference implementations for Soroban/Stellar or EVM sidechains (see `PiRC101Vault.sol` as economic reference model).

### 4. Dockerized Environment
```bash
docker build -t pirc .
docker run -p 8080:80 pirc
```

---

## 📖 Documentation & Proposals

- **docs/PiRC101_Whitepaper.md** – Full sovereign monetary standard
- **docs/QUICKSTART_FOR_PI_CORE_TEAM.md** – Core-team integration guide
- **docs/MERCHANT_INTEGRATION.md** – Walled-garden merchant onboarding
- **economics/economic_model.md** – Formal invariants and AI governor specs

All PiRC proposals are open for community review and formal submission.

---

## 🛠 Deployment (Netlify – Production Ready)

The `netlify.toml` ensures:
- Root publish directory = `.` (index.html is the entry point)
- Automatic function routing (`/api/*` → `netlify/functions/`)
- Security headers (X-Frame-Options: DENY, strict CORS, Referrer-Policy)

**One-click deploy** from GitHub → Netlify → live at your custom domain with zero downtime.

---

## 🤝 Contributing

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/pi-rc-xxx`)
3. Update documentation and add tests
4. Submit a Pull Request referencing the relevant PiRC proposal

We welcome:
- New simulation scenarios
- Rust/Soroban ports
- Additional language translations for the dashboard
- Formal security audits

---

## 📜 License

MIT License – see [LICENSE](LICENSE) file.
All economic models and contract prototypes are provided for research and community use.

---

**Disclaimer**
This is an independent research prototype within the PiRC ecosystem. All telemetry and simulations reflect conceptual mainnet parity metrics. It is **not** an official Pi Network product.

---

**Ready to explore the future of Pi utility economics?**
Clone → Deploy → Simulate → Contribute.

**Vanguard Bridge is live. The Pi ecosystem’s long-term monetary standard starts here.**

— Ze0ro99 & PiRC Community
*Last updated: March 2026*
153 changes: 153 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vanguard Bridge | Technical Telemetry & Equity Explorer</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
<script src="https://unpkg.com/lightweight-charts/dist/lightweight-charts.standalone.production.js"></script>
<script src="assets/js/token_layers.js"></script>
<style>
/* Core Technical Theme - Professional Charcoal & Neon Blue */
:root {
--pi-gold: #ffa500;
--bg: #0d1117;
--card: #161b22;
--border: #30363d;
--text: #c9d1d9;
--text-muted: #8b949e;
--vanguard-blue: #58a6ff;
--stable: #3fb950;
--danger: #f85149;
}

body { background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; margin: 0; }

/* Navbar with Logo Integration */
.navbar { background: var(--card); padding: 12px 25px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 100; }
.logo { color: var(--pi-gold); font-weight: bold; font-size: 1.2rem; display: flex; align-items: center; gap: 12px; }
.logo img { height: 32px; width: 32px; border-radius: 4px; }

.controls { display: flex; align-items: center; gap: 15px; }
.lang-btn { background: #21262d; border: 1px solid var(--border); color: var(--text); padding: 4px 8px; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }
.controls select { background: #21262d; color: white; border: 1px solid var(--border); padding: 5px 10px; border-radius: 6px; }

.container { max-width: 1400px; margin: 20px auto; padding: 0 20px; }

/* Stats & Charts Grid */
.section-header { font-size: 0.95rem; font-weight: 600; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.charts-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.chart-box { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 15px; height: 350px; }
.chart-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.chart-title { font-size: 0.9rem; font-weight: bold; }
.chart-price { font-size: 1.2rem; font-weight: bold; font-family: monospace; }
.chart-container-div { width: 100%; height: 280px; }

/* Token Cards */
.token-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; margin-bottom: 30px; }
.token-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 18px; border-left: 4px solid var(--border); }
.token-price { font-size: 1.4rem; font-weight: bold; margin: 10px 0; font-family: monospace; }
.token-tvl { font-size: 0.75rem; color: var(--text-muted); font-family: monospace; }

/* Telemetry Ledger */
.explorer-card { background: var(--card); border-radius: 8px; border: 1px solid var(--border); overflow: hidden; }
.tx-list { width: 100%; border-collapse: collapse; }
.tx-header { background: #1c2128; color: var(--text-muted); font-size: 0.7rem; text-transform: uppercase; }
.tx-row { border-bottom: 1px solid var(--border); font-size: 0.8rem; }
.tx-cell { padding: 12px 15px; text-align: left; }

.badge { padding: 4px 8px; border-radius: 4px; font-size: 0.65rem; font-weight: bold; text-transform: uppercase; }
.badge-pioneer { background: rgba(255, 165, 0, 0.1); color: var(--pi-gold); border: 1px solid rgba(255, 165, 0, 0.2); }
.badge-cex { background: rgba(248, 81, 73, 0.1); color: var(--danger); }

.address-tag { background: #21262d; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 0.75rem; color: var(--vanguard-blue); }
</style>
</head>
<body>

<nav class="navbar">
<div class="logo">
<i class="fas fa-bridge-circle-check"></i>
<span>VANGUARD BRIDGE</span>
</div>
<div class="controls">
<button class="lang-btn" onclick="changeLanguage('en')">EN</button>
<button class="lang-btn" onclick="changeLanguage('ar')">AR</button>
<button class="lang-btn" onclick="changeLanguage('zh')">ZH</button>
<button class="lang-btn" onclick="changeLanguage('id')">ID</button>
<button class="lang-btn" onclick="changeLanguage('fr')">FR</button>
<button class="lang-btn" onclick="changeLanguage('ms')">MS</button>
<select id="currency-select" onchange="updateCurrency()">
<option value="USD">USD ($)</option>
<option value="JOD">JOD (د.أ)</option>
<option value="EUR">EUR (€)</option>
<option value="SAR">SAR (ر.س)</option>
<option value="EGP">EGP (ج.م)</option>
<option value="TND">TND (د.ت)</option>
<option value="JPY">JPY (¥)</option>
</select>
</div>
</nav>

<div class="container">
<div class="section-header">
<i class="fas fa-satellite-dish"></i> <span data-i18n="telemetry_status">Live Technical Telemetry</span>
</div>

<div class="charts-container">
<div class="chart-box">
<div class="chart-meta">
<div class="chart-title" data-i18n="cex_price">External Market (Speculative IOU)</div>
<div class="chart-price" id="cex-price-display" style="color: var(--danger);">$0.17</div>
</div>
<div id="cex-chart" class="chart-container-div"></div>
</div>
<div class="chart-box" style="border-top: 3px solid var(--pi-gold);">
<div class="chart-meta">
<div class="chart-title" data-i18n="wcf_parity">Vanguard Justice Parity (WCF)</div>
<div class="chart-price" id="pirc-price-display" style="color: var(--pi-gold);">Calculating...</div>
</div>
<div id="pirc-chart" class="chart-container-div"></div>
</div>
</div>

<div class="token-grid">
<div class="token-card" style="border-left-color: var(--pi-gold);">
<div data-i18n="pioneer_equity">Pioneer Equity (Ref)</div>
<div class="token-price" id="t-pi-price">---</div>
<div class="token-tvl">Backed Weight: 10M Micros/Pi</div>
</div>
<div class="token-card" style="border-left-color: var(--vanguard-blue);">
<div data-i18n="bridge_cap">Bridge Liquidity Cap</div>
<div class="token-price">$500M</div>
<div class="token-tvl">Status: Synchronized</div>
</div>
</div>

<div class="explorer-card">
<div style="padding: 15px; border-bottom: 1px solid var(--border); font-weight: bold; font-size: 0.9rem;">
<i class="fas fa-list-check"></i> <span data-i18n="ledger_title">Vanguard Bridge Real-Time Ledger</span>
</div>
<table class="tx-list">
<thead class="tx-header">
<tr>
<th class="tx-cell">Hash</th>
<th class="tx-cell">Type</th>
<th class="tx-cell">CEX Micros (Uncompressed)</th>
<th class="tx-cell">Ecosystem Macro (Compressed)</th>
<th class="tx-cell">Justice Val (WCF)</th>
</tr>
</thead>
<tbody id="ledger-body">
</tbody>
</table>
</div>
</div>

<script type="module" src="assets/js/explorer-core.js"></script>

<script src="assets/js/314_system.js"></script>
<script src="assets/js/governance_voting.js"></script>
</body>
</html>