Bitcoin Forum
April 26, 2024, 04:09:00 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: A thought on casinos  (Read 1077 times)
Gareth Nelson (OP)
Hero Member
*****
Offline Offline

Activity: 721
Merit: 503


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?
Whoever mines the block which ends up containing your transaction will get its fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
notme
Legendary
*
Offline Offline

Activity: 1904
Merit: 1002


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.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
December 21, 2011, 02:17:44 PM
Last edit: December 21, 2011, 06:11:57 PM by DeathAndTaxes
 #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 (OP)
Hero Member
*****
Offline Offline

Activity: 721
Merit: 503


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 (OP)
Hero Member
*****
Offline Offline

Activity: 721
Merit: 503


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
warwar
Hero Member
*****
Offline Offline

Activity: 798
Merit: 505



View Profile
December 19, 2017, 02:37:48 PM
 #6

" My friend lost his house and his car. I think he had a gambling problem. Sad story. Unfortunately it happens.
I play too, but only for fun and only free apps. For example Best Free spins websites 2018 - gmblsites.com
Guys, be reasonable!"

Agree i think you could play gamble games with those website that has faucets or if you really want to send money to it then be respondsible person, you are ruining your life and your family if youve get addicted to gambling and you will mostly loss a lot of things and much worse is your family and a lot of debts. Just play with fun not for profit, and learn to control your self. Mostly of the gamblers these days is they cant manage to lose they try to win back their losses
BillCoin
Sr. Member
****
Offline Offline

Activity: 476
Merit: 259



View Profile
January 11, 2018, 09:43:13 AM
 #7

The main problem with that would be that the casino game won't be able to do anything if someone find out a backdoor in the code and is now taking all the money out of the casino.

The whole idea that the casino has no way to lose funds, they not only act as a casino, they also act as a major bank, even if you found a breech at one of their games, they won't let you take the money out as they will block your withdrawal request.
The idea that you offered is maybe much comfortable way to gamble for the users, but it makes the casino to be open for a long variety of risks.
kryptqnick
Legendary
*
Offline Offline

Activity: 3080
Merit: 1384


Join the world-leading crypto sportsbook NOW!


View Profile
January 11, 2018, 10:08:35 AM
 #8


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?
I am not sure whether this solution is possible, but why make your life harder with pseudo-random stuff? Is the aim to ensure that casino will pay the one who won? If it is then a very good solution is smart contracts. The casino can simply make a contract under which their funds will automatically be transferred to those who won the money and thus ensure scam-free environment. Of course, one needs to use appropriate coins to do that (not btc) like ethereum (or its token) or byteball, but I don't think that is a big problems.

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
▄▄██████▄▄
▀█▀
█  █▀█▀
  ▄█  ██  █▄  ▄
█ ▄█ █▀█▄▄█▀█ █▄ █
▀▄█ █ ███▄▄▄▄███ █ █▄▀
▀▀ █    ▄▄▄▄    █ ▀▀
   ██████   █
█     ▀▀     █
▀▄▀▄▀▄▀▄▀▄▀▄
▄ ██████▀▀██████ ▄
▄████████ ██ ████████▄
▀▀███████▄▄███████▀▀
▀▀▀████████▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
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!