Pages:
Author

Topic: If I wanted to start a Bitcoin casino... [will pay for help] (Read 9109 times)

newbie
Activity: 56
Merit: 0
First pay, then we look what to do with your casino. Shortly would be better not even try to do something due to very strong competitors.  Wink
brand new
Activity: 0
Merit: 0
    I believe that every game player has the mindset to win but only few understand the winning strategy. Like myself I’m a table games player. Let it not appear strange but in many cases it turns out mathematics and casino games are closely related.  Math permeates every aspect of life and gambling is by no means an exception.
    It’s hardly a secret for anyone the house always has an advantage over the players. Fortunately, there are always ways to decrease the percentage of the casino’s edge, meanwhile increasing one’s chances of winning. Many players resort to applying different betting strategies which allow them to neutralize, at least partially, the house’s edge and thus accumulate more winnings by simply complying with the system of choice they’re following.
    I have come to realize that there is a suitable betting strategy for each casino game. Some systems are more universal and can be used in a number of games, others less so and can be properly applied only in specific cases. Either way, choosing a suitable betting system and applying it properly can be of great assistance to all players.
    There is this system that is close to being perfect and only but a few has mastered how it work and it has always bring a positive outcome. This principle is called the Fibonacci’s system.
    How does it work? The Fibonacci’s is a cumulative progression which means in a sequence of numbers each number that follows is equal to the total of the two numbers which precede it. It always starts with 0 and 1 but when the strategy is applied in gambling, the zero is always ignored. An example of such a sequence would be (0,) 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 – and it can actually continue in the same manner forever. The idea being, if one increases their bets continually, sooner or later there will come a time when their winnings will overcome the losses.
    It’s recommended to use this strategy with even bet units. Let’s say for example a player’s single bet unit is equal to $10. If they comply with the Fibonacci’s betting strategy and their sequence of numbers is as follows 1, 2, 3, 5, 8, 13, the player should raise the stakes after each loss, so respectively the bets will amount to $10, $20, $30, $50, $80, $130 etc. In case the player wins, he/she should go back two steps in the sequence – for example if they have won when they’ve bet $80, their next bet should amount to $30.
