Bitcoin Forum
November 10, 2024, 08:57:36 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: LuckyGo Seeding Event  (Read 217 times)
luckygo (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
December 10, 2018, 12:30:47 PM
 #1

LuckyGo is to go alive In a few days. Game algorithm in converting hashes has is as follow, name it Seeding Event.

Starting with a secret “Seed”, a chain of 1,000,000 SHA256 hashes thus generates. Each element is the hash of the lowercase, hexadecimal string representation of the previous hash.  The hash of the chain's last element is 035cf2ff24d28229aa75636268c5cb9a7a278c2afef27577de00291ef6ae8c47.

Every game maps to a hash in the chain: The 1,000,000th element of the chain is the hash of game #1 and the first element in the chain is the hash of game #1,000,000. To verify that a hash belongs to a game #n, SHA256 hash it n times and compare the result with the terminating hash.

This is specifically how to calculate a result from its “Seed” hash:


Code:
function gameResult (seed, salt) {
    const sha = CryptoJS.algo.SHA256.create();
    sha.update(seed);
    sha.update(salt);
    seed = String(sha.finalize());

    const nBits = 52; // number of most significant bits to use
    // 1. r = 52 most significant bits
    seed = seed.slice(0, nBits / 4);
    const r = parseInt(seed, 16);
    // 2. X = r / 2^52
    let X = r / Math.pow(2, nBits); // uniformly distributed in [0; 1)
    // 3. X = 99 / (1-X)
    X = 99 / (1 - X);
    // 4. return max(trunc(X), 100)
    const result = Math.floor(X);
    return Math.max(1, result / 100);
};

Before being used to calculate the corresponding result, the “salt” hash begins from the bitcoin block in height of 553500. This block has not been mined yet, proving that we have not deliberately picked a chain that is unfavorable f
or players.
luckygo (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
December 12, 2018, 08:27:45 AM
 #2

 Cheesy
https://www.blockchain.com/en/btc/block-height/553500
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!