en
    solana-education
    8 min read

    How Publicly Verifiable Randomness Works on Solana and Other Blockchains

    SOLOTTO pool artwork

    SOLOTTO by SOLYMARKET

    Explore the artwork and inspect the rules. Product imagery is not evidence of a winning outcome or a verified payment.

    View pools & rules

    Why Public Verification Matters

    Randomness helps digital systems make selections that participants should not be able to predict or manipulate. On a blockchain, examples include assigning scarce digital resources, selecting participants for an audit, distributing test workloads, or choosing committee members. If someone can secretly control the selection, the process may appear fair while favoring that person.

    Public verification addresses a specific question: Can an independent observer check that an outcome was generated according to the stated rules? Instead of trusting an operator’s claim, observers examine published commitments, cryptographic proofs, transaction records, and application code.

    However, verifiable does not automatically mean unpredictable, unbiased, or secure. A system can prove that it processed an input correctly while allowing someone to choose a favorable input beforehand.

    This guide explains how public verification works, what Solana contributes, and which limitations users should understand before relying on an application’s randomness claims.

    What Makes Randomness Trustworthy?

    Randomness has several distinct properties. Evaluating them separately prevents a common mistake: treating one successful verification as proof that the entire system is fair.

    • Unpredictability: Participants cannot determine the result before the intended disclosure.
    • Bias resistance: No participant can steer the distribution toward preferred outcomes.
    • Verifiability: Observers can check that the output follows the documented procedure.
    • Availability: The system delivers results when needed rather than withholding inconvenient ones.
    • Request binding: A result belongs to a particular request and cannot be substituted elsewhere.

    These properties depend on timing. An output that becomes public eventually may still be useful if nobody could predict it before relevant decisions became irreversible.

    “Random-looking” is not enough. A hash of a counter can look irregular, but anyone who knows the counter can calculate it. Conversely, a cryptographically secure result might contain repeated digits or consecutive similar outcomes without indicating a problem.

    The key question is not whether a sequence looks surprising. It is whether the generation process prevents meaningful prediction or manipulation under clearly stated assumptions.

    Why Blockchain Data Alone Is Usually Insufficient

    Blockchains are designed to let many computers agree on the same state. Smart-contract execution therefore needs to be deterministic: given the same inputs and state, honest validators should reach the same result.

    That requirement makes ordinary local randomness unsuitable inside a program. If each validator independently generated a different number, they could disagree about the transaction’s effects.

    Developers sometimes use timestamps, transaction signatures, slot numbers, or block-related hashes as substitutes. These values are observable, but observability does not make them safe randomness sources. Depending on the design, participants may predict inputs, vary transaction parameters, influence inclusion, or choose whether to submit a transaction after calculating a candidate outcome.

    On Solana, a recent blockhash primarily supports transaction freshness. It is not automatically a secure randomness beacon. Slot leaders also have influence over transaction inclusion and ordering, which must be considered when designing selection mechanisms.

    Hashing weak inputs does not remove these weaknesses. A cryptographic hash transforms data deterministically; it does not create unpredictability from information an adversary already knows.

    Commit–Reveal: Proving an Input Was Chosen Earlier

    A commit–reveal protocol separates choosing a secret from publishing it.

    First, a participant generates a secret using a cryptographically secure random-number generator. The participant publishes a cryptographic commitment, commonly a hash containing the secret and relevant context. Later, the participant reveals the secret. Anyone can recompute the hash and confirm that it matches the earlier commitment.

    Illustration of a digital ledger used to record commitments and verify later disclosures

    The commitment should include enough context to identify its purpose, such as an application identifier, round identifier, and participant identifier. Unambiguous encoding matters: poorly structured concatenation can create confusion about which inputs were committed.

    The secret must also have sufficient entropy. If it comes from a small set, observers may guess it by hashing every possibility.

    Multiple participants can combine their revealed contributions through a documented cryptographic construction. This can reduce dependence on any one contributor, but it introduces a major problem: the last revealer may see the emerging result and refuse to reveal.

    Deadlines, penalties, and fallback procedures can address some operational risks, but they do not automatically eliminate bias. A fallback that changes the outcome may itself give an adversary a choice between results.

    Public verification should therefore cover both the matching commitments and the rules governing missing disclosures.

    Verifiable Random Functions and Cryptographic Proofs

    A verifiable random function, or VRF, produces an output and a proof from a secret key and an input. Anyone with the corresponding public key can verify that the output is valid for that input.

    For a properly constructed VRF, the output is unpredictable to parties without the secret key before disclosure. The proof prevents the key holder from presenting arbitrary alternative outputs as valid for the same key and input.

    This does not mean the key holder cannot calculate the result. The holder can evaluate the VRF and may be able to withhold publication. Also, if someone can repeatedly change the input or choose among many keys, they may search for a favorable result.

    A sound application therefore needs more than a valid proof. It should establish:

    1. Which public key or authorized provider is trusted.
    2. How each request input is constructed.
    3. When application inputs become fixed.
    4. Whether requests can be canceled or retried selectively.
    5. How the verified result becomes bound to its intended use.

    In Solana applications, a randomness service may deliver results through transactions and program-controlled accounts. Designs vary: some use VRFs, while others use threshold cryptography or different security mechanisms.

    Do not assume a service uses a VRF merely because it advertises “verifiable randomness.” Identify the actual construction and its verification assumptions.

    Threshold Systems and Public Randomness Beacons

    A public randomness beacon publishes values according to a defined schedule or sequence. Applications can reference a future beacon value after locking the decisions that the value will affect.

    Threshold systems distribute cryptographic authority among multiple parties. Rather than one operator holding the complete signing capability, a specified number of participants must cooperate to produce an output.

    Some beacons derive randomness from a unique threshold signature over a predetermined message, such as a round identifier. Observers can verify the signature and apply the specified derivation procedure.

    The security depends on the exact protocol, the threshold, and assumptions about compromised or unavailable participants. Distributed operation reduces certain single-operator risks, but it does not make collusion impossible or guarantee continuous service.

    Timing remains essential. If an application lets a user select among already published beacon rounds, that user can choose a favorable result. If it permits unrestricted retries, it may create the same opportunity indirectly.

    A robust design specifies the future round in advance, handles delays consistently, and explains whether any fallback changes its security guarantees. Verification must include that selection rule, not just the beacon’s proof.

    How to Check a Solana Application’s Randomness Flow

    Start by identifying the full path from request to final application state. A blockchain explorer can help inspect transactions and accounts, but an explorer display is not itself a cryptographic proof.

    Illustration of a wallet interface for reviewing permissions and transaction details safely

    First, locate the documented program and randomness-provider integration. Confirm that the application checks the expected account owners, account identities, and request identifiers. Otherwise, an attacker may substitute data from an unrelated account or earlier request.

    Next, determine when relevant inputs are locked. For a resource assignment, this might include the eligible participant list and allocation rules. Those inputs should not remain editable after an authorized party can learn the randomness.

    Then inspect how fulfillment is authenticated. Does the application verify a proof directly, or does it rely on another program that performs verification? If it trusts a provider-controlled account, understand that boundary.

    Finally, confirm that consumption is controlled. A request intended for one decision should not accidentally authorize multiple selections or permit discretionary replacement. Check whether the resulting state records which request was used.

    Solana transactions can have different commitment levels. For durable verification, distinguish a transaction merely observed by a node from one reported as finalized. Also consider program upgrade authority: future code changes may alter the rules even if earlier results were correctly processed.

    Converting Random Bytes Into Fair Selections

    Even excellent random bytes can produce biased selections if an application converts them incorrectly.

    Suppose a system takes one uniformly random byte, which has 256 possible values, and calculates the remainder after division by 10. The result is a digit from 0 through 9, but the digits are not equally likely. Digits 0 through 5 each correspond to 26 byte values, while digits 6 through 9 each correspond to 25.

    This is called modulo bias.

    Illustration of probability distributions showing how conversion rules can affect selection fairness

    One standard solution is rejection sampling. In this example, accept values from 0 through 249, reject values from 250 through 255, and obtain another sample according to the specified procedure. Taking the accepted value modulo 10 then gives each digit exactly 25 possible source values.

    Real implementations often work with much larger integers, but the principle is the same. The procedure for generating additional samples must also be deterministic and documented when independent verification is required.

    For weighted selections, inspect how weights are represented, summed, and mapped to intervals. Rounding mistakes, integer overflow, or inconsistent ordering can undermine correctness.

    If several values are derived from one verified output, use a documented cryptographic expansion method with counters and purpose labels. This helps separate uses and makes reproduction possible without assuming that arbitrary slices are independent.

    FAQ: Common Questions About Public Verification

    Can statistical testing prove that a system is secure?

    No. Statistical tests can reveal some defects, but they cannot establish that an operator lacks a secret predictive advantage. A malicious generator may pass statistical tests while remaining predictable to its creator.

    Security evaluation requires examining the construction, permissions, timing, and adversary model. Statistics are supporting evidence, not a substitute for protocol analysis.

    Does an on-chain record prove an outcome was unbiased?

    No. An on-chain record can show what was submitted and how a program processed it. It may not reveal how many candidate inputs an operator tried privately before submitting one.

    Look for mechanisms that fix inputs before the result becomes knowable and prevent selective publication, cancellation, or retries.

    Do I need to connect a wallet to verify randomness?

    Usually, inspecting public records does not require signing transactions. You may need software to check a proof, but public verification should not inherently require a recovery phrase or private key.

    Treat requests for those secrets as dangerous. A signature request may authorize an action, so do not sign merely because a site labels the request “verification.”

    Does an audit guarantee a randomness system is safe?

    No. An audit assesses a defined scope and version under particular assumptions. It may identify weaknesses, but it cannot guarantee the absence of vulnerabilities, compromised operators, or later configuration changes.

    Check whether the deployed implementation matches the reviewed version and whether privileged roles can modify critical behavior.

    What if the randomness provider stops responding?

    The application should have a documented policy for delays and failures. Waiting, canceling, or switching providers can have different consequences.

    A fallback deserves special scrutiny if someone can trigger it after learning the first candidate result. That discretion can undermine fairness even when both providers independently generate valid randomness.

    Summary: Verify the Whole Process, Not Just the Number

    Publicly verifiable randomness combines cryptography with rules that constrain behavior. Commitments can prove that inputs were fixed earlier. VRFs can prove that an output belongs to a particular key and input. Threshold beacons can distribute trust across multiple participants.

    None of these mechanisms, by itself, proves that an entire application is fair.

    A practical review asks whether inputs were locked in time, proofs were checked correctly, requests were bound to their intended uses, and failures were handled without giving anyone favorable choices. It also examines output conversion, administrative permissions, and transaction finality.

    For Solana users, the safest approach is to inspect public information without exposing wallet secrets or signing unnecessary transactions. Strong public verification makes the process reproducible and its assumptions explicit—not merely its final number visible.

    Read next

    Five pools to explore

    All pools

    Games from this article

    Before you choose

    Check availability, price, odds and network fees. 18+ only; no guaranteed winnings or profit.

    Smart player guides: wheel, card packs and the full siteRead the guides
    how randomness can be verified publicly
    Solana
    SOL

    SOLOTTO

    Ready to try it on Solana?

    Explore pools and card packs. Check current prices, rules and availability, and verify each payment separately.