Inspiration Across West Africa from Lagos market stalls (Ajo / Esusu) to Dakar neighborhoods (Tontine)—over 100 million market traders, artisans, and students rely on rotational savings circles (ROSCAs) to build capital outside traditional banks. Yet informal paper-and-cash circles fail savers in four structural ways:
- Currency Devaluation & Inflation Erosion: Saving in local fiat (NGN or XOF) over multi-month rotations erodes real purchasing power before later-turn recipients ever collect their pot.
- Collector Default Risk: Traditional circles depend on one human treasurer holding physical cash or a single bank account creating a single point of failure and risk of collector disappearance.
- Opaque, Tamper-Prone Paper Bookkeeping: Handwritten exercise books get lost, damaged, or disputed, leaving savers with zero verifiable repayment history.
- Banking Gatekeepers & Fee Traps: Rigid KYC requirements shut out informal market women and youth, while flat transfer fees punish weekly micro-contributions.
Aligned with BTrust's open-source Bitcoin mission, AjoBook keeps the communal savings circle exactly as West Africans know and trust it but replaces the paper exercise book and human treasurer with Bitcoin, the Lightning Network, Nostr, and an Autonomous AI Steward.
What It Does (8 Real ROSCA Mechanics) AjoBook operates with zero mock wallet balances and implements eight complete community savings mechanics:
- Host Opens Circle: Sets circle name, host display name, contribution in satoshis (sats) (with live ₦ NGN and CFA XOF conversion), cadence (Every 5 Minutes [Live Demo], Daily, Weekly, Monthly), 1x Deposit Safeguard, and Open for Late Joiners toggle.
- Join via Link or QR Code: Members scan an invite QR code or open ?circle=&join=1, connect their real wallet, and write their name in the book. Payout order equals join order.
- 1-Signature Turn Contributions: Each turn, members settle their exact BOLT11 contribution invoice with one real wallet authorization (NWC, WebLN / NIP-07, or scannable BOLT11 / LNURL QR).
- Autonomous Pot Payout: The instant the final (N-th) member pays for a turn, the pot disburses automatically to the active collector's Lightning address with a verifiable SHA-256 BOLT11 preimage proof: $$\text{Pot}{\text{net}} = (N \times C) \times (1 - f{\text{protocol}})$$
- 1x Security Deposit & Default Coverage: Members lock \(1 \times C\) upfront. If a member misses a turn, their escrowed deposit covers their share so the turn collector still receives 100% of the pot; unused deposits refund automatically at cycle completion.
- Late Turns & Public MISSED Stamp: Once a turn's deadline passes, anyone can close the late turn—marking unpaid members MISSED publicly in the ledger while applying deposit coverage.
- Late Joiners & Pro-Rata Catch-Up Split: While registration remains open, a late joiner appends to the end of the queue and pays a catch-up contribution split equally among past collectors (\(1 \dots T_{\text{current}} - 1\)) so everyone ends square: $$\text{CatchUp} = C \times (T_{\text{current}} - 1)$$
- Claimable Escrow ("No Stuck Money") & Verifiable History: Any payout that cannot be delivered immediately waits safely under that member's name until they click Claim Sats, with every ledger event linked to signed Nostr receipts and live mempool.space block heights.
How We Built It
- Frontend (React + TypeScript + Vite + Tailwind CSS): Mobile-first warm editorial exercise-book UI (< 30 kB CSS) designed for low-bandwidth 2G/3G networks and mid-range Android devices, featuring a three-way ⚡ SATS | ₦ NGN | CFA XOF switcher and USSD/Mobile Money bridge readiness.
- Real Bitcoin & Lightning Wallet Stack:
- Nostr Wallet Connect (@getalby/sdk / NIP-47): Connects any nostr+walletconnect:// node (Alby Hub, Mutiny, CoinOS, Zeus, BTCPayServer) to read live balances, generate BOLT11 invoices, and verify cryptographic SHA-256 preimages.
- WebLN & NIP-07 (window.webln / window.nostr): 1-click authorization via Alby or nos2x browser extensions.
- External Mobile Wallets: Scannable BOLT11 / LNURL QR codes for Phoenix, Breez, Blink, Zeus, and Sparrow Wallet.
- Live Bitcoin Telemetry (mempool.space REST API): Real-time Bitcoin tip block height and recommended sat/vB fee rates.
- Nostr Protocol (nostr-tools): Publishes tamper-evident circle state (kind: 30078) and awards portable savings reputation badges (NIP-58 / kind: 8) to reliable circle members.
- Autonomous AI Steward: Computes real-time circle health/default risk scores and generates culturally grounded payment reminders in English, French (for Dakar Tontine circles), and Nigerian Pidgin (for Lagos Ajo traders).
- Security & Reproducibility: Non-root Docker containers (docker compose up --build), strict input validation, payment replay prevention, API rate limiting, zero-PII logging (npub aliases only), and an 8-invariant E2E test suite (npm test).
Challenges We Faced
- Eliminating Wallet Friction Without Using Mock Balances: Many hackathon dApps rely on fake balances that violate trustlessness. We solved this by integrating native NWC (nostr+walletconnect://), WebLN, and scannable BOLT11 QR flows alongside live mempool.space block telemetry so every balance, invoice, and preimage is cryptographically verifiable.
- Designing Fair Math for Late Joiners & Missed Turns: Ensuring that late joiners and mid-cycle defaults never leave earlier or later collectors short required formalizing catch-up distribution formulas, 1x deposit slashing rules, and claimable escrow so zero sats ever get stuck.
- Designing for West African Bandwidth & Language Diversity: Market traders operate across anglophone and francophone West Africa on data-conscious phones, motivating our ultra-light editorial UI, local fiat conversions (NGN / XOF), and trilingual AI Steward.
What We Learned
- NWC + Nostr Unlocks Non-Custodial Social Finance: Combining NIP-47 remote wallet authorization with NIP-58 reputation badges turns informal community trust into portable, verifiable financial history without requiring traditional banks.
- Cultural Familiarity Drives Bitcoin Adoption: Framing sats, BOLT11 preimages, and Nostr receipts inside the familiar visual metaphor of an African Ajo exercise book makes self-custodial Bitcoin intuitive from the first tap.
What's Next for AjoBook
- Native LDK / C-Lightning Hold Invoices: Moving escrowed deposits to trustless HTLC Hold Invoices at the Lightning node level.
- BTCPayServer Community Plugin: Enabling cooperatives and market associations to self-host AjoBook circles directly inside BTCPayServer.
- Fedimint Community Guardians: Allowing trusted local market unions to run federated Chaumian e-cash mints for zero-fee internal circle turns.
- Live Telco USSD Gateway: Connecting our USSD session adapter to Nigerian and Senegalese mobile networks so feature-phone traders can check balances and approve turns offline.
Built With
- ai
- bitcoin
- docker
- lightning-network
- nostr
- nwc
- react
- tailwindcss
- typescript
- webln