How It Works
- Operator publishes a lottery note on Nostr
- Users zap the note to buy tickets (1 sat = 1 ticket)
- Tickets assigned deterministically - sorted by payment_hash from zap receipts
- Sales close 6 blocks before the draw block and operator published a note that commits to a ticket ordering
- Winner determined using Bitcoin block hash: (block_hash % total_tickets) + 1
- Prize paid via Lightning to the winner's lud16 address