Each opening is calculated by the following variables:

  • Server Seed - provided by us
  • Client Seed - provided by your browser and adjusted by you.
  • Nonce - A number that increases with each case you open.

You will get an encrypted hash of the serverseed before you open a case. Since you get it in advance, the site cannot change it later. However it is encrypted, so you cannot calculate your own roll results in advance (only afterwards if you get the unhashed serverseed.).

To get the unhashed server seed, you'll have to change your current one, that'll reveal your previous server seed, and provide you with a new hashed one.

Your browser will generate a random clientseed. However, you could adjust this clientseed yourself and that won't change the current server seed and nonce.

Each case item get's an individual range of tickets according to their probability, the sum of all tickets it's 100000. To pick a random item from the case, we generate a number between 1-100000 and then we find the item that's on the range of the generated number.

Calculating Roll result

This is a code snippet that can be run in NodeJS, it takes a serverseed, clientseed and a nonce and it returns a result number. The item that has it's range of tickets inside the drawn result, it's the one that get's drawn in the case opening.

const crypto = require('crypto');

const CHARSROLL = 15;
const MAXROLL = 100000;

const combine = (serverSeed, clientSeed, nonce) => {
    return crypto.createHmac('sha256', serverSeed).update(clientSeed + ':' + nonce).digest('hex');
}

const getResult = hashedValue => {
    const partHash = hashedValue.slice(0, CHARSROLL);
    const roll = parseInt(partHash, 16) % MAXROLL;
    return roll + 1;
};

console.log(getResult(combine(serverSeed, clientSeed, nonce)));

Each case opened is calculated by the following variables:

  • Server Seed - a randomly generated hash.
  • Client Seed - the ID of an EOS block we commit to before it's mined.
  • Nonce - A number that increases with each case you open.

At creation, a server seed it's generated for each battle, and it's SHA256 hash is shown. After all players have joined and before the openings start, we commit to a future EOS block, and we will use it's ID as the client seed once mined.

After the round is over the unhashed server seed will be revealed so users can confirm it's SHA256 matches with the one shown previously.
This way, neither the players nor our system know what data will be used to generate the openings results until after all players have committed their bets.

Roll verification code is the same as individual case openings, but the nonce starts at 0 and increases by 1 on each opening.

const crypto = require('crypto');

const CHARSROLL = 15;
const MAXROLL = 100000;

const combine = (serverSeed, clientSeed, nonce) => {
    return crypto.createHmac('sha256', serverSeed).update(clientSeed + ':' + nonce).digest('hex');
}

const getResult = hashedValue => {
    const partHash = hashedValue.slice(0, CHARSROLL);
    const roll = parseInt(partHash, 16) % MAXROLL;
    return roll + 1;
};

// CHANGE THESE VALUES
const unhashedServerSeed = ''; // shown at the end of the game
const clientSeed = ''; // eos blockchain transaction id
const slots = 2; // count of players in the battle
const rounds = 15; // amount of cases/rounds in the battle
// 

for (let i = 0; i < rounds; i++) {

    console.log('Round ' + (i + 1) + ' results:');

    for (let r = 0; r < slots; r++) {
        const nonce = i * slots + r;
        console.log('Player on seat ' + (r + 1) + ':, ' + getResult(combine(unhashedServerSeed, clientSeed, nonce)));
    }

}

In Roulette, our system generates the result for each round by using the SHA-256 hash of 2 inputs:

  • Server Seed - a series of hashes generated from a genesis seed.
  • Client Seed - the hash of Bitcoin block 788,500.

To calculate the Server Seed, we begin with a genesis seed and hash it using the SHA-256 algorithm. We then hash the resuling seed, and repeat this process to generate 10 million Server Seeds.

10th millionth server seed:
acb0aa39d25f1a618ccf90cf695106c412759d07461a285dab94ac55c991aab4

Client seed: (Bitcoin Block 788,500 hash)
00000000000000000003e5a54c2898a18d262eb5860e696441f8a4ebbff03697

const crypto = require('crypto');

const clientSeed = "00000000000000000003e5a54c2898a18d262eb5860e696441f8a4ebbff03697";

