Fairness protocol v1
Every jackpot winner is decided on the server with cryptographic randomness before the wheel spins. The wheel only replays a result that is already recorded. Before a round takes entries we publish a hash of a secret seed; once the round ends we reveal the seed so anyone can recompute the winner.
Before entries open:
server_seed = 32 random bytes (CSPRNG, Postgres pgcrypto)
server_seed_hash = SHA256(server_seed) -> published on the game
Fixed message (known before any entry):
message(c) = "PVPCasino:jackpot:v1:" + game_id + ":" + draw_version + ":" + c
After entries close (N = final pot in cents = ticket count):
limit = floor(2^64 / N) * N
for c = 0, 1, 2, ...:
h = HMAC-SHA256(key = server_seed, data = message(c))
r = first 8 bytes of h, big-endian unsigned 64-bit
if r < limit: winning_ticket = r mod N; stop (rejection sampling: no modulo bias)
winner = entry with ticket_start <= winning_ticket < ticket_end
After settlement: server_seed is revealed on the game record.What this does and doesn't prove
- The seed was fixed before any entry: its hash was public from the moment the round opened.
- The draw input has no free parameter: the message is fully determined by the game number and protocol version.
- Ticket mapping is integer-only and unbiased thanks to rejection sampling.
- Limitation: the operator generates the seed alone. A future version will mix in an independent randomness source before any real-money use.
Verify a draw
Or open any completed game and press “Verify”.
Coinflip protocol v1
Uses the same seed-commitment engine as Jackpot, with its own message prefix so results from one game can never be reused for another.
When the game is created (before any opponent exists): server_seed = 32 random bytes (CSPRNG, Postgres pgcrypto) server_seed_hash = SHA256(server_seed) -> published on the game Fixed message (no free parameter): message = "PVPCasino:coinflip:v1:" + game_id + ":" + draw_version h = HMAC-SHA256(key = server_seed, data = UTF-8(message)) side = (h[0] & 1) == 0 ? HEADS : TAILS (exactly 50/50: one bit) The result is fixed when the opponent joins, hidden until the flip starts, and the seed is revealed once the game is settled.
Verify a coinflip
Runs entirely in your browser; nothing is sent to our servers.
Published test vectors (32)
| game_id | server_seed | first byte | side |
|---|---|---|---|
| 1 | 0000000000000000000000000000000000000000000000000000000000000000 | 101 | TAILS |
| 100 | 0000000000000000000000000000000000000000000000000000000000000000 | 182 | HEADS |
| 1 | 0000000000000000000000000000000000000000000000000000000000000000 | 101 | TAILS |
| 100 | 0000000000000000000000000000000000000000000000000000000000000000 | 182 | HEADS |
| 12345 | ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff | 242 | HEADS |
| 7 | ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff | 77 | TAILS |
| 12345 | ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff | 242 | HEADS |
| 7 | ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff | 77 | TAILS |
| 42 | 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f | 68 | HEADS |
| 2147483648 | 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f | 25 | TAILS |
| 42 | 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f | 68 | HEADS |
| 2147483648 | 000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f | 25 | TAILS |
| 1 | deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef | 90 | HEADS |
| 100 | deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef | 231 | TAILS |
| 1 | deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef | 90 | HEADS |
| 100 | deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef | 231 | TAILS |
| 12345 | 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 | 49 | TAILS |
| 7 | 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 | 100 | HEADS |
| 12345 | 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 | 49 | TAILS |
| 7 | 9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 | 100 | HEADS |
| 42 | 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef | 218 | HEADS |
| 2147483648 | 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef | 203 | TAILS |
| 42 | 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef | 218 | HEADS |
| 2147483648 | 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef | 203 | TAILS |
| 1 | a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5 | 0 | HEADS |
| 100 | a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5 | 197 | TAILS |
| 1 | a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5 | 0 | HEADS |
| 100 | a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5 | 197 | TAILS |
| 12345 | 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a | 185 | TAILS |
| 7 | 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a | 152 | HEADS |
| 12345 | 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a | 185 | TAILS |
| 7 | 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a | 152 | HEADS |
