P

PackDraw

Provably Fair

Verify that every pack opening is fair and unmanipulated

How It Works

1

Server Seed Generated

Before your roll, the server generates a random seed and publishes a SHA-256 hash (commitment) of it. This proves the seed was chosen before you rolled.

2

Client Seed Provided

You provide your own client seed (or one is generated for you). This ensures the server cannot predict the final outcome.

3

Roll Calculated

The final roll is computed as SHA-256(serverSeed + clientSeed + nonce). The first 8 hex characters are converted to a number between 0 and 1.

4

Verify Anytime

After the opening, the server seed is revealed. You can verify that its hash matches the commitment, and recalculate the roll yourself.

Verify an Opening

Paste the seed data from any pack opening to verify it was fair.

Algorithm

// 1. Server generates seed
serverSeed = crypto.randomBytes(32).hex()
commitment = SHA256(serverSeed)  // published before roll

// 2. Roll calculation
combined = serverSeed + ":" + clientSeed + ":" + nonce
hash = SHA256(combined)
roll = parseInt(hash[0..7], 16) / 0xFFFFFFFF  // 0.0 to 1.0

// 3. Item selection
// Items are sorted by cumulative weight
// The roll value selects the winning item

// 4. Verification
// After reveal, check: SHA256(serverSeed) === commitment
// Then recalculate roll to confirm the result