lnbits / lnurlp

MIT License
9 stars 8 forks source link

Raffle mode #20

Open prusnak opened 1 year ago

prusnak commented 1 year ago

There is a lnurld project that primarily functions as a basic lnurlp server, but it has a unique Raffle feature that caught my eye.

Here's how it works.

  1. The admin activates 'raffle mode' for a specific lnurlp account.
  2. Once activated, every time someone makes a payment using this lnurlp, they receive a success message like "Ticket ABCDEF." Here, 'ABCDEF' is an alphanumeric string derived from the preimage of the payment.
  3. The admin can access the raffle screen to:
    • Select winners at random by clicking the 'DRAW' button. Each time it's pressed, the 'ABCDEF' token and the corresponding payment preimage are displayed. This is usually shown on big screen so everyone in the room can see it. We show the preimage because some LN wallets might not display success messages in their transaction history/details, but many do show the preimage.
    • After the raffle concludes, admin can clear the database of all issued tickets. This is useful so admin can start a new raffle the other day.

We have a blast with this Raffle at our meetups, and it'd be awesome to see it integrated into LNbits!

P.S.: If you feel this might be beyond the scope of the lnurlp extension, please let me know. But considering a separate raffle extension would likely duplicate about 80% of what lnurlp already accomplishes, I thought it could be a good fit to add it directly to this one.

dni commented 1 year ago

loving the idea!

i am on the fence, my gut says it should be its own extension.

arbadacarbaYK commented 11 months ago

sounds like the Bets4Sats (https://github.com/oren-z0/bets4sats) Extension thats still not vetted

https://github.com/lnbits/lnbits-extensions/pull/133