Introduction

CONTINGENCY is an offline-first network for communication and payment coordination. Phones prepare a USDC balance while they're online. When connectivity fails, they exchange encrypted messages and signed payment instructions over a Bluetooth mesh, and any device that gets back online can settle those instructions on Solana.

The one rule#

An offline instruction is not a payment. A voucher that has been signed, relayed or delivered has not moved any money. Funds move only when the settlement program confirms the voucher on Solana. Every part of the system, from the app to these docs, keeps those states separate. Payment lifecycle explains each one.

How it fits together#

  1. Prepare while online. A user funds an offline vault on Solana with USDC and posts a small bond.
  2. Pay offline. The buyer's phone signs a payment voucher: a 227-byte message that names the vault, the merchant, the amount and a sequence number.
  3. Relay. The voucher travels to the merchant over Bluetooth, through other phones if needed, using the mesh network.
  4. Settle. The first device to reconnect submits the voucher to the settlement program, which verifies the signature and pays the merchant from the vault.

What's built#

ComponentStatusWhere
Voucher format and TypeScript libraryDevnetvoucher-ts/ (@contingency/voucher)
Settlement program (Solana, Anchor)Devnetprogram/
Shared test vectorsDevnetvoucher-ts/test-vectors/
Web wallet: offline QR payments, devnet relayerDevnet/app, web/src/components/live/
iOS and Android apps (BitChat fork)PlannedNot started
Swift and Kotlin voucher librariesPlannedNot started

The codebase still uses the project's original name, contingency, in package and program names.

Where to go next#