Skip to content

Mint your own currency.

A federated mutual-credit ledger. Mint personal currencies, hold them at any bank you trust — your own or somebody else’s — and settle cryptographically. No central authority, no middleman.

Why “game”? barter.game is designed as a game first. We suggest treating it as a practice environment for trading skills — a safe space to experiment with personal currencies, negotiation, and settlement. Only use it for real economic transactions if your local laws and circumstances permit. The “game” framing keeps the stakes appropriate while the protocol itself is serious cryptography.

How it works in one paragraph

Every user and every bank is an ed25519 keypair. Voucher, Account, Order, Mandate, Offer, Signature, Address, and Post docs are canonicalized via RFC 8785 JSON, SHA-256-hashed, and content-addressed. Ledger records are bank-minted with ULIDs. In a cross-bank trade the coordinator creates the record pairs (create_records), holders submit signed Orders (submit_docs), and the coordinator clears each Order at each bank with a signed Mandate (submit_mandate). From there the banks self-advance: per-record approvals, holds, then settlement. Banks discover each other via the bank fields in Orders and call each other directly through the Address registry; a lost push can be relayed by hand. There is no global ledger: only the banks party to a deal see its records — a bank receives exactly the records that satisfy the Orders it stores. The math binds everyone together.

Read the full docs →

See it work

Open the live demo banks — no install needed: barter-game-banks.ai-1st.deno.net/alice/ui. Register with a handle and password; the key is generated and encrypted in your browser.

Or run a bank locally:

git clone https://github.com/ai-1st/barter.game.git
cd barter.game
deno run apps/bank/genkey.ts   # prints BANK_ALICE_PRIV_KEY=<base58>
BANK_ALICE_PRIV_KEY=<base58> deno run --allow-net --allow-env --allow-read --allow-write --unstable-kv apps/bank/main.ts

Then open http://localhost:8000/alice/ui, register two users, issue personal currencies, and place matching orders. The banks settle on their own. Sum per Voucher = 0. The cryptographic version of “we’re even.”