DegenLoot
EN
Search Search the site
Menu DegenLoot
Color theme
Language English
Back to Blog
Guides

Blockchain Game Randomness: VRF vs Seeded RNG and What Players Can Verify

Blockchain Game Randomness: VRF vs Seeded RNG and What Players Can Verify

A replay can match perfectly while the seed was cherry-picked. Blockchain game randomness has two separate jobs: establish where a random value came from, then show how the game used it. A verifiable random function, or VRF, addresses the first job. A seeded engine makes the second reproducible. They can work together; treating them as rival fairness badges misses where a game can still be rigged.

The useful question is who could choose, preview, discard or reinterpret an outcome before it became binding. That's where a technically correct proof can sit inside a lousy game design.

Quick answer: A VRF proof lets you check a random output against a public key and input, subject to the scheme's security assumptions. Seeded RNG produces a repeatable sequence; an engine can replay a match when all its inputs and rules are preserved. A game can use both. Neither alone proves that nobody cherry-picked a seed or discarded a result, or that the game settled the match correctly.

1

VRF and seeded RNG prove different things

The phrase "VRF versus seeded RNG" makes randomness sound like a choice between crypto magic and an ordinary game engine. The awkward detail? A VRF is itself deterministic for a fixed secret key and input.

RFC 9381's VRF specification separates proof verification, uniqueness and pseudorandomness. The key holder computes an output and proof. Someone else checks that proof against the public key and input. Under the relevant assumptions, the same key and input cannot produce two different outputs that both pass verification. Someone without the secret key should not be able to predict the output before it is disclosed.

The key holder can calculate the output. That matters if they can choose the input or discard results. The guarantees also depend on the VRF construction and how public keys are validated, including when a malicious participant supplies a key. RFC 9381 explains those properties; it doesn't establish which cryptographic suite Chainlink uses.

A seeded pseudorandom number generator, or PRNG, expands a starting value into a sequence. The game consumes that sequence for draws, damage rolls or other decisions. Reproducible execution requires the same generator and draw ordering, alongside the same game state. A seed on its own doesn't explain any of that.

Layer Evidence it can supply What remains outside that evidence
VRF output Proof tied to the expected key and input Whether the game selected requests impartially or delivered every result
Seeded generator Repeatable random sequence with a fixed algorithm Who chose the seed and whether it was predictable beforehand
Deterministic engine Repeatable execution from identical complete inputs Honest input selection, complete logging and seed provenance
VRF-fed deterministic engine A trace from verified output through reproducible play Correct binding, mapping, failure handling and final settlement

A cryptographically secure seeded generator may protect a secret sequence before disclosure. An ordinary simulation PRNG need not offer that protection. Reproducibility and secrecy are different properties, and a design needs to say which it requires. The table compares evidence, not games.

For the introductory terminology, our explanation of provably fair games covers the basics. Here the focus is narrower: the gaps between seed acquisition and the winner on your screen.

2

Seed selection can rig a reproducible match

Consider a hypothetical seeded RNG game with a card battle and frozen teams. Its operator can run the simulation privately with different seeds, keep one that produces a preferred winner, then publish that seed and a matching replay. Every disclosed calculation can be correct.

That's seed grinding. In this hypothetical, the operator can run the engine before choosing the seed. Your replay checks the run they published. It can't show you the candidates they threw away.

Hashing the seed before the match doesn't automatically fix this. A commitment binds the value after commitment. If the operator already knew the teams while searching candidates, the published commitment can faithfully bind a deliberately selected seed. Timing does the work that the hash cannot.

A stronger design ties player actions and the rules to a match identity before an adversary can know the relevant randomness. It also constrains which randomness source, key or future round that match will use. Letting someone pick among several already-known outputs recreates the selection problem at a different layer.

The last reveal can become an extra choice

In a simple commit-reveal design, each participant first publishes a commitment to a secret contribution, then reveals that contribution later. The contributions combine into the final seed. The last participant may be able to calculate the outcome once everyone else has revealed. If they dislike it, they can refuse to reveal their own contribution.

No commitment has been broken. The protocol has reached its abort branch.

A timeout fallback may supply a second candidate outcome. If the last revealer can choose between completion and that fallback after seeing both possibilities, the fallback becomes part of the selection attack. Escrow or penalties can change incentives, but they aren't a mathematical command forcing someone to send a message. Whether the penalty deters the attack depends on what the attacker values.

This deduction concerns a simple game ceremony. Ethereum's consensus mechanism is different, though EIP-4399's PREVRANDAO security discussion documents a related withholding choice: a proposer may skip a block instead of contributing that slot's RANDAO reveal. The proposal also discusses transaction censorship. Calling every on-chain random value "manipulation-proof" ignores those choices.

Public randomness needs a preselected future round

