Appendix A: State Machines & Sequence Diagrams
Detailed state machines and sequence diagrams for on-/off-ramp and dispute flows.A.1 On-Ramp State Machine
Complete On-Ramp State Machine
Complete On-Ramp State Machine
States:Transitions:
| From | To | Trigger | Timeout | Effects |
|---|---|---|---|---|
| INITIAL | OPEN | createOrder() | - | Lock user bond |
| OPEN | MATCHED | acceptMatch() | T_match | Assign merchant, lock merchant bond |
| OPEN | EXPIRED | - | T_match | Return bonds |
| MATCHED | FUNDED | confirmFiat() | T_fiat | Record fiat transfer |
| MATCHED | EXPIRED | - | T_fiat | Return bonds |
| FUNDED | CONFIRMED | merchantConfirm() | T_confirm | Prepare USDC release |
| FUNDED | DISPUTED | - | T_confirm | Enter dispute process |
| CONFIRMED | SETTLED | - | T_dispute | Release USDC, return bonds, update reputation |
| CONFIRMED | DISPUTED | raiseDispute() | T_dispute | Freeze settlement |
| DISPUTED | RESOLVED | adminResolve() | - | Execute verdict, slash or return bonds |
A.2 Off-Ramp State Machine
Complete Off-Ramp State Machine
Complete Off-Ramp State Machine
States:Key Differences from On-Ramp:
- USDC locked at order creation
- Merchant posts bond at match acceptance
- Merchant must provide payment proof
- User can dispute non-receipt
- Default settlement if no dispute within T_dispute
A.3 Dispute Resolution Sequence
Dispute Resolution Sequence Diagram
Dispute Resolution Sequence Diagram
Appendix B: Proof Interface Specs
Inputs/outputs for identity predicates; verifier APIs; planned evidence module interface.B.1 ZK-KYC Proof Interface
Identity Proof Specification
Identity Proof Specification
Proof Type: Government ID VerificationPrivate Inputs:Public Inputs:Proof Output:Verification:
B.2 Social Account Verification (Reclaim Protocol)
Social Proof Specification
Social Proof Specification
B.3 Bank Transaction Proof (Planned)
Bank Transaction Evidence Specification (Roadmap)
Bank Transaction Evidence Specification (Roadmap)
Proof Type: Payment ConfirmationPrivate Inputs:Public Inputs:Proof Output:Verification Flow:
- Merchant claims fiat payment sent/received
- Merchant generates zkTLS proof from banking portal
- Proof submitted to on-chain verifier or off-chain relayer
- Verifier checks proof cryptographically
- Attestation hash posted on-chain
- Order settlement proceeds automatically
- Bank name not revealed
- Account numbers not revealed
- Other transactions not revealed
- Only proof of specific transaction posted
Appendix C: Oracle Adapter Spec
Sources, aggregation, parameters.C.1 Oracle Architecture
Oracle System Design
Oracle System Design
Components:Current Sources (Example for USDC/USD):
C.2 Price Aggregation Algorithm
Median + TWAP Calculation
Median + TWAP Calculation
Median Calculation:TWAP Calculation:Combined Approach:
Appendix D: Reputation Math
Scoring formulae, decay, thresholds, and examples.D.1 Reputation Formula
Complete Reputation Calculation
Complete Reputation Calculation
Base Formula:Trade Reputation:KYC Reputation:Network Reputation:Time Decay:Penalties:
D.2 Tier Thresholds
Reputation Tier System
Reputation Tier System
Tier Definitions:
Tier Progression Example:
| Tier | RP Range | Max Transaction | Daily Limit | Fee Discount |
|---|---|---|---|---|
| New User | 0-100 | $100 | $500 | 0% |
| Standard | 100-500 | $500 | $2,000 | 0% |
| Verified | 500-1000 | $2,000 | $10,000 | 10% |
| Trusted | 1000-3000 | $5,000 | $50,000 | 20% |
| Elite | 3000-10000 | $20,000 | $200,000 | 30% |
| Merchant | 10000+ | $50,000+ | $1,000,000+ | 30% |
Appendix E: Governance Parameters Registry
With safe ranges and change procedures.E.1 Complete Parameter List
All Governed Parameters
All Governed Parameters
Economic Parameters:Time Parameters:Oracle Parameters:
Appendix F: Glossary
Protocol terms and rail classes.Terms and Definitions
Terms and Definitions
A
- Admin Settlement: Current dispute resolution method where authorized admins issue verdicts based on evidence
- AML (Anti-Money Laundering): Regulations and practices designed to prevent money laundering
- Base L2: Ethereum Layer 2 scaling solution where P2P Protocol is currently deployed
- Bond: Collateral posted by users or merchants, slashed for fraudulent behavior
- Circuit Breaker: Automatic trading pause triggered by abnormal conditions
- Credibility: Reputation earned through honest protocol participation
- Dispute Window: Time period during which parties can contest order outcomes
- Futarchy: Governance mechanism using prediction markets for decision-making
- KYC (Know Your Customer): Identity verification processes
- Merchant: Vetted liquidity provider who mediates fiat-crypto exchanges
- Off-Ramp: Converting crypto to fiat
- On-Ramp: Converting fiat to crypto
- Oracle: System providing external data (prices) to smart contracts
- PIX: Brazil’s instant payment system
- Proof-of-Credibility (PoC): P2P Protocol’s reputation system
- Rail: Payment method or system (UPI, PIX, SEPA, etc.)
- Reputation Points (RP): Numerical score representing user credibility
- Slashing: Penalty imposed by taking a portion of posted bonds
- Settlement: Final completion of a trade with fund transfers
- TGE (Token Generation Event): Token launch, planned March 2026
- TWAP (Time-Weighted Average Price): Price averaging method resistant to manipulation
- UPI (Unified Payments Interface): India’s instant payment system
- Zero-Knowledge Proof (ZK Proof): Cryptographic method to prove statements without revealing underlying data
- ZK-KYC: Identity verification using zero-knowledge proofs
- zkTLS: Zero-knowledge proofs for TLS session data, used by Reclaim Protocol
Document Metadata
Version: 1.0Date: March 5, 2026
Status: Pre-TGE Release
Next Review: June 2026 Contributing Authors:
- P2P Protocol Core Team
- Community Contributors
- Technical Advisors
- Technical Review: Completed
- Security Review: Completed
- Legal Review: Completed
- Community Review: Open
End of WhitepaperThank you for reading the P2P Protocol whitepaper. For questions, feedback, or to get involved:
- Join our Discord: discord.gg/p2p
- Follow development: github.com/p2p-protocol
- Start using the protocol: p2p.me
- GitHub (developer reputation)
- LinkedIn (professional verification)
- Twitter (social presence)
- Others as added by Reclaim
Private Inputs:- OAuth tokens or session cookies (never exposed)
- Account credentials (never exposed)
- Full profile data (selectively revealed)
Public Inputs: