Bitcoin Forum
May 28, 2024, 03:39:31 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 [5]
81  Economy / Gambling / Re: Rocketpot Seed Event on: August 23, 2019, 07:56:36 PM
Here’s an archived snapshot of the page: https://archive.is/Mwq4s
Feel free to quote this post and save the original post (and confirm that block 591433 is still not mined).
82  Economy / Gambling / Rocketpot Seed Event on: August 23, 2019, 07:53:42 PM
The seed event has been designed to reflect launches of similar games on this forum.

To make it provably fair we have generated a chain of 8,000,000 SHA256 hashes where each hash is the hash of the hexadecimal representation of the previous hash. The last hash in the chain is 5de24be2ba88f21070aca0b909a23ba8977a60e047e750dc6bd637aa3b4defc8.

The formula for generating the game result:

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

    function generateGameResultFromSeed(roundSeed, salt) {

      // Number of most significant bits to use
      const nBitsToUse = 52;

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

      // Step 2. r = 52 most significant bits
      const roundRandSource = roundHash.slice(0, nBitsToUse / 4);
      const r = parseInt(roundRandSource, 16);

      // Step 3. Calculate crash = r / 2^52, uniformly distributed in [0; 1)
      const twoPower52 = Math.pow(2, nBitsToUse);
      let crash = r / twoPower52;

      // Step 4. Calculate crash normalized in 100 - 100B range
      crash = Math.floor(97 / crash);
      crash = Math.min(crash, 100000000000);
      crash = Math.max(crash, 100);

      // Step 5. Take next 52 bits as seed for player selection in Jackpot round
      const jpPlayerRandSource = roundHash.slice(nBitsToUse / 4, 2 * nBitsToUse / 4);
      const jpPlayerRandom = parseInt(jpPlayerRandSource, 16);

      // Step 6. Take next 52 bits as seed for picking Jackpot value on the wheel
      const jpValueRandSource = roundHash.slice(2 * nBitsToUse / 4, 3 * nBitsToUse / 4);
      const jpValueRandom = parseInt(jpValueRandSource, 16);

      return {roundHash, jpPlayerRandom, jpValueRandom, crash, roundSeed};
    }

The client seed is the hash of a future bitcoin block that has not been mined at the time of this post. The block we will use is 591433. This way players can be certain that we did not deliberately pick a client seed which advantages the house.
83  Economy / Gambling / Re: Stake.com Crash seeding event on: July 22, 2019, 11:56:05 AM
good luck   Smiley
Pages: « 1 2 3 4 [5]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!