### basics

New games run every 8 seconds. Each moment the counter ticks up, with each tick the chance of the game crashing increase until the game crashes. Players place bets on when they think the game will crash. The longer you stay in the higher the cashout reward. Players set an automatic target value before the game begins and can cash out early at any time by clicking the cash out button.

### Probability and Profit

The house edge is set at 1.5%. ~1.5% of games will crash at 1.0. The probability of a game crashing at 2.0 is therefore slightly lower at 49.8%. The probability of 3.0 is 33%, 10.0 is 10% and so on.

The profit of a bet is the bet amount multiplied by the cash out value minus the bet. So a bet of 100 eos with a cash out value of 2.0, would net a profit of 100 eos. A bet of 100 eos with a cash out value of 10.0 would net a profit of 1,000 eos.

### Creating Randomness

Game values are created as a series of SHA256 hashes similar to other crash games. The initial hash is created from a series of 512 random bytes appended with the seed hash. All games are then a hash value of the previous hash appended with the seed value. This creates a chain of hashes originating from the original 512 random bytes. That chain is played backwards for each game such that you can know all previous game values but not future game values.

### Hashes to Values

A game value is computed from a hash by taking the 52 least significant bits from the hash and dividing it by 2 ^ 52. This gives a number between 0 and 1. We then take the floor of ((99 / (1 - x)) / 100) as the game value.
In code:

dec = hexdec(substr(hash, -13); x = dec / pow(2, 52);
z = floor(99 / (1 - x));
result = max(1, (z / 100));