Skip to main content

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.

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.

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_sdk and 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

  1. Your program submits a randomness request with a caller_seed, callback discriminator, and callback accounts.
  2. The request is added to an oracle queue for fulfillment.
  3. A verified oracle computes the random value and proof.
  4. The MagicBlock VRF program verifies the proof.
  5. 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

Start with the right guide

Use the Solana VRF quickstart when you are ready to implement request and callback instructions. Use the security guide to review callback validation, signer checks, and audit links before going live.