Transparency documentation
How every result is generated and verified
SpinRewarder uses a commit–reveal scheme so that neither the operator nor the player can know or change an outcome after a bet is placed.
- 01
Commit
Before your first spin, the server generates a 256-bit server seed with a cryptographically secure RNG and publishes only its SHA-256 hash.
- 02
Combine
Each spin computes HMAC-SHA256 with the server seed as key and “clientSeed:nonce” as message. The nonce increases by one per spin.
- 03
Roll
The first 52 bits of the HMAC are scaled to an integer roll between 0 and 9,999.
- 04
Resolve
The roll is matched against the active published odds: segments are walked in order, accumulating basis points until the roll falls inside one.
- 05
Reveal
When you rotate your seed, the old server seed is revealed. Anyone can hash it, check it matches the commitment, and recompute every result.
The exact formula
hmac = HMAC_SHA256(key = serverSeed, msg = clientSeed + ":" + nonce)
value = first 13 hex chars of hmac (52 bits)
roll = floor(value × 10000 / 2^52) // 0 … 9999
cumulative = 0
for segment in publishedOdds (in order):
cumulative += segment.probability_bps
if roll < cumulative: return segmentProbabilities are stored in basis points (1 bp = 0.01%) and must total exactly 10,000. Payout = bet × multiplier, capped at the game's maximum payout. All of this runs inside the database transaction that debits your wager, so outcomes and balances can never diverge.
- Server seeds are generated with PostgreSQL pgcrypto's secure random generator.
- Published odds versions are immutable; changes require a new version with advance notice.
- Completed games and wallet entries are write-once — updates are rejected at the database level.
Verify a result yourself
Easiest route: open any record from the public ledger — revealed records are verified automatically.