pull down to refresh
55 sats \ 8 replies \ @WeAreAllSatoshi 30 May \ on: Lightning Lotto vibe coded by @rolznz lightning
Vibe code ugh
reply
I feel like people are gonna start labeling their own code as vibe code, so when someone inevitably says it’s shit, they can just blame it on AI
reply
reply
reply
No I missed that one!
It happened to me though, I’m building https://bumbei.com not a vibe code app though, and we integrated Strike’s API for withdrawals and had some vulnerabilities and it got drained with close to 300k sats!😅
Our error was that we we’re trying to do withdrawals from a central wallet instead of segregated ones!
reply
LNFly is a bit different, it's a one-shot prompt that really gets you to focus on the idea and rules of the app you're trying to make. This is really another layer of abstraction on top of a high level programming language. Here's the current prompt for the lottery game:
Make a bitcoin lightning lottery app called "blotto" where you can buy lottery tickets for 210 sats each. Each time someone pays, the timer until a winning ticket will be called increases by 10 minutes.
When requesting to buy a ticket, the backend should generate an invoice using NWC. Once it is paid by the user (with bitcoin connect)
the frontend should do a call to the backend to verify the invoice was paid, and if so the ticket should be displayed to the user and give them a way to download the ticket. The filename of the ticket should be "BLOTTO_<game ID>_<public ID>.txt" and the contents should be the hidden ID.
Make sure the current buy button is replaced by a download ticket button (which should have a different color and should flash until the user clicks it). Once they have downloaded the ticket, there should be a secondary button below: "buy another ticket".
The backend MUST verify the payment was made by lookup up the invoice, before returning the ticket to the user.
If less than two tickets have been purchased, the timer should not start.
Each ticket should have a public ID (a simple sequential ID starting at 1) and a hidden ID (a long random string) that the user can use to redeem the winnings.
The winnings should be the rounded down value of the total number of tickets * the ticket price * 0.95.
The countdown timer should show on the main page.
When someone is on the page, every 10 seconds it should poll an endpoint to check the timer. On the page it show show a smooth countdown.
There should also on the page show the number of PAID tickets purchased and the prize pool (calculated from PAID tickets only)
If anyone buys a ticket, there should be a "timeout increased!" animated text which will be shown to anyone currently viewing (not just the user who bought the ticket).
The tickets and end date should be saved on the backend.
Once the endpoint to check the countdown timer is called and the countdown is finished, show the winning ticket (public ID) and allow users to attach their ticket file they previously downloaded (using an input field) and their lightning address to claim the prize.
If the prize is not claimed within 24 hours, the game should be reset. Also show a countdown of time to claim the prize.
If the ID matches, the backend must use Nostr Wallet Connect to pay the prize to the provided lightning address (using lightning tools to fetch an invoice) and then reset the game.
There should be a way to view previous games: (Date ended, Tickets sold + Prize pool in sats + winning ticket public ID + whether the ticket was claimed or not)
Style the game with a fun, lightning lottery theme. Make sure the content is vertically centered if it doesn't full the entire height of the screen.
reply
It’s an experiment app testing this new product at Alby
https://lnfly.albylabs.com/
Roland works for Alby and is a Rockstar
https://x.com/getalby/status/1928089198826770579
reply
reply