> For the complete documentation index, see [llms.txt](https://docs.catapult.trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.catapult.trade/mechanics-turbo/provable-fairness.md).

# Provable Fairness

{% stepper %}
{% step %}

### Commit Phase

When a token is initialized, the engine pre-computes the complete price sequence P0…PN using the GBM model. The system generates a secret string fairSalt and identifies the speedTicksInSecond. Before the chart goes live, these elements are hashed to create a unique fairHash. This hash is broadcast immediately, serving as an immutable anchor
{% endstep %}

{% step %}

### Live Trading Phase

Traders execute orders against the unfolding price stream. While the fairHash and speedTicksInSecond are public, the fairSalt and the full price array remain hidden. Because the hash is already published, any backend attempt to alter future ticks or truncate the session would cause the final verification to fail.
{% endstep %}

{% step %}

### Reveal Phase

Upon session expiration, the system discloses the fairSalt and provides a **Copy Prices** function to export the raw ticksString (a comma-separated string of all generated prices). With this data, the original commitment can be independently verified.
{% endstep %}
{% endstepper %}

### Verification Mechanics

The system is designed to be stateless and verifiable by any participant using the following logic:

`fairHash = ethers.hashMessage(ticksString + fairSalt + speedTicksInSecond)`

#### In-Browser Verification

The **Verify Fairness** tool recalculates the hash using the disclosed parameters and compares it to the original published hash. A match confirms the chart was not tampered with.

#### Independent Verification

Power users can verify the commitment on their local machines by installing ethers.js and running the formula against the exported data.

#### Integrity Guarantee

This scheme is fair because the hash is published before the data is revealed. Due to the properties of the Keccak-256 function used in hashMessage, changing even a single character in the price array, salt, or speed value results in a completely different hash. This ensures that the disclosed data must be identical to the data generated before the first trade was ever placed.
