Verify a rip

Paste any rip id, yours or anyone’s. No sign-in needed.

This rip checks out

5 of 5 checks passed · Under Armour Drive Midlayer Crew Neck Jumper — Downpour Grey / Midnight Navy, £60.00 RRP for £50.00

  • PassedCommitmentsha256(server seed) = 002ce9a6d4b4d56c… — matches the hash published before the rip
  • PassedDeterminismband roll 796584 of 1000000 → common; item roll 9 → 6013938-044
  • PassedGuarantee6000p of RRP for 5000p paid
  • PassedUniverseall 260 units in the draw came from snapshot 78d08e924c8c… (260 units at the time it was taken)
  • PassedAccountingevery unit absent from your pool is accounted for: 0 other rip(s) of this pack between the snapshot and yours
The published inputs
Our seed
f771087d7970eac41009b70de2a2efe053e7dd1736ac8222912fb629aeb616ce
Its SHA-256 (the commitment)
002ce9a6d4b4d56c5af1d8a081f5b97b3f32f3a3ad0c957c23597fb2a4649ee0
Your seed
d56c20b746920c9e
Rip number
11
Pool snapshot
78d08e924c8c6ff13eddb9cab188e2e7f290925c05beb77b7f3c2c3583b34acf
Recompute it here

How it works

We commit

Before you rip, we publish a SHA-256 hash of a secret seed.

You rip

Your seed is mixed in, and the result is worked out from both.

We reveal

Then we publish our seed, so anyone can redo the arithmetic.

Every rip is stored with both seeds, the pool it faced and the result, and the record can’t be edited afterwards.

Check it without us

This is the whole algorithm. Give it the published values and it prints the same item.

Show the code
const { createHmac, createHash } = require('node:crypto')

let counter = 0
const next32 = () => createHmac('sha256', serverSeed)
  .update(`${clientSeed}:${nonce}:${counter++}`)
  .digest()
  .readUInt32BE(0)

// uniform in [0, range) with no modulo bias
const below = (range) => {
  const limit = Math.floor(2 ** 32 / range) * range
  for (;;) { const v = next32(); if (v < limit) return v % range }
}

const bands = table.bands                                  // canonical order
const totalPpm = bands.reduce((s, b) => s + b.ppm, 0)
let roll = below(totalPpm), seen = 0, band = bands.at(-1)
for (const b of bands) { seen += b.ppm; if (roll < seen) { band = b; break } }

const units = band.items.reduce((s, i) => s + i.w, 0)
let r2 = below(units), acc = 0, item = band.items.at(-1)
for (const i of band.items) { acc += i.w; if (r2 < acc) { item = i; break } }

console.log(band.rarity, item.id, item.rrp)
console.log(createHash('sha256').update(serverSeed).digest('hex')) // = the commitment