As a side project that has been worked on for almost 3 years, it is finally released!
Temporary Demos while guest feature is being worked on
Jackpot Demo30Max DemoCoinflip DemoProvability Fair:
This seeding event is using the same provably fair as Bustabit
Starting with a secret we've generated a chain of 25,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 56982c4f61d8b1c25c9106a6e54d99bf761f368484f89283c6f645db2580e25f.
Every game maps to a hash in the chain: The 25,000,000th element of the chain is the hash of game #1 and the first element in the chain is the hash of game #25,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 = 99 / (1-X)
X = 99 / (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 567510. This block has been mined.
As there are no versus house gamemodes currently active there is no need to pick an un-mined block. As soon as Roulette or versus house game mode is introduced we will pick a new block that has not been mined which will look similar to this
threadIf you have any questions or concerns we will gladly answer them!