const getResult = serverSeed => {

    const hmac = crypto.createHmac('sha256', serverSeed);
    hmac.update(clientSeed);
    const sha = hmac.digest('hex');

    const result = parseInt(sha.substr(0, 8), 16) % 15;
    return result;

};

console.log(getResult(serverSeed)); // roulette number between 0-14

In Crash, our system generates the result for each round by using the SHA-256 hash of 2 inputs:

  • Server Seed - a series of hashes generated from a genesis seed.
  • Client Seed - the hash of Bitcoin block 788,500.

10th millionth server seed:
acb0aa39d25f1a618ccf90cf695106c412759d07461a285dab94ac55c991aab4

Client seed: (Bitcoin Block 788,500 hash)
00000000000000000003e5a54c2898a18d262eb5860e696441f8a4ebbff03697

const crypto = require('crypto');

const clientSeed = "00000000000000000003e5a54c2898a18d262eb5860e696441f8a4ebbff03697";
const houseEdge = 10;

const getResult = serverSeed => {

    const hmac = crypto.createHmac('sha256', serverSeed);
    hmac.update(clientSeed);
    
    const sha = hmac.digest('hex');

    const hex = sha.substr(0, 8);
    const int = parseInt(hex, 16);

    const crashpoint = Math.max(1, (2 ** 32 / (int + 1)) * (1 - (houseEdge / 100)));
    return crashpoint;

};

console.log(getResult(serverSeed)); // round crashpoint

In Jackpot, our system generates the result for each round by using the SHA-256 hash of 2 inputs:

  • Server Seed - a randomly generated hash.
  • Client Seed - the ID of an EOS block we commit to before it's mined.

When a new jackpot round is created, we'll make a random server seed and show it's SHA256 hash. After all players have placed their bets, we'll commit to a future block number on the EOS blockchain, once the block gets mined, we'll use it's ID as the Client seed.

const crypto = require('crypto');

const combine = (serverSeed, clientSeed) => {
    return crypto.createHmac('sha256', serverSeed).update(clientSeed).digest('hex');
}

// returns a float between 0 and 1
const getFloatResult = hashedValue => {
    let decimalNumber = parseInt(hashedValue, 16);
    let maxDecimalValue = parseInt('f'.repeat(64), 16);
    let floatNumber = decimalNumber / (maxDecimalValue - 1);
    return Number(floatNumber.toFixed(7));
};

const percentageWinner = getFloatResult(combine(serverSeed, clientSeed));
const winnerTicket = Math.floor(totalTickets * percentageWinner);
console.log(winnerTicket);

In Coinflip, our system generates the result for each round by using the SHA-256 hash of 2 inputs:

  • Server Seed - a randomly generated hash.
  • Client Seed - the ID of an EOS block we commit to before it's mined.

When a new coinflip game is created, we'll make a random server seed and show it's SHA256 hash. After all players have placed their bets, we'll commit to a future block number on the EOS blockchain.

const crypto = require('crypto');

const combine = (serverSeed, clientSeed) => {
    return crypto.createHmac('sha256', serverSeed).update(clientSeed).digest('hex');
}

const getResult = hashedValue => {
    const number = parseInt(hashedValue.charAt(1), 16);
    return (number % 2 === 0) ? 'ice' : 'fire'
};

console.log(getResult(combine(serverSeed, clientSeed))); // winning side

In Mines, our system generates a 32-byte hexadecimal hash based on your server seed, client seed and nonce.

  • Server Seed - a SHA-256 hash of 16 cryptographically secure random bytes.
  • Client Seed - a seed that each user can customize at any time.
  • Nonce - the round number that increments with each bet

For shuffling we use the Fisher–Yates shuffle algorithm to ensure there are no duplicate outcomes.

import _ from "lodash";
    
const floats = _.flatten(
  generateFloats(server_seed, client_seed, nonce, 0, mines)
).map((float: number, index: number) => float * (25 - index));

const minePositions = shuffle(
  [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24],
  floats
).slice(0, MINES);

console.log(floats);
console.log(minePositions);

CHAT