Skip to content

Verity: verifiable randomness for PulseChain ​

White paper, draft 1, October 2026. Status: testnet, unaudited.

Abstract ​

Smart contracts that award prizes, assign NFT traits or seed tournaments need random numbers that no participant can predict or influence. Values derived from block data can be manipulated by validators and predicted by players, and commit–reveal schemes fail when a participant refuses to reveal. Verity is an oracle that delivers random numbers together with an elliptic-curve verifiable random function (ECVRF) proof, which the requesting chain verifies before any contract sees the value. The oracle can delay a result but cannot choose or alter it. Verity is built for PulseChain, where no comparable service exists, and is designed to serve other EVM chains. This paper describes the protocol, its cryptographic construction, its security properties and limits, its economics, and measurements from the PulseChain testnet deployment.

1. The problem ​

On-chain applications need randomness that is:

  1. Unpredictable to every participant until the outcome is fixed;
  2. Unbiasable: nobody can choose among outcomes;
  3. Verifiable: anyone can check that the rules were followed.

Common shortcuts fail at least one of these:

SourceFailure
block.timestamp, blockhashValidators can choose or withhold blocks; players can simulate a transaction before sending it
block.prevrandaoThe proposer knows it in advance and can withhold its block (biasing by one bit per withheld slot)
Commit–reveal between playersThe last revealer sees the outcome and can refuse to reveal
Off-chain serverUnverifiable: users must trust the operator

Lotteries, NFT mints and games have been drained through each of these.

2. Background ​

A verifiable random function maps an input to an output using a secret key sk. The holder can publish the output together with a proof that anyone can check against the public key pk. Two properties matter:

  • Uniqueness: for a given pk and input there is exactly one output with a valid proof.
  • Pseudorandomness: without sk, the output is indistinguishable from random.

Verity uses ECVRF over secp256k1 with the construction of Chainlink's audited VRF.sol (keccak-based hash-to-curve; Fiat–Shamir challenge). It is efficient to verify on the EVM because elliptic-curve multiplications are checked with the ecrecover precompile.

3. System design ​

3.1 Actors ​

  • Consumer contract: requests randomness and receives it in a callback.
  • Subscription owner: funds a subscription that pays for its consumers' requests.
  • Operator: holds a VRF key registered on the coordinator, runs the Verity node, and earns fees.
  • Coordinator: the on-chain contract that records requests, verifies proofs, bills, and calls consumers back.
  • Governance: a multisig acting through a timelock; it can change parameters only within limits written into the contract.

3.2 Request and fulfilment ​

  1. A consumer calls requestRandomWords(keyHash, subId, confirmations, callbackGasLimit, numWords). The coordinator reserves the request's maximum cost from the subscription, derives preSeed = H(coordinator, keyHash, consumer, subId, nonce) and requestId = H(keyHash, preSeed), stores a commitment to all request parameters, and emits an event.
  2. After the requested number of confirmations, the operator's node computes seed = H(preSeed, blockhash(requestBlock)) and produces the VRF proof for seed with its key.
  3. Anyone may submit the proof; normally the operator does. The coordinator checks the commitment, recomputes the seed from the stored block hash, verifies the proof, derives numWords words as H(output, i), deletes the commitment, calls the consumer with exactly the gas it asked for, and charges the subscription.

The block hash is unknown when the request is sent, so the requester cannot predict the seed. The VRF output is unique, so the operator cannot choose it.

3.3 Old requests ​

The EVM exposes only the last 256 block hashes. A BlockhashStore contract preserves older hashes, either directly while they are visible or by walking block headers backwards from a trusted hash. The node stores the hash of any request still pending after 128 blocks, so delayed requests remain fulfillable.

3.4 Redundancy ​

Each request binds to one key. Redundancy comes from running several nodes with the same key on independent infrastructure. The coordinator accepts only the first valid proof, so duplicate submissions cannot cause double fulfilment. A backup node waits a few extra blocks, so in normal operation it sends nothing.

4. Cryptographic construction ​

For key sk with pk = sk·G and input seed:

  1. H = hashToCurve(pk, seed): keccak-based try-and-increment onto secp256k1, choosing the even y.
  2. Γ = sk·H.
  3. With a deterministic nonce k = H(domain, sk, H, seed) mod n: U = k·G and V = k·H.
  4. c = H(2, H, pk, Γ, V, address(U)) and s = k − c·sk mod n.
  5. Output: H(3, Γ).

The verifier checks:

  • address(c·pk + s·G) = address(U);
  • c·Γ + s·H = V (with witnesses for c·Γ and s·H, each checked through ecrecover, and the inverse of the projective z coordinate);
  • that c re-hashes correctly.

It also requires all points on the curve and 0 < s < n. Verification costs about 23,000 gas on average.

Implementation assurance.

  • The Rust prover and Solidity verifier are tested against each other with shared vectors.
  • Every tampered field of a proof is rejected (fuzzed).
  • Full request scenarios are generated in Rust and replayed in Solidity, to check the seed derivation in both languages.
  • 1,000,000 output words pass a NIST SP 800-22 subset (monobit, block frequency, runs, longest run) plus byte and dice-face χ² tests.

5. Security analysis ​

