In the world of online gaming, fairness is crucial. Players need to trust that the games they play are genuinely random and not manipulated. bustabit uses a provably fair system to ensure that every game result is fair and verifiable by players. This page explains how bustabit's provably fair system works in simple terms.
At the heart of bustabit's fairness system is a concept called a hash. But what exactly is a hash?
A hash is like a digital fingerprint for any piece of data. It's generated by a mathematical function called a hash function. When you input data into a hash function, it produces a fixed-size string of characters, which is the hash.
Two key properties of hash functions are:
Let's take the SHA-256 hash function as an example. If we input the phrase "red train"
into SHA-256, we get the following hash:
a2691e176303122661d2551f627d8d2184e1e582ddab88cdabc63f95186e1ab9
If we change the input slightly to "red trains"
(adding an "s"), the hash changes completely:
35464444d2b3fcb57e410e7215f78ab2b1c8c889fff1efee7284acd11fee64a4
This demonstrates the "avalanche effect" of hash functions, where even a small change in the input results in a vastly different hash.
Now that we understand hashes, let's explore how bustabit uses them to ensure fairness through a hash chain.
A hash chain is a sequence where each hash is produced by hashing the previous hash. Here's how it works:
Figure 1: Illustration of a hash chain
The hash chain ensures fairness because:
bustabit generates a long hash chain to determine game outcomes. Here's the process:
Figure 2: bustabit's hash chain structure
To ensure complete transparency, bustabit publicly commits to the exact code used to derive the game results from the hashes. This means that:
By committing to the code during the seeding event (a public announcement where they publish the terminating hash and the game derivation code), bustabit sets everything in stone. This ensures that the entire system is transparent and trustworthy.
Figure 3: Precommitting to game derivation code
Each game's outcome (the crash point) is calculated using its assigned hash and the precommitted game derivation code. Here's how:
Crash Point = max(1, floor((99 / (1 - X)) / 100))
X
is the decimal number from step 2.
Since bustabit has publicly committed to this exact code, any deviation would be detectable. Players can use the same code to verify that the crash points are calculated correctly.
To add an extra layer of security and fairness, bustabit collaborates with ActuallyFair.com, using their Vx service. Here's how it works:
bustabit incorporates an unpredictable element called the game salt, which is the hash of a future Bitcoin block. Since no one can predict this hash before the block is mined, it adds true randomness to the game.
ActuallyFair.com uses their private key to sign a combination of the previous game's hash and the game salt. This signature, called the vxSignature, is unique and verifiable.
For each game:
Figure 4: Collaboration with ActuallyFair.com
This process ensures that neither bustabit nor ActuallyFair.com can manipulate the game outcomes, as it relies on unpredictable data and publicly committed code.
Players can independently verify that each game was fair. Here's how:
Figure 5: Steps to verify game fairness
Precommitting to the game derivation code is crucial because:
bustabit's provably fair system combines cryptographic hashes, hash chains, unpredictable data, and publicly committed code to ensure every game is fair and transparent. Understanding these components allows players to trust that the games are not manipulated and that they have a fair chance of winning.
For more technical details, you can visit bustabit's official Provably Fair page or check out their open-source verifier on GitHub.