What happens on-chain during a Crash round?
Every Crash round is built from three on-chain transactions, in this order:- Commit: before betting opens, the backend generates a random 32-byte secret and publishes its SHA-256 hash on-chain (the
start_new_roundinstruction). This is the commitment: from this moment, only that exact secret can ever settle the round. The commitment is public in the transaction’sCrashRoundPreparedevent. - Betting: players place their bets. The secret stays hidden; the commitment guarantees it cannot be swapped.
- Round start / entropy capture: when the round begins (the
start_gameinstruction), the program reads the most recent slot hash from Solana’sSlotHashessysvar and stores it in the round. The app calls this value the round’s block hash. The crash point is now fully determined (it is a pure function of the stored slot hash and the committed secret), but nobody who doesn’t know the secret can compute it yet. The value is public in theCrashGameStartedevent. - The round plays out: the multiplier climbs and players cash out.
- Reveal: the backend submits the secret (the
crashinstruction). The program verifies on-chain thatsha256(secret)equals the commitment (a mismatch makes the transaction fail), then computes the crash point itself and finalizes the round. TheCrashRoundFinalizedevent publishes the secret, the slot hash and the final crash point.
What is the exact crash point formula?
The crash point is derived exactly like this (this is the arithmetic the on-chain program executes: integer math, no rounding surprises):- The concatenation order is blockhash first, then secret.
Xis read big-endian from the first 4 bytes of the SHA-256 output.- Divisions are floor (integer) divisions.
- The
max(10000, …)floor means the multiplier is never below 1.00x, and the cap onXprevents astronomically small denominators.
Worked example
WithX = 0xABCD1234 (2,882,343,476) and the current 1% edge (edge_bps = 100):
What the distribution looks like
The formula maps a uniformX to the classic crash curve. The probability that a round reaches at least a multiplier m is approximately:
edge_bps in its reveal event; the current value is listed in Fees and limits.
What is guaranteed, and what is not
Enforced by the program:- After the commitment is on-chain, the operator cannot change the round’s secret: the reveal transaction fails on any secret whose hash does not match.
- Once the round has started (slot hash stored), the crash point is fixed. Cashing out early, late, or in large numbers changes nothing: the outcome was determined before the multiplier started climbing.
- The crash point is computed by the program, not reported by the backend. A wrong value cannot be written on-chain.
- Everything needed to verify (commitment, slot hash, secret, final crash point) is published in on-chain events, permanently.
- Start timing. The operator knows the secret before the round starts, and its backend decides when to submit the round-start transaction. Since recent slot hashes are public, it could in principle precompute the would-be multiplier for candidate slots and time the start to influence which slot hash is captured. The scheme does not prevent this; it makes it observable: round-start timing is public, and any systematic bias would show up in the statistics of published crash points, which anyone can recompute in bulk.
- Cancels. After the round starts, the operator knows the outcome before players do, and it could cancel an unfavourable round instead of revealing. Two hard limits apply: a cancel refunds every stake in full (the program has no confiscation path), and every cancel emits a public event; cancel frequency is the on-chain tell. Cancelling exists as a recovery path for a lost secret (for example a backend crash between commit and reveal) and is expected to be essentially never used.