Bitcoin Forum
May 02, 2024, 03:00:20 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Old  (Read 109 times)
Crashcord (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
Old
April 01, 2020, 09:14:56 AM
Last edit: July 31, 2020, 12:58:16 PM by Crashcord
 #1

Old
1714662020
Hero Member
*
Offline Offline

Posts: 1714662020

View Profile Personal Message (Offline)

Ignore
1714662020
Reply with quote  #2

1714662020
Report to moderator
Unlike traditional banking where clients have only a few account numbers, with Bitcoin people can create an unlimited number of accounts (addresses). This can be used to easily track payments, and it improves anonymity.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714662020
Hero Member
*
Offline Offline

Posts: 1714662020

View Profile Personal Message (Offline)

Ignore
1714662020
Reply with quote  #2

1714662020
Report to moderator
JasonFC
Member
**
Offline Offline

Activity: 85
Merit: 28


View Profile
April 01, 2020, 10:13:28 AM
 #2

Seeding event:
We will be releasing our crash game soon and to proof our provably fair system we will be holding this event as we consider this the best way to do it.

Unfair seed:
Each game is salted with the hash of Bitcoin block #623936 which is not mined yet but it will be in a few hours.
By posting it before it was mined, there is no way thay we picked unfair seed.
Because this information is only released once the block has been mined. And there is no way for us to see the future.

Code to generate the results:

var serverSecret = 'change this';
var clientSeed = 'future bitcoin block hash #623936'

var gamesToGenerate = 10e8;
var serverSeed = serverSecret;

for (var game = gamesToGenerate; game > 0; --game) {
  serverSeed = crypto.createHash('sha256').update(serverSeed).digest('hex');
  console.log('#' +  game + ' crashes at ' + crashPointFromHash(serverSeed) +'x', '\t\tHash: ' + serverSeed);
}

function crashPointFromHash(serverSeed) {
  var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, serverSeed);
  var hash = hmacHasher.finalize(clientSeed).toString();

  function divisible(hash, mod) {
    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;
  }

  if (divisible(hash, 25))
      return (1.00).toFixed(2);

  var h = parseInt(hash.slice(0,52/4),16);
  var e = Math.pow(2,52);

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

var terminatingHash = crypto.createHash('sha256').update(serverSeed).digest('hex');
console.log('Terminating hash is: ', terminatingHash);

Quoted and archived.

Congrats on the release, and best of luck!

flashflip.io - instant bitcoin gambling on Discord
flashcrash.io - learn more
Crashcord (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
April 01, 2020, 10:14:08 AM
 #3

Appreciated! Smiley
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!