Why VRF Matters
Every race outcome in horse.fun is determined by Verifiable Random Function (VRF) - a cryptographic system that ensures:- Unpredictable: No one can know the outcome before it happens
- Verifiable: Anyone can verify the randomness was generated correctly
- Tamper-proof: Impossible to manipulate without detection
Unlike traditional online games where you must trust the operator, VRF provides mathematical proof of fairness.
How It Works
The Random Seed
Each race receives a unique 256-bit random seed:Determine Winners
Using Plackett-Luce sequential weighted sampling (integer-only, fully on-chain verifiable):- Horses are drawn one finishing position at a time
- Each draw picks a horse with probability proportional to its remaining weight
- This produces the full finishing order (1st, 2nd, 3rd, …) and guarantees each horse wins with exactly its stated probability
Trigger Jackpots
Select Next Track
Verification
Anyone can verify race fairness:- Check the VRF proof - Confirms the seed was generated correctly
- Recalculate outcomes - Apply the same deterministic algorithms
- Compare results - Verify they match what happened on-chain
Verify Past Races
Use any Solana explorer to inspect VRF seeds and race outcomes
Security Guarantees
What VRF Prevents
Prediction
Impossible to know outcomes before VRF generation
Manipulation
Cannot influence results without invalidating cryptographic proof
Selective Publishing
All requested randomness must be published on-chain
Replay Attacks
Each race has unique inputs preventing seed reuse
FAQ
Can the protocol choose favorable outcomes?
Can the protocol choose favorable outcomes?
No. The protocol must use whatever seed Switchboard provides. Any attempt to modify or reject the seed would be visible on-chain.
What if oracles collude?
What if oracles collude?
Switchboard uses multiple independent oracle operators. Collusion would require compromising a majority of nodes simultaneously, which is economically irrational.
How random is 'random enough'?
How random is 'random enough'?
The 256-bit seed provides 2^256 possible outcomes - more than atoms in the observable universe. This is cryptographically secure randomness.
What if the oracle doesn't respond?
What if the oracle doesn't respond?
The protocol re-requests randomness on a deliberately slow cadence (rapid retries would let a censoring adversary “re-roll” outcomes) and the race stays pending — resolution is simply late, and the race schedule continues around it. There is no deterministic fallback seed: a known fallback would make the emergency outcome computable in advance. In the extreme case of a permanent oracle shutdown, the multi-sig upgrade authority migrates the protocol to another VRF provider and pending races resolve with fresh randomness.
Where does the very first seed come from?
Where does the very first seed come from?
A dedicated VRF request is made at protocol initialization, before race 1 opens for entries. Even the first track selection and permutation are oracle-derived, never operator-chosen.
Next Steps
How It Works
See the complete race cycle
Track Types
Understand probability distributions
