View Repository
Build, test, and run the Anchor program and client.
Solana VRF
How verifiable randomness works on MagicBlock.
What the example demonstrates
- VRF on a delegated account: the reward account lives on the ER, so randomness requests and reward minting run at rollup speed.
- Oracle callback pattern: the program exposes a callback instruction that only the VRF oracle can fulfill, receiving verified random bytes on-chain.
- Randomness-derived state: reward selection happens deterministically from the verified bytes — no off-chain draw to trust.
- Commit-back settlement: the final reward state is committed from the ER back to Solana, ready for base-layer payouts.
Recommended next steps
VRF Quickstart
Request and consume randomness in your own program.
Ephemeral Rollups
The delegation and commit lifecycle behind the example.
SPL Token Custody
Pay rewards out in SPL tokens — ER custody or post-commit payouts.
Magic Actions
Trigger base-layer follow-ups atomically when the commit lands.

