Appearance
How it works
Consumer ──requestRandomWords──▶ VerityCoordinator ──RandomWordsRequested──▶ Oracle node
▲ │ ▲ │
└──── rawFulfillRandomWords ─────────┘ └──── fulfillRandomWords(proof) ─────────┘
(after verifying the proof) (after N confirmations)The seed
preSeed = keccak256(abi.encode(coordinator, keyHash, consumer, subId, nonce))
requestId = keccak256(abi.encode(keyHash, preSeed))
actualSeed = keccak256(abi.encodePacked(preSeed, blockhash(requestBlock)))The request block's hash does not exist when the request is sent, so the requester cannot predict the seed. The coordinator stores a hash of the request's parameters, so the oracle cannot alter them.
The proof
Verity uses ECVRF on secp256k1, with the construction of Chainlink's audited VRF.sol:
- keccak-based hash-to-curve;
ecrecoverused for cheap scalar multiplications;- witnesses supplied by the prover so that verification costs about 23k gas.
The oracle's output is keccak256(3, Γ), where Γ = sk · H(pk, seed). It is unique for a given key and seed, and the proof shows Γ was computed with the registered key without revealing it.
The Rust prover and the Solidity verifier are tested against each other with shared vectors, including tampered proofs that must be rejected. One million output words pass statistical randomness tests (a NIST SP 800-22 subset).
Trust model
| Property | Guaranteed by |
|---|---|
| Correctness: a result is the VRF output for this key and seed | On-chain proof verification |
| Unpredictability: nobody knows the result before the request block exists | Future block hash in the seed |
| No double-fulfilment | Commitment deleted on fulfilment |
| Liveness: someone answers | The operator; backup nodes with the same key; timeout and refund. Multiple independent operators are on the roadmap |
| No censorship of a specific result | The oracle can only withhold, which is visible on-chain and refunded after the timeout. It can never substitute a different value |
The oracle can see the result before publishing it and can delay or withhold it. That's why consumers must never offer a reroll (see security rules).
Old requests
The EVM only exposes the last 256 block hashes (~43 minutes on PulseChain). The oracle stores the hash of any request still unanswered after 128 blocks in the BlockhashStore, so the request stays provable later. If that moment was missed (every node offline), the hash can still be proven from block headers: one batched walk back from the oldest visible block stores the hashes of all stuck requests (verity bhs backfill, or the node itself when auto_backfill_budget is set).