Bitcoin Forum
July 06, 2024, 08:23:39 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Economy / Gambling / Re: Stake.US Crash & Slide seeding event on: September 23, 2023, 09:05:49 PM
[/img]
Welcome to yet another seeding event. This time for our social US based version of Stake. Once again props to Rhavar for the method. Few hundred thousand blocks have passed since we last posted one of these  Cheesy

To prove our fairness we have generated a chain of 10,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:
Slide:  767ef376909b0319928ff50aede3565545e7698b003378e44d69f7d787a707f4
Crash: b285201a65c7c0c9e9316f91e37b134f3f8629fc0e8d24f0307893b53b286db3

The formula for generating the game result:

Code:
const gameHash = hashChain.pop()

const hmac = createHmac('sha256', gameHash);

// blockHash is the hash of bitcoin block 584,500

hmac.update(blockHash);

const hex = hmac.digest('hex').substr(0, 8);
const int = parseInt(hex, 16);

// 0.01 will result in 1% house edge with a lowest crashpoint of 1

const crashpoint = Math.max(1, (2 ** 32 / (int + 1)) * (1 - 0.01))


blockHash used is Bitcoin block 747,460 which has not been mined at time of posting. Basically we are using the hash of a future bitcoin block as a client seed so players can be certain that we did not pick one in the house's favor. I'd appreciate it if someone could quote this post so this is all set in stone.

Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!