Inspiration
In Dakar and across West Africa, tontines — and the susu circles that grew alongside them — are how people without access to formal credit buy a motorbike, stock a shop, or pay school fees. Everyone contributes the same amount each round; one member takes the whole pot; nobody pays interest.
It works because of trust. It also breaks for the same reason. Cash handling, a notebook only the treasurer can read, and late payments all leak value — and one member who takes an early pot and disappears poisons the circle for everyone. We didn't want to replace the institution. We wanted to replace the two parts that actually fail: the bookkeeping and the enforcement.
What it does
Zappot is a coordinator for rotating savings circles settled in satoshis over Lightning.
- Contributions are paid to a real BOLT-11 invoice issued through Nostr Wallet Connect (NIP-47). The coordinator never holds a seed and never opens a port.
- The pot is paid to the winner's own Lightning invoice — and only if that invoice asks for exactly what the circle owes them, to the satoshi.
- Enforcement is rules, not trust: collateral at join, a winner's bond held back at payout, missed rounds covered from collateral first, and defaults excluded from future pots and dividends.
- The pot can be auctioned instead of handed out in join order, so whoever needs the money first can pay the others a discount for it — interest, without a lender.
- A member is a Nostr key. No email, no password. Every action is a signed event, and circle state is published as an addressable note (kind 30078).
- An AI coordinator writes payment reminders in French, English and Wolof, briefs the group on what needs doing, flags a round that looks wrong before money moves, and explains a savings record in one sentence. It never touches money: it reads public state and writes text, and with no API key every function falls back to deterministic templates.
- A practice circle fills the other seats with simulated members, so one person can walk the whole loop — create, join, pay, bid, close, get paid, take collateral back — in about three minutes.
How we built it
Node 22 with native TypeScript, no server framework and no bundler; a single-file vanilla-JS front end with no build step either. nostr-tools for event signing and verification, @scure/base for bech32, hand-written BOLT-11 amount decoding, and a JSON store written atomically (write + rename) under a serialised queue.
The rules live in one pure, I/O-free module: collateral, bond, auction, default handling, pull payments. The HTTP layer only authenticates, verifies, and calls it. Sats move only when the wallet reports an invoice settled.
We wrote 33 tests that need no network and no wallet. Every test that settles a round asserts inSats − paidOutSats − owedSats === 0, so no satoshi is created or stranded by any path we could think of.
Challenges we ran into
Proving a payment without custody. An NWC grant can pay an invoice but can't prove one arrived. So sats only move on a settled-invoice report, and a payout is refused unless the member's invoice amount matches their balance exactly — that single check is the only thing between a member and the pot.
Authentication without accounts. A Nostr signature proves who, not what they intended. Every action carries action and circle tags, must land inside a 300-second window, and each event id is burned once — so a captured request can be neither edited nor replayed.
Honest demo economics. Judges need to try the loop before owning a wallet. Practice circles therefore book contributions and payouts as recorded instead of invoiced, and say so in the toast and the ledger. Real circles refuse that path with a 503, so the shortcut can never quietly become the product.
Knowing what we had not verified. No live NWC wallet was connected in this environment, so make_invoice, lookup_invoice and pay_invoice are untested against a real node, and the Wolof strings were written by a non-native speaker. The README lists those gaps instead of hiding them.
Accomplishments that we're proud of
- A zero-sum money path: every settling scenario proves that contributions minus payouts minus what is still owed equals zero.
- Payouts that cannot be inflated — the invoice amount must equal the claimable balance to the satoshi, checked before a wallet is ever asked to pay.
- Replay-proof, account-free auth built entirely from signed Nostr events.
- An AI that can't break the product: it has no access to money or rules, and every function degrades to French/English/Wolof templates when the API is unavailable.
- A three-minute solo demo that walks the entire circle lifecycle with simulated members, so a judge never has to recruit five friends.
- 33 tests that run offline in under a second, on a project whose whole job is moving money.
What we learned
That collateral is a pricing problem, not a feature: it has to be cheap enough that a real tontine member joins and large enough that leaving early costs more than staying. And that the model is the least important part of "AI in fintech" — the valuable work was making every AI answer degrade to a deterministic template, so nothing in the money path depends on a network call.
What's next for Zappot
Anchor each member's savings record as a signed Nostr note so the score is portable between coordinators and verifiable without trusting one; federate circles so any coordinator can settle one; make payouts retry-safe by storing the preimage before crediting; add expired-invoice rejection and a hold-invoice flow so a payout can be claimed later instead of pushed; and render reminders as shareable images for WhatsApp, where these groups actually coordinate, with native Wolof and Pular review before a public run.
Built With
- api
- bitcoin
- bolt-11
- connect
- css
- gpt-4o
- html
- javascript
- lightning
- mini
- network
- nip-07
- nip-47
- node.js
- nostr
- nostr-tools
- openai
- rest
- typescript
- wallet