Inspiration

In Dakar's markets, vendors save together through tontines: every week each member puts in the same amount, and each week one member takes home the whole pot. It is how a tailor buys a sewing machine or a fish seller restocks before Tabaski. India has the same ritual (the bhishi, kameti and chit fund), and so do Mexico (tanda), Ghana (susu), China (hui) and Korea (gye).

The ritual works, but its tools don't: a paper notebook, cash changing hands in a busy market, and one treasurer holding everyone's savings. When a tontine fails, it is usually because the pot was lost, stolen, or quietly disputed: "I paid you last Tuesday!"

We asked: what does this ritual look like when nobody has to hold the pot?

What it does

TontineZap is a phone-first web app for the person who already runs the circle, the organizer.

  • Zero custody. Each round, members pay the round's recipient directly over Bitcoin Lightning, wallet to wallet, through Nostr Wallet Connect (NWC). The app never touches funds and has no server.
  • Proof instead of trust. A payment is marked paid only when sha256(preimage) == payment_hash is verified on the phone and the recipient's wallet confirms settlement. Every payment gets a receipt number (N°0001…).
  • A ledger that can't be lost or quietly edited. Every change is signed and NIP-44 encrypted, published to three Nostr relays (kind 30078), and stored on the phone (IndexedDB) so it works offline. Another member's phone can join with an invite code and verify the same ledger.
  • Emergency bid. A member with an urgent business need can take this round's pot early at a small discount; everyone else pays less, and the discount is their dividend. The app warns when a discount gets predatory.
  • AI Group Treasurer, on-device (no data leaves the phone): a health score, alerts for late payers and the #1 tontine risk (a member who got paid and stopped contributing), and French/English audit reports you can send on WhatsApp in one tap, with a QR receipt card.
  • Global by design, Dakar first. Pick the circle's local name (Tontine, Bhishi, Kameti, Chit fund, Tanda, Susu, Hui, Gye) and display currency (CFA franc or Indian rupee). Payments are always in sats.
  • Hybrid reality. Members without Lightning yet can pay cash; the organizer records it and it is visibly marked "unproven".
  • One-tap demo for judges. "Demo: Dakar tontine" or "Demo: Mumbai bhishi (₹)" creates 4 real, disposable Lightning test wallets so you can run a full round of real payments in seconds.

Try it: https://tontinezap.vercel.app

How we built it

  • Frontend: Vite + React 18 + TypeScript + Tailwind 4 as a PWA, about 178 KB gzipped, for mid-range Android phones on 3G.
  • Lightning: @getalby/sdk NWCClient (make_invoice, pay_invoice, lookup_invoice, get_balance). Demo wallets come from Alby's NWC faucet.
  • Nostr: nostr-tools: Schnorr-signed kind-30078 events, NIP-44 v2 group encryption, a SimplePool across relay.damus.io, nos.lol and relay.primal.net, and a persistent signed outbox that retries when the phone is back online.
  • Security: wallet connection strings are kept in memory only and validated with zod; an optional passphrase vault (PBKDF2-SHA256 600k → AES-256-GCM); redaction of every log and error; a strict Content-Security-Policy. Threat model in the README, policy in SECURITY.md.
  • Design, "Painted Route Board": the hand-painted transport art that Dakar and India share, Dakar's car rapide buses and India's "Horn OK Please" trucks. The circle is drawn as a route and each member is a stop; a yellow pot disc slides to the next stop when a round closes. High-contrast yellow, ultramarine and ink stay legible in market sunlight.
  • Testing: 35 unit tests (redaction, URI validation, proofs, vault, NIP-44, rotation, auction, advisor, multi-device merge, currencies) plus a live end-to-end test: real faucet wallets → real Lightning payments → ledger read back from Nostr.

Challenges we ran into

  • Making the bid fair, not just possible. Reverse-auction tontines can exploit a member in distress, so we flag steep discounts and only allow bids before anyone has paid.
  • Keeping secrets secret in a browser. Wallet connection strings can spend money: memory-only, redacted everywhere, encrypted only when the user chooses to keep them.
  • Offline markets. The phone is the source of truth and Nostr the tamper-evident backup, with an outbox that publishes later.
  • One design for two continents. We found a visual language Dakar and Mumbai vendors both know by heart: hand-painted buses and trucks.

Accomplishments that we're proud of

  • Real Lightning payments between members settle in about 1–2 s with zero fees on test wallets, each with a verified cryptographic proof.
  • A full 4-member circle runs end to end: 4 rounds, 12 proven payments, and a ledger recoverable from Nostr.
  • No custody, no backend, no accounts: it's a static site that costs $0 to host.

What we learned

  • Wallet-to-wallet payments over NWC make "no one holds the pot" an architectural fact, not a promise.
  • NIP-44 plus replaceable kind-30078 events make a good tamper-evident, multi-device ledger.
  • The best UX for a savings circle respects the ritual people already have: the turn order, the notebook and the WhatsApp update.

What's next for TontineZap

  • Per-member Nostr identities (NIP-07/NIP-46) and private groups (NIP-29/MLS) instead of one shared circle key.
  • Hold invoices, so a pot only settles once every member has paid (atomic rounds).
  • Reminders via Nostr DMs and WhatsApp on due dates.
  • More currencies (KES, NGN, GHS, MXN) and languages (Wolof, Hindi), plus voice prompts.
  • Bridges to mobile money (Wave, Orange Money, UPI) for members not yet on Bitcoin.

Source: https://github.com/Sohamkhrt/tontinezap

Built With

Share this project:

Updates

Submission history