Skip to main content
← Back

Transparency & Verification

How BlockchainBall generates winning numbers and how you can verify every draw.

How the Draw Works

  1. Round Opens — The operator creates a new round on-chain with a fixed deadline. Tickets can be purchased until the deadline.
  2. Ticket Sales Close — At the deadline, the operator calls closeRound() on-chain. No new tickets can be purchased.
  3. Numbers Drawn — The operator fetches randomness from drand.io (a public randomness beacon), then derives 6 main numbers (1–45) and 1 bonus number (1–10) using a SHA-256 counter-mode CSPRNG. If drand is unavailable, a local crypto.randomBytes fallback is used and flagged in the audit log.
  4. Cross-Validation — Before submission, the operator computes winner counts locally and cross-checks with the indexer's independent calculation. A mismatch aborts the draw.
  5. On-Chain Finalization — The operator calls finalizeRound(roundId, winningNumbers, winnerCounts). The contract verifies prize math and locks results permanently on-chain.
  6. Claim Period — Winners have 365 days to claim prizes via claimPrize(). Unclaimed prizes are swept to the operator treasury after expiry.

What the Smart Contract Guarantees

  • Prize pool is 90% of all tickets sold — enforced at finalization.
  • Each prize tier receives a fixed percentage of the pool (1st: 50%, 2nd: 20%, 3rd: 15%, 4th: 10%, 5th: 5%).
  • Winner counts submitted by the operator are verified against ticket data.
  • Prizes are claimed directly to your wallet — the operator cannot redirect funds.
  • Once finalized, draw results are immutable on-chain.
  • Tickets you purchased are recorded on-chain and cannot be altered.

How to Independently Verify

Every draw is verifiable on-chain and through the indexer:

  • On-chain — Call getRound(roundId) on the contract to see winning numbers, winner counts, and prize amounts. All data is public.
  • Verification Dashboard /verification shows the indexer's independent re-computation of winner counts for each finalized round. Discrepancies are flagged immediately.
  • Operator Audit Log — Each draw cycle writes a tamper-evident JSONL audit log including the draw source, winning numbers, and winner counts. Logs are retained indefinitely.
  • Block Explorer — All on-chain transactions (close, finalize, claim) are visible on Sepolia Etherscan.

Audit Trail Format

Each draw produces a JSONL record like this:

{"timestamp":"2026-05-16T20:00:01.234Z","event":"DRAW_NUMBERS","roundId":42,"winningMain":[3,17,22,34,40,45],"winningBonus":7,"source":"drand","drandRound":12345678,"note":"SHA-256 CSPRNG derived from drand randomness"}
{"timestamp":"2026-05-16T20:00:02.100Z","event":"FINALIZE_ROUND","roundId":42,"txHash":"0x...","winnerCounts":[0,1,0,2,5],"status":"success"}

The source: "drand" field confirms numbers were derived from the public drand.io randomness beacon using SHA-256 counter-mode CSPRNG. If drand was unavailable, the source reads "csprng-fallback".