MagicBlock’s Solana VRF gives Solana programs a verifiable randomness primitive for gameplay, lotteries, matchmaking, and other real-time flows that need fair outcomes without trusting blockhashes or app servers.Documentation Index
Fetch the complete documentation index at: https://docs.magicblock.gg/llms.txt
Use this file to discover all available pages before exploring further.
Start Building
Build a Solana VRF request and callback flow with the MagicBlock VRF SDK.
Technical Details
See how requests, proofs, oracle queues, and callbacks work.
Security & Audits
Read the audit report and security notes.
Open Source VRF
Inspect the program, SDK, proof implementation, and examples on GitHub.
What is Solana VRF?
Solana VRF is a verifiable random function implementation for Solana programs. Your program requests randomness, an oracle computes a random value with a cryptographic proof, and the MagicBlock VRF program verifies that proof before calling back into your program. That proof makes the result auditable. Users and programs can verify that a random outcome was produced from the committed request instead of being chosen after the fact by a validator, server, or game operator.Why use MagicBlock Solana VRF?
- Built for Solana programs: request randomness through the
ephemeral_vrf_sdkand consume the result in your own callback instruction. - Designed for real-time apps: MagicBlock’s ephemeral rollup execution model keeps randomness delivery low-latency for games and interactive flows.
- Verifiable by design: proofs are validated on-chain before your callback logic runs.
- Open source and audited: the VRF program is public, with audit coverage linked from the security docs.
How Solana VRF works
- Your program submits a randomness request with a
caller_seed, callback discriminator, and callback accounts. - The request is added to an oracle queue for fulfillment.
- A verified oracle computes the random value and proof.
- The MagicBlock VRF program verifies the proof.
- Your callback receives the random bytes and converts them into game or app logic, such as dice rolls, loot drops, or raffle winners.
Common use cases
- Loot drops and gacha
- Matchmaking and shuffling
- Raffles and giveaways
- Randomized resource generation
- Random character attributes or NFT traits
- Any Solana app that needs auditable fairness

