Started: Oct 29 , 2018

admin@bitbuster.io

Member login
Password recovery

Info

News


Seeding event!

Seeding event!

Is the game fair?

Absolutely! And we can prove it.

The principle of our provably fair system remains the same.

Starting with a secret we generated a chain of 10,000,000 SHA256 hashes. Each element is the hash
of the lowercase, hexadecimal string representation of the previous hash. The hash of the chain's last element is daf9a5126ae5841d9134cb30f7702c5ff4c19b3204f8b3b0e91a2c61e4896e1a

Every game maps to a hash in the chain: The 10,000,000th element of the chain is the hash of game #1
and the first element in the chain is the hash of game #10,000,000. To verify that a hash belongs to
a game #n, simply hash it n times and compare the result with the terminating hash.


To calculate a game's result from its hash:


const crypto = require("crypto")

function gameResult(seed, salt) {
const nBits = 52 // number of most significant bits to use

// 1. HMAC_SHA256(key=salt, message=seed)
const hmac = crypto.createHmac("sha256", salt)
hmac.update(seed)
seed = hmac.digest("hex")

// 2. r = 52 most significant bits
seed = seed.slice(0, nBits/4)
const r = parseInt(seed, 16)

// 3. X = r / 2^52
let X = r / Math.pow(2, nBits) // uniformly distributed in [0; 1)

// 4. X = 98 / (1-X)
X = 98 / (1 - X)

// 5. return max(trunc(X), 100)
const result = Math.floor(X)
return Math.max(1, result / 100)
}



Before being used to calculate the corresponding result, each game hash is salted with the lowercase, hexadecimal string representation of the hash of bitcoin block 547813. This block has not been mined yet, proving that we have not deliberately picked a chain that is unfavorable for players.





Oct-28-2018 09:24:57 AM
All Rights Reserved. bitbuster.io