Inspiration

Khady, 34, sells fabric at Sandaga market in Dakar. Like millions of traders across West Africa, she saves through a tontine (ajo or esusu in Nigeria): ten people put in the same amount every week, and each week one of them takes the whole pot.

It works on trust, and trust breaks. Cash gets lost or stolen, records live in a notebook or a WhatsApp chat, nobody can prove who paid, and sometimes the person holding the money disappears with it.

Several projects here put savings circles on Lightning. We asked a harder question: can every member check, on their own phone, that the circle was run honestly, without trusting the organizer, the server or each other?

What it does

  • Shares are locked, not handed over. Each member pays with a Lightning hold invoice. The money leaves their wallet but stays locked in the payment. No one can spend it mid-round, not even the organizer.
  • All or nothing. When the last member pays, every share is collected at once and the pot goes straight to that round's recipient, within seconds. If the deadline passes and someone hasn't paid, every share is cancelled and returns to its owner automatically.
  • A record that proves itself. Every step is signed and published on Nostr. When a round opens, Kola publishes a fingerprint of each payment. When the money moves, it publishes the matching proof. Each member's phone checks every signature and every proof itself: who paid, that the pot was exactly right, and that it reached the right person. Members sign their own "I joined" record, so even the organizer can't invent members.
  • An assistant in plain words. Ask "Whose turn is it?" or "Who still owes?", or have it draft a polite reminder. Built on Claude, it only sees a safe summary (nicknames, amounts, progress), never keys or payments, and it can't take any action.
  • Built for the people who use tontines. Amounts in FCFA or naira next to sats; English and French; invites and reminders sent on WhatsApp in one tap; installable on Android; tuned for mid-range phones on slow networks; no jargon. Every error says whether your money moved.

How we built it

  • Lightning: LND (v0.18) on a private regtest network: one coordinator node plus six member wallets, driven over LND's REST API. Each job uses the narrowest permission token (macaroon): the part that creates invoices cannot send money.
  • Round engine: a strict state machine (open → collecting → settling → paying out → paid out, or → cancelled). Payment secrets are derived with HMAC, never stored. After a crash it picks up where it left off from what the Lightning node reports.
  • Nostr: our own event kinds, signed by the coordinator and by members. The audit runs in the browser and reads the relay directly. Login has no passwords: every API request is signed with the member's Nostr key (NIP-98). Keys are created on the phone and stored encrypted under a PIN (NIP-49), and the server never sees them.
  • App: TypeScript monorepo. React running on Preact, Vite, Fastify, Zod at every boundary, and SQLite as a cache only (the truth lives in Lightning and on Nostr). The assistant uses the Claude API.
  • Quality: 140+ unit tests, plus integration tests that play full rounds against real Lightning nodes: happy path, missed deadline with refunds, and a server restart mid-round. CI on every push.
  • Shipping: one command (pnpm start) runs everything locally. A one-script deploy puts it on a server with HTTPS, a firewall and a strict security policy.

Challenges we ran into

  • The point of no return. Once the first share is collected, a secret is revealed and the round can't be undone. We designed the engine around that line: before it, any problem refunds everyone; after it, the engine only moves forward and retries the payout until it succeeds.
  • Making proof understandable. Checking signatures and payment proofs on the phone is only useful if the result is plain: "All 12 records are genuine and agree with each other."
  • Public relays are open to everyone. Anyone can post to a public relay, so a single junk event could have turned every member's "verified" into a warning. Records not signed by the circle's own members are now skipped and counted. We also fixed a subtle case where a forged copy could hide a genuine record.
  • Real infrastructure. A hard shutdown corrupted a Lightning node's database. We now stop the network cleanly and re-seed automatically on boot.

Accomplishments that we're proud of

  • Nothing is simulated. Real hold invoices, real Lightning payouts, real signed Nostr records, and a real wallet, all on a test network.
  • Members can verify, not just trust. The proof that the pot reached the right person is checked on each member's phone.
  • Anyone can try it in under a minute on the live demo: tap a demo person, start a round, switch people in Settings, and watch the pot arrive.

What we learned

Hold invoices are the right building block for any "all or nothing" group payment. A public record is only worth something when ordinary members can check it. And the hardest parts of money software are the failure cases: deadlines, crashes and retries, not the happy path.

What's next for Kola

  1. Bring your own wallet (Nostr Wallet Connect), so members pay from Phoenix, Wallet of Satoshi or any NWC wallet. This removes the custodial demo wallets.
  2. Pilot with a real group in Dakar or Lagos, on signet then mainnet with small amounts, and agree with them what should happen when someone misses a payment.
  3. Voice reminders in Wolof, Yoruba and Pidgin.
  4. Several relays, with the coordinator's key in the invite, so the record can't be hidden.

Honest limits: test network only; demo wallets are held by the server; the server briefly holds the pot (seconds) between collecting it and paying the winner. These are all documented in our threat model.

Built With

Share this project:

Updates

Submission history