PropertyHolds againstMechanism
CorrectnessAnyone, including the operatorOn-chain proof verification; parameter commitment
Uniqueness / no choiceThe operatorVRF uniqueness; one key per request
UnpredictabilityRequester, playersFuture block hash in the seed
At-most-onceConcurrent fulfillers, reentrancyCommitment deletion before the callback; reentrancy lock
Fair billingOperators, governanceReservation caps the charge; gas price capped by the lane; fee caps in code; timelocked changes

What Verity does not guarantee ​

  • Liveness. An operator can delay or withhold a result, and sees it before publishing. Withholding is visible on-chain, and after a timeout the requester can cancel for a refund. Consumers must never treat cancellation as a reroll, or a withholding operator (or a requester watching the mempool) could bias outcomes. Multiple independent operators reduce this risk.
  • Validator influence on the request block. The validator who produces the request's block knows its hash first and could decline to publish it. Without the operator's secret key, however, it cannot compute the outcome, so withholding gains it nothing it can predict.
  • Deep reorganisations. These can replace the request's block. Consumers choose the number of confirmations according to the value at stake.

6. Economics ​

Requests are paid in the chain's native coin from subscriptions:

charge = gasCost + premium + protocolFlatFee      (never more than the reservation)
gasCost = gas used × min(tx gas price, lane maximum)
  • The operator receives the gas cost and most of the premium; the protocol treasury receives a configurable share of the premium plus the flat fee.
  • Both are capped in code: premium ≤ 100%, protocol share ≤ 50%, and the flat fee is bounded.
  • Changes pass through a timelock, so users see them in advance.

Measured on PulseChain testnet, a single-word request was charged about 0.00115 tPLS, of which 0.001 was the flat fee. Results arrived about 45 seconds after the request with 3 confirmations.

Verity has no token. Any future change to the economic model (for example operator staking) would be designed with legal review, and this paper makes no claims about returns.

7. Decentralisation plan ​

  1. Today (testnet): one operator key with a primary node and a backup node; a 2-of-3 Safe behind a timelock owns the coordinator; the guardian can pause new requests instantly.
  2. Mainnet beta: the project operates 2–3 nodes per key on separate infrastructure; value caps are communicated to integrators.
  3. Independent operators: additional operators register their own keys (lanes), and integrators can choose among them. Operator onboarding follows published requirements and service levels.
  4. Governance: the owner Safe's signers are published, and the timelock delay is measured in days on mainnet.

8. Implementation ​

ComponentTechnology
ContractsSolidity 0.8.28, compiled for Shanghai (PulseChain has no Cancun opcodes); Foundry
Oracle node and CLIRust; alloy; SQLite state; Prometheus metrics
SDKTypeScript (viem)
AppsReact; explorer and subscription manager

The test suite includes unit, fuzz, invariant (books reconcile after every fuzzed action), cross-implementation, and end-to-end tests on a local chain. These cover:

  • reorgs;
  • restarts and crashes mid-request;
  • redundant nodes racing;
  • flaky RPCs (with injected failures before and after forwarding);
  • dropped transactions;
  • fee spikes;
  • a 300-request burst;
  • fulfilment after the 256-block window.

Testnet operations rehearsed:

  • a post-window fulfilment through the BlockhashStore (265 blocks);
  • key rotation;
  • transfer of ownership to a multisig and then a timelock;
  • a failover drill: the backup fulfilled in 82 s after the primary stopped.

9. Roadmap ​

  1. Hardening (current): audits of the contracts and cryptography, and of the node and operations; a public audit contest; a bug bounty.
  2. Public testnet beta: design partners integrate; four weeks without critical issues.
  3. Mainnet beta: value caps; project-run nodes.
  4. Scale out: independent operators; more EVM chains.

10. Comparison ​

VerityChainlink VRFPyth EntropydrandCommit–reveal
On PulseChainYesNoNoNeeds an on-chain verifierYes
Verifiable on-chainYes (ECVRF)Yes (ECVRF)Commit-reveal basedBLS threshold (round-based)Yes
Per-requestYesYesYesNo (rounds)Yes
Trust for livenessOperator(s)Node operatorsProviderLeague of EntropyParticipants

Appendix A: parameters (PulseChain testnet v4) ​

Coordinator 0xF3cBd70d61a8F5c8522d1377D9208844C3e1f0D7 (1.0.0, BlockhashStore 1.0.0 0x22C02B42Cc3349d7905C657b43d85082E170B77b). Minimum confirmations 3, max callback gas 2,500,000, request timeout 8,640 blocks, premium 20% (25% of it to the protocol), flat fee 0.001 tPLS, lane max gas price 100 gwei.

Appendix B: glossary ​

  • Gas lane: a registered VRF key with a maximum gas price.
  • Reservation: the maximum cost held from a subscription while a request is pending.
  • BlockhashStore: a contract preserving block hashes older than 256 blocks.
  • Guardian: an address allowed only to pause new requests.

References ​

  1. S. Goldberg et al., RFC 9381: Verifiable Random Functions (VRFs), IETF, 2023.
  2. Chainlink, VRF.sol (MIT licence): ECVRF verification on the EVM.
  3. NIST SP 800-22 Rev. 1a, A Statistical Test Suite for Random and Pseudorandom Number Generators.
  4. Verity audit package: verity-contracts/audit/ (specification, threat model, known issues).

Testnet: PulseChain testnet v4. Unaudited software; do not use on mainnet yet.