Post
Topic
Board Announcements (Altcoins)
Re: [ANN][CHA] Chancecoin, a coin for betting in a decentralized casino
by
peled1986
on 22/06/2014, 19:41:02 UTC
I propose that we go back to using Blockchain hashes as our source of randomness for transactions in blocks where the total amount of CHA that can possibly be won (for all bets in the block) is less than 2,000 CHA.
+1
2,000 CHA = about 2 btc right now.
I think its safe even with a total of 5,000.
Since each mining block has 25 bitcoins and using the burn valuation of 0.001 BTC/CHA, we are considering using the Blockchain hashes as a source of randomness for bets in blocks where the max payout is less than 25,000 CHA. For blocks where the total bet payout is over 25,000 CHA, we will use the new york lottery numbers in addition to the bitcoin block hashes. This should allow us to resolve the bet as soon as the current block is mined, significantly reducing the waiting time. Let us know what you think.
Venetian

What will be the average waiting time ?


The average wait time will be 10 minutes (faster than Satoshi Dice, since they have to send you something in the next block to indicate the result), as this is the average time for a block to be mined.

above 25,000 CHA  =  new york lottery numbers in addition to the bitcoin block hashes - sounds good.

I played with https://primedice.com/ quite a lot in the past - the results are immediately.

@magician what do you mean that CHA will be faster?


Code:
PrimeDice offers state of the art verification which allows our users to check the integrity of every roll
and confirm they are not manipulated. Our random numbers are generated through the use of three seeds.
These are: the server seed, secret seed and most importantly, the client seed. This means that all three
seeds help determine the number generated. If one changes, the number changes.

The user is freely able to change the server seed and client seed at their own will. The secret, the final
ingredient, is kept secret until a day after the roll. The secret is the same across all bets for that given
day, therefore it cannot be changed to manipulate single bets. If it was, all rolls would not add up correctly.

How to verify bets!

To verify your provably fair bet, simply take the sha512 hash of our secret with the client seed and server
seed (In the order: secret, server seed, client seed). Take the first 8 digits of the new sha512 hash and
convert it from hex to decimal. You will then need to divide by 42949672.95 [Which is ((2^32-1)/100] in
order to get a 0-100 base 10 numeric value. This value will have been the roll.

Click here for previous bet lookup!

Example php code you can also use:

$seed = $argv[1];
$server = $argv[2];
$client = $argv[3];

$hash = hash('sha512', $seed . $server . $client);

$value = substr($hash, 0, 8);
$dice = round(hexdec($value)/42949672.95,2);

echo "\{$hash\} - \{$dice\} ";

Note: Bets before ID: 225759 use sha1 instead of sha512 to calculate the hash.