Bitcoin Forum
May 08, 2024, 03:20:24 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: phun.io - Provably Fair Seeding Event  (Read 390 times)
phun.io (OP)
Copper Member
Jr. Member
*
Offline Offline

Activity: 154
Merit: 2

phun.io - The Social Gambling Game


View Profile WWW
March 24, 2018, 01:51:32 AM
 #1

Welcome to the phun.io Provably Fair Seeding Event!

This will reuse the idea posted by Ryan and used for Bustabit v1.
   
  • A chain of 10 million (1e7) sha256 hashes was generated, starting with a Server Secret that has been repeatedly fed the output of sha256 hash back into itself 10 million times.
        The final hash in the chain is: ad699bff1c169b3553687720c5d4b4c22e9f729c12782730c7399264c3593d9a, by publicizing it here we are preventing any ability to pick an alternate sha256 chain.
  • phun.io 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 Bitcoin Cash block that hasn't yet been mined: block 522752

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 money pot 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 =  'If you knew this, you could steal all my money';
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 terminating hash is: ', terminatingHash);

Using our chosen starting serverSeed, the hash terminating the chain is ad699bff1c169b3553687720c5d4b4c22e9f729c12782730c7399264c3593d9a. That is to say, the first game's hash played under the new provably fair scheme, when hashed will be ad699bff1c169b3553687720c5d4b4c22e9f729c12782730c7399264c3593d9a.

Play now: https://www.phun.io
1715138424
Hero Member
*
Offline Offline

Posts: 1715138424

View Profile Personal Message (Offline)

Ignore
1715138424
Reply with quote  #2

1715138424
Report to moderator
1715138424
Hero Member
*
Offline Offline

Posts: 1715138424

View Profile Personal Message (Offline)

Ignore
1715138424
Reply with quote  #2

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

Posts: 1715138424

View Profile Personal Message (Offline)

Ignore
1715138424
Reply with quote  #2

1715138424
Report to moderator
1715138424
Hero Member
*
Offline Offline

Posts: 1715138424

View Profile Personal Message (Offline)

Ignore
1715138424
Reply with quote  #2

1715138424
Report to moderator
1715138424
Hero Member
*
Offline Offline

Posts: 1715138424

View Profile Personal Message (Offline)

Ignore
1715138424
Reply with quote  #2

1715138424
Report to moderator
crypto_m3rchant
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
March 24, 2018, 01:55:20 AM
 #2

Welcome to the phun.io Provably Fair Seeding Event!

This will reuse the idea posted by Ryan and used for Bustabit v1.
   
  • A chain of 10 million (1e7) sha256 hashes was generated, starting with a Server Secret that has been repeatedly fed the output of sha256 hash back into itself 10 million times.
        The final hash in the chain is: ad699bff1c169b3553687720c5d4b4c22e9f729c12782730c7399264c3593d9a, by publicizing it here we are preventing any ability to pick an alternate sha256 chain.
  • phun.io 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 Bitcoin Cash block that hasn't yet been mined: block 522752

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 money pot 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 =  'If you knew this, you could steal all my money';
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 terminating hash is: ', terminatingHash);

Using our chosen starting serverSeed, the hash terminating the chain is ad699bff1c169b3553687720c5d4b4c22e9f729c12782730c7399264c3593d9a. That is to say, the first game's hash played under the new provably fair scheme, when hashed will be ad699bff1c169b3553687720c5d4b4c22e9f729c12782730c7399264c3593d9a.

Play now: https://www.phun.io

I am quoting this so OP doesn't make changes.
phun.io (OP)
Copper Member
Jr. Member
*
Offline Offline

Activity: 154
Merit: 2

phun.io - The Social Gambling Game


View Profile WWW
March 24, 2018, 02:00:32 AM
 #3

I have generated a snapshot as proof I won't edit the post: https://web.archive.org/web/20180324015547/https://bitcointalk.org/index.php?topic=3187788.0
phun.io (OP)
Copper Member
Jr. Member
*
Offline Offline

Activity: 154
Merit: 2

phun.io - The Social Gambling Game


View Profile WWW
March 24, 2018, 02:22:50 AM
 #4

Block 522752 was mined.

