Bitcoin Forum
December 08, 2016, 10:14:08 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: A thought on casinos  (Read 848 times)
Gareth Nelson
Hero Member
*****
Offline Offline

Activity: 722


View Profile
December 21, 2011, 01:24:02 PM
 #1

This came to me the other day, and i'm unsure on the details as I haven't went into the transaction scripts yet so please excuse me if the whole idea is nonsense.

Would it be possible to implement a PRNG in the transaction script in such a way that the payouts are automated to the winner of a gambling game? Something such as comparing the output of the PRNG specified in the transaction script with the last byte of the address and a small whitelist of addresses.

I presume that the scripting is turing-complete but space limited, but i'm not too familiar with this aspect of bitcoin myself.

Thoughts anyone?
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481235248
Hero Member
*
Offline Offline

Posts: 1481235248

View Profile Personal Message (Offline)

Ignore
1481235248
Reply with quote  #2

1481235248
Report to moderator
notme
Legendary
*
Offline Offline

Activity: 1526


View Profile
December 21, 2011, 01:34:36 PM
 #2

This came to me the other day, and i'm unsure on the details as I haven't went into the transaction scripts yet so please excuse me if the whole idea is nonsense.

Would it be possible to implement a PRNG in the transaction script in such a way that the payouts are automated to the winner of a gambling game? Something such as comparing the output of the PRNG specified in the transaction script with the last byte of the address and a small whitelist of addresses.

I presume that the scripting is turing-complete but space limited, but i'm not too familiar with this aspect of bitcoin myself.

Thoughts anyone?

Assuming it is turing-complete, you still need enough "random" data to seed your PRNG.  Where are you going to get that data from in a way that isn't reproducible at a distance?

https://www.bitcoin.org/bitcoin.pdf
While no idea is perfect, some ideas are useful.
12jh3odyAAaR2XedPKZNCR4X4sebuotQzN
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
December 21, 2011, 02:17:44 PM
 #3

This came to me the other day, and i'm unsure on the details as I haven't went into the transaction scripts yet so please excuse me if the whole idea is nonsense.

Would it be possible to implement a PRNG in the transaction script in such a way that the payouts are automated to the winner of a gambling game? Something such as comparing the output of the PRNG specified in the transaction script with the last byte of the address and a small whitelist of addresses.

I presume that the scripting is turing-complete but space limited, but i'm not too familiar with this aspect of bitcoin myself.

Thoughts anyone?

Assuming it is turing-complete, you still need enough "random" data to seed your PRNG.  Where are you going to get that data from in a way that isn't reproducible at a distance?

If you could delay the transaction (i.e. don't process until block x) you could submit a transaction and then use the block hashes for the next 6 blocks (1 hour) as your seed data.  Not sure if Bitcoin can (or will) support transactions which can't be processed until a certain date but if they do ...

1) Current block is 123
2) Casino submits game to Bitcoin network (transaction has a not before block 129 limit)
3) Script skips block 124 and looks at block hashes of blocks 125, 126, 127, 128 to determine winner.
4) Transaction is included in block 129, payouts according to rng in script.

Would that work?
Is that possible in Bitcoin (or possible in future)?
If so it would eliminate operator fraud (well other than outright theft).  

Proof of concept Game:
Operator website offers a game 10 BTC bet, One in 11 chance to win 100 BTC. The website provides user a deposit address.   Players need no accounts, they can track their progress by looking up deposit address.  Once there are 11 bets the website creates keep 10 BTC (the vig) and creates a 100 BTC transaction w/  a delay 6 block limit.  The transaction uses the hashes of the next 5 blocks as the seed and the addresses used by players as payout.  If you win the 100 BTC comes right to your wallet.  If you don't you know the game was fair as the winner was determined by something in the future and you can verify results.

A simplified version wouldn't even need a RNG.  Just take the XOR the hashes of the 5 blocks as your random data.  Now start w/ least significant digit of the combined hash and compare it to the least significant digit of player's addresses.  Is there a match?  If yes then payout to matching addresses (payouts could be split - 1/58 chance).  If not then look at next least significant.  If there is no match for 10 digits (essentially quadrillions to one) then return the 10 BTC wager back to all players - void game.

Any comments?

On edit:  fixes some mistakes & added clarification.
Gareth Nelson
Hero Member
*****
Offline Offline

Activity: 722


View Profile
December 21, 2011, 03:33:38 PM
 #4

This came to me the other day, and i'm unsure on the details as I haven't went into the transaction scripts yet so please excuse me if the whole idea is nonsense.

Would it be possible to implement a PRNG in the transaction script in such a way that the payouts are automated to the winner of a gambling game? Something such as comparing the output of the PRNG specified in the transaction script with the last byte of the address and a small whitelist of addresses.

I presume that the scripting is turing-complete but space limited, but i'm not too familiar with this aspect of bitcoin myself.

Thoughts anyone?

Assuming it is turing-complete, you still need enough "random" data to seed your PRNG.  Where are you going to get that data from in a way that isn't reproducible at a distance?

That's the whole point in fact - the data must be reproducible so that all players get the same sequence and same experience
Gareth Nelson
Hero Member
*****
Offline Offline

Activity: 722


View Profile
December 21, 2011, 03:34:28 PM
 #5

This came to me the other day, and i'm unsure on the details as I haven't went into the transaction scripts yet so please excuse me if the whole idea is nonsense.

Would it be possible to implement a PRNG in the transaction script in such a way that the payouts are automated to the winner of a gambling game? Something such as comparing the output of the PRNG specified in the transaction script with the last byte of the address and a small whitelist of addresses.

I presume that the scripting is turing-complete but space limited, but i'm not too familiar with this aspect of bitcoin myself.

Thoughts anyone?

Assuming it is turing-complete, you still need enough "random" data to seed your PRNG.  Where are you going to get that data from in a way that isn't reproducible at a distance?

If you could delay the transaction (i.e. don't process until block x) you could submit a transaction and then use the block hashes for the next 6 blocks (1 hour) as your seed data.  Not sure if Bitcoin can (or will) support transactions which can't be processed until a certain date but if they do ...

1) Current block is 123
2) Transaction has a not before block 129 limit
3) Script skips block 124 and looks at block hashes of blocks 125, 126, 127, 128
4) Transaction is included in block 129, payouts according to rng in script.

Would that work?
Is that possible in Bitcoin (or possible in future)?
If so it would eliminate operator fraud (well other than outright theft).  

Concept Game:
Operator website could have a game.  10 BTC bet, One in 11 chance to win 100 BTC. The website provides user a deposit address.   Players need no accounts, they can track their progress by looking up deposit address.  Once there are 11 bets the website creates keep 10 BTC (the vig) and creates a 100 BTC transaction delay 6 block transaction using the hashes of the next 5 blocks as the seed and the addresses used by players as payout.  If you win the 100 BTC comes right to your wallet.  If you don't you know the game was fair.

A simplified version wouldn't even need a RNG.  Just take the xOR of the 5 blocks as your random data.  Now start w/ least significant digit compare it to the least significant digit of player's addresses.  Is there a match?  Yes.  The payout to matching addresses (payouts could be split - 1/58 chance).  If not then look at next least significant.  If there is no match for 10 digits (essentially quadrillions to one) then payout 10 BTC back to all players - void game.

Any comments?

This is exactly the kind of concept I was looking for
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!