Author

Topic: Win Bitcoins | Provably Fair | Pot Increases Over Time (Read 1304 times)

newbie
Activity: 55
Merit: 0
Had a good email chat to Danny from Coindesk, who mentioned bitpotluck.com in his recent article:
http://www.coindesk.com/what-will-gambling-do-to-the-bitcoin-block-chain/
newbie
Activity: 55
Merit: 0
Now integrated with Twitter API to post when:
- there is a player in the pot, and we need 1 more.
- a winner is selected
- a pot has closed due to lack of players
- new pot created

Also changed pots to last for 24 hours.
newbie
Activity: 55
Merit: 0
First, we start with a secret seed number, determined by the PHP code:

$secret_seed = mt_srand(microtime() * 1000000 *1.61803398875);

Run that line, UNEDITED. Then dump $secret_seed. It will be 0. Independant from system settings.

Ah. When writing the technical explanation, I wasn't copy'n'pasting my code. I was writing it off the top of my head, so "$secret_seed =" is not *actually* used in the code in that spot, but rather:
Code:
mt_srand(microtime() * 1000000 *1.61803398875);
$secret_seed = mt_rand();


EDIT: On another note: When you are in the username field of the login and press tab, you don't go to the password field.


Thanks - fixed.

I was so confused when I saw a decimal place past the eighth place. I've been doing too much bitcoin.

LOL

EDIT:
EDIT2: Also is it possible to see all sold tickets (with ticket numbers) before the round ends?

When there are more than 2 players in a pot, the game message will tell you how many players are involved. If you buy in, you'll be told your own ticket numbers.
If you're the only person in the pot when time runs out, you get refunded in full.
sr. member
Activity: 322
Merit: 250
I was so confused when I saw a decimal place past the eighth place. I've been doing too much bitcoin.
full member
Activity: 196
Merit: 100
You refuse to read, do you?

Direct copy from your website:

Quote
All games are provably fair. That means, anyone can prove that the game's selected winning ticket was a legitimate and real selection based on a mathetical formula.

First, we start with a secret seed number, determined by the PHP code:

$secret_seed = mt_srand(microtime() * 1000000 *1.61803398875);

That number on the end is the golden ratio. We're just trying to be "cute" by including it in the formula.

Run that line, UNEDITED. Then dump $secret_seed. It will be 0. Independant from system settings.

EDIT: On another note: When you are in the username field of the login and press tab, you don't go to the password field.

EDIT2: Also is it possible to see all sold tickets (with ticket numbers) before the round ends?
full member
Activity: 196
Merit: 100
Provably fair?
As it is currently determined, your $secret_seed is ALWAYS 0.
If anything else, your website is a fraud because the explanation dictates that it is 0.

(mt_srand(microtime() * 1000000)*1.61803398875 ALWAYS returns 0, since mt_srand returns nothing and then multiplication with a number casts it to a number, 0; 0 * anything is 0, so $secret_seed MUST be 0)

The game is provably fair. The secret seed is never zero. Throw this into a PHP script and run it.

mt_srand(microtime() * 1000000)*1.61803398875;
$seed = mt_rand();
print $seed;
?>

But that is not the script you posted on your site.
Your site says (or said in case you adjusted it already):
$secret_seed = mt_srand(microtime() * 1000000)*1.61803398875;
Which is always 0.

Just "Throw this into a PHP script and run it."

Also the *1.6.... does nothing to the mt_srand as well since it's outside of the brackets. So even if you did use the code you posted you would set the Mersenne Twister random seed to microtime() * 1000000. Then take the result of that function (void) and multiply it with 1.6...., which is 0. That 0 is never used and the next call of mt_rand will create the same number.

"Throw this into a PHP script and run it.":
Code:
$time = microtime() * 1000000;
mt_srand($time)*1.61803398875;
$result1 = mt_rand();
mt_srand($time);
$result2 = mt_rand();

if ($result1 !== $result2) {
  die('YOU JUST FRIGGIN BROKE PHP, THIS BRANCH IS IMPOSSIBLE TO GET COVERED'. PHP_EOL);
} else {
  die('... as expected, the *1.61803398875 did nothing at all'. PHP_EOL);
}

Output: "... as expected, the *1.61803398875 did nothing at all
"
newbie
Activity: 55
Merit: 0
Provably fair?
As it is currently determined, your $secret_seed is ALWAYS 0.
If anything else, your website is a fraud because the explanation dictates that it is 0.

(mt_srand(microtime() * 1000000)*1.61803398875 ALWAYS returns 0, since mt_srand returns nothing and then multiplication with a number casts it to a number, 0; 0 * anything is 0, so $secret_seed MUST be 0)

The game is provably fair. The secret seed is never zero. Throw this into a PHP script and run it.

mt_srand(microtime() * 1000000)*1.61803398875;
$seed = mt_rand();
print $seed;
?>
full member
Activity: 196
Merit: 100
Provably fair?
As it is currently determined, your $secret_seed is ALWAYS 0.
If anything else, your website is a fraud because the explanation dictates that it is 0.

(mt_srand(microtime() * 1000000)*1.61803398875 ALWAYS returns 0, since mt_srand returns nothing and then multiplication with a number casts it to a number, 0; 0 * anything is 0, so $secret_seed MUST be 0)
newbie
Activity: 55
Merit: 0
EDIT: Site has closed

Check out the gambling site I developed - a spruced up lottery-type game with the following features:

* Off-blockchain transactions powered by Inputs.io [special thanks to TradeFortress]
* as above, instant entry (no waiting for blockchain confirmation) and no transaction fees
* no site registration required
* no win limits - pot size depends on the number of contributions per pot
* winners are paid out immediately after being selected
* choice of multiple entry fees from as little as 0.001 BTC for light play up to 1 BTC per entry for heavy hitters
* multiple pots with differing time limits for quick 10 minute draws to long 6 hour draws
* provably fair (of course)

Some cool things I've added into the game are:

* pot starting balance increases after every payout
* first 2 contributors of any pot get 1 free ticket (an incentive to join)
* auto-updating on-screen (no page refreshing)

The winner takes 95% of the pot total, where 2% is left in the pot for the next draw. This enables the pot size to increase over time. The other 3% goes to covering hosting costs (and profit, if any).

I'm happy to answer questions and keen to read your opinions and suggestions.
Jump to: