Free for every game and every draw

Randomness your players can verify.

FairDice gives game servers seed-based dice, card shuffles and lottery draws that run fully offline, then turns every match into a link anyone can open to check that nothing was rigged.

0
API calls during a game
3
SDK languages with identical results
Free
Cost, for every service

Commit. Play. Reveal.

The classic commit-reveal scheme, packaged so that one link proves a whole match.

1

Commit

Before the game your server creates a FairDice and shows players the SHA-256 fingerprint of its secret seed. From now on the seed cannot change.

2

Play

Every roll, shuffle or draw is computed from the seed, the players' seed and a counter. No network, no latency: it runs inside your game server.

3

Reveal

After the game the SDK packs the seed and the list of draws into one link. Anyone can open it and recompute every result in their own browser.

SDK

A few lines in your game server

Install the SDK, roll as usual, share the link when the match ends.

// npm i https://fairdice.ir/sdk/fairdice-latest.tgz
import { FairDice } from 'fairdice';

// 1. Before the match: create the dice, show players the commitment
const dice = new FairDice({ dice: '2d6', game: 'Backgammon', meta: { match: 'm-1842' } });
broadcast({ commitment: dice.commitment });

// optional: players send their own seeds before the first roll
dice.setPlayerSeeds([whiteSeed, blackSeed]);

// 2. During the match: roll offline, as often as you like
const [a, b] = dice.roll();          // e.g. [6, 6]

// 3. After the match: one link proves every roll
broadcast({ proof: dice.url() });    // https://fairdice.ir/v/eyJ2Ijox...

Questions

Can the operator cheat by choosing a lucky seed?

The commitment is shown before any player seed is known. Players add their own seed (or a future beacon value is used), so the operator cannot search for a seed that favours them, and cannot swap it afterwards without the hash changing.

Does fairdice.ir see my game data?

No. The SDK runs entirely inside your server and never calls us. Proof links are verified in the visitor's browser. Online features (rooms, draws, notary, short links) are optional.

Is it really free?

Yes. Every service on fairdice.ir is free for now: SDKs, verification, rooms, draws, beacon, notary and API.

What if fairdice.ir disappears?

Proofs do not depend on us. The protocol is documented byte by byte, test vectors are public and the SDKs can verify any proof offline.

Which games can use it?

Anything with randomness: dice games, card games (Hokm, poker, blackjack, durak), dominoes, roulette, bingo, lotto, loot boxes, matchmaking, tournament brackets and procedural map seeds.