A distributed randomness beacon offers another source. drand's cryptography documentation describes unique threshold-BLS signatures and hash-derived random outputs. Enough participants must contribute, with security tied to the threshold and setup assumptions. A game still needs the beacon's output to arrive before it can use it.

For a game, choosing the beacon's network identity and a future round in advance matters. An operator allowed to browse completed rounds and pick one can still select a favorable result, however good each round's proof is. The selection rule belongs in the evidence, alongside the random bytes.

3

A valid VRF can meet a broken game integration

Chainlink's VRF overview describes on-chain proof verification before a consumer uses the output. That's useful infrastructure. Chainlink's own application guidance also makes clear how much security sits outside the primitive.

Its VRF v2.5 security considerations tell developers to associate fulfillments using requestId, stop accepting relevant inputs after requesting randomness, and avoid cancellation or re-requesting. These are concrete constraints, not decorative recommendations beneath a badge.

Late choices and the wrong match

Randomness requests can finish out of order. Suppose match A requests first, but match B's output arrives first. If the game assigns that output to A just because A is waiting, it can settle the wrong match with a perfectly valid proof. Chainlink's guidance is to match each fulfillment to its requestId.

The same boundary applies to game-affecting inputs. If players can change teams or alter a wager after the request while randomness becomes knowable, a supposedly random settlement can reward informed late choices. Input locking must cover everything that affects the calculation, not merely the field the interface happens to disable.

For example, a locked team list is incomplete if the operator can still change the card-data version used to resolve it. Binding the ruleset and starting state follows from this threat model. It isn't a claim that the VRF provider validates card balance.

Withholding, reorgs and callback failures

A proof doesn't make its holder publish it. Selective withholding is a delivery failure; it doesn't let the holder forge a different valid output for the same fixed key and input. But a game that replaces withheld results with fresh requests can turn availability failure into another chance at selection.

The completed-match record may then look clean while discarded requests disappear. I think this is the most useful reason to ask about failed games, rather than just admire successful proofs. Missing outcomes need an explanation.

Chainlink's security guide warns that a chain reorganization can move a request into a different block and yield a different output. That's a reroll opportunity, not arbitrary control over the resulting value. The confirmation policy should reflect the chain and value at risk. There isn't a universal confirmation count that this guide can honestly prescribe.

The guide also says a reverted fulfillRandomWords() callback isn't retried. One design option is to save the output in a minimal callback and settle the match separately. Funding and gas constraints can still prevent delivery. A failed callback isn't proof of cheating. What happens to the waiting match afterward: does it stay pending, fail permanently, get refunded, or request another result?

A refund can protect a player's funds without solving outcome selection. If aborting is allowed only when an outcome is unfavorable, the surviving games are a filtered sample.

Uniform bytes can become uneven rolls

Good entropy can lose its intended distribution during conversion. libsodium's random-data documentation distinguishes uniform bounded sampling from a naive remainder operation such as random % upper_bound.

Here's a deliberately small example. Each integer from 0 through 7 is equally likely. Taking the remainder after division by 3 sends 0, 3 and 6 to outcome 0. Outcome 1 gets 1, 4 and 7. Only 2 and 5 land on outcome 2, so that outcome is less likely.

Those are illustration numbers, not measured game odds. With a much larger source range the bias may be tiny, but its size depends on how many source values produce each result. Rejection sampling can remove this range-mapping bias by discarding values outside an evenly divisible accepted range. That arithmetic rejection has a fixed rule; it differs from discarding whole matches because the winner is inconvenient.

Weighted rewards and shuffles need their own correct transformations. So does the order in which the engine draws numbers.

4

Deterministic replay needs a preserved engine

"Same seed, same result" has an implied footnote: the same complete simulation.

Glenn Fiedler's deterministic-lockstep explanation describes bit-identical simulation from identical initial conditions and correctly ordered inputs. It also covers platform and compiler pitfalls involving floating-point behavior. A replay package can't silently substitute a different environment and expect the original calculation to survive.

There's a similar trap in generator choice. The Rust Rand Book's seeding guide warns that seeding doesn't itself imply reproducibility. A convenient default generator isn't necessarily stable between versions. A named, fixed algorithm is a better foundation for evidence that must outlive a patch.

A useful version-pinned replay package would preserve:

  • The seed, how it was derived and the originating request or round identity.

  • An exact engine build plus the PRNG algorithm and version.

  • Rules and card data as they existed for that match.

  • Initial state and ordered actions, with an expected final state or checksum.

This is a suggested evidence package. A website offering only today's simulator can leave yesterday's match impossible to reproduce after a balance update. Archiving source helps, but players still need the relevant data and a way to run that version.

And a matching replay proves consistency with the supplied artifacts. It doesn't establish that the action history is complete, that omitted matches never existed or that the starting seed was chosen impartially. Our provably fair checker guide handles the practical verification workflow; this distinction explains why a successful check has a bounded meaning.

