Skip to main content

zkc VRF

What is zkc VRF

zkVRF (Zero-Knowledge Verifiable Random Function) is a decentralized random number generation system that combines zero-knowledge proofs with distributed signing to produce verifiable, tamper-resistant random numbers. It offers a secure and scalable solution for applications requiring high-integrity randomness.

How does it work

System Overview

Key components of the system

  • User (Application): Initiates random number requests.
  • Random Number Provider: Manages requests and coordinates the generation process.
  • Signing Group Manager: Organizes the distributed signing process.
  • Signing Nodes: Participate in the signing process to generate random numbers.
  • ZKC Node: Generates zero-knowledge proofs for verification.

The process flows as follows:

  1. User registers a random number request.
  2. Signing Group Manager poll the VRF request event from Random Number Provider.
  3. Signing Group Manager requests signatures from Signing Nodes.
  4. Signing Nodes provide signatures.
  5. Signing Group Manager generates a signed random number.
  6. The signed random number is submitted to the ZKC Node for ZK proof generation.
  7. ZKC Node returns the ZK proof.
  8. Signing Group Manager submits the signed random number and ZK proof to the Random Number Provider.
  9. Random Number Provider verifies the signed random number and ZK proof on-chain.
  10. User receives the verified random number from Random Number Provider.

Each components in details

How applications can use zkcVRF:

Applications interact with zkVRF through a Solidity contract:

  1. Call the request_random function with parameters:
  • seed: Initial seed for randomness generation
  • signing_group_hash: Hash of the signing group's public keys
  • reward(tbd): Payment for the randomness generation service
function request_random(uint256 seed, uint256 group_hash) public {
_vrf.create_random(seed, address(this), group_hash);
  1. Implement the zkcvrfCallbackIface interface and handle_random() callback function to receive the verified random number.
function handle_random(uint256 seed, uint256 randomNumber) public onlyVrfContract {
emit receiveRandom(seed, randomNumber);
//console.log(seed, randomNumber);
//Use the randomNumber
  1. The Random Number Provider will call handle_random once the number is generated and verified.

Use cases

  • Decentralized gaming and gambling
  • Fair resource allocation in blockchain systems
  • Secure key generation for cryptographic protocols
  • Randomized algorithm inputs in scientific simulations
  • Unbiased selection processes in governance systems


  • Enhanced decentralization: Uses multiple signing nodes instead of relying on a single provider.
  • Improved transparency: Zero-knowledge proofs allow verification without revealing sensitive information.
  • Scalability: The distributed architecture can handle more requests efficiently.
  • Customizable security: Allows selection of signing groups for different security levels.
  • Cost-effective: Potentially lower costs due to reduced reliance on centralized oracles.
  • Flexible integration: Can be easily integrated into various blockchain ecosystems.

The zkVRF system provides a robust, secure, and scalable solution for generating verifiable random numbers, addressing limitations of existing approaches and enabling a wide range of applications to benefit from trustless randomness.