Ajo on Lightning

reading settings
font:
size:
spacing:

A rotating savings circle (ajo, esusu, tontine) on Bitcoin Lightning where nobody holds the pot. Each member's own wallet pays that round's payee directly.

Ajo on Lightning
held by the app or the organiser at any point
0 sat
states checked in the TLA+ model of the payment rules
7.28M
reminder languages: English, Pidgin, Yoruba, French and Wolof
5

The problem

In an ajo, esusu or tontine, one organiser collects from every member each round and holds the pot until it's paid out. The circle's savings depend on her, and so does the work of chasing late payers and proving who paid.

What changed

  • Removed the pot. Each round, every member's own Lightning wallet pays that round's payee directly through Nostr Wallet Connect, so the organiser collects with one button and holds nothing.
  • Made sure a member shown as not paid is never charged. The payee's wallet holds each payment until the round releases it, and a late payment is never released.
  • Gave every payment a signed Nostr receipt that anyone in the circle can read, with no names in it.

What I worked on

  • I built it solo for the Dakar Bitcoin Hack 2026, in TypeScript, with a Docker Compose stack of bitcoind, a Nostr relay, a router and five member Alby Hubs on regtest.
  • I limited each wallet link to one job. The pay link can only pay, up to a limit the member's own wallet enforces, and the receive link can only create invoices. Ajo refuses a link that can do more.
  • I wrote a TLA+ model of the round and ran the unit tests against its rules with 1,000 random runs.

Ajo on Lightning is for the circle organiser, often the woman who already runs a market traders' ajo with 5 to 20 members. Today she visits stalls or waits for transfers, holds the pot, calls late payers and is the only record of who paid.

How a round works

The organiser types the circle's passcode and presses Collect this round. Each member's wallet pays the payee, and each row turns to Paid. If a payment can't go through, the row says why, for example that it's over the member's weekly limit.

Each payment uses a hold invoice, so the payee's wallet holds the money until the round releases it. A late payment is never released, and running the round again never creates a second invoice for the same member.

Reminders

For anyone who hasn't paid, Claude Haiku writes a short reminder in the circle's language, ready to copy into WhatsApp. The model sees only the language, the seat, the amount and the due date. The server adds the member's name afterwards.

Checking it

The repo has unit tests, an end-to-end script that checks the payee's hub and the relay directly, and a TLA+ model that holds all five payment rules over 7,280,499 states.

Limits

It runs on regtest only, with fixed passwords, so it isn't safe for real money as it stands. One stack runs one circle, and the organiser starts each round by hand.