Post
Topic
Board Beginners & Help
Re: FREE to enter 0.2 BTC Raffle
by
tescomatty
on 31/05/2013, 22:33:20 UTC
There is a system for picking giveaway winners that is random, fair, and verifiable. Put the list of entries in a text file, sort it randomly, and then add some salt at the end. Number each entry, starting with 0. Post a hash of the file to the thread for all to see. Then get a trusted third party, like an uncontroversial hero member, to post a random number, preferably a few orders of magnitude larger than the number of entries. The trusted third party must attest that he has not seen the contents of the text file. For appearances' sake the trusted third party should also not have entered the giveaway. Mod the random number by the number of entries; this is your selector. The entry corresponding to the selector is the giveaway winner. Post the contents of the text file in such a way that the entrants can reproduce the hash.

For example, this could be the list of entries:

boba
spork
nikto
azrael

Here's the text file (secret):

0 nikto
1 boba
2 spork
3 azrael
g3qnuqnjkfrenfduvrbequig5q34b/,mcsm,/hachm,/atm,/a

The hash (public):

MD5 (giveaway.txt) = f139f1c4069cfa99022a2fbea534431b

Trusted third party "weeboo" says he has not seen the secret and has no conflict of interest. He provides the number 42.

Post the secret file. 42 mod 4 is 2, so the winner is spork.

It is not provably fair because you must trust third party, but I agree its much better than if OP comes here and says: the winner is XY because my random number told it so = we know it was rigged

Provably fair would be for example: the list of entrants is published here with numbers from 0 to max and told the random number for selecting a winner will be taken from first block hash after time X, timezone Y  as the first 4 hex characters after zeros whose will be mod-ed with the max entrants

Like block 238939
http://blockchain.info/block-index/388151/0000000000000049f7405dee9857490618e7536a1e28c750feef53125477eda2

has hash
0000000000000049f7405dee9857490618e7536a1e28c750feef53125477eda2

and 49f7 is 18935 decimal so from your example

18935 mod 4 is 3 so winner is azrael