Bitcoin Forum
May 07, 2024, 04:46:51 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Warning: One or more bitcointalk.org users have reported that they strongly believe that the creator of this topic is a scammer. (Login to see the detailed trust ratings.) While the bitcointalk.org administration does not verify such claims, you should proceed with extreme caution.
Pages: [1]
  Print  
Author Topic: Need some help with a provably fair drawing, advice please.  (Read 761 times)
KingOfSports (OP)
Hero Member
*****
Offline Offline

Activity: 602
Merit: 500

Acc bought - used solely for signature testing


View Profile
August 27, 2013, 11:36:08 PM
 #1

So my last drawing went off and Lightlord won all the prizes. However, I am thinking for the next drawing offering it to cost .01 BTC each ticket, now here is my problem. I am not going to use Just-dice's rolling to decide the winners, this takes way too much time and honestly no one wants to count what # ticket they are and what numbers they have for the roll.

I need a simple way of randoming drawing a number 1-500 or 1-1000 or whatever I need. I was thinking I have a private seed or hash or whatever and I ask someone else extremely trusted to hold their own private seed or something, then when the drawing filled we "combine" them and input the user seeds "1" "2" "3" and so on for prize # that is being drawn for.

So in summary:
A secret seed held by me
Another seed held by another player
And the client / public seed being the number of the prize being drawn (my drawing would prob have 10 winners, so it would be 1, 2, 3, 4, 5 up to 10) for the 10 draws. If a ticket would be drawn a second time I would draw again by adding a zero or something.

Can someone explain to me how to do this?

I have the idea and I know coinroll.it is doing something similar with their 100 BTC giveaway, but I don't understand how you add hashes or any of that or compute what the drawn number would be using the hashes.

Please comment if you can explain or help, thanks!

.







.
1715100411
Hero Member
*
Offline Offline

Posts: 1715100411

View Profile Personal Message (Offline)

Ignore
1715100411
Reply with quote  #2

1715100411
Report to moderator
1715100411
Hero Member
*
Offline Offline

Posts: 1715100411

View Profile Personal Message (Offline)

Ignore
1715100411
Reply with quote  #2

1715100411
Report to moderator
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715100411
Hero Member
*
Offline Offline

Posts: 1715100411

View Profile Personal Message (Offline)

Ignore
1715100411
Reply with quote  #2

1715100411
Report to moderator
knowitnothing
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250


View Profile
August 27, 2013, 11:54:43 PM
 #2

One of my last replies to you was a method entirely described and implemented, did you find some flaw on it ? I'm fine if you simple don't want to listen to me, that is ok. You can also look at Dabs lottery at least as an example for picking seeds.

Right now I honestly think you need to show some effort in implementing what has been described to you, then you can show other people what you have tried and what specifically you don't understand.
cwil
Sr. Member
****
Offline Offline

Activity: 285
Merit: 259


View Profile
August 28, 2013, 12:16:47 AM
 #3

Code:
<?php
print "Usage: $argv[0] [total_winners] [total_tickets] <seeds,...>\n";
$secrets "";
for(
$i 3$i sizeof($argv); $i++) $secrets .= $argv[$i];
print 
$secrets"\n";
$hash hash("sha256"$secrets);
print 
$hash "\n";
$seed hexdec(substr($hash08));
print 
$seed "\n";
mt_srand($seed);
$i $argv[1];
$winners = array();
do {
$randval mt_rand() % $argv[2];
if(!in_array($randval$winners)) {
array_push($winners$randval);
print "--$i--$randval\n";
$i--;
}
} while(
$i 0);
?>

cwil
Sr. Member
****
Offline Offline

Activity: 285
Merit: 259


View Profile
August 28, 2013, 12:41:12 AM
 #4

Also, just use txids of each payment as a secret and release a hash of your secret so there is no possibility of cheating, by you or anyone else.
Dabs
Legendary
*
Offline Offline

Activity: 3416
Merit: 1912


The Concierge of Crypto


View Profile
August 28, 2013, 02:05:28 AM
 #5

Hi. I welcome friendly competition. You even got a whale on your first drawing (hey lightlord, why didn't you buy tickets from me, hehehe.)

There is the usual Provably Fair, sometimes called "Provably Results" according to mem, if you restrict the seed to one (you) or fix the seeds otherwise. But using an extra secret from someone else will make it truly Provably Fair.

Your method of determining the winner just has to be made public. The rules on how I compute or calculate the winner on mine is all posted so ... feel free to copy it. I ended up using 7 secrets, 1 I know, 5 known by others, and 1 no one knows until that date.

I'd be happy to hold one secret for you, which I will publish on your thread the day after all entries are in.

In fact, I'd be happy to do the whole drawing for you, to determine the winners (according to my system) while you hold all the coins. I did that recently with a dice site give away.

(Don't forget to tip the dealer.) hehehe.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!