Stellarch illustrates the execution layer

Stellarch is a browser TCG on Hive whose documented mechanic is deterministic seeded-RNG combat and seed-verifiable match replays. The same seed and complete match inputs reproduce the outcome. That makes it a relevant illustration of execution consistency rather than a reason to declare seeded RNG the winner of this comparison.

The documented replay mechanic doesn't establish how Stellarch selects its seeds. This article has no evidence that Stellarch uses a VRF and hasn't verified a seed-commitment process, impartial seed selection or an independent audit of seed provenance. It also doesn't establish that a public archive preserves old engine versions. Those limits matter even when a replay matches.

Stellarch is currently an open alpha, free to play in your browser, with changes and resets to expect. We haven't playtested or independently audited its implementation for this article. Trying the alpha gives you a game to explore, not proof of an unverified seed-selection process.

5

One seed can connect provenance to execution

A composed architecture can use a verified external output to seed a reproducible engine. The following is a design example, not a description of Stellarch or a claim that any named game already follows it.

  1. Before anyone can know the output, the game locks the participants' committed inputs and rules/data version to that match. A fixed request or future-round rule identifies the randomness it will use.
  2. The game saves the delivered output with its proof and request or round identity, then follows a documented rule to turn it into the simulation seed.
  3. The preserved engine version runs the match, and the game settles it under fixed rules.
  4. The published record lets you trace the locked inputs through the random output to the result. It also records delivery failures.

Another badge on the homepage won't fill a missing step.

A useful evidence map has distinct questions:

Player question Evidence that would help answer it
Was this the agreed random request? Fixed key/source identity and request or future-round binding
Could inputs change after randomness became knowable? Commitment history and enforceable input-lock rules
Could unfavorable outcomes disappear? Request lifecycle records and disclosed timeout/failure handling
Did the game use the value correctly? Documented mapping, original engine/data and complete ordered inputs

Availability is still part of the design. Verifiable output that never arrives can't resolve a waiting match. A fallback needs to explain who can trigger it and whether they can already predict its consequences. Otherwise "we have a backup RNG" can quietly mean "someone gets another choice."

Hidden information changes the disclosure window

Publishing everything immediately can break the game you meant to protect. A seed that regenerates deck order or future draws may let a player calculate information they shouldn't have during play. On-chain delivery makes a VRF output public, even if the front end doesn't display it.

Solidity's security documentation explains that contract data remains observable even when variables are marked private. That keyword restricts access in code; it isn't encryption. An easy detail to miss if you're reading a contract like an ordinary server application.

Post-game disclosure can support verification without exposing decisions still in progress. Commitments to hidden state need suitable blinding, which adds an unpredictable secret value to the commitment. Without it, a small set of possible secret values may be guessable by hashing every candidate. Some games need a dedicated privacy mechanism. Neither a VRF nor a replay makes that requirement disappear.

Our comparison of verifiable crypto card games looks at game selection rather than randomness architecture.

6

Frequently Asked Questions

Can a VRF output seed a deterministic game?

Yes. A game can derive a seed from a verified VRF output and feed it to a fixed generator and engine. The derivation, match inputs and engine version need to be defined. Proof of the source value and reproducible execution then address different parts of the same calculation.

Does a matching replay prove that the seed was chosen fairly?

No. It shows that the supplied inputs reproduce the outcome under the specified engine. An operator could select a favorable seed before publishing it. Seed provenance, commitment timing and restrictions on retries need their own evidence.

Can a valid VRF proof coexist with an unfair result?

Yes. A game could associate the output with the wrong match, accept late inputs, discard requests or map the bytes incorrectly. The proof verifies a narrower cryptographic claim. Correct integration and settlement remain separate responsibilities.

Why preserve the original engine and ruleset?

A changed generator, card-data snapshot or simulation rule can change the outcome even with the same seed. Reproducing an old match requires its original complete inputs and compatible execution environment. Today's live rules are not automatically evidence for yesterday's battle.

Why not publish every seed before play?

A public seed may reveal hidden deck order or future draws. Verification timing must respect the game's decision windows. Commitments can bind hidden information for later disclosure, but they require suitable blinding and don't provide privacy by themselves.

Sources

  1. RFC 9381's VRF specification rfc-editor.org
  2. EIP-4399's PREVRANDAO security discussion eips.ethereum.org
  3. drand's cryptography documentation docs.drand.love
  4. Chainlink's VRF overview docs.chain.link
  5. VRF v2.5 security considerations docs.chain.link
  6. libsodium's random-data documentation libsodium.gitbook.io
  7. Glenn Fiedler's deterministic-lockstep explanation gafferongames.com
  8. Rust Rand Book's seeding guide rust-random.github.io
  9. Stellarch stellarch.io
  10. Solidity's security documentation docs.soliditylang.org

Related Posts