Documentation

Complete P2P Marketplace Documentation

Everything you need to build, deploy, and scale your peer-to-peer marketplace.

🚀 Quick Start

Get up and running in minutes

Read Guide →

🏗️ Architecture

Understand the system design

View Docs →

🔐 Security

Trustless & secure by design

Learn More →

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 install

2. Run Development Server

npm run dev

3. 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:

  1. Buyer selects advertisement - Chooses quantity and payment method
  2. 30-minute payment window - Buyer pays seller directly (outside platform)
  3. Buyer marks "Payment Sent" - Uploads proof (optional)
  4. Seller confirms payment - Has 24 hours to verify
  5. Seller ships product - Provides tracking info
  6. Buyer confirms delivery - Or auto-releases after 7 days
  7. Order complete - Reputation updated, stakes released

Deployment

Deploy Frontend (Vercel)

npm install -g vercel
vercel

Deploy Smart Contracts

See TRUSTLESS_ARCHITECTURE.md for complete smart contract deployment guide.

Additional Resources