Docs
Nebula VRF
Nebula VRF provides verifiable randomness on Stellar using a commit–reveal workflow and BLS12-381 verification inside Stellar smart contracts (Soroban). Use it when your app needs randomness that is binding (locked in at commit time), authenticated (only the committed key can reveal), and derivable (deterministic u64 per context via derive_random).
What you get
- On-chain contract — Verifies commitments and BLS signatures, stores the verified 32-byte value, and exposes
derive_random(randomness, context) -> u64so apps get a deterministic random number per context. - Off-chain entropy — Seed and salt are generated off-chain (e.g. by your backend or the Nebula core API). The contract verifies that the revealed value matches the commitment and was signed by the committed key.
- Two parts working together — Commit and reveal can be done by an app (e.g. for testing or trusted-operator use) or by an oracle-style service (e.g. Nebula core) that supplies the entropy. When the oracle performs commit/reveal, the app consumes the verified value and derives randomness; the outcome is then not chosen by the app.
Flow in brief
- Commit — Publish
sha256(seed || salt)and your BLS G1 public key. The value is now bound; you cannot change it later. - Reveal — Publish
seed,salt, and a BLS G2 signature over the commitment. The contract verifies and returns the 32-byte randomness. - Derive — Call
derive_random(randomness, context)to get a deterministicu64for that context (e.g."lottery_round_1","nft_mint_42").
Use cases
- Lotteries and draws — When the entropy is supplied by an oracle or multiple parties, outcomes are not under a single operator’s control.
- DAO and governance — Fair selection (e.g. committees, proposal ordering) using context-bound randomness.
- NFTs and games — Deterministic, per-context random numbers for mints, traits, or matchmaking.
- Any app that needs on-chain verifiable randomness with binding and authenticated reveal.
Networks
Nebula VRF is deployed on:
- Mainnet (recommended for production)
- Testnet (recommended for development and testing)
Contract IDs:
Contract IDs
Mainnet
CDLBUXLWQDRVVDYECDUVUOS3UG2YHZ4ZPDM3PKY5XSSX6DLMSNJOBPTYTestnet
CBLC5COYONIRCPWWCRNE6S2EOYJ7IQOWI7RUDG5ZVPHCLZW2KXFFCK2QStart here
- Getting started — Quickstart (API) or Quickstart (Rust SDK)
- On-chain contract — Functions, types, encodings, and integration
- Rust SDK — Use the
nebula-vrfcrate in backend tooling - Crypto spec — Message format, DST, and encoding requirements
- API reference — HTTP endpoints for payload generation and verification