Random numbers anyone can check.
On Arc, PREVRANDAO always returns 0. Arc VRF gives your contracts random numbers that come with a proof, verified on-chain before your contract sees them. Fees are paid in USDC.
Request
CoordinatorYour contract asks for randomness. The coordinator derives a pre-seed from the key hash, your address, the subscription and a counter.
preSeed = keccak256(keyHash, sender, subId, nonce)
0xae8c55299baafabfd93525c2b927e6bad97ad2e0e5d1be520aa05f45072af620
Block
ChainThe request lands in block 47,387,533. Nobody knew this hash before the block existed.
blockhash(requestBlock)
0x82257b9523649c38964eb5a7152985e7408702c03630640a15d739305d87b9c2
Seed
NodeThe node mixes the two. Neither the node nor the caller could choose this value.
seed = keccak256(preSeed ‖ blockHash)
0xb246f519fa7ad12880a7597c1ab0af2bdc3387db42f66eed2e897b69d757b6d9
Prove
NodeOnly the node’s secret key maps the seed to this curve point γ. It sends γ with a proof, never a bare number.
γ = sk · hashToCurve(pk, seed)
0x31cc5813dd5c22876ed771b71b9ac2b4cf519256d4b0be74a39395e14623b8d5
0x4bceae8aa7b9b084c000b281ec2db94eacba24ff5efef253034721f28a5b52f6
Check
CoordinatorVRF.sol verifies the proof on-chain. Any other γ fails and the transaction reverts.
randomness = keccak256(3, γ)
0x83faef5289060da3291f929088a2abed5dca9e50f052b9d755f9843aa503865a
Deliver
Your contractOne proof, as many words as you asked for, each expanded on-chain.
words[i] = keccak256(randomness, i)
0x3fcd8c03668ca23e5d6ad191eaf0614ef523d8e18f6263d82a85bc1552ee2f42
Network
Live on Arc Testnet
- Coordinator
- 0xc97f22a5…2471ae
- Wrapper
- 0x5c0fa592…cb9ab7
- Gas lanes
- …
- Premium
- …
- Flat fee
- …
- Max callback gas
- …
- Min confirmations
- …
- Subscriptions created
- …
Recent fulfilments
No fulfilments yet. Try the playground.
Two ways to pay
Both use the same coordinator, proof and callback. They differ in who holds the USDC.
Subscription
Fund one balance, add the contracts allowed to spend it. Each fulfilment is charged for the gas it actually used plus a premium. Best for regular requests or several contracts.
- Inherit
ArcVRFConsumerBase - Up to 100 consumers, 500 words per request
Direct funding
Your contract pays the wrapper with each request, at a price quoted up front. Nothing to set up. Best for occasional requests or when end users pay.
- Inherit
ArcVRFWrapperConsumerBase - Up to 10 words per request