Bitcoin Forum

Economy => Gambling => Topic started by: BC.GAME on June 16, 2020, 11:45:22 AM



Title: Multiplayer Keno seed event - BC.Game
Post by: BC.GAME on June 16, 2020, 11:45:22 AM
Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic game.

Starting with a secret I've 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 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

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:
Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


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 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.


Title: Re: Multiplayer Keno seed event - BC.Game
Post by: BC.GAME on June 17, 2020, 02:38:03 AM
Block 635,010 is mined
https://btc.com/0000000000000000000cdcd92552a3971fc46cf451fe8e0df56af95d2fbe4585
So our salt will be
0000000000000000000cdcd92552a3971fc46cf451fe8e0df56af95d2fbe4585


Title: Re: Multiplayer Keno seed event - BC.Game
Post by: DarkStar_ on June 17, 2020, 03:24:39 AM
Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic game.

Starting with a secret I've 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 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

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:
Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


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 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.

Quoted and archived. (https://web.archive.org/web/20200617032406/https://bitcointalk.org/index.php?topic=5255968.0)


Title: Re: Multiplayer Keno seed event - BC.Game
Post by: BC.GAME on June 22, 2020, 06:01:32 AM
Dear community members,

After launching our new Multiplayer Keno game, we found that the current algorithm had a problem. Specifically, the ball shuffling gave the balls numbered 1-10 a probability of being the game's result over the other balls by 1%-2%.

Reasons:
1. The initialization order of the balls is arranged in the order of 1-40.
2. The hash used for the two ball shuffling events is the same, resulting in the similar order of the balls in the two shuffling events and the order of the balls not scattered widely enough.

1% House Edge does not affect fairness, but in order to make the game result distribution more random, we will upgrade the algorithm and choose a new salt.

Upgrading methods:
1. Adjust the initialization order of the balls. We will provide the order before the games so as to adhere to fairness standards.
2. Use a new hash for the second shuffling. The new hash will be generated through calculating the seed of the first ball shuffling with hash256 (seed).
This is the new code:

Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 30, 11, 40, 2, 29, 12, 39, 3, 28, 13, 38, 4, 27, 14, 37, 5, 26, 15, 36, 6, 25, 16, 35, 7, 24, 17, 34, 8, 23, 18, 33, 9, 22, 19, 32, 10, 21, 20, 31];
    let seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    seed = String(CryptoJS.SHA256(seed));
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));

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 635,810
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players. Also this block has not been pre-mined which can be verified using any block explorer.


Title: Re: Multiplayer Keno seed event - BC.Game
Post by: CHRISBIN702 on June 22, 2020, 06:13:37 AM
I can't help but smile knowing that for a brief period of time, there existed a 1%-2% "Player's Edge" instead of the usual 1% House Edge. Lol.

All joking aside I'm glad that you are paying attention and showing great professionalism in the way you run bcgame. I'm once again, highly impressed.


Title: Re: Multiplayer Keno seed event - BC.Game
Post by: johnjimjack on June 22, 2020, 06:27:11 AM
Dear community members,

After launching our new Multiplayer Keno game, we found that the current algorithm had a problem. Specifically, the ball shuffling gave the balls numbered 1-10 a probability of being the game's result over the other balls by 1%-2%.

Reasons:
1. The initialization order of the balls is arranged in the order of 1-40.
2. The hash used for the two ball shuffling events is the same, resulting in the similar order of the balls in the two shuffling events and the order of the balls not scattered widely enough.

1% House Edge does not affect fairness, but in order to make the game result distribution more random, we will upgrade the algorithm and choose a new salt.

Upgrading methods:
1. Adjust the initialization order of the balls. We will provide the order before the games so as to adhere to fairness standards.
2. Use a new hash for the second shuffling. The new hash will be generated through calculating the seed of the first ball shuffling with hash256 (seed).
This is the new code:

Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 30, 11, 40, 2, 29, 12, 39, 3, 28, 13, 38, 4, 27, 14, 37, 5, 26, 15, 36, 6, 25, 16, 35, 7, 24, 17, 34, 8, 23, 18, 33, 9, 22, 19, 32, 10, 21, 20, 31];
    let seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    seed = String(CryptoJS.SHA256(seed));
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));

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 635,810
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players. Also this block has not been pre-mined which can be verified using any block explorer.

Noted.


Title: Re: Multiplayer Keno seed event - BC.Game
Post by: okseo122 on June 22, 2020, 06:30:26 AM
Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic game.

Starting with a secret I've 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 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

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:
Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


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 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.
   


Noted too


Title: Re: Multiplayer Keno seed event - BC.Game
Post by: Zaynab on June 22, 2020, 06:49:34 AM
Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic game.

Starting with a secret I've 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 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

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:
Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


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 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.

This had to be quoted for the record.


Title: Re: Multiplayer Keno seed event - BC.Game
Post by: BustaMachine on June 22, 2020, 06:57:38 AM
Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic game.

Starting with a secret I've 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 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

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:
Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


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 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.
Quated bruh it's BustaMachine ;)


Title: Re: Multiplayer Keno seed event - BC.Game
Post by: BC.GAME on June 22, 2020, 07:07:20 AM
Block 635,810 is mined
https://btc.com/000000000000000000076973be291d219d283d4af9135601ff37df46491cca7e
So our salt will be
000000000000000000076973be291d219d283d4af9135601ff37df46491cca7e
We will use the new algorithm after the Bet #35489 in Keno


Title: Re: Multiplayer Keno seed event - BC.Game
Post by: Saint-loup on June 23, 2020, 08:47:28 PM
Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic game.

Starting with a secret I've 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 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

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.
That's great but why don't you use the same feature (a hash chain) for your crash game? And how do you pick your seeds for this game?
https://bitcointalk.org/index.php?topic=5256606.msg54660157#msg54660157