Complete P2P Marketplace Documentation
Everything you need to build, deploy, and scale your peer-to-peer marketplace.
Introduction
The P2P Marketplace Framework is inspired by Binance's proven P2P trading model, adapted for physical goods. It enables anyone to create a decentralized marketplace where buyers and sellers can trade directly without platform intermediaries.
Key Features
- ✅ 0% Platform Fees - Optional staking instead of commissions
- ✅ Advertisement Model - Like Binance P2P, not traditional listings
- ✅ Time-Based Automation - Auto-cancel, auto-release mechanisms
- ✅ Flexible Payments - Bank transfer, crypto, cash on delivery
- ✅ On-Chain Reputation - Immutable seller ratings
- ✅ Dispute Resolution - Built-in arbitration system
Quick Start
1. Clone the Repository
git clone https://github.com/slubbles/p2p-system.git
cd p2p-system/frontend
npm install2. Run Development Server
npm run dev3. Open in Browser
Navigate to http://localhost:3000
System Architecture
The marketplace is built on a three-layer architecture:
Layer 1: Blockchain Foundation
Smart contracts for escrow, reputation, and dispute resolution. Deployed on EVM-compatible chains (Polygon, Arbitrum, Base, etc.)
Layer 2: Off-Chain Coordination
IPFS for storage, The Graph for indexing, XMTP for encrypted messaging between buyers and sellers.
Layer 3: Frontend Application
Next.js 15 with TypeScript, Tailwind CSS, and shadcn/ui. Fully responsive and production-ready.
Order Flow
The order process follows Binance P2P's proven model with time-based automation:
- Buyer selects advertisement - Chooses quantity and payment method
- 30-minute payment window - Buyer pays seller directly (outside platform)
- Buyer marks "Payment Sent" - Uploads proof (optional)
- Seller confirms payment - Has 24 hours to verify
- Seller ships product - Provides tracking info
- Buyer confirms delivery - Or auto-releases after 7 days
- Order complete - Reputation updated, stakes released
Deployment
Deploy Frontend (Vercel)
npm install -g vercel
vercelDeploy Smart Contracts
See TRUSTLESS_ARCHITECTURE.md for complete smart contract deployment guide.