Bitcoin Forum
November 19, 2018, 11:10:32 PM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Creating verifiable rolls with PHP  (Read 34 times)
bukz
Newbie
*
Offline Offline

Activity: 154
Merit: 0


View Profile WWW
September 02, 2018, 03:34:02 AM
 #1

Hey guys I'm working on a gambling site for my community members to play around and invest in. Does anyone know how I can create rolls that are verifiable? I've found some old code from the old coindice script but it's not working fomr some reason. Cheers!
1542669032
Hero Member
*
Offline Offline

Posts: 1542669032

View Profile Personal Message (Offline)

Ignore
1542669032
Reply with quote  #2

1542669032
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
adaseb
Legendary
*
Offline Offline

Activity: 1778
Merit: 1102



View Profile
September 02, 2018, 06:17:30 AM
 #2

Its very easy for a dice style game and you have basically many options to work with.

What you do at first is generate some random seed such as
"01234567890"

and then you run a hash thru it such as SHA256
SHA256('01234567890')= EE29EB4A8725678278AC439CF7ABFD2A849CDC7378A6B6316017B81C51D720E7

Then you can simply add a nonce and client seed to that seed if you want and it would increment for everybet.

At first you show the gambler the hashed seed "EE29EB4A8725678278AC439CF7ABFD2A849CDC7378A6B6316017B81C51D720E7" and when he is done playing you need to give them the unhashed seed "01234567890" so they can verify their bets.

There are many ways to do this and if you program it correctly it would be impossible for either party to cheat.

.FORTUNE.JACK.
      ▄▄███████▄▄
   ▄████▀▀ ▄ ██████▄
  ████ ▄▄███ ████████
 █████▌▐███▌ ▀▄ ▀█████
███████▄██▀▀▀▀▄████████
█████▀▄▄▄▄█████████████
████▄▄▄▄ █████████████
 ██████▌ ███▀████████
  ███████▄▀▄████████
   ▀█████▀▀███████▀
      ▀▀██████▀▀
         
         █
...FortuneJack.com                                             
...THE BIGGEST BITCOIN GAMBLING SITE
       ▄▄█████████▄▄
    ▄█████████████████▄
  ▄█████████████████████▄
 ▄██
█████████▀███████████▄
██████████▀   ▀██████████
█████████▀       ▀█████████
████████           ████████
████████▄   ▄ ▄   ▄████████
██████████▀   ▀██████████
 ▀██
█████████████████████▀
  ▀██
███████████████████▀
    ▀█████████████████▀
       ▀▀█████████▀▀
#JACKMATE
WIN 1 BTC
▄█████████████████████████▄
███████████████████████████
███████████████████████████
██████████▀█████▀██████████
███████▀░░▀░░░░░▀░░▀███████
██████▌░░░░░░░░░░░░░▐██████
██████░░░░██░░░██░░░░██████
█████▌░░░░▀▀░░░▀▀░░░░▐█████
██████▄░░▄▄▄░░░▄▄▄░░▄██████
████████▄▄███████▄▄████████

███████████████████████████
███████████████████████████
▀█████████████████████████▀
bukz
Newbie
*
Offline Offline

Activity: 154
Merit: 0


View Profile WWW
September 02, 2018, 01:39:52 PM
 #3

Thanks!
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!