Skip to main content

Provably Fair RNG Jackpot

The Provably Fair RNG Jackpot engine powers decentralized lotteries on Prizee Raffle with mathematically verifiable, tamper-proof randomness derived directly from the blockchain.


How Verifiable Randomness Works​

Traditional online lotteries rely on closed-source software or blackbox random number generators (RNG) where participants must blindly trust the operator. Prizee Raffle replaces trust with cryptographic proof.

The Lifecycle of a Draw Seed​

  1. Ticket Sales Lock: When the round countdown ends, ticket purchasing is permanently closed.
  2. Future Block Anchor: The protocol commits to a specific future block number on the Arc Network.
  3. Block Hash Extraction: Because no entity (miners, platform, or players) can predict a future block hash before it is validated by blockchain consensus, the resulting hash serves as an unbiasable cryptographic seed.
  4. Deterministic Number Derivation: The 6 winning numbers are derived publicly using an open mathematical algorithm that anyone can re-run and audit.

Mathematical Derivation Rules​

The algorithm extracts numbers by converting the 64-character hexadecimal block hash into a decimal sequence and parsing sequential two-digit number pairs:

  1. Hex to Decimal: The block hash (e.g., 0x9f8b...2c4a) is converted into a standard decimal integer string.
  2. Sequential Pair Parsing: The sequence is read in sequential 2-digit pairs from left to right (e.g., 54, 45, 41, 28, 23, 08).
  3. Range Check: Pairs from 01 through 55 are accepted. 00 and pairs from 56 through 99 are skipped.
  4. Order and Repeats: Accepted pairs keep their original order. Duplicate values are retained until six values have been collected.
  5. Deterministic Expansion: If the initial decimal stream does not contain six accepted pairs, the protocol hashes the current stream and continues parsing. The same input always produces the same output.

Automatic Ticket Number Assignment​

Players choose only how many tickets to buy; they do not choose the numbers. For every ticket, the backend hashes a seed composed of the user ID, round ID, and that user's ticket index in the round. It then applies the same two-digit pair rules above to assign six values. This makes assignment automatic, separately derived for each ticket index, and reproducible.

When results are evaluated, matching uses occurrence counts: if a value is repeated, each occurrence can match at most one corresponding occurrence in the winning sequence.


Interactive Seed Decoder in the App​

To ensure 100% transparency for everyday players, every completed draw includes an interactive On-Chain Seed Decoder directly on the ticket page:

  • Accepted Pairs (Lime Green): Highlights the exact 6 number pairs that satisfied all criteria and formed the winning ticket.
  • Skipped Pairs (Muted / Red): Shows pairs that were skipped because they are 00 or greater than 55.
  • Remainder Digits (Dim): Shows the unused trailing digits after all 6 winning numbers were filled.
  • Verify on ArcScan: A one-click button to view the mined block hash directly on the blockchain explorer.

Prize distribution (one threshold, equal split)​

Jackpots do not pay 70/15/8/4% by match count. There is one winner rule:

  1. The creator sets how many pairs are required (1–6, default 6).
  2. Every ticket that matches at least that many pairs is a winner. Matching fewer pairs pays nothing.
  3. Those winning tickets share 100% of the live escrow pool equally. One winning ticket takes the whole pool. Three winning tickets each get about one third (leftover micro-USDC goes to the first winner).
  4. Two tickets owned by the same user count as two shares.
  5. Matching more pairs than the threshold does not increase the share. A 6-pair ticket and a 2-pair ticket are equal only if the creator set the threshold to 2.

Payouts go from escrow to each winner’s connected WALLET.


Rolling jackpot (create UI)​

Jackpot is still a first-class raffle type. The create form did not remove Jackpot. It only removed Single draw + fallback.

New jackpots are always rolling_jackpot:

  1. Tickets that match at least the required pair count (1–6, creator-set) share the jackpot.
  2. If nobody matches, escrow stays open. The pool does not go to a single fallback winner.
  3. The deadline extends by the creator’s interval (24 hours, 3 days, 7 days, or custom hours). Tickets remain valid.
  4. A new Arc block hash is used on the next draw. This repeats until a ticket matches.

Existing fixed_lottery rounds (one draw + fallback) can still settle as before; they cannot be created from the current UI.