Post
Topic
Board Gambling
Re: 999xCrash game in Telegram fairness verification and salt decision notification
by
seoincorporation
on 29/08/2024, 14:12:12 UTC
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.