Inspiration
Selling property in Dakar is an obstacle course: finding one buyer able to pay 350 million FCFA in cash on an illiquid market takes years, fraud and fake land titles make trust expensive, and for most people a down payment on a house will stay out of reach forever.
We flipped the problem: instead of one buyer paying everything, thousands of participants each buy a ticket for ~1,000 FCFA. The seller gets their price in weeks. One participant gets the keys. And because "raffle" usually means "scam", we made the entire draw provably fair verifiable by anyone, rigged by no one, not even us.
What it does
satsPicks is a real-estate raffle platform built on Bitcoin:
- Buy tickets in seconds — one Lightning invoice, any wallet (Phoenix, Wallet of Satoshi…). No bank account, no sign-up. Your Lightning payment receipt is your ticket.
- Commitment before the draw — at closing time, every ticket fingerprint is sealed into a Merkle root and published on Nostr, a network we don't control, before the draw block exists. Impossible to add or remove a ticket quietly.
- The blockchain picks the winner — one simple formula:
$$ \text{winner} = \text{SHA-256}(\text{block_hash} \parallel \text{merkle_root}) \bmod n_{\text{tickets}} $$
The randomness comes from global Bitcoin mining; manipulation is economically unviable.
- Verify, don't trust — a public Verify page re-runs the whole computation in your browser (WebCrypto), plus an independent CLI verifier. Green checks = provable, fair draw.
- Real-world bridge — the title deed is verified and held in escrow by a partner notary before the raffle opens. The draw picks the winner; the notary executes the sale. If the minimum threshold isn't reached, everyone is refunded.
- No passwords — log in with your Lightning wallet (LNURL-auth) or your Nostr key. The wallet pays, the wallet identifies you.
How we built it
- Next.js + TypeScript full-stack app, SQLite for storage, Tailwind for UI (French + English).
- Lightning payments: one invoice per purchase, each ticket's fingerprint derived from the payment hash (multi-ticket buys:
sha256(payment_hash + ':' + i)). - Merkle commitment: ticket hashes sorted and paired with SHA-256; the root is published to Nostr relays at close.
- Draw engine: deterministic recomputation from the target Bitcoin block hash (via mempool.space) — the same code runs server-side, in the browser verifier, and in the standalone CLI.
- Demo mode with simulated payments so judges can try the full flow without spending sats.
Challenges we ran into
- Designing trust without authority: the commit-then-draw ordering (Merkle root on Nostr before the block is mined) was the key insight that removes us from the trust equation.
- Making verification accessible: cryptographic proofs are useless if only developers can check them — hence the one-button in-browser verifier with plain-language green checks.
- Multi-ticket fairness: deriving independent, verifiable fingerprints for N tickets from a single Lightning payment.
- Bridging on-chain randomness with off-chain law: a draw no one can rig still needs a notary to turn a winning ticket into a signed deed.
What we learned
Bitcoin's block hash is a free, global, unstoppable randomness beacon — and Lightning + Nostr + a notary are enough to build a complete trust pipeline: payments you can't fake, commitments you can't rewrite, and a sale that holds up in the real world.
What's next
- Automatic refunds via Lightning hold invoices when the threshold isn't met
- Notary onboarding program across Senegal
- USSD tickets for feature phones — no smartphone required
- Mainnet pilot with a first real property
Sats today, keys tomorrow.
Built With
- bitcoin
- lightning-network
- lnurl-auth
- nextjs
- node.js
- nostr
- react
- sha-256
- sqlite
- tailwind
- typescript