Post
Topic
Board Gambling
Merits 1 from 1 user
Re: 999xCrash game in Telegram fairness verification and salt decision notification
by
TopGame
on 30/08/2024, 01:59:28 UTC
⭐ Merited by seoincorporation (1)
Code:
(seed, salt) => {
    const nBits = 52; // number of most significant bits to use

    // 1. HMAC_SHA256(message=seed, key=salt) 
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(seed), salt);
    seed = hmac.toString(CryptoJS.enc.Hex);

Just an observation, here is different the input seed than the last seed, so, why not use different names for that variable, like seed and serverSeed.

And your provably fair has a problem, is not fair at all, let me explain why.

A true provably fair engine needs a Nonse, that's a number that increases on each bet, that way your seed and salt are the same on each roll, but you provide a "secret seed", that way the user can't predict the next roll, and if the user want to reveal that secret seed, then he must ask for another seed. That's how the perfect provably fair system works. And since you only have a seed and salt that means your salt is dynamic, and you can manipulate that on each roll to decrease the user odds. The only protection for the user is to change the seed each roll.

Let me answer your doubts. Players can compare the results of this round with the results of the last N rounds to confirm whether the dealer is cheating. Because we use continuously generated hashes to generate results.
For the specific principle, you can refer to:
https://top.game/help/provably-fair