Bitcoin Forum

Economy => Gambling discussion => Topic started by: Dexon on August 23, 2017, 02:35:34 PM



Title: WinXRP.com Provably Fair Seeding Event
Post by: Dexon on August 23, 2017, 02:35:34 PM
Disclamer: I was hired by winxrp.com to make this seeding event and therefor set up the provably fair on the game. I will not be part of the team that manage this site.

This will reuse the idea posted by Ryan and used for Bustabit (https://bitcointalk.org/index.php?topic=922898.0).

  • A chain of 10 million 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: d760e15075a3c29537ac2159cf15aec017ca039b8b114180d02e67040dd6b65e, by publicizing it here we are preventing any ability to pick an alternate sha256 chain.
  • winxrp 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 block that hasn't yet been mined: block 482030.

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 final hash is: ', terminatingHash);


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


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: RHavar on August 23, 2017, 03:55:03 PM
Quoting to prevent changes. Also archived at:
http://archive.is/I9E2l

Also confirming that block 482030 hasn't yet been mined

Disclamer: I was hired by winxrp.com to make this seeding event and therefor set up the provably fair on the game. I will not be part of the team that manage this site.

This will reuse the idea posted by Ryan and used for Bustabit (https://bitcointalk.org/index.php?topic=922898.0).

  • A chain of 10 million 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: d760e15075a3c29537ac2159cf15aec017ca039b8b114180d02e67040dd6b65e, by publicizing it here we are preventing any ability to pick an alternate sha256 chain.
  • winxrp 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 block that hasn't yet been mined: block 482030.

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 final hash is: ', terminatingHash);


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


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: Pali on August 24, 2017, 07:26:53 PM
I approve of this path forward. ;)


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: ngocngoc on August 26, 2017, 05:07:59 AM
I have deposited into account: ngocngoc why now lose account with my xrp again


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: Dexon on August 26, 2017, 06:04:44 PM
The block has been mined, game started.
You can verify games using: https://jsfiddle.net/mwtmv9nr/embedded/result/


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: gullu on August 26, 2017, 06:21:24 PM
prov fair processed by Dexon and approval of the process by Ryan means good news for the site.


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: RHavar on August 26, 2017, 11:19:18 PM
prov fair processed by Dexon and approval of the process by Ryan means good news for the site.

Please note that I'm not approving (or disapproving) of the process. I'm merely quoting it so people can see what it originally was with assurances that it doesn't change. I personally haven't verified any games so I can not make any statements either way.


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: Lionidas on August 26, 2017, 11:48:36 PM
What is this site and is it owned by bustabit in anyway?
If not then why is the owner Rhavar replying and quoting for this winxrp site?

They have nothing to do with themselves do they? ???


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: Dexon on August 27, 2017, 12:07:35 AM
What is this site and is it owned by bustabit in anyway?
If not then why is the owner Rhavar replying and quoting for this winxrp site?

They have nothing to do with themselves do they? ???

Bustabit has nothing to do with winxrp. Ryan only helped out with the seeding event as a good friend.


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: Pyloux31 on August 28, 2017, 06:53:04 AM
hello,

i have deposit 30 xrp the 08-16-2017 and up over to 102 xrp (102'000'000 bits).
After the website update when i try to log-in that say "Username does not exist".. My account have delete ?

What i can do for recovry my xrp or my account please ? Username: Pyloux31

Thanks


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: Dexon on August 30, 2017, 06:30:46 PM
hello,

i have deposit 30 xrp the 08-16-2017 and up over to 102 xrp (102'000'000 bits).
After the website update when i try to log-in that say "Username does not exist".. My account have delete ?

What i can do for recovry my xrp or my account please ? Username: Pyloux31

Thanks

Your account was on the other site.
To get your depo back, you need to contact Administrator on the chat.


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: mexicano on November 22, 2017, 11:34:29 PM
Your account was on the other site.
To get your depo back, you need to contact Administrator on the chat.

Hi @Dexon

Just wondered what happens with the site. It display a 522 error from CloudFlare.

Regards


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: 3x1t on January 01, 2018, 01:26:17 AM
Yo Dexon, how about bringing your site back online ? It shows the following message for 1 week now already:

"This is a temporary redirection
WinXRP is currently down. But will be back online soon. Sorry for the inconvenience and the delay.
Rest assured your funds are safe."

"...funds are safe" in your pocket or what does that mean ?!


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: xBoxLive on January 04, 2018, 12:58:15 PM
Site is down again. Says withdraw's delayed until the 8th. WTF. Bad rep. :/ Site is delayed because XRP shot up 300% in the past 2 weeks and now they are scrambling to keep order on the game.


Title: Re: WinXRP.com Provably Fair Seeding Event
Post by: Dexon on January 06, 2018, 02:08:41 AM
Site is down again. Says withdraw's delayed until the 8th. WTF. Bad rep. :/ Site is delayed because XRP shot up 300% in the past 2 weeks and now they are scrambling to keep order on the game.

See https://bitcointalk.org/index.php?topic=2695030.msg27539960#msg27539960 for more info about what's going on right now.