Back to the game

Provably fair, explained simply

How can you be sure an online game does not cheat? On LilyFrog, every game is set before you play and you can recompute it yourself. Here is how, with a worked example.

The problem: trusting the server

In an online game, the server draws the results. Without proof, nothing would stop a site from changing a result at the last moment, for instance making the croc show up just as your pot gets big. Provably fair makes such cheating impossible to hide.

The three ingredients

The formula

Each draw is computed this way: HMAC-SHA256(server seed, “client seed:nonce:cursor”). The first 52 bits of the result (the first 13 hexadecimal characters) give a number between 0 and 1. The jump holds if this number is lower than the odds of the pad chosen, set by the settings of the game. The layout of the pads, the weather, the special pads and every jump are drawn the same way, each with its own cursor.

A worked example

With seeds made up for the example (they are not real seeds of the game):

  1. Server seed: c032094037df1d053e66fcdaefe7813049e8fd4847d39a887bac56513d7571b0
  2. Its hash, shown before playing: 0abaecdc59735436da02f5fcef6e7a2ec6d5cda856804dd88db6576b4b31f668
  3. Client seed nenuphar, game no. 7, jump of row 3 (cursor 103): the message is nenuphar:7:103.
  4. HMAC-SHA256: 1525ee90e73c835b61aeb70508c5f09e60b76b1122b512570bb931ba80fcc96f
  5. The first 13 characters, 1525ee90e73c8, divided by 252, give 0.08261004483868994.

Anyone with the same seeds finds exactly this number. Had the server cheated, the sums would not add up.

Checking a real game

  1. In My account, open the history: every game has a “Verify” link.
  2. On the Provably fair page, tap “Change seed”: the old server seed is revealed, and a new one takes its place for your next games.
  3. Compare: the hash of the revealed seed must be the one you saw before playing. The site then recomputes all the games you played with it, and you can redo the sums yourself below.

Compute it yourself, without us

This calculator runs entirely in your browser: it sends nothing to our server. Paste a revealed seed, your client seed, the nonce and the cursor. For one of your games, the “Verify” link of the history shows the revealed seed, the client seed and the nonce of that game; the list of cursors, Infinite Pad and the daily challenge included, is on the Provably fair page.

What it guarantees, and what it does not

Play LilyFrog