Inspiration

Every month, Senegalese workers in Paris, Madrid, and New York send money home to Dakar for specific household needs: pharmacy prescriptions in Medina, school fees in Hann, bags of cement in Fass, or groceries in Sandaga. Standard remittance corridors charge high fees, arrive as fungible cash that often gets diverted to other bills, and leave families relying on blurry WhatsApp photos as proof of payment.

We wanted to solve this without building another custodial fintech database or storing sensitive family identity data on a central server. KeurBon combines the Wolof word keur (household) with the French word bon (voucher) to make remittances cryptographically purpose-locked using open Bitcoin Cashu and Nostr protocols.

What it does

KeurBon is a non-custodial, bilingual (French-first with instant English toggle) web application built for mid-range phones and intermittent 2G/3G networks in Dakar. It ships five real routes:

  • Overview (/): Live architecture walkthrough, demo scenario presets, and role switching between Paris Sender and Dakar Merchant.
  • Issue Purpose Voucher (/issue): A diaspora sender enters an amount in FCFA (converted to sats with automatic mint swap-fee headroom via NUT-02 fee_ppk), selects a Dakar merchant, sets a refund locktime (45s for live testing or 24h / 72h / 7d), and mints real Bitcoin Cashu proofs on testnut.cashu.space locked strictly to that merchant's secp256k1 public key (NUT-11 P2PK).
  • Dakar Vendor Counter (/redeem): The merchant pastes or loads the voucher token and runs two checks 100% offline: verifying the NUT-11 target pubkey + locktime, and validating every NUT-12 DLEQ proof against the cached mint keyset. Clicking Test Mint Rejection with an unauthorized key proves enforcement live against the Cashu mint (HTTP 400 code 20008: P2PK spend conditions are not met). With the authorized vendor key, the merchant signs via Schnorr, claims the satoshis, and broadcasts a zero-PII Nostr kind 30078 receipt.
  • Sender Vault & Refund Recovery (/ledger): Senders monitor issued vouchers, run live NUT-07 spend-state audits (UNSPENT / SPENT), export/import local JSON backups, configure custom Cashu mints, and reclaim expired unused vouchers in one click using their NUT-11 refund key.
  • Dakar Vendor Registry & Independent Receipt Verifier (/vendors): Browse Dakar merchants or register a local vendor pubkey, then query live Nostr relays (wss://nos.lol, wss://relay.primal.net) or paste raw event JSON to verify any receipt's BIP-340 Schnorr signature independently. Every receipt contains only the voucher SHA-256 hash, merchant npub, spend category, and amount (zero family names, phone numbers, or addresses).

How we built it

  • Frontend: React 19, TypeScript, Vite 6, React Router v7 (five standalone routes), and Tailwind CSS v4 with a daylight high-contrast paper theme (#F1F4F2, #0C5C44 Dakar forest green, #9C5214 ochre) and self-hosted fonts (@fontsource/outfit, @fontsource/source-sans-3, @fontsource/jetbrains-mono) so zero external font CDN calls block rendering on slow mobile data.
  • Bitcoin Cashu Engine: @cashu/cashu-ts implementing NUT-04 (minting), NUT-02 (swap fee calculation), NUT-07 (live spend-state checks), NUT-10 / NUT-11 (P2PK vendor locking + refund locktime + Schnorr signing), and NUT-12 (offline DLEQ verification).
  • Nostr Receipt Layer: nostr-tools implementing NIP-19 (npub / nsec), BIP-340 Schnorr signing and independent verification, and kind 30078 application-specific receipt events published to live public relays.
  • Zero-Custody Local Vault: Client-side secp256k1 keys and voucher state persisted locally in browser storage with JSON export/import. No backend server holds keys, funds, or personal data.
  • Deployment & Testing: Multi-stage Docker + Nginx one-command setup, live Vercel deployment with SPA rewrites, and a 16-test Vitest suite covering both pure unit logic and live cryptographic end-to-end flows against testnut.cashu.space.

Challenges we ran into

  • Multi-proof QR capacity overflow: Locked NUT-11 tokens with 9 proofs plus NUT-12 DLEQ signatures reach ~5,300 characters, exceeding single-frame static QR byte capacity (~2,953 bytes). We solved this with an automatic compact verification QR fallback for oversized tokens paired with one-click full-token copy, while scoping animated BC-UR multi-frame QR scanning for the next release.
  • Mint swap fee headroom (NUT-02 fee_ppk): Claiming P2PK proofs via a mint swap requires input fees; minting the exact face value left vendors slightly short or caused fee rejections. We calculated fee_ppk headroom up front during issuance so the vendor receives the intended satoshi face value cleanly.
  • Offline DLEQ validation with cached keysets: Ensuring merchants on flaky 2G/3G links can verify mint signatures before calling the network required caching keyset public keys locally and isolating offline NUT-11 / NUT-12 inspection from the live swap step.

Accomplishments that we're proud of

  • 16/16 automated tests passing, including live mint issuance, offline 9/9 DLEQ verification, live HTTP 400 code 20008 attacker rejection against testnut.cashu.space, Schnorr claim, expiry refund reclaim, and BIP-340 zero-PII Nostr receipt verification.
  • Zero custodial servers and zero PII on relays: Anyone can verify fulfillment publicly without learning who sent the funds or which family member picked up medicine in Dakar.
  • True mobile-first daylight UI: Verified zero horizontal overflow and zero console errors across 375px to 1440px viewports in both French and English.

What we learned

  • NUT-11 P2PK combined with NUT-12 DLEQ makes Cashu ecash surprisingly practical for purpose-bound commerce in emerging markets, because cryptographic spend rules and offline validation live directly inside the bearer token instead of a custodial backend.
  • Designing for Dakar daylight and low-bandwidth mobile connections changes every engineering tradeoff: self-hosted fonts, compact tabular numbers (FCFA + sats), offline-first inspection rails, and French-first copy matter as much as the cryptography.

What's next for KeurBon

  1. NUT-05 Lightning & Mobile-Money Off-Ramps: Let Dakar merchants sweep claimed Cashu satoshis straight to Lightning wallets or local FCFA (Wave / Orange Money) liquidity partners.
  2. NIP-07 & Android Amber Signers: Replace browser-held demo keys with hardware or external Nostr signers (NIP-07 desktop extensions and NIP-55 Amber on Android).
  3. Animated BC-UR QR Scanning: Stream multi-proof NUT-11 + NUT-12 tokens across camera-to-screen animated QR frames at the pharmacy counter.
  4. 30-Merchant Dakar Field Trial: Pilot with pharmacies, schools, and hardware shops across Medina, Fass, Hann, and Plateau.

Built With

Share this project:

Updates

Submission history