Understanding Fiber's Peer-to-Peer Payments Through Two Demos

To help developers get a hands-on feel for Fiber Network’s peer-to-peer payment model, I built two demo applications that showcase a fully decentralized architecture where the backend never touches user funds.

Why Peer-to-Peer Payments Matter

Traditional payment platforms require users to deposit funds first — the platform custodies and transfers money on their behalf. This means users must trust that the platform won’t get hacked, won’t disappear overnight, and won’t misuse their funds. Fiber Network eliminates this trust dependency entirely.

┌─────────────────────────────────────────────────────────────────┐
│      Traditional Custodial Model        Fiber P2P Model         │
│                                                                 │
│   User ──deposit──▶ Platform          User A         User B     │
│                       │                Node           Node      │
│                       ▼                  │              │       │
│                  Platform Wallet         ▼              ▼       │
│                       │           ┌────────────────────────┐    │
│                       ▼           │   Fiber Network        │    │
│                   Recipient       └────────────────────────┘    │
│                                                                 │
│                                      App Backend                │
│                                    (state only)                 │
│                                                                 │
│   Funds flow through platform,    Funds routed via Fiber,       │
│   requires trust                  backend has zero access       │
└─────────────────────────────────────────────────────────────────┘

Key Differences

Traditional Custodial Fiber P2P
Fund Flow Funds must pass through the platform Funds route directly between user nodes via Fiber Network
Trust Model Must trust the platform’s security and integrity Only trust your own node and open-source code
Backend Role Manages funds + business logic Manages business state only (orders, game logic) — zero contact with funds

The Two Demos

fiber-game — Two-Player Wagering Games

Supports Rock-Paper-Scissors and Guess the Number. Both players place bets through their own Fiber nodes. An Oracle uses adaptor signatures to cryptographically ensure that only the winner can unlock and claim the loser’s funds — no intermediary custody required at any point.

fiber-escrow — Decentralized Escrow Trading

When a buyer pays, funds are locked in the Fiber Network via Hold Invoices — not in a platform wallet. The seller can only claim payment after confirming shipment. In case of a dispute, an arbiter steps in to resolve it. Funds never pass through the backend.


Source code: GitHub - quake/fiber-demo · GitHub

Both demos can be launched locally with a single command. Give them a try and let me know what you think!

Screenshots

11 Likes

All it takes is a wallet now to make the ecosystem fly. The possibilities are endless

2 Likes