Group buying where a Bitcoin Cash covenant holds the money.
Hit the group size and the shop is paid automatically. Miss it and every buyer is refunded automatically,
and early joiners get a bonus from the shop.
$8 if 10 of us buy. Otherwise your money comes back, plus a bonus.
Or join the Refund Bunch (needs 3, has only 2 seats): after its deadline block your money comes back with a bonus, and nobody has to press anything.
|
Open the app EMBER2026 donations (Community Choice) bitcoincash:zzvha3elk3nl27xsyam28kxhcqzgl4duw50jehkn4t
|
On Nov 22, 2026 a real Selene phone wallet joined the Judge Bunch over WizardConnect, and the open web page broadcast the keyless payout. Selene shows the receipt NFT by name with the Bunch icon, read from our BCMR registry.
![]() |
|
Every other contract path ran on testnet3 (same consensus rules as mainnet): complete, leave with the receipt,
keyless refund + early bonus, and shop-accept with the early-joiner rebate. All txids: docs/EVIDENCE.md.
| Home | A live bunch | Connect a wallet |
|---|---|---|
![]() |
![]() |
![]() |
| Start a bunch (shops) | Pickup voucher check | Phone |
|---|---|---|
![]() |
![]() |
![]() |
All screenshots are of the live mainnet site (docs/assets/screens/).
- Nobody wants to go first. Group deals and threshold campaigns stall because early joiners carry the risk that the group never fills.
- Someone has to hold the money. Whoever collects money for a group order must be trusted to refund it if the order falls through.
- Deal platforms are expensive for shops. A 2011 analysis of Groupon merchant agreements put Groupon's share at
around 42% of revenue (research summary in
docs/11).
Bunch replaces the trusted organiser with a covenant, and adds an early refund bonus: a dominant assurance contract (Tabarrok 1998). If the group fills you get the deal; if it doesn't, you get your money back plus a bonus, so joining early is a no-lose choice.
| Finding | Source |
|---|---|
| A refund bonus makes contributing a dominant strategy | Tabarrok (1998), Public Choice 96:345–362 |
| Refund bonuses raise success in threshold fundraising (lab) | Cason & Zubrickas (2017), GEB 101 · (2019), EER 119 |
| Refund bonuses "can increase the rate of campaign success by 50% or more"; early-only bonuses work as well and pay out less | Cason, Tabarrok & Zubrickas (2021), GEB 129 · working paper · summary |
| A refund bonus is a credible quality signal | Cason, Tabarrok & Zubrickas (2025), Management Science 71(7) |
| Showing later buyers how many joined increases purchases | Hu, Shi & Wu (2013), Management Science → Bunch's live counter |
| Group discounts turn buyers into sales agents | Jing & Xie (2011), Management Science 57(8) |
| Small teams + short windows drive team purchase at scale | Pinduoduo (Modern Retail) · YC |
| Metamorphic relations find faulty crowdfunding contracts (the best relations killed 89% of mutants) | Villanueva et al. (2025), arXiv 2501.09955 → our metamorphic tests |
The sources, as published (screenshots of the abstract pages, Nov 22, 2026)
| Innovation | Why it matters | Where |
|---|---|---|
| Dominant assurance contract as a UTXO covenant | The bonus pool is locked up front, so the promise to pay early joiners is enforced by consensus, not trust | contracts/BunchState.cash |
| Keyless settlement by any open page | No bot, no server, no key: whoever has the page open broadcasts complete or refund; duplicates are harmless | src/core/settle.ts, src/ui/useBunch.ts |
| Authority by spending NFTs | WizardConnect has no message signing, so the receipt NFT authorises leave and the shop key NFT authorises accept | contracts/*.cash, src/core/build.ts |
| The bunch lives in the link | Every parameter is in /b#v1.<base64url>; any browser rebuilds both contract addresses and reads state from Electrum |
src/core/spec.ts |
| Receipts are pickup vouchers | The receipt NFT shows by name in wallets (BCMR) and the shop verifies it against the chain | src/core/voucher.ts, functions/bcmr/[cat].ts |
| Early rebate survives a smaller deal (D1) | If the shop accepts fewer buyers after the deadline, early joiners still get their bonus as a rebate | merchantAccept in BunchState.cash |
| Mutation-tested covenants | Every require is removed one by one; each must break a test or be explained |
MUTATION_REPORT.md |
flowchart LR
B[Buyer wallet] -- join: price --> S[(Seat UTXO<br/>seat NFT)]
B -. receipt NFT .-> B
ST[(BunchState<br/>minting NFT + bonus pool)] -- count+1 --> ST
S --> C{count ≥ target?}
C -- yes: anyone broadcasts complete --> M[Shop: price × n − 2%]
C -- no, deadline passed: anyone broadcasts refund --> R[Every buyer: price<br/>early seats: + bonus]
sequenceDiagram
participant U as Buyer (Selene)
participant P as Bunch page (static)
participant E as Electrum (Fulcrum)
participant C as Covenants on BCH
P->>E: read state + seats (scripthash subscribe)
U->>P: tap Join
P->>U: WizardConnect sign request (broadcast: false)
U-->>P: signed join tx
P->>E: broadcast join
E-->>P: notification: count = target
P->>E: broadcast keyless complete (any open page)
C-->>P: shop paid, exact 2% fee
| Transaction | Who | Inputs → outputs |
|---|---|---|
| genesis | shop | vout-0 coin → state (minting NFT + pool), shop key NFT, change |
| join | buyer, 1 signature | state + buyer coins → state′, seat (= price), receipt NFT, change |
| leave | buyer (spends own receipt) | state + seat + receipt → state′, full refund, change |
| complete | anyone | state + every seat → shop, exact platform fee |
| refund | anyone, after deadline | state + every seat → shop's leftover pool, each buyer price (+ bonus if early) |
| merchantAccept | shop (spends key NFT) | state + key + every seat → shop, fee, a bonus rebate to each early seat |
| escape / reclaim | anyone, after grace period | seat → its buyer / state → shop |
Full design: ARCHITECTURE.md. The web app is static files on Cloudflare Pages; the only function is a
stateless BCMR registry so wallets can name the receipts. No server holds keys or money.
Covenants that loop over inputs and inspect tokens, CashTokens NFTs as receipts and vouchers, sub-cent fees and instant 0-conf. "Anyone can settle" only works because the contract, not a server, decides who gets paid.
Summary below; threat model, findings and remaining risks in SECURITY.md.
- Seat theft through join/leave is blocked; settlement needs every seat (
inputs.length == count + 1). - Refunds go to the address stored in each seat; forged seats, receipts and shop keys from other token categories are rejected.
- Every payout is exact, so a broadcaster can't shift money between outputs (Finding F1); keyless miner fees are capped by
maxFee. - After the grace period every seat can go home even if this site disappears.
- Internal testing and review only. No third-party audit.
| Layer | What | Command |
|---|---|---|
| Contract VM tests | 131: 20 normal flows + 111 single-change attacks, each must fail inside a contract | npm run test:vm |
| Mutation testing | 82/95 rule mutants + 33/35 operator mutants killed; every survivor explained | npm run mutate |
| App tests (vitest) | 62: builders on the real BCH VM, WizardConnect signing, spec validation, metamorphic + fast-check property tests | npm run test:unit |
| WizardConnect live | real dapp + wallet managers paired over the public relay | npm run test:live |
| Browser journeys | create → join ×2 → paid → voucher verified; accept with rebate; refund + bonus; leave | npm run e2e |
| Smoke + accessibility | deployed site on desktop and phone, real mainnet Electrum read, axe WCAG 2 A/AA on every page | npm run e2e:smoke |
Details: TESTING.md.
npm install
npm run compile # cashc -> artifacts/
npm test # VM tests + vitest
npm run dev # http://localhost:5173 (VITE_NETWORK=chipnet for chipnet; VITE_MOCK=1 for a simulated chain)
npm run keygen && npm run seed:demo && npm run deploy # see DEPLOYMENT.md| Requirement | Where |
|---|---|
| Anyone can make a useful mainnet tx | Join the Judge Bunch (pinned on the home page); proven with Selene |
| Live demo | https://bunch-cash.pages.dev |
| WizardConnect | src/core/wallet.ts, src/ui/wallet.tsx; Selene join on mainnet |
| Banner: slides, repo, unique EMBER2026 address | top of every page (src/ui/components.tsx) |
| Mainnet transactions | docs/EVIDENCE.md |
Full mapping of every rule and judging category to evidence: JUDGES.md.
- Every path ran on testnet3; on mainnet a real phone wallet has signed the join. Leave, create and shop-accept have not yet been signed by a real phone wallet (headless wallets sign them in
npm run e2e). - CashScript can only prove "after", so late joins can't be blocked by the contract; the UI hides Join at the deadline and late seats are refunded in the same batch.
- Time deadlines use median-time-past, about an hour behind wall clock; demos use block-height deadlines.
- One state thread means one join per block of contention; the UI retries ("someone just took seat 4").
- Not built yet: leader flow, public merchant history, tiers, PUSD, lanes, XO template, languages (
ROADMAP.md).
JUDGES.md · ARCHITECTURE.md · SECURITY.md · TESTING.md ·
DEPLOYMENT.md · BUSINESS.md · ROADMAP.md · CHANGELOG.md ·
CONTRIBUTING.md · design notes docs/00–13.
Built for BCH BLAZE 2026 (Mainnet Track), starting from the planning pack in docs/ (contracts, VM tests, research).
Thanks to the community member who funded the Bunch team shop on mainnet.
MIT (LICENSE). Uses @wizardconnect/* unmodified from npm; their docs say LGPL-3.0-or-later while some npm
metadata disagrees.

