brand new
Activity: 0
Merit: 0
You was looking for a nice online daw sd  W dwadw casino website, Then they try their luck online, or at a local bar running a charity tournament. you are welcome to casino online
คาสิโนออนไลน์
brand new
Activity: 0
Merit: 0
You can use turnkey software for bitcoin casino. For example enterra poker or softswiss. Enterra software supports different kinds of poker(hold'em, omaha, chinese). Also there is an oportunity of renting, if you have small budget.
full member
Activity: 140
Merit: 100
[...]
So if one player leaves at any point the hand is stuck? Or is it less strict than that?

I gave it a bit of thought. Yes, a denial of service attack is possible. However, it is a bit like chicken and egg problem. If remaining N-1 players can cooperate to find out what is hidden in cards that have not been dealt, then they can, by elimination, find out what the last player has in hand.
legendary
Activity: 1246
Merit: 1016
Strength in numbers
There is a method to play cards on internet and be fair and secure. However, I expect a generous tip, do you agree? If you agree then read on  Wink

1. There are N players at the table.
2. Each player generates his own encryption and decryption keys for commutative chipper. Both are secret. (More about such chippers later.)
3. A salt is selected and published.
4. Player 1 creates a deck. Each card consists of plain text: card,siut,salt
5. Each player, including player 1, encrypts each card with his own encryption key, shuffle the whole deck, and then passes the deck to a next player.
6. When the deck has been encrypted and shuffled by everyone, anyone can be a dealer. It can be player N, or 1, or random one.
7. When dealer wants to give a card to player K, he first passes this card to Player K+1 for decryption. (Of course if card is for player N then start with player 1.) Each player, starting with K+1, decrypts the card and passes it to next one (player 1 is next after player N). In this way Player K gets the card last. When decrypted by player K, the card will read: card,siut,salt. If message is readable (salt does match) then no tampering has occured.

Since player K is the last to decrypt the card, he can be sure no one else knows what card he was delt! You can play any kind of card game in this way. How cool is that?

Now about commutative chipper as prommised in step 2. This is a chipper where E(key1, E(key2, message)) = E(key2, E(key1, message)). This means that you can decrypt in any order.

You can use a variation of RSA encryption to achieve this. In this variation both encryption and decryption keys are SECRET. However, the parameters necessary to generate them are public. In particular two prime numbers are disclosed.

So we publicly generate two large prime numbers p and q, then calculate n=p*q and PHI=(p-1)*(q-1).

Next each player in secret picks up his own encryption key e which is relatively prime to PHI. If N is large that is trivial with ony few trials and errors.

Each player, also in secret, calculates decryption key d=e^(-1) mod PHI.

Encryption is calculated as c = m^e mod n (where c stands for cypertext and m for message).
Decryption is calculated as m = c^d mod n.

For the sake of this example m = (card-2) + 13 * siut + 52 * salt
card = (m mod 13) + 2
siut = floor(m/13) mod 4
salt = floor(m/52)

My tip wallet is 1FQkH63k6hkexFMTRzLtJEE6ZAaTBRhjiS   Smiley

Edit: typo

So if one player leaves at any point the hand is stuck? Or is it less strict than that?
full member
Activity: 140
Merit: 100
[...]
Whoa... heavy shit..

I like what I read, the little I understand Wink

Ok, how can I make it more aprochable?

The concept of commutative chipper is quite simple. It is like adding paddlocks to a chest. It does not matter in which order you put them on and take them off, as long as all have been taken off.

The phase of shuffling: put your paddlock and shuffle around.
The phase of dealing cards: remove paddlocks so that the receiver of the card unlocks it last.
hero member
Activity: 770
Merit: 500
You're fat, because you dont have any pics on FB
There is a method to play cards on internet and be fair and secure. However, I expect a generous tip, do you agree? If you agree then read on  Wink

1. There are N players at the table.
2. Each player generates his own encryption and decryption keys for commutative chipper. Both are secret. (More about such chippers later.)
3. A salt is selected and published.
4. Player 1 creates a deck. Each card consists of plain text: card,siut,salt
5. Each player, including player 1, encrypts each card with his own encryption key, shuffle the whole deck, and then passes the deck to a next player.
6. When the deck has been encrypted and shuffled by everyone, anyone can be a dealer. It can be player N, or 1, or random one.
7. When dealer wants to give a card to player K, he first passes this card to Player K+1 for decryption. (Of course if card is for player N then start with player 1.) Each player, starting with K+1, decrypts the card and passes it to next one (player 1 is next after player N). In this way Player K gets the card last. When decrypted by player K, the card will read: card,siut,salt. If message is readable (salt does match) then no tampering has occured.

Since player K is the last to decrypt the card, he can be sure no one else knows what card he was delt! You can play any kind of card game in this way. How cool is that?

Now about commutative chipper as prommised in step 2. This is a chipper where E(key1, E(key2, message)) = E(key2, E(key1, message)). This means that you can decrypt in any order.

You can use a variation of RSA encryption to achieve this. In this variation both encryption and decryption keys are SECRET. However, the parameters necessary to generate them are public. In particular two prime numbers are disclosed.

So we publicly generate two large prime numbers p and q, then calculate n=p*q and PHI=(p-1)*(q-1).

Next each player in secret picks up his own encryption key e which is relatively prime to PHI. If N is large that is trivial with ony few trials and errors.

Each player, also in secret, calculates decryption key d=e^(-1) mod PHI.

Encryption is calculated as c = m^e mod n (where c stands for cypertext and m for message).
Decryption is calculated as m = c^d mod n.

For the sake of this example m = (card-2) + 13 * siut + 52 * salt
card = (m mod 13) + 2
siut = floor(m/13) mod 4
salt = floor(m/52)

My tip wallet is 1FQkH63k6hkexFMTRzLtJEE6ZAaTBRhjiS   Smiley

Edit: typo

Whoa... heavy shit..

I like what I read, the little I understand Wink
full member
Activity: 140
Merit: 100
There is a method to play cards on internet and be fair and secure. However, I expect a generous tip, do you agree? If you agree then read on  Wink

1. There are N players at the table.
2. Each player generates his own encryption and decryption keys for commutative chipper. Both are secret. (More about such chippers later.)
3. A salt is selected and published.
4. Player 1 creates a deck. Each card consists of plain text: card,siut,salt
5. Each player, including player 1, encrypts each card with his own encryption key, shuffle the whole deck, and then passes the deck to a next player.
6. When the deck has been encrypted and shuffled by everyone, anyone can be a dealer. It can be player N, or 1, or random one.
7. When dealer wants to give a card to player K, he first passes this card to Player K+1 for decryption. (Of course if card is for player N then start with player 1.) Each player, starting with K+1, decrypts the card and passes it to next one (player 1 is next after player N). In this way Player K gets the card last. When decrypted by player K, the card will read: card,siut,salt. If message is readable (salt does match) then no tampering has occured.

Since player K is the last to decrypt the card, he can be sure no one else knows what card he was delt! You can play any kind of card game in this way. How cool is that?

Now about commutative chipper as prommised in step 2. This is a chipper where E(key1, E(key2, message)) = E(key2, E(key1, message)). This means that you can decrypt in any order.

You can use a variation of RSA encryption to achieve this. In this variation both encryption and decryption keys are SECRET. However, the parameters necessary to generate them are public. In particular two prime numbers are disclosed.

So we publicly generate two large prime numbers p and q, then calculate n=p*q and PHI=(p-1)*(q-1).

Next each player in secret picks up his own encryption key e which is relatively prime to PHI. If N is large that is trivial with ony few trials and errors.

Each player, also in secret, calculates decryption key d=e^(-1) mod PHI.

Encryption is calculated as c = m^e mod n (where c stands for cypertext and m for message).
Decryption is calculated as m = c^d mod n.

For the sake of this example m = (card-2) + 13 * siut + 52 * salt
card = (m mod 13) + 2
siut = floor(m/13) mod 4
salt = floor(m/52)

My tip wallet is 1FQkH63k6hkexFMTRzLtJEE6ZAaTBRhjiS   Smiley

Edit: typo
legendary
Activity: 3598
Merit: 2386
Viva Ut Vivas
The conclusion is that players using Martingale strategy pose no threat to a casino. The odds are high that the player will go bust before he is able even to double his money.
Well that depends on minimum bet, maximum bet and wallet size Smiley

Say minimum 0.01BTC max 1000BTC wallet ~1300BTC

0.01
0.02
0.04
0.08
0.16
0.32
0.64
1.28
2.56
5.12
10.24
20.48
40.96
81.92
163.84
327.68
655.36
BUST

Thats 17misses in a row, absolutely possible, however fairly unlikely.
The casino can limit the betting range, but the bot could just jump tables.
And since its a bot, even 0.01BTC per win will be fine, if it can just do 1 win per 5minutes thats 2.88BTC per day per bot/played table, they can even share money pool if the deposit system accepts a low amount of verifications, or you could have bots continuously sitting at different tables, so when the 0.01bot looses a 0.64bet, the next bot takes over at a higher stake table and the first bot starts over on a new round, that way you dont need to move the big cash around.

Ofcause this is not practical, since the risk is alot higher than the gain, a 1000BTC risk for maybe 10BTC/day, you might as well play it all on red and wall away Smiley


I wrote a computer program to run through a game of roulette over and over using the doubling method starting with a million bucks on a $5 minimum. It would go up for a while then BAM...hit a huge losing streak and lose it all.

I think of it like an opposite lottery. Take $175 million and bet on a number. If the number does not hit, then you win a dollar. If it hits, you lose it all. Sure, odds are that you will probably win that dollar, and win it many times. But there is always that chance that the number hits and you lose it all. And at the casino, the odds are in favor in the house.
newbie
Activity: 14
Merit: 0
I saw this thread and thought "Would an actual physical bitcoin casino be legal?"
If not could i create a bitcoin exchange\internet cafe where the users would bid with there bit coins online at there choice of website (Maybe the house could run one). Then when they are done send there hard earned btc to their special btc address registered with there "Username". Am i wrong could you legally gamble with bitcoins?
hero member
Activity: 568
Merit: 500
Sites like bittleships and luckycoin casino make it look so easy to deposit/spend/earn/withdrawl bitcoin, and I was wondering if someone would help me set that up.

It's pretty easy to do if you run your own bitcoind. You use the bitcoind JSON RPC to detect player deposits, and all other transactions are just INSERTs into your database. Then, a SQL query like this can give you the player's balance:

Code:
   SELECT SUM(AMOUNT) FROM TXNS WHERE UID=[user's id];

Combine this with client-side polling, and voila!


SUM(AMOUNT) will quickly slow down your site if you plan to have millions of users. A simpler strategy is to do a small incremental computation with each transaction and record the new total balance with each transaction. That way you just need a simple SELECT to get the balance.

Keeping running balances without checking them frequently against sums is not safe when building a site that deals with real money. What if your application or your database goes down in the middle of an update? Moreover, timestamps can and do change on bitcoin transactions after they've shown up in a wallet. You can't just look at the last timestamp and take all the transactions that happened in it, or you'll end up polling the same transactions twice and adding them to the user's running database sum. So for data consistency you'd then need to compare the TXID against all TXIDs you've processed before, which is a much slower operation than a simple SUM of the user's transactions compared to that user's wallet account balance.

We use (basically) the SUM(AMOUNT) strategy. If you're worried about speed when you have a million users, partition your transactional database by user IDs, or shard it over multiple instances. If you're running bitcoind, you should be running it on a separate dedicated machine anyway, and it's doubtful you'll have a very efficient system if you're running one instance with a million wallets anyway. So have a db over there on each bitcoind machine that does the summing for a particular group of users (100k would probably be an upward reasonable limit), and then opens a socket to send the results to your game server. SUM() on a primary key is plenty fast over millions of rows even without partitioning.

Also bear in mind that if you ever find yourself running a successful Bitcoin casino with millions of users, you will probably have plenty of spare cash for server upgrades. Writing NoSQL or non-ACID code that trusts your application layer to never miss or repeat a single real-money transaction will create its own scaling problems and is very, very unsafe.
member
Activity: 89
Merit: 13
Sites like bittleships and luckycoin casino make it look so easy to deposit/spend/earn/withdrawl bitcoin, and I was wondering if someone would help me set that up.

It's pretty easy to do if you run your own bitcoind. You use the bitcoind JSON RPC to detect player deposits, and all other transactions are just INSERTs into your database. Then, a SQL query like this can give you the player's balance:

Code:
   SELECT SUM(AMOUNT) FROM TXNS WHERE UID=[user's id];

Combine this with client-side polling, and voila!


SUM(AMOUNT) will quickly slow down your site if you plan to have millions of users. A simpler strategy is to do a small incremental computation with each transaction and record the new total balance with each transaction. That way you just need a simple SELECT to get the balance.
member
Activity: 280
Merit: 10
Sites like bittleships and luckycoin casino make it look so easy to deposit/spend/earn/withdrawl bitcoin, and I was wondering if someone would help me set that up.

It's pretty easy to do if you run your own bitcoind. You use the bitcoind JSON RPC to detect player deposits, and all other transactions are just INSERTs into your database. Then, a SQL query like this can give you the player's balance:

Code:
   SELECT SUM(AMOUNT) FROM TXNS WHERE UID=[user's id];

Combine this with client-side polling, and voila!
full member
Activity: 127
Merit: 100
The conclusion is that players using Martingale strategy pose no threat to a casino. The odds are high that the player will go bust before he is able even to double his money.
Well that depends on minimum bet, maximum bet and wallet size Smiley

Say minimum 0.01BTC max 1000BTC wallet ~1300BTC

0.01
0.02
0.04
0.08
0.16
0.32
0.64
1.28
2.56
5.12
10.24
20.48
40.96
81.92
163.84
327.68
655.36
BUST

Thats 17misses in a row, absolutely possible, however fairly unlikely.
The casino can limit the betting range, but the bot could just jump tables.
And since its a bot, even 0.01BTC per win will be fine, if it can just do 1 win per 5minutes thats 2.88BTC per day per bot/played table, they can even share money pool if the deposit system accepts a low amount of verifications, or you could have bots continuously sitting at different tables, so when the 0.01bot looses a 0.64bet, the next bot takes over at a higher stake table and the first bot starts over on a new round, that way you dont need to move the big cash around.

Ofcause this is not practical, since the risk is alot higher than the gain, a 1000BTC risk for maybe 10BTC/day, you might as well play it all on red and wall away Smiley
vip
Activity: 448
Merit: 252
If you create a Casino you need enough Money for the Casino Pot.

For example my site have instant Payout and the Wallet must be everytime full with enough coins.

And for the fairness you can use mt_rand for every game round.
legendary
Activity: 2940
Merit: 1333
Yes that system was what I meant, what do you mean with "dont even need to try" ?

He meant this part of that page:

The conclusion is that players using Martingale strategy pose no threat to a casino. The odds are high that the player will go bust before he is able even to double his money.
full member
Activity: 127
Merit: 100
ie. its pretty easy to detect a user using double bet attack, and let them succeed a few times, before locking them in for a 50x lost bet.
Don't even need to try, https://en.wikipedia.org/wiki/Martingale_%28betting_system%29
Yes that system was what I meant, what do you mean with "dont even need to try" ?

The published hash idea is pretty neat, would work well for most games, as long as the hash is complex enough.
(0xAA 0xAA 0xAA) would be pretty obvious for a 3 wheel spin thing.
member
Activity: 89
Merit: 13
card based games: the card order is hashed prior to a game, and the hash is presented to the user
...
Now anyone can audit the table to ensure that the game is indeed fair, and since another table has been generated for the day, no one can cheat.

that's what I meant ("use pregenerated random values show the hashes of game states before players make decision"), but it won't probably work well for many card games, because:
Quote
if players play against each other and they have something to hide from each other (like in poker) then it is harder (since casino owner potentially knows the cards of other players and it gives him/her possibility to play against them).

Or am I misunderstanding something?


No, you understand correctly. The risk of a casino creating a bot that will play blackjack to soak all the good cards is possible.

For example: deck is pregenerated. The likely outcome of every hand for every player is already known (since most players will follow basic strategy). If the casino detects that one of the players is likely to get a blackjack, the casino can simply put a bot player on the table to soak up the face cards and change the outcome. This may be negated by having one player per table (easy to do online). However, there is no guarantee that all decks would be casino favorable even with published hashes. The only way around this is to allow a player to cut the deck. The cut deck + hash should be fairly acceptable. In any case, blackjack online is not very house-friendly since the players can easily note down every card and use all kinds of counting software for them. The only way a house will have an advantage is to reshuffle the deck after every hand.

Poker on the other hand is very very hard. Even if you can get a secure deck, the casino does know what cards any player is holding and it would give casino bots a huge advantage.

As others have said here, all other games can be worked out by publishing the hash first before every roll.
legendary
Activity: 1199
Merit: 1012
card based games: the card order is hashed prior to a game, and the hash is presented to the user
...
Now anyone can audit the table to ensure that the game is indeed fair, and since another table has been generated for the day, no one can cheat.

that's what I meant ("use pregenerated random values show the hashes of game states before players make decision"), but it won't probably work well for many card games, because:
Quote
if players play against each other and they have something to hide from each other (like in poker) then it is harder (since casino owner potentially knows the cards of other players and it gives him/her possibility to play against them).

Or am I misunderstanding something?
Pages:
Jump to: