Wednesday, May 22, 2019

Proposals for picking a winner and sending notifications

Hi!

I just found this sub and love the concept. Unfortunately, it seems that the implementation is a little...complex...which has bred some distrust looking through the comments. And that's fair, users shouldn't need to download and look through source code to know that their money is going to the right person. It could be done a lot simpler, more transparently, and in a way that anyone with a web browser can verify in under a minute.

Also, because the notification emails are sent out manually, there have been times users missed a drawing. It happens! I'm not condemning anyone for getting caught up with life. But if the system were automated, as most email notifications are, both users and the mods would benefit. In fact, the whole system could be automated. Mods would benefit from having only to monitor the subreddit for inappropriate posts, and users would benefit from consistent, fair, transparent drawings, even in the event that the mods get too busy to host drawings.

Proposals

Firstly, the algorithm for picking the winner. How many of you have read the description and left scratching your head? I'm going to be honest, I've got a decent background with programming, web development, and blockchain, and it still took me a while to grasp. I propose 3 easy steps:

  1. Use an online post of some sort that has a unique ID, and pick the first one that was posted after the drawing closes. Blockchain IDs were picked because those are basically impossible to manipulate, and that's fine.
  2. The ID will probably contain letters. Convert each letter to a number, leaving you with a plain decimal number.
  3. Find the modulus (remainder after division) of that number with the number of entries. This gives you a number between 0 and the number of entries (and thus the winner)

Example

So for example, suppose 350 people enter into a drawing. The drawing closes, and the first bitcoin block mined afterwards is this one. It's ID is "0000000000000000001679bf81ee62f1f6cad59a1ed76dd49636d174f39a2634". You can verify that it was the first block mined after the drawing ended by clicking on the link to see when the previous block was mined. Take that ID and punch it into this website (it simply converts letters to their numeric equivalent based on their position in the alphabet). You get "000000000000000000167902068105056206106603010459011050476040449636041740639012634". Then just go to any calculator and punch in "167902068105056206106603010459011050476040449636041740639012634 % 350" to get the remainder of dividing that longass number with 350. The result is 234. And there's your winner. In my winner post, I'd have something like:


Congratulations to /u/conscious_dream! They won Drawing #69.

Contestants: 350
First blockchain: 0000000000000000001679bf81ee62f1f6cad59a1ed76dd49636d174f39a2634
Decimal form: 167902068105056206106603010459011050476040449636041740639012634
167902068105056206106603010459011050476040449636041740639012634 % 350 = 234

For more details on how this drawing was chosen, please click this link that would actually be here in implementation :p


Personally, I feel like that's much simpler than linking people to a dropbox filled with python code that runs needlessly complex algorithms. I also think the whole system should be automated. A bot could:

  1. Create the entry thread monthly.
  2. Email all subscribers
  3. Lock the thread after 24 hours.
  4. Wait for the next block to be mined.
  5. Determine the winner, notify them, and create the winner thread.

The how behind that is for another post :p But I imagine it wouldn't take more than 100 lines of code and simplify everyone's lives as well as ensure that drawings happen consistently, everyone gets notified consistently, and mods are free to take a week or year off without affecting the subreddit if they so choose.

Let me know your thoughts!


No comments:

Post a Comment