Client seed: 00000000000000000017d87fc6443429ef4059f2bde075ddab289a34e8a0a1de

The first game: https://www.phun.io/game/1000000

Thank you, hope to see you guys on!

https://www.phun.io  Smiley
phun.io (OP)
Copper Member
Jr. Member
*
Offline Offline

Activity: 154
Merit: 2

phun.io - The Social Gambling Game


View Profile WWW
January 02, 2019, 12:10:43 PM
 #5

Due to a little problem we encountered, we will be doing the seeding event again starting from game 2,000,000.

Games between 1,000,000 - 1,999,999 can still be verified using the previous final hash: ad699bff1c169b3553687720c5d4b4c22e9f729c12782730c7399264c3593d9a

This will reuse the idea posted by Ryan and used for Bustabit v1.
   
  • A chain of 10 million (1e7) sha256 hashes was generated, starting with a Server Secret that has been repeatedly fed the output of sha256 hash back into itself 10 million times.
        The final hash in the chain is: b099a967f8154d3e833f29b9df58378cfe3bbb78a757f3e84c5b6565035ed211, by publicizing it here we are preventing any ability to pick an alternate sha256 chain.
  • phun.io 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 Bitcoin SV block that hasn't yet been mined: block 563470

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 money pot 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 =  'If you knew this, you could steal all my money';
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 terminating hash is: ', terminatingHash);

Using our chosen starting serverSeed, the hash terminating the chain is b099a967f8154d3e833f29b9df58378cfe3bbb78a757f3e84c5b6565035ed211. That is to say, the 2 millionth game's hash played under the new provably fair scheme, when hashed will be b099a967f8154d3e833f29b9df58378cfe3bbb78a757f3e84c5b6565035ed211.

Play now: https://www.phun.io
phun.io (OP)
Copper Member
Jr. Member
*
Offline Offline

Activity: 154
Merit: 2

phun.io - The Social Gambling Game


View Profile WWW
January 02, 2019, 12:14:18 PM
 #6

Due to a little problem we encountered, we will be doing the seeding event again starting from game 2,000,000.

Games between 1,000,000 - 1,999,999 can still be verified using the previous final hash: ad699bff1c169b3553687720c5d4b4c22e9f729c12782730c7399264c3593d9a

This will reuse the idea posted by Ryan and used for Bustabit v1.
   
  • A chain of 10 million (1e7) sha256 hashes was generated, starting with a Server Secret that has been repeatedly fed the output of sha256 hash back into itself 10 million times.
        The final hash in the chain is: b099a967f8154d3e833f29b9df58378cfe3bbb78a757f3e84c5b6565035ed211, by publicizing it here we are preventing any ability to pick an alternate sha256 chain.
  • phun.io 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 Bitcoin SV block that hasn't yet been mined: block 563470

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 money pot 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 =  'If you knew this, you could steal all my money';
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 terminating hash is: ', terminatingHash);

Using our chosen starting serverSeed, the hash terminating the chain is b099a967f8154d3e833f29b9df58378cfe3bbb78a757f3e84c5b6565035ed211. That is to say, the 2 millionth game's hash played under the new provably fair scheme, when hashed will be b099a967f8154d3e833f29b9df58378cfe3bbb78a757f3e84c5b6565035ed211.

Play now: https://www.phun.io

We are quoting this and have also generated a snapshot as proof we won't edit the post: https://web.archive.org/web/20190102121221/https://bitcointalk.org/index.php?topic=3187788
phun.io (OP)
Copper Member
Jr. Member
*
Offline Offline

Activity: 154
Merit: 2

phun.io - The Social Gambling Game


View Profile WWW
January 02, 2019, 12:30:32 PM
 #7

Block 563470 was mined.

Client seed: 000000000000000006e7d2f3765c2616d250083403fab8815143be977b35adaa

The 2 millionth game: https://www.phun.io/game/2000000

Thank you, hope to see you guys on!

https://www.phun.io  Smiley
Kid_diK
Member
**
Offline Offline

Activity: 322
Merit: 12

bit★Starz - Dream Big, Win Bigger


View Profile
February 11, 2019, 08:09:34 AM
 #8

Scam

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!