Fairness
OPDuel Originals
Limbo
Plinko
Keno
Roulette
Mines
Blackjack
Roll
Dice
Provably Fair Roll
Roll is a multiplayer wheel game with 15 cells, each containing a symbol with an associated multiplier. Because all players share the same round, Roll uses a different fairness system than other OPDuel Originals.
Verify Game Fairness
Instead of individual client seeds, Roll uses EOS blockchain block IDs as a public source of randomness that no one can predict or manipulate.
The Algorithm
// Roll uses swapped inputs compared to other games:
// - Secret (revealed after round) becomes the HMAC key
// - EOS Block ID goes in the message
const message = `${eosBlockId}:0:0`;
const hash = HMAC_SHA256(secret, message);
// Extract float from first 4 bytes
const bytes = hash.slice(0, 4);
let float = 0;
for (let i = 0; i < 4; i++) {
float += bytes[i] / Math.pow(256, i + 1);
}
// Scale to wheel (15 cells)
const cellIndex = Math.floor(float * 15);How It Works
- Before the round - The server commits to a hashed secret
- Round starts - Players place bets within a time window
- EOS block selected - A future EOS blockchain block is chosen (unpredictable until it's mined)
- Result calculated - The secret and EOS block ID are combined to determine the winning cell
- Secret revealed - Players can verify the outcome using the revealed secret and public block ID
This system ensures neither the server nor players can predict or influence the outcome.
The Wheel (15 Cells)
| Cell | Symbol | Color | Multiplier |
|---|---|---|---|
| 0 | Skull | Green | 14x |
| 1 | Hat | Orange | 2x / 7x |
| 2 | Swords | Blue | 2x |
| 3 | Dragon | Orange | 2x |
| 4 | Swords | Blue | 2x |
| 5 | Dragon | Orange | 2x |
| 6 | Swords | Blue | 2x |
| 7 | Dragon | Orange | 2x |
| 8 | Swords | Blue | 2x |
| 9 | Dragon | Orange | 2x |
| 10 | Swords | Blue | 2x |
| 11 | Dragon | Orange | 2x |
| 12 | Swords | Blue | 2x |
| 13 | Dragon | Orange | 2x |
| 14 | Hat | Blue | 2x / 7x |
Betting Options
| Bet | Wins On | Cells | Multiplier |
|---|---|---|---|
| Orange | Dragons + Orange Hat | 7 cells | 2x |
| Blue | Swords + Blue Hat | 7 cells | 2x |
| Hats | Either hat (cells 1, 14) | 2 cells | 7x |
| Skull | Green skull (cell 0) | 1 cell | 14x |
Note: Hats pay 2x if you bet on their color, or 7x if you specifically bet on Hats.
Example
Given:
- EOS Block ID:
1ba95ab0ebdac8a211fef46580751c561eea9c1408205219ce03d76985e38362 - Secret:
d930759d7297a524a2eff4746ffac68f44489bf554cf177acd81846162ea8678
The hash produces bytes: [136, 248, 217, 140] (hex: 88 f8 d9 8c)
hash = HMAC_SHA256(secret, "eosBlockId:0:0")
float = 136/256 + 248/256² + 217/256³ + 140/256⁴
= 0.53125 + 0.003784 + 0.0000129 + 0.00000003
= 0.5350471465
cellIndex = floor(0.5350471465 × 15)
= floor(8.025707)
= 8Cell 8 is Blue Swords - Blue bets win at 2x.
Why EOS Blockchain?
The EOS blockchain provides:
- Public verifiability - Anyone can look up the block ID on blockchain explorers
- Unpredictability - Block contents are determined by decentralized miners
- Immutability - Once mined, blocks cannot be changed
- Fast finality - EOS produces blocks quickly, keeping game rounds short
This makes Roll provably fair for multiplayer gameplay where individual client seeds aren't practical.

