Inspiration
A Nigerian in London wants his mother in Kano to have a bag of rice. Today he sends cash and hopes, the money gets spent on something else, skimmed by a middleman, or lost to a fake alert scam that's now tooled and subscription scale, not opportunistic (one Telegram distributed fake-receipt generator alone has 61,000+ subscribers). The vendor has the mirror problem: she won't ship before payment, gets burned by forged transfer alerts, and settles days later through mobile money minus up to 5%. Everyone in this space competes on remittance fees. Nobody sells certainty about what the money actually became. That gap not fees, not speed, but proof, is what Yazo is built to close.
What it does
Yazo locks a dollar-priced payment on Bitcoin Lightning the moment a buyer pays, and holds it genuinely held, not just recorded as "pending" until the person receiving the goods shows a one-time delivery code. The vendor cannot take the money early. Yazo itself cannot either: the payment only settles when the correct code produces the cryptographic preimage a Lightning hold invoice requires, and Yazo never stores that code or the preimage, only a hash of it. If delivery never happens, a watcher refunds the payer automatically once the hold window passes nobody has to ask, dispute, or trust a human on the other end to do the right thing.
Four separate, rolescoped link keys are issued per order (payer, recipient, vendor, proof only), so the order id itself is never a shared credential a vendor or a forwarded link could use to cancel an order after goods already shipped.
The build includes a complete working flow end to end: a vendor dashboard, a key-based onboarding/sign in page (no accounts, no passwords, a self certifying key is the whole credential), a landing page with a live, functioning click-through demo of the real order component (not a screenshot), and signed, SSRF checked outbound webhooks so a vendor's own system can react to order events automatically.
How we built it
Zero runtime dependencies, deliberately, the entire backend is pure Node.js
(v22+) against node:https, node:sqlite, and node:test, so a judge can
run the full test suite with nothing to install. The escrow logic itself
(src/core/escrow.js) is a pure state machine over plain objects, tested
completely offline against src/lightning/fake.js, a fake Lightning node
that enforces the same rules the real one does (including real HTLC/CLTV
timing), so correctness is verified with no node, no chain, and no network
required.
Against a real two-node Lightning regtest network (lnd + btcd), both
journeys run for real: a delivered order settles to the vendor in seconds,
and an undelivered one refunds the payer automatically on expiry, with real
channel balances moving to the sat.
The frontend is plain HTML/CSS/vanilla JS, no framework, no build step, three pages (landing, dashboard, onboarding) sharing a token-based design system, built and verified mobile-first against a real 390px viewport throughout rather than adapted afterward.
Challenges we ran into
The real one was recognizing that the order id itself was a security hole:
in an earlier version, anyone holding an order's link, including a vendor
who'd already shipped, could cancel it before the delivery code was ever
shown, because the id alone functioned as a single shared credential with no
distinction between roles. That became the role scoped capability link
system (src/core/capability.js): four separate 128 bit keys per order, each
hashed server-side, each carrying only its own role's permissions, with a
dedicated attack-test suite proving every exploit against the old design now
fails.
A second real one, found during a pre submission audit rather than left to chance: Lightning's own hold-invoice streaming interface doesn't guarantee a newline between two consecutive payment state updates. The original frame parser assumed one was always there; under realistic timing, two updates arriving in the same network chunk could permanently corrupt its internal buffer and silently stop real-time payment detection for that order. It had zero test coverage before the audit caught it, fixed with a proper parser and nine new tests covering the exact failure case.
Accomplishments that we're proud of
A complete, honest threat model rather than a marketing one: the two code-sharing modes (QR vs. typed) are explicitly not claimed to be equally strong, and the weaker one is capped at five guesses specifically because we'd rather refund a payer than let a close guess win. 165 tests, all passing, covering the attack paths directly, including a test that hands a simulated attacker everything the server stores and proves it still can't move the money.
What we learned
That the gap between "a payment happened" and "the thing it was for actually happened" is the entire product, not a feature on top of a payment product, but the whole of it. And that a hold invoice's elegance (Yazo's own server cryptographically cannot settle early, not just promises not to) comes with a real, physical constraint, a Lightning channel will not hold an HTLC open indefinitely, that has to be designed around honestly rather than hidden, which shaped both the roadmap and the README's own Constraints section.
What's next
An on chain hash timelock contract, the same hash lock guarantee Lightning already provides, carried past the ~24 hour ceiling a Lightning channel can tolerate, so a hold can cover deliveries that genuinely take days. A stablecoin payout option at release time, integrating an existing licensed conversion partner rather than Yazo issuing or custodying anything itself, so a vendor can opt out of carrying 100% of the Bitcoin price risk during the hold. And escrowed payments for AI agents over L402, which reuses almost exactly the same preimage as proof primitive already built for human release secrets, pointed at machine to machine commerce instead. Full writeup, sourced: docs/roadmap.md.
