As part of the Backdrop Build Hackathon I elected to commit myself to making a prototype of the 'Ticketed DLC' protocol I proposed a few months back. 37 days later, here I am with a working prototype. Setting a deadline for yourself can really make a difference - Who knew?

The Repo is Here

TLDR

A Ticketed DLC (discreet log contract) is an off-chain scaling protocol which lets many people buy into a conditional payment contract (AKA discreet log contract) with no additional on-chain footprint and no additional trust required. One person buying in looks the same on-chain as 100 people buying in. All buy-ins and pay-outs for a DLC can be done over lightning, ecash, or cross-chain via atomic swaps.
If you're not already familiar with DLCs, check out this document in the DLC specifications repo. They're essentially a way of wagering on which outcome a semi-trusted oracle will sign.

Next Steps

There's definitely still plenty of optimization and upstream-interop work left to do, and having PTLCs on Lightning would make this so much more efficient on-chain. But as a proof of concept I can play with today, I'm incredibly happy with the result.
It seems this could actually work in the real world. Running against regtest, all tests are passing, and simulated players can buy into simulated DLCs simply by buying SHA256 preimages (e.g. via Lightning)
Ultimately though, this is only a Rust library; there's nothing for a user to 'play with' beyond running the integration tests.
I'm curious if y'all plebs would be interested in collaborating to build something that could work as an more interactive demonstration on testnet and maybe even mainnet. Hit me up on Nostr or email if you have any ideas.
This could be huge. A bit over my head but @benthecarman might find this really interesting. Either way, great work and looking forward to following along.
reply