Bitcoin Forum
December 14, 2024, 08:52:24 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Ltcnyan.com -- Social Litecoin Gambling Site -- Seeding Feed  (Read 210 times)
LTCnyan (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
January 04, 2018, 03:45:05 PM
 #1

Welcome to the first provably fair seeding event. One of the most requested features of ltcnyan has been to create a provably distribution of game crashes, to replace our provably predetermined multipliers.

The original scheme of turning a multiplayer game in which peers do not trust each other was first proposed by Dooglus, refined by Eric and solidified into code by Steve.

The high level of the scheme is as follows:

1) We have generated a chain of 10 million sha256 hashes, starting with a server secret that has been repeatedly fed the output of sha256 back into itself 10 million times. The sha256 of the final hash in the chain is: 86b20c76a2fa9655aecb71b0cf0d32c142a6036a36cb5c0f47738048eb9199f3, by publicising it here we are preventing any ability to pick an alternate sha256 chain.


2) ltcnyan will play through that chain of hashes, in reverse order, and use the hashes to determine the crash point in a probably fair manner.

3) To avoid criticism that the Litecoin address 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 339300.


The reference code (javascript) is as follows:

The method to create the hash chain is simply sha256:
Code:
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:
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:
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);

Check The fairness of Game: https://jsfiddle.net/54wnmk1s
Website URL: https://www.ltcnyan.com
Register Now: https://www.ltcnyan.com/register

                                                                       Happy New year To all The Bitcoin talk Users.
                                                                                         From: https://ltcnyan.com
arisatox
Member
**
Offline Offline

Activity: 310
Merit: 12


View Profile WWW
January 04, 2018, 07:30:57 PM
 #2

I think there is a bug in your calculation or something. When I look at stats, I see

Bankroll: -718 Lites
Max win per game: -22 Lites

Check out LuckyDiamond for amazing promos!

LuckyBird





ff
DarkStar_
Legendary
*
Offline Offline

Activity: 2772
Merit: 3284


View Profile WWW
January 04, 2018, 08:22:19 PM
 #3

Quoted for you. Do you have a link to your source code anywhere? Assuming your using the open source version of bustabit (as you do not have a license purchased), it is required by the APGLv3 license that the open source version has.

I think there is a bug in your calculation or something. When I look at stats, I see

Bankroll: -718 Lites
Max win per game: -22 Lites

Looks fine for me:


Welcome to the first provably fair seeding event. One of the most requested features of ltcnyan has been to create a provably distribution of game crashes, to replace our provably predetermined multipliers.

The original scheme of turning a multiplayer game in which peers do not trust each other was first proposed by Dooglus, refined by Eric and solidified into code by Steve.

The high level of the scheme is as follows:

1) We have generated a chain of 10 million sha256 hashes, starting with a server secret that has been repeatedly fed the output of sha256 back into itself 10 million times. The sha256 of the final hash in the chain is: 86b20c76a2fa9655aecb71b0cf0d32c142a6036a36cb5c0f47738048eb9199f3, by publicising it here we are preventing any ability to pick an alternate sha256 chain.


2) ltcnyan will play through that chain of hashes, in reverse order, and use the hashes to determine the crash point in a probably fair manner.

3) To avoid criticism that the Litecoin address 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 339300.


The reference code (javascript) is as follows:

The method to create the hash chain is simply sha256:
Code:
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:
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:
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);

Check The fairness of Game: https://jsfiddle.net/54wnmk1s
Website URL: https://www.ltcnyan.com
Register Now: https://www.ltcnyan.com/register

                                                                       Happy New year To all The Bitcoin talk Users.
                                                                                         From: https://ltcnyan.com

taking a break - expect delayed responses
arisatox
Member
**
Offline Offline

Activity: 310
Merit: 12


View Profile WWW
January 04, 2018, 09:43:29 PM
Last edit: January 04, 2018, 09:59:53 PM by arisatox
 #4

Looks fine for me:


It went positive soon after I posted that image because people lost but it is still way off. If you look at the image it shows maximum win of 35 but the site shows 30 million, so the bankroll is not properly set up or something in the code.

If you look now, it's negative again

Bankroll:   -157,145 Lites
Max win per game:   -4,714 Lites

For proof, here is an archived copy of the page showing what it looks like

http://timetravel.mementoweb.org/reconstruct/20180104215904/https://ltcnyan.com/stats

Check out LuckyDiamond for amazing promos!

LuckyBird





ff
MadZ
Hero Member
*****
Offline Offline

Activity: 908
Merit: 657


View Profile
January 05, 2018, 12:31:07 AM
 #5

3) To avoid criticism that the Litecoin address 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 339300.

Does this mean that the secret seed mentioned in step 1 is a LTC address? Doesn't that kind of narrow down the potential seeds quite a bit? Also, you should probably move this to the altcoin section, or it will be moved for you I suppose.
LTCnyan (OP)
Newbie
*
Offline Offline

Activity: 10
Merit: 0


View Profile
January 06, 2018, 06:01:38 AM
 #6


It went positive soon after I posted that image because people lost but it is still way off. If you look at the image it shows maximum win of 35 but the site shows 30 million, so the bankroll is not properly set up or something in the code.

If you look now, it's negative again

Bankroll:   -157,145 Lites
Max win per game:   -4,714 Lites

For proof, here is an archived copy of the page showing what it looks like

http://timetravel.mementoweb.org/reconstruct/20180104215904/https://ltcnyan.com/stats

There was a problem in stats, And we have sorted out that part. Please check now for your confirmation.
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!