spoorancher
Newbie
Offline
Activity: 30
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 06, 2013, 06:46:45 AM |
|
I'm sorry, but I really am not understanding all of that the post What about this (sort of based on that) Each ticket is given a number, which equals (100/(S+1))*P, where S=Number of tickets sold and P=place which the ticket was sold, so first sold is 1, second is 2...The +1 is in there so the lowest and highest numbers will be evenly spaced from 0 and 100 Then, the winner is the person whose number is closest to the number formed by combining the last two digits of the most recent block's hash. If the number was closer to zero or 100 than the lowest ticket number, the next block will be used (or else first and last tickets would be more likely to win) In the example you linked to, the numbers would be: 20 nikto 40 boba 60 spork 80 azrael And the last two digits of the block would be 7 and 2, making the number 72, so azrael would win This seems like it would be fair to me
There are too many odd cases for this to be verifiable. Also the block hashes are reported in hexadecimal. You are not going to get a number evenly distributed between 0 and 99. My original idea was to use a third party as a random number source, which required the salt and the hash. If you can get a random number from a future source, like a block hash, then you don't need to keep the file contents secret. Thus all you really need here is to turn a block hash into a random number and then use that to select a ticket. In order for this to be provably fair it is absolutely necessary that you state the rules for doing this precisely and unambiguously before you know what the random number is. Here is a straightforward plan. Make a list of tickets in a spreadsheet. If someone has more than one ticket, put their name in the spreadsheet twice. Give each line a number starting with 0. So, assuming boba has two tickets: 0 nikto 1 boba 2 boba 3 spork 4 azrael Post the spreadsheet in this thread. It turns out I can't resist a good math problem. I put together a Google Docs spreadsheet that turns block hashes into a random number, and then into a row selector: https://docs.google.com/spreadsheet/pub?key=0AsBByTjGFrPUdFYwSVhJYmJRb2lqbEJRSmZBQTNhSWc&output=htmlIt is a small improvement on tescomatty's idea. I cut up the 256-bit hash into eight 32-bit chunks, XORed them together, then took the modulus of that and the number of entries to get a random number between 0 and the number of entries minus one. If anyone with a CS or cryptography background cares and wants to double-check my work, I would appreciate it. When you post your spreadsheet, announce a block number a good 20 links higher than the newest one. When the block is generated, post its hash to the thread. PM me. I will update the spreadsheet with the hash, and it will spit out a number matching one of the entries in your spreadsheet. If there is actual money at stake here and you are planning to run a fair and verifiable giveaway, it would also benefit you to post the address of the wallet you will be distributing the coins from.
|
|
|
|
hambalan
Newbie
Offline
Activity: 46
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 06, 2013, 06:53:24 AM |
|
Since you have given me a free ticket, I suppose I now have a vested interest in this. Your suggested method is vastly improved with one major flaw: the block hash is hex based (16 values) as opposed to decimal based (10 values). If you take a look at the hash value of the block, using tescomatty's example (0000000000000049f7405dee9857490618e7536a1e28c750feef53125477eda2), you'll see that it contains 16 "numbers / values" (0-9; a-f). Taking the last two "digits" of the hash ("a2" in this case), it is actually equivalent to 162 in the decimal system (easy online conversion can be found at http://easycalculation.com/hex-converter.php). If you take the first three digits after the 0s (49f), it is equivalent to 1183 etc. You are of course free to choose any number of digits from the hash, but it is important that the selection should be converted from hex to decimal. The next step is to "mod" the decimal equivalent of your selected string. This basically is to divide a number and take the remainder after the division. For example, "a2" in hex = "162" in decimal, and dividing 162 by 4, the remainder would be 2 (162 = 4 x 40 + 2 ). It is important to renumber the number of entries in the raffle and start from 0. Instead of numbering 4 tickets as 1,2,3 & 4, you need to renumber them to 0,1,2 & 3. This is because modding will always produce a result (remainder after division) less than what you divide the number by (16 mod 4 = 0; 17 mod 4 = 1; 18 mod 4 = 2; 19 mod 4 = 3; 20 mod 4 = 0 etc) Hope the above makes sense.
|
|
|
|
|
personABCD (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 06, 2013, 09:07:13 PM |
|
Okay, thanks again for the help... hambalan, I was going to use the last two numerical digits (0-9) of the hash, I'm not sure if you got that, but it seems like you probably did and the numbers aren't evenly distributed in a decimal system.
So now I have switched from my system to assign each ticket a number from 1 to 100 and am going to just do what you said. Each ticket has a number starting from zero, and I will take the last two alpha-numeric characters of the block hash and convert them into decimals, then determine the winner by using H modulo T=W, where H=decimal value of last two hash characters, T=tickets sold and W= winning ticket number
Once again, thanks for your help
|
|
|
|
i3lome
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:05:16 AM |
|
1H7E7YqMoWQZsUCumbvyASYJzpnz3dudaB
2 tickets, hope I win that was my last Satoshi
|
|
|
|
personABCD (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:05:23 AM |
|
Okay...Ticket sales are closed Watch http://blockchain.info/ for the next block, 240154, then the winner will be announced
|
|
|
|
i3lome
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:06:18 AM |
|
did I get in on time
|
|
|
|
personABCD (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:07:45 AM |
|
1H7E7YqMoWQZsUCumbvyASYJzpnz3dudaB
did I get in on time
A bit late, but I'll let you have it as long as I receive the unconfirmed payment before the next block is mined on http://blockchain.info/, otherwise I will return it when it arrives, thanks, watch the spreadsheet
|
|
|
|
i3lome
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:09:19 AM |
|
thanks, big winner this way please
|
|
|
|
personABCD (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:11:26 AM |
|
Got the payment from i3lome, check the spreadsheet linked to in the OP
|
|
|
|
personABCD (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:13:45 AM |
|
I'm still waiting on the next block, after that it will only take a few minute for me to find and confirm the winner
|
|
|
|
personABCD (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:22:20 AM |
|
Congrats to (I was wrong, with my math at first, but the winner is still n00ber), you win again...I'd say you're luck but you had 62.5% of the tickets so it was sort of in your favor
|
|
|
|
|
i3lome
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:28:39 AM |
|
so did I confirm before the block or what,
|
|
|
|
personABCD (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:30:27 AM |
|
so did I confirm before the block or what,
Yes, I said you did...Unfortunately you didn't win, sorry
|
|
|
|
i3lome
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:31:31 AM |
|
lol, damn now Im broke.
|
|
|
|
n00ber
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:34:17 AM |
|
lol, damn now Im broke.
Sent you a consolation prize
|
|
|
|
i3lome
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:41:08 AM |
|
lol, damn now Im broke.
Sent you a consolation prize Awesome, thank you very much. Ive been wearing out the Btc Faucets, it takes about a week and 1/2 to get BTC0.01. No complaints tho, I also Mine Litecoin at 23khs of 3 cpu's. 1.5Months = 1 Ltc. I know I wont make money but I like Crypto and will continue on maybe I can get lucky and win one of these raffles to get some mining equipment. At the rate Im goin now it will take about 2 years to generate 1 Btc. Im excited, already been cussed for wasting electricity the big boys (rigs) could have been using. Im not gonna quit tho. Thanks again n00ber
|
|
|
|
personABCD (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:43:11 AM |
|
Okay, the prize has been sent to n00ber and he has confirmed payment
|
|
|
|
personABCD (OP)
Newbie
Offline
Activity: 28
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
June 07, 2013, 12:46:42 AM |
|
Awesome, thank you very much. Ive been wearing out the Btc Faucets, it takes about a week and 1/2 to get BTC0.01. No complaints tho, I also Mine Litecoin at 23khs of 3 cpu's. 1.5Months = 1 Ltc. I know I wont make money but I like Crypto and will continue on maybe I can get lucky and win one of these raffles to get some mining equipment. At the rate Im goin now it will take about 2 years to generate 1 Btc. Im excited, already been cussed for wasting electricity the big boys (rigs) could have been using. Im not gonna quit tho.
Thanks again n00ber
Until I got this my new GPU, I was only at about 29khs for LTC, but fortunately I got on FC and DGC and made money from mining those early
|
|
|
|
|