Bitcoin Forum
June 17, 2019, 02:03:40 AM *
News: Latest Bitcoin Core release: 0.18.0 [Torrent] (New!)
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Fair Randomization  (Read 693 times)
GueurK
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
May 30, 2013, 11:24:37 AM
 #1

Hi there,

I'm building a new Bitcoin lottery.
The rule is very simple :
_ At the end of the round one user is selected randomly to win the pot.

The question : I want to make a fair randomization, like in other gambling websites.

Can someone give me clues about it ?

Thank's a lot !!

Try The Brand New Ethereum Game
50 Last Players Also Win The Bank
Works On Any iOS/Android Device With Standard Browser
Join Us On Telegram To Get Notified When You Can Win
COLOR PIXELS
AND WIN
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
GueurK
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
May 30, 2013, 02:59:12 PM
 #2

I feel alone ^^
deslok
Sr. Member
****
Offline Offline

Activity: 462
Merit: 250


It's all about the game, and how you play it


View Profile
May 30, 2013, 03:37:42 PM
 #3

you'd need a random number generator in hardware to be truly random, however without one of those a pseudo random number generator(easy enough in most programing languages) would be sufficient as long as the input was from a source you didn't directly control (something pulled from the blockchain such as the number of a randomly selected block in the past week would work well)

"If we don't hang together, by Heavens we shall hang separately." - Benjamin Franklin

If you found that funny or something i said useful i always appreciate spare change
1PczDQHfEj3dJgp6wN3CXPft1bGB23TzTM
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1193



View Profile
May 30, 2013, 08:22:21 PM
 #4

Take a random number (generated using any choice you want), and publish its hash (maybe padded with additional data to prevent guessing). Keep the random number a secret. at the time of drawing, take the hash of the latest block, and concatenate that with your secret number and take the hash of that. Use that hash to seed whatever PRNG you want to use. To allow auditing, publish the exact PRNG implementation you used and your secret (plus padding if any). Any user should be able to re-create the results.

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
GueurK
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
May 31, 2013, 11:50:24 AM
 #5

Thank's for your answers !
I'm gonna have a try.
I don't want to be accused of scam.

Razick
Legendary
*
Offline Offline

Activity: 1302
Merit: 1002

★YoBit.Net★ 1400+ Coins Exchange


View Profile
May 31, 2013, 02:06:20 PM
 #6

Hi there,

I'm building a new Bitcoin lottery.
The rule is very simple :
_ At the end of the round one user is selected randomly to win the pot.

The question : I want to make a fair randomization, like in other gambling websites.

Can someone give me clues about it ?

Thank's a lot !!



For something like that the built in psuedo-random number generator in your programming language should be fine. If you are using PHP just use $winner = rand(1,$numberOfEntries);

Or if you want to be provably fair, generate the random number in advance and publish a hash of it. You can then announce the winning number after the drawing and any user can compare the hashes.

Am I spamming? Report me!
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!