We’re excited to announce that we’re releasing Crash II game in
http://Blaze.com, so we welcome you to our seeding event for Crash II which we would be releasing soon. For this seeding event we are following the same approach we had for Crash and Double.
As part of our fairness we generated a chain of 10,000,000 SHA256 hashes where each hash is the hash of the hexadecimal representation of the previous hash. Being the last hash in the chain: 80bea5b63f9afdf51527f58b0467082a6b0dfe7f94c3bf9bb8f03e5e226152f1
Script to calculate Crash point:const { createHmac } = require('crypto');
const divisible = (hash, mod) => {
// So ABCDEFGHIJ should be chunked like AB CDEF GHIJ
let val = 0;
let o = hash.length % 4;
for (let i = o > 0 ? o - 4 : 0; i < hash.length; i += 4) {
val = ((val << 16) + parseInt(hash.substring(i, i + 4), 16)) % mod;
}
return val === 0;
};
const calculateIfIsBonusRound = (provablyFairHash) => {
return divisible(provablyFairHash, 72);
};
const calculateCrashPointFromHash = function (hash) {
// In 1 of 15 games the game crashes instantly.
if (divisible(hash, 15)) return 0;
// Use the most significant 52-bit from the hash to calculate the crash point
let h = parseInt(hash.slice(0, 52 / 4), 16);
let e = Math.pow(2, 52);
return (Math.floor((100 * e - h) / (e - h)) / 100).toFixed(2);
};
// these will be the 10M pre generated rolls to be used
const hashChain = ['random1', 'random2'];
const gameHash = hashChain.pop();
// It's the hash we're gonna be using of the result of a yet to be mined block on the blockchain #792,123
const blockHash = '';
const hash = createHmac('sha256', gameHash).update(blockHash).digest('hex');
const crashPoint = calculateCrashPointFromHash(hash);
// if it's bonus round you get double payout
const isBonusRound = calculateIfIsBonusRound(hash);
console.log({ crashPoint, isBonusRound });
We’re gonna be using a BlockHash that hasn’t been mined at the time of this post, we’re expecting to use Bitcoin block 809,654 this to prove we have no influence over the outcome of the game. Please guys feel free to quote this post so this will be all set in stone.
Looking forward to show you guys Crash II very soon!