Hey Stackers! π
I wanted to share a side project I've been working on: LightningCanvas.
It's an interactive 100x100 pixel board (10,000 total pixels) where anyone can buy pixels for 100 sats each via Lightning, set custom colors, title, and URL.
Once all 10k pixels are filled, a 200,000 sat prize is automatically awarded to 6 winning pixel coordinates!
π Provably Fair Mechanism
Winner selection uses cryptographic SHA-256 modulo math based on the latest mined Bitcoin block hash when the 10,000th pixel is purchased.
π€ Let's test it together!
I'd love to test out the placement, instant LN invoices, and verification flow with anyone from the community here. Drop a comment if you place a pixel, or let me know if you run into any bugs or have UI/UX suggestions!
π Check it out here: https://timelock-canvas.vercel.app/
Did you say ~lightning ~gaming? Sign me up!
The site is currently inactive due to application improvements. Refunds have been issued to everyone who purchased pixels using satoshis!
Nice, it's similar to satoshis.place and satoshisettlers.com/
cc @tidwell
Ok cool concept however when I went to pay my invoice for 2300 sats it only charged me 1 sat. Did I do something wrong?
Hey! You didn't do anything wrong, but since it's an open-amount invoice, your wallet lets you type the amount manually.
Just enter 2300 sats manually when paying, and don't forget to add your PX-.... ID in the note field so the canvas can verify it!
Also, make sure to download TXT Receipt so you have your exact pixel coordinates! Thanks for the support!
Cool build. One question on the fairness draw: taking SHA-256(blockhash) mod 10,000 has a small modulo bias (2^256 isn't a multiple of 10,000), and deriving 6 winners from a single hash makes those draws correlated rather than independent. Probably fine for a fun game, but have you considered rejection sampling for the mod, plus hashing in a per-winner index (e.g. SHA-256(blockhash || i)) so each coordinate is independently uniform? Also: what stops someone from watching the tip and rushing the final pixel purchases when the current block hash happens to favor their pixels?
100 sats for one pixel, 200k sats on the line. Thatβs one hell of a gamble.
Small UX note for canvas-style apps like this: the open-amount invoice pattern keeps confusing first-time Lightning users (paying 1 sat instead of 2300). A fix that works well elsewhere is generating an exact-amount invoice per purchase and embedding the order id in the invoice memo/description hash, so the wallet prefills everything and verification is automatic on settle. More invoices to manage server-side, but it removes the two biggest support tickets: wrong amounts and missing order ids.