Bitcoin Forum
July 16, 2018, 05:19:53 AM *
News: Latest stable version of Bitcoin Core: 0.16.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Litecoin.win Provably Fair Seeding Event  (Read 121 times)
FluxTube
Copper Member
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
February 01, 2018, 10:15:13 AM
 #1

Please notice: litecoin.win is formerly known as ltcrash.com and bustacoin.com. See https://bitcointalk.org/index.php?topic=2782356

This will reuse the idea posted by Ryan and used for Bustabit.

This is an event to prove litecoin.win is fair.

  • Starting with a secret seed I've generated a chain of 10,000,000 SHA256 hashes. Each element is the hash of the lowercase, hexadecimal string representation of the previous hash. The hash of the chain's last element is: 281baeeb0f2dc9c9a0875b7362483a50dfd7e37a33a75d82ed9aed82bcb53544
  • litecoin.win will play through that chain of hashes, in reverse order, and use the hashes to determine the crash point.
  • To avoid criticism that the Server Secret used in step 1 was carefully chosen to generate lots of "bad" crash points, each hash in the chain will be salted with a client seed, which we have no control of.
    The client seed will be the block hash of a Litecoin block that hasn't yet been mined: block 507084

The reference code (javascript) is as follows:

The method to create the hash chain is simply sha256:

Code:
function genGameHash(serverSeed) {
  return crypto.createHash('sha256').update(serverSeed).digest('hex');
}

The method to convert a game hash, mix it with the picked client seed to a litecoin.win multiplier:

Code:
function crashPointFromHash(serverSeed, clientSeed) {
  function divisible(hash, mod) {
    // We will read in 4 hex at a time, but the first chunk might be a bit smaller
    // So ABCDEFGHIJ should be chunked like  AB CDEF GHIJ
    var val = 0;
   
    var o = hash.length % 4;
    for (var i = o > 0 ? o - 4 : 0; i < hash.length; i += 4) {
      val = ((val << 16) + parseInt(hash.substring(i, i+4), 16)) % mod;
    }

    return val === 0;
  }

  var hash = crypto.createHmac('sha256', serverSeed).update(clientSeed).digest('hex');

  /* In 1 of 101 games the game crashes instantly. */
  if (divisible(hash, 101))
     return 0;

  /* Use the most significant 52-bit from the hash
     to calculate the crash point */
  var h = parseInt(hash.slice(0,52/4),16);
  var e = Math.pow(2,52);

  return Math.floor((100 * e - h) / (e - h));
}

The chain could be generated with code such as:
Code:
var serverSecret =  'secret';
var clientSeed = '0000examplehash';

var gamesToGenerate = 1e7;

var serverSeed = serverSecret;

for (var game = gamesToGenerate; game > 0; --game) {
  serverSeed = genGameHash(serverSeed);
  console.log('Game ' +  game + ' has a crash point of ' + (crashPointFromHash(serverSeed, clientSeed) / 100).toFixed(2) +'x', '\t\tHash: ' + serverSeed);
}

var terminatingHash = genGameHash(serverSeed);

console.log('The final hash is: ', terminatingHash);

Using our chosen starting serverSeed, the hash terminating the chain is 281baeeb0f2dc9c9a0875b7362483a50dfd7e37a33a75d82ed9aed82bcb53544

1531718393
Hero Member
*
Offline Offline

Posts: 1531718393

View Profile Personal Message (Offline)

Ignore
1531718393
Reply with quote  #2

1531718393
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1531718393
Hero Member
*
Offline Offline

Posts: 1531718393

View Profile Personal Message (Offline)

Ignore
1531718393
Reply with quote  #2

1531718393
Report to moderator
1531718393
Hero Member
*
Offline Offline

Posts: 1531718393

View Profile Personal Message (Offline)

Ignore
1531718393
Reply with quote  #2

1531718393
Report to moderator
1531718393
Hero Member
*
Offline Offline

Posts: 1531718393

View Profile Personal Message (Offline)

Ignore
1531718393
Reply with quote  #2

1531718393
Report to moderator
TestingScript
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
February 01, 2018, 10:18:16 AM
 #2

Please notice: litecoin.win is formerly known as ltcrash.com and bustacoin.com. See https://bitcointalk.org/index.php?topic=2782356

This will reuse the idea posted by Ryan and used for Bustabit.

This is an event to prove litecoin.win is fair.

  • Starting with a secret seed I've generated a chain of 10,000,000 SHA256 hashes. Each element is the hash of the lowercase, hexadecimal string representation of the previous hash. The hash of the chain's last element is: 281baeeb0f2dc9c9a0875b7362483a50dfd7e37a33a75d82ed9aed82bcb53544
  • litecoin.win will play through that chain of hashes, in reverse order, and use the hashes to determine the crash point.
  • To avoid criticism that the Server Secret used in step 1 was carefully chosen to generate lots of "bad" crash points, each hash in the chain will be salted with a client seed, which we have no control of.
    The client seed will be the block hash of a Litecoin block that hasn't yet been mined: block 507084

The reference code (javascript) is as follows:

The method to create the hash chain is simply sha256:

Code:
function genGameHash(serverSeed) {
  return crypto.createHash('sha256').update(serverSeed).digest('hex');
}

The method to convert a game hash, mix it with the picked client seed to a litecoin.win multiplier:

Code:
function crashPointFromHash(serverSeed, clientSeed) {
  function divisible(hash, mod) {
    // We will read in 4 hex at a time, but the first chunk might be a bit smaller
    // So ABCDEFGHIJ should be chunked like  AB CDEF GHIJ
    var val = 0;
   
    var o = hash.length % 4;
    for (var i = o > 0 ? o - 4 : 0; i < hash.length; i += 4) {
      val = ((val << 16) + parseInt(hash.substring(i, i+4), 16)) % mod;
    }

    return val === 0;
  }

  var hash = crypto.createHmac('sha256', serverSeed).update(clientSeed).digest('hex');

  /* In 1 of 101 games the game crashes instantly. */
  if (divisible(hash, 101))
     return 0;

  /* Use the most significant 52-bit from the hash
     to calculate the crash point */
  var h = parseInt(hash.slice(0,52/4),16);
  var e = Math.pow(2,52);

  return Math.floor((100 * e - h) / (e - h));
}

The chain could be generated with code such as:
Code:
var serverSecret =  'secret';
var clientSeed = '0000examplehash';

var gamesToGenerate = 1e7;

var serverSeed = serverSecret;

for (var game = gamesToGenerate; game > 0; --game) {
  serverSeed = genGameHash(serverSeed);
  console.log('Game ' +  game + ' has a crash point of ' + (crashPointFromHash(serverSeed, clientSeed) / 100).toFixed(2) +'x', '\t\tHash: ' + serverSeed);
}

var terminatingHash = genGameHash(serverSeed);

console.log('The final hash is: ', terminatingHash);

Using our chosen starting serverSeed, the hash terminating the chain is 281baeeb0f2dc9c9a0875b7362483a50dfd7e37a33a75d82ed9aed82bcb53544

!shrug
nons
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
February 01, 2018, 10:21:09 AM
 #3

Please notice: litecoin.win is formerly known as ltcrash.com and bustacoin.com. See https://bitcointalk.org/index.php?topic=2782356

This will reuse the idea posted by Ryan and used for Bustabit.

This is an event to prove litecoin.win is fair.

  • Starting with a secret seed I've generated a chain of 10,000,000 SHA256 hashes. Each element is the hash of the lowercase, hexadecimal string representation of the previous hash. The hash of the chain's last element is: 281baeeb0f2dc9c9a0875b7362483a50dfd7e37a33a75d82ed9aed82bcb53544
  • litecoin.win will play through that chain of hashes, in reverse order, and use the hashes to determine the crash point.
  • To avoid criticism that the Server Secret used in step 1 was carefully chosen to generate lots of "bad" crash points, each hash in the chain will be salted with a client seed, which we have no control of.
    The client seed will be the block hash of a Litecoin block that hasn't yet been mined: block 507084

The reference code (javascript) is as follows:

The method to create the hash chain is simply sha256:

Code:
function genGameHash(serverSeed) {
  return crypto.createHash('sha256').update(serverSeed).digest('hex');
}

The method to convert a game hash, mix it with the picked client seed to a litecoin.win multiplier:

Code:
function crashPointFromHash(serverSeed, clientSeed) {
  function divisible(hash, mod) {
    // We will read in 4 hex at a time, but the first chunk might be a bit smaller
    // So ABCDEFGHIJ should be chunked like  AB CDEF GHIJ
    var val = 0;
   
    var o = hash.length % 4;
    for (var i = o > 0 ? o - 4 : 0; i < hash.length; i += 4) {
      val = ((val << 16) + parseInt(hash.substring(i, i+4), 16)) % mod;
    }

    return val === 0;
  }

  var hash = crypto.createHmac('sha256', serverSeed).update(clientSeed).digest('hex');

  /* In 1 of 101 games the game crashes instantly. */
  if (divisible(hash, 101))
     return 0;

  /* Use the most significant 52-bit from the hash
     to calculate the crash point */
  var h = parseInt(hash.slice(0,52/4),16);
  var e = Math.pow(2,52);

  return Math.floor((100 * e - h) / (e - h));
}

The chain could be generated with code such as:
Code:
var serverSecret =  'secret';
var clientSeed = '0000examplehash';

var gamesToGenerate = 1e7;

var serverSeed = serverSecret;

for (var game = gamesToGenerate; game > 0; --game) {
  serverSeed = genGameHash(serverSeed);
  console.log('Game ' +  game + ' has a crash point of ' + (crashPointFromHash(serverSeed, clientSeed) / 100).toFixed(2) +'x', '\t\tHash: ' + serverSeed);
}

var terminatingHash = genGameHash(serverSeed);

console.log('The final hash is: ', terminatingHash);

Using our chosen starting serverSeed, the hash terminating the chain is 281baeeb0f2dc9c9a0875b7362483a50dfd7e37a33a75d82ed9aed82bcb53544

Nice !
FluxTube
Copper Member
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
February 01, 2018, 10:40:35 AM
 #4

Block #507084 has been mined.
The client seed will be that hash of that block: 0000000000000000003499be13766404995184368e14174120ef76e231df88a1

samanthacrypto
Jr. Member
*
Offline Offline

Activity: 42
Merit: 0


View Profile WWW
February 01, 2018, 10:45:06 AM
 #5

guys, you go to crypto market now, then you should buy Litecoin.
Dexon
Full Member
***
Offline Offline

Activity: 227
Merit: 150

I'm a web dev :D


View Profile WWW
February 02, 2018, 03:14:52 PM
 #6

Just a lil touch here: the block height 507084 was a bitcoin block, not a litecoin block. (https://blockchain.info/block/0000000000000000003499be13766404995184368e14174120ef76e231df88a1)
FluxTube
Copper Member
Newbie
*
Offline Offline

Activity: 28
Merit: 0


View Profile WWW
February 02, 2018, 10:33:49 PM
 #7

Just a lil touch here: the block height 507084 was a bitcoin block, not a litecoin block. (https://blockchain.info/block/0000000000000000003499be13766404995184368e14174120ef76e231df88a1)

Thanks.

Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!