Degen.com Provably Fair Audit: Full Source Code Analysis of 14 In-House Games
What follows is a technical cryptographic audit — nothing more. It is not a casino review, not a recommendation, and not an advertisement. There are no affiliate links here, no promotional framing, and no “sign up” buttons. The document exists to answer a single question with evidence: “does this platform’s provably fair system actually work?”
Our team pulled every fairness-related JavaScript module out of Degen.com’s production frontend, reconstructed the algorithms behind them, and checked each one against established cryptographic standards. The platform explicitly authorized publication.
Audit Scope
Platform: Degen.com
Category: In-house games (“Originals”) only — third-party provider slots and live dealer are out of scope
Games audited: 14 (Dice, Limbo, Crash, Mines, Keno, Plinko, Roulette, Blackjack, Baccarat, Casino War, Baccarat Switch, Blackjack Switch, Double Down Madness, Stacks, Chicken Crossing)
Method: Static analysis of production JavaScript bundles extracted from the live site
Date: May 2026
Auditor: ProvablySmart Research Lab
1. Methodology
Degen.com runs as a single-page React application bundled with Vite. Because it’s a single-page app, the whole frontend — fairness algorithms included — ships as client-side JavaScript. In other words, the code deciding your game outcomes executes in your own browser, where anyone can read it.
1.1 Source Extraction
We located and downloaded each JavaScript module holding fairness logic:
| Module | Size | Contents |
|---|---|---|
index-Bb1DGAvz.js (main) | 2.96 MB | Core HMAC primitives, all game-specific verifiers (Dice, Limbo, Crash, Roulette, Mines, Keno, Plinko, Stacks, Card Games). |
index-Bhe537iM.js (ProvablyFair page) | 91.5 KB | Full human-readable verification scripts (as template literals) and interactive step-by-step verification UI. |
The smaller chunk, index-Bhe537iM.js, embeds developer-written, commented verification scripts covering all 14 games straight in the code. Few operators do this. It is an unusual degree of transparency.
1.2 Analysis Approach
Every game was tested against four properties:
- Determinism: Does the same input (server seed, client seed, nonce) always produce the same output?
- Uniformity: Is the output distribution unbiased across the valid range?
- Independence: Are sequential outputs statistically independent?
- Commitment: Is the server seed committed (hashed) before the player makes a decision?
2. Architecture Overview
The industry default for crypto casinos is HMAC-SHA256 everywhere. Degen.com instead splits its design into two separate models depending on the game type.
| Model | Trust Basis | Games | Randomness Source |
|---|---|---|---|
| A: HMAC-SHA512 | Commit-reveal of server seed + player-chosen client seed | 13 games (Dice, Limbo, Mines, Keno, Plinko, Roulette, Stacks, Chicken, all Card Games) | HMAC-SHA512(serverSeed, clientSeed:nonce:cursor) |
| B: Constant Client Seed | Server seed hash chain + globally shared client seed | Crash | HMAC-SHA256(serverSeed, Bitcoin Genesis Hash) |
3. Shared Cryptographic Primitives
3.1 HMAC-SHA512 Implementation
13 of the 14 games rest on HMAC-SHA512. Here is the core primitive from Degen’s codebase:
async function hmacSHA512(serverSeed, message) {
const key = await crypto.subtle.importKey(
'raw', new TextEncoder().encode(serverSeed),
{ name: 'HMAC', hash: 'SHA-512' }, false, ['sign']
);
const sig = await crypto.subtle.sign('HMAC', key, new TextEncoder().encode(message));
return bytesToHex(new Uint8Array(sig));
}Assessment: Correct. It relies on the Web Crypto API (crypto.subtle), which runs native, timing-attack-resistant cryptographic operations inside the browser engine itself.
Note: The message format string is {clientSeed}:{nonce}:{cursor}. For single-outcome games (Dice, Limbo, Roulette), the cursor slot holds a static string such as "DICE" or "LIMBO". That substitution is valid and mathematically sound.
3.2 Hex to Float Extraction
To turn the 64-byte hex output into a usable decimal between 0 and 1, Degen applies a standard 32-bit floating-point extraction:
function bytesToFloat(hash) {
const b = [0, 2, 4, 6].map(i => parseInt(hash.slice(i, i + 2), 16));
return b[0] / 256 + b[1] / 65536 + b[2] / 16777216 + b[3] / 4294967296;
}Assessment: A standard implementation, familiar from Stake-derived algorithms. The first 4 bytes (8 hex characters) map to a float at a resolution of 1 in 4.29 billion.
4. Permutation Algorithms
4.1 Fisher-Yates Shuffle
Used by: Mines, Keno, Stacks, Chicken Crossing.
Games that must pick unique items from a finite pool use a correctly built Fisher-Yates style rejection/splice algorithm. Mines looks like this in the code:
let available = Array.from({ length: 25 }, (_, i) => i);
let mines = [];
for (let cursor = 0; cursor < mineCount; cursor++) {
const hash = await hmacSHA512(serverSeed, `${clientSeed}:${nonce}:${cursor}`);
const float = bytesToFloat(hash);
const index = Math.floor(float * available.length);
mines.push(available[index]);
available.splice(index, 1);
}Assessment: Textbook-correct. The pool shrinks with each pick (splice), duplicates are impossible by construction, and the resulting distribution is uniform.
5. Discovered Flaws & Technical Deviations
The review surfaced a handful of mathematical imperfections. None are exploitable; all deserve documentation.
5.1 Modulo Bias (No Rejection Sampling)
Roulette (37 outcomes) and Card Games (52 cards) derive their result by multiplying the 32-bit float directly:
Math.floor(float * 37)Since 4,294,967,296 doesn't divide evenly by 37 or 52, a tiny effect called modulo bias creeps in — certain outcomes land exactly 1 in 4.29 billion more often than others.
Severity: Cosmetic. At roughly 2.33 × 10⁻¹⁰ per Roulette outcome, no statistical test would detect this. Strict cryptographic practice still calls for Rejection Sampling to remove it entirely.
5.2 The "Infinite Deck" in Card Games
Blackjack, Baccarat, Casino War, and the Switch variants run on what Degen.com calls an "Infinite Deck": each card comes independently from Math.floor(float * 52), and no drawn card leaves a virtual shoe.
Implication: Depletion effects don't exist here. Five or more Aces of Spades can legitimately appear across one round if enough hands are dealt. Every draw is individually fair at 1/52 — but house edge and optimal basic strategy differ materially from physical multi-deck shoes.
Severity: Informational. This is a documented design decision, spelled out in their fairness modal — not a cryptographic defect.
5.3 Crash uses a different HMAC Model
Crash swaps SHA-512 for HMAC-SHA256 and removes the player-set client seed entirely. Its global seed is the Bitcoin Genesis block hash — the same construction BC.Game and Stake use for their Crash games.
Severity: Informational. Multiplayer synchronization demands this: every player must see one identical deterministic outcome.
6. Complete Game-by-Game Summary
| Game | Model | Extraction | Range | Bias |
|---|---|---|---|---|
| Dice | SHA-512 | floor(float × 10001) / 100 | 0–100.00 | Cosmetic Modulo Bias |
| Limbo | SHA-512 | (1 - House Edge) / float | [1.0, ∞) | Zero |
| Mines | SHA-512 | Fisher-Yates Splice | 25 positions | Zero |
| Keno | SHA-512 | Fisher-Yates Splice | 40 positions | Zero |
| Plinko | SHA-512 | float < 0.5 | {L, R} per row | Zero |
| Crash | SHA-256 | 2^32 / (h+1) × 0.99 | [1.0, ∞) | Zero* |
| Roulette | SHA-512 | floor(float × 37) | 0–36 (37 slots) | ~2.3×10⁻¹⁰ |
| Stacks | SHA-512 | Fisher-Yates (bust) + float (land) | Variable | Zero |
| Chicken Crossing | SHA-512 | Fisher-Yates Splice | Variable grid | Zero |
| Blackjack | SHA-512 | floor(float × 52) (Infinite Deck) | 52 cards | Cosmetic Modulo Bias |
| Baccarat | SHA-512 | floor(float × 52) (Infinite Deck) | 52 cards | Cosmetic Modulo Bias |
| Casino War | SHA-512 | floor(float × 52) (Infinite Deck) | 52 cards | Cosmetic Modulo Bias |
| Blackjack Switch | SHA-512 | floor(float × 52) (Infinite Deck) | 52 cards | Cosmetic Modulo Bias |
| Baccarat Switch | SHA-512 | floor(float × 52) (Infinite Deck) | 52 cards | Cosmetic Modulo Bias |
| Double Down Madness | SHA-512 | floor(float × 52) (Infinite Deck) | 52 cards | Cosmetic Modulo Bias |
* Crash builds its 1% house edge directly into the formula. That's transparent math, not RNG bias.
7. Findings
7.1 Strengths
- S1 — Transparency: Full readable JavaScript verification algorithms sit directly on Degen.com's Provably Fair page — a benchmark other operators could adopt tomorrow.
- S2 — Correct Fisher-Yates implementation: The splice/rejection approach in Mines, Keno, Stacks, and Chicken Crossing checks out mathematically.
- S3 — Web Crypto API usage: Every HMAC-SHA512 operation runs through the browser's native
crypto.subtleinterface. - S4 — Per-cursor entropy: Multi-value rounds draw fresh HMAC hashes via cursor incrementation, so sequential values can't be correlated.
7.2 Weaknesses
- W1 — Modulo bias in some games: Roulette and Card generation rely on
value % N-style scaling without rejection sampling. Negligible in practice, yet it falls short of perfect bias elimination. Severity: Low. - W2 — Infinite Deck model: Card games deal with replacement. Each draw is fair on its own terms, but standard strategy expectations go out the window. Severity: Informational.
7.3 Recommendations
| ID | Recommendation | Priority |
|---|---|---|
| R1 | Add rejection sampling to the Roulette and Card generators, wiping out modulo bias completely. | Low |
| R2 | Consider offering standard "shoe" based dealing for Card Games to appease traditional players. | Low |
8. Conclusion
Degen.com passes its audit. The platform uses a carefully constructed, browser-native HMAC-SHA512 architecture across nearly all of its Originals, and the mathematics behind those games hold up under inspection.
Cryptographic purists will flag the small modulo bias in several titles and the infinite-deck mechanics in card games. Neither undermines the platform's fundamental trustlessness. Anyone can verify their own bets against published code, and committing seeds beforehand closes off any backdoor for manipulating outcomes.
Disclosure
This audit was conducted independently by ProvablySmart Research Lab. The platform granted permission for source code analysis and publication. No compensation was received. No affiliate or commercial relationship exists between ProvablySmart and Degen.com. This document is provided for educational and research purposes only. It is not financial advice, not a gambling recommendation, and not an endorsement of any platform.
Technical FAQ
Can Degen.com predict or manipulate outcomes?
No. The server seed gets committed via hash before you place a bet. Swapping the seed afterwards would change that hash, and you'd catch it immediately. Successful manipulation would require breaking SHA-512 preimage resistance — computationally infeasible by any known means.
What is the "modulo bias" mentioned in the report?
Mapping a uniform random 32-bit integer onto a range like 37 (Roulette) that doesn't divide 2³² evenly means some numbers inherit slightly higher probability under the naive method. Rejection sampling fixes this by discarding invalid values and redrawing. Degen's naive approach carries a bias of about 0.000000023% per outcome — cosmetic, not exploitable.
How can I independently verify a Degen.com bet?
Degen publishes the exact JavaScript verification logic inside its Provably Fair modal. Copy the script, plug in your server seed, client seed, and nonce, then run it in your browser console. If the output differs from your game history, something is wrong — if it matches, the bet replayed exactly as claimed.

