Safety & Fairness
How PackSpinner Ensures Fairness
At PackSpinner, the safety and confidence of our customers is our top priority. We've implemented rigorous measures to ensure every aspect of our website is secure and meets or surpasses industry standards. Our commitment to provable fairness guarantees that every outcome is random, impervious to tampering, and open to validation by anyone.
For single-pack opens, we combine a random server seed, your client seed, and a nonce into a long string. This string is converted into a very large integer, securely hashed, and then normalized to a ticket number between 1 and 1 million. This method of randomness can easily be verified by passing the client seed, server seed, and nonce into our getTicketNumber function (shown below).
Terms & Definitions
Ticket Number: An integer value between 1 and 1,000,000 that is the result of combining the random inputs of client seed, server seed, and nonce. This ticket number is then used to look up the resulting product based on that product's ticket number range, which is visible in the pack details.
Client Seed: A client seed is any string of characters that is known to you before a random result is generated. In single-pack opens, the client seed is provided by you and when combined with the server seed and nonce, used as the source of randomness in our VRF procedure.
Server Seed: A server seed is randomly generated by our servers and is super secret. A hash of this value is provided to you before any purchase. To verify randomness, note your server seed hash before purchase, found in your PackSpinner account profile. After your purchase, we expose the unhashed server seed to you. Taking the sha512 hash of your newly exposed (unhashed) server seed, you will get the server seed hash you noted before your purchase. Additionally, combining your server seed, nonce, and client seed and passing it to our getTicketNumber function, you can verify the result.
Nonce: A nonce is simply an auto-incrementing number that is used by our getTicketNumber function to provide a unique random result when server seeds and client seeds remain unchanged.
Verifying Randomness
To maintain transparency, we provide a set of functions that can be used to verify the fairness of your outcomes. You can use these functions to verify the resulting ticket number you received after purchase. The client seed, server seed, and nonce used for any pack opening can be found in your pack purchase history, located within your PackSpinner account profile.
import crypto from 'crypto'
export const sha256 = (value: string) =>
crypto.createHash('sha256').update(value).digest('hex')
export const combineSeeds = (serverSeed: string, clientSeed: string, nonce: number) =>
crypto.createHmac('sha256', serverSeed).update(`${clientSeed}:${nonce}`).digest('hex')
export const getTicketNumber = (hmac: string) =>
(parseInt(hmac.slice(0, 13), 16) % 1_000_000) + 1
// serverSeedHash announced before the opening:
// sha256(serverSeed)
// ticket number of the opening:
// getTicketNumber(combineSeeds(serverSeed, clientSeed, nonce))