Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Guides

Launching a Verifiable Delay Function for Physical Events

This guide provides a technical walkthrough for implementing a Verifiable Delay Function to create cryptographically secure, trustless timestamps for physical events in DePIN networks.
Chainscore © 2026
introduction
IMPLEMENTATION GUIDE

Launching a Verifiable Delay Function for Physical Events

A technical guide to implementing Verifiable Delay Functions (VDFs) for creating provably fair, on-chain randomness from real-world events.

A Verifiable Delay Function (VDF) is a cryptographic primitive that guarantees a minimum computation time, producing a unique output that is efficiently verifiable. For physical events, this creates a powerful tool for generating provably fair randomness on-chain. The core idea is to use the unpredictable outcome of a real-world event (like a sports match or weather data) as the seed for a VDF, which then imposes a mandatory time delay before the final random result is revealed and can be verified by anyone. This prevents last-reveal attacks and manipulation, as the outcome is locked in by the VDF's sequential computation the moment the event concludes.

The implementation architecture involves several key components. First, an oracle or trusted data feed (e.g., Chainlink, API3) must commit the event outcome to the blockchain, providing the initial seed. This seed is then fed into the VDF. A popular choice for implementation is the Wesolowski VDF or Pietrzak VDF, which are based on repeated squaring in a group of unknown order. The computation is performed off-chain by a prover, which generates the final output and a succinct proof. The critical property is that computing this output requires the full, sequential computation time, but verifying the proof against the original seed is fast.

Here is a simplified conceptual flow using pseudo-code:

code
event_outcome = oracle.fetch("FINAL_SCORE"); // e.g., "TEAM_A_WINS"
seed = keccak256(event_outcome, blockhash);
// VDF computation (time-locked, happens off-chain)
{output, proof} = compute_vdf(seed, iterations=T);
// On-chain verification (fast)
is_valid = verify_vdf(seed, output, proof);
if (is_valid) {
    random_result = output;
}

The parameter T (iterations) defines the enforced time delay, which must be longer than the potential dispute or finalization period of the physical event to ensure the seed is immutable.

Security considerations are paramount. The most significant threat is a faster-than-expected VDF evaluation, which could compromise the time-lock guarantee. This is mitigated by using a large, safe modulus for the sequential squaring and regularly updating cryptographic parameters based on the latest research from groups like the VDF Alliance. Furthermore, the oracle providing the seed must be secure and reliable; using a decentralized oracle network with multiple nodes increases censorship resistance. The system must also account for the possibility of the prover failing to submit the proof, requiring economic incentives or a fallback mechanism.

Practical use cases for VDFs in physical events are expanding. They are ideal for on-chain betting and prediction markets where fair resolution is critical, such as settling wagers on sports or election results. They can also be used for randomized NFT drops tied to real-world milestones or for selecting validators or governance participants in a DAO based on an external, unpredictable event. By leveraging the inherent unpredictability of the physical world and the guaranteed delay of a VDF, developers can build applications that are both transparent and resistant to manipulation by any single party.

To get started, developers can explore existing libraries like Chia's VDF implementation (in C++) or Ethereum's research on VDFs. The key steps are: 1) Integrate a reliable oracle service, 2) Choose and parameterize a VDF scheme (considering current security benchmarks), 3) Design the on-chain verification contract, and 4) Implement a robust proving service. This creates a foundational layer for trustless systems that bridge real-world events and blockchain state.

prerequisites
VDF SETUP

Prerequisites and System Requirements

Before launching a Verifiable Delay Function (VDF) for physical events, you must establish a secure, isolated, and auditable hardware environment. This guide details the essential components.

A Verifiable Delay Function (VDF) is a cryptographic primitive that enforces a minimum computation time, making it ideal for creating provable lags for physical events like randomness beacons or timelocks. The core requirement is a trusted execution environment (TEE) or a dedicated, air-gapped hardware module. This ensures the VDF computation is isolated from network manipulation and runs for a predetermined, verifiable duration. Popular choices include Intel SGX enclaves, ARM TrustZone, or custom secure elements like those from Infineon or NXP.

Your system must be equipped with a high-performance, deterministic CPU. VDFs, such as those based on repeated squaring in a class group (e.g., Chia's VDF) or Wesolowski's construction, require sustained integer arithmetic. The processor must execute the same sequence of operations identically every time to guarantee reproducibility for verification. You will need to benchmark your hardware to establish a reliable steps-per-second baseline, which is critical for setting the time delay parameter T accurately. Variability in clock speed or thermal throttling can compromise proof correctness.

For physical event integration, you need tamper-evident sensors and a secure data ingestion pipeline. This could be a cryptographically signed feed from an atomic clock (for timestamping), a Geiger counter (for randomness from radioactive decay), or a trusted weather API. The sensor data must be hashed and fed as the input x to the VDF function VDF(x, T) = (y, \u03c0). The system must prevent any other process from pre-computing or influencing this input after the event is recorded.

Software prerequisites include a VDF implementation library and its dependencies. For Rust, you might use chiavdf bindings. For a research setup, the ECVDF library from Ethereum Research provides a Python reference. You must also install a verified runtime for your TEE (like the Intel SGX SDK or OpenEnclave) and a monitoring stack to log temperature, CPU load, and power consistency to detect physical tampering. All code should be pinned to specific, audited commit hashes.

Finally, establish a verification infrastructure on a separate, networked machine. This system will receive the output proof \u03c0 and the claimed result y to verify they were correctly computed from input x with delay T. It requires the same VDF verification library but not the secure hardware. Network firewalls should be configured to allow only outbound proof broadcasts from the secure module and inbound verification requests on strict ports, creating a one-way data flow for security.

key-concepts-text
TUTORIAL

Core Concepts: How VDFs Enable Trustless Time

A guide to implementing Verifiable Delay Functions (VDFs) for creating provable, real-world time delays in blockchain protocols.

A Verifiable Delay Function (VDF) is a cryptographic primitive that enforces a minimum wall-clock time to compute a result, even with massive parallelization. Unlike Proof-of-Work, which is probabilistic and energy-intensive, a VDF is deterministic and sequential. It requires a specific, unavoidable number of sequential computational steps. This property makes VDFs uniquely suited to creating a trustless source of time in decentralized systems, where participants cannot rely on a central clock. They are foundational for protocols like Ethereum's RANDAO/VDF-based randomness beacon and Chia's Proof-of-Space-and-Time consensus.

The core mechanism involves a function that takes an input x and a difficulty parameter T (number of sequential steps). The prover computes y = VDF(x, T) which is slow, then generates a succinct proof π. Anyone can use this proof to verify that y is the correct output and that T steps were indeed required, and they can do this verification much faster than the original computation. Common constructions, like Wesolowski's or Pietrzak's schemes, are based on repeated squaring in a group of unknown order, such as an RSA group or a class group.

To launch a VDF for a physical event, you must first define the event's trigger and resolution. For example, consider an oracle predicting a real-world outcome, like the closing temperature on a specific day. The process begins when the trigger event occurs (e.g., the day ends). An input seed x is generated from this event data. A VDF with a pre-set delay T (e.g., equivalent to 1 hour of computation) is then evaluated on this seed. The prolonged computation period acts as a commitment window, allowing participants to submit their predictions before the result y is known and provable.

Implementing this requires careful setup. You must select a secure VDF construction and a group (like an RSA-2048 modulus). The delay parameter T must be calibrated to your hardware to achieve the desired real-world delay. In code, using a library like chiavdf, the core proving looks like: proof = prove(data, T). The verification is: is_valid = verify(data, proof, T). The security relies on the sequentiality assumption—that no adversary can compute the function significantly faster by using more processors. This creates a cryptographic timestamp, proving that the output y was generated after the input x and a precise amount of time later.

This mechanism enables powerful applications. It can create unpredictable randomness by using a VDF on a publicly revealed but initially unpredictable seed (like a block hash). It powers leader election in consensus by ensuring a fair delay between proposal rounds. Most critically for physical events, it mitigates last-reveal attacks in oracle designs. By enforcing a mandatory computation delay between the event and the provable result, it prevents an attacker from seeing an initial result and then racing to manipulate the final outcome. The VDF output becomes an objective, time-locked anchor for decentralized agreement.

use-cases
APPLICATIONS

Primary Use Cases for Physical VDFs

Verifiable Delay Functions for physical events enable trustless coordination with real-world inputs. These are the core applications developers are building.

architecture-overview
SYSTEM ARCHITECTURE AND DATA FLOW

Launching a Verifiable Delay Function for Physical Events

This guide details the architectural components and data flow required to integrate a Verifiable Delay Function (VDF) into a system that anchors physical-world events to a blockchain.

A VDF for physical events creates a cryptographic link between a real-world occurrence and a blockchain state. The core system architecture consists of three primary layers: the Physical Event Layer, where sensors or oracles capture data; the Computation Layer, where the VDF is executed to enforce a mandatory time delay; and the Settlement Layer, where the final proof is recorded on-chain. Data flows sequentially through these layers, ensuring the event's timestamp is verifiably delayed and immutable. This structure prevents front-running and provides a trust-minimized timestamp for events like IoT sensor readings, sports results, or random number generation.

The data flow begins at the Event Trigger. A trusted hardware module, like a Trusted Execution Environment (TEE) or a secure oracle network (e.g., Chainlink), observes a predefined condition. Upon detection, it generates an initial commitment, typically the hash of the event data and a random nonce. This commitment commitment = H(event_data || nonce) is immediately published to a public log or a blockchain as a start signal. Publishing this start signal is crucial as it defines the precise moment t0 from which the VDF delay period begins, preventing retroactive manipulation of the event's timing.

Once the start signal is anchored, the VDF Evaluation phase begins. A designated prover (which could be the same TEE or a separate, permissioned node) receives the commitment and begins computing the VDF. For a VDF like the Wesolowski or Pietrzak scheme, this involves sequential squaring in a RSA group or class group. The computation runs for the predetermined delay time T (e.g., 10 minutes), producing a final output output and a succinct proof π. The key property is that T cannot be parallelized, guaranteeing real-world time has passed. The prover then constructs a final transaction containing the original commitment, the output, and the proof.

The final step is On-Chain Verification and Settlement. The prover's transaction is submitted to a smart contract on the settlement blockchain (e.g., Ethereum, Arbitrum). The contract's verify function performs two checks: it validates the VDF proof π against the published start commitment and the output, and it verifies that the delay time T has elapsed since the commitment's block timestamp. If both checks pass, the contract accepts the output as a valid proof of elapsed time for the original physical event. Downstream applications, such as prediction markets or gaming dApps, can then reliably use this attested output, knowing it corresponds to an event that occurred at least T time ago.

Critical design considerations include oracle security and liveness. The initial event observation must be trustless or decentralized to avoid a single point of failure. Using a committee of oracles with threshold signatures can enhance security. Furthermore, the system must account for prover liveness; if the designated prover fails, a fallback mechanism or a proof-of-stake slashing system is needed to ensure the VDF is always completed. The choice of delay parameter T is also a trade-off between security (longer delays) and usability (shorter delays) for the specific application.

implementation-steps
IMPLEMENTATION GUIDE

Launching a Verifiable Delay Function for Physical Events

A practical guide to implementing a Verifiable Delay Function (VDF) to create trustless, time-locked proofs for real-world events like sports results or random number generation.

A Verifiable Delay Function (VDF) is a cryptographic primitive that enforces a minimum, real-world time delay for computation, producing a unique output that is efficiently verifiable. Unlike Proof-of-Work, which is parallelizable, a VDF is inherently sequential. This property makes it ideal for creating trust-minimized timestamps and randomness beacons for physical events. For example, you could use a VDF to prove that a specific sports game outcome was known only after the final whistle, not before. The core components are a delay parameter t (number of sequential steps), a public input x, and a function that produces an output y and a proof π.

To implement a VDF, you must first select a suitable function. The Wesolowski VDF and Pietrzak VDF are two common, battle-tested constructions. Both rely on repeated, sequential squaring in a group of unknown order, such as an RSA group or a class group. For this guide, we'll outline the Pietrzak VDF using an RSA group. The setup requires generating two large, random primes p and q to form a modulus N = p*q. The order of the multiplicative group (ℤ/Nℤ)* is φ(N) = (p-1)*(q-1), which must be kept secret to ensure the sequential nature of the computation.

The evaluation phase is computationally intensive and must be performed by a prover. Given a public input x (e.g., a hash of the event data) and delay parameter t, the prover computes y = x^(2^t) mod N. This requires t sequential modular squarings and cannot be sped up with parallel processors. After computing y, the prover must also generate a succinct proof π to allow for fast verification. In the Pietrzak protocol, this involves a recursive halving and challenge process, creating an interactive proof that can be made non-interactive using the Fiat-Shamir heuristic.

Verification is the crucial, efficient step that any observer can perform. Using the public input x, output y, proof π, and modulus N, a verifier can check the correctness of y in log(t) time. This asymmetry—slow to compute, fast to verify—is the VDF's defining feature. For physical events, the public input x would be a commitment to the event outcome, posted on-chain before the event concludes. The VDF evaluation then runs for a predetermined duration t, acting as an enforced waiting period, after which the provably correct result y can be revealed and verified.

Integrating this into a blockchain application, such as a sports betting dApp, requires careful orchestration. A smart contract would: 1) Accept and store the commitment x. 2) Wait for the VDF duration t to pass in real time. 3) Accept the prover's submitted output y and proof π. 4) Run the efficient verification function. 5) Disperse funds based on the verified result. This creates a cryptographically guaranteed delay, preventing the prover (or oracle) from manipulating the result after the event is known. Libraries like chiavdf (in C++) or vdf-competition implementations provide production-ready references.

Key considerations for a production deployment include parameter selection (ensuring t matches the real-world delay needed), prover incentivization (who runs the expensive computation?), and group setup (using a trusted setup or a class group with unknown order). For maximum security and decentralization, using class groups from ideal class groups of imaginary quadratic fields is recommended, as they do not require a trusted setup. This implementation provides a robust foundation for building applications that require verifiable, time-locked proofs for events in the physical world.

HARDWARE OPTIONS

VDF Implementation and Hardware Comparison

A comparison of hardware platforms for implementing a Verifiable Delay Function, focusing on performance, cost, and suitability for physical event attestation.

Feature / MetricHigh-End FPGA (e.g., Xilinx Alveo)Consumer GPU (e.g., NVIDIA RTX 4090)Specialized ASIC (e.g., Custom VDF Chip)

Estimated Delay Time for 1B Steps

< 1 second

~5-10 seconds

< 0.1 second

Initial Hardware Cost

$3,000 - $10,000

$1,500 - $2,000

$50,000+ (NRE)

Power Consumption (Peak)

~225W

~450W

~50W (post-fabrication)

Verification Speed

Fast (on-chain)

Fast (on-chain)

Fast (on-chain)

Development Complexity

High (HDL/Verilog)

Medium (CUDA/OpenCL)

Very High (Full chip design)

Physical Tamper Resistance

Time-to-Market for Prototype

2-4 months

1-2 weeks

12-18 months

Suitability for On-Site Events

Good (portable, rugged)

Poor (large, high power)

Excellent (custom form factor)

hardware-acceleration
HARDWARE ACCELERATION

Launching a Verifiable Delay Function for Physical Events

Verifiable Delay Functions (VDFs) create a unique, time-based proof that cannot be parallelized. This guide explains how to implement a VDF for physical event attestation using hardware acceleration.

A Verifiable Delay Function (VDF) is a cryptographic primitive that guarantees a minimum computation time, even with massive parallelism. It produces a unique output from an input, where the computation takes a predetermined number of sequential steps. This property is ideal for creating trustless timestamps for physical events, such as proving a sensor reading occurred at a specific moment. Unlike Proof-of-Work, VDFs are energy-efficient, as the work cannot be sped up by adding more hardware. The core components are an evaluator that performs the slow computation and a verifier that can quickly check the result's validity.

Implementing a VDF for real-world events requires a secure, tamper-proof hardware environment. A common approach uses a Trusted Execution Environment (TEE) like Intel SGX or a secure element. The hardware runs the VDF evaluation in an isolated enclave, ensuring the sequential steps are executed faithfully without interference. For example, a weather station's temperature sensor could feed data into the enclave, which then uses it as the seed for a VDF like MinRoot or Wesolowski's construction. The resulting proof, generated after a fixed delay (e.g., 10 seconds), is cryptographically bound to the sensor data and the elapsed time.

The primary VDF construction for hardware is the repeated squaring method in a group of unknown order, such as an RSA group or a class group. The evaluator computes y = x^(2^T) mod N, where x is the input, T is the delay parameter, and N is the modulus. This operation is inherently sequential. To accelerate this on hardware, developers use optimized modular arithmetic libraries and leverage FPGA or ASIC designs for constant-time operations, which are resistant to timing attacks. The VDF Alliance provides open-source implementations and research on efficient hardware designs.

Here is a simplified conceptual outline of the VDF evaluation process within a secure enclave using a pseudo-code structure:

python
# Pseudo-code for enclave-based VDF evaluation
input_data = read_secure_sensor()
challenge = hash("VDF_ATTESTATION" + input_data)

# Sequential squaring (the delay)
result = challenge
for i in range(TOTAL_DELAY_STEPS):
    result = modular_square(result, MODULUS)

proof = generate_wesolowski_proof(challenge, result, TOTAL_DELAY_STEPS)
seal_and_output_proof(proof, result)

The generate_wesolowski_proof function creates a succinct proof that allows anyone to verify the result was computed correctly with T steps, without redoing the work.

After generating the proof, it must be anchored to a blockchain to create a permanent, verifiable record. The hardware device or a relay submits the VDF output and proof to a smart contract on a chain like Ethereum or a Layer 2. The contract verifies the proof on-chain. This creates a tamper-evident ledger of physical events. Use cases include: - Proof-of-location for IoT devices, - Secure randomness beacons for lotteries, - Timestamping for legal documents or supply chain data. The key security consideration is ensuring the hardware's root of trust and protecting against side-channel attacks on the VDF computation.

Optimizing this system involves balancing the delay length, proof size, and verification cost. A longer T parameter increases security but delays proof generation. Using class groups for the underlying math can reduce proof size compared to RSA groups. For production, integrate with frameworks like OpenEnclave for TEE development and use audited libraries such as Chia VDF for the core arithmetic. The final system provides a cryptographically strong, hardware-accelerated bridge between the physical world and verifiable digital records.

VDF FOR PHYSICAL EVENTS

Frequently Asked Questions (FAQ)

Common technical questions and troubleshooting for developers implementing Verifiable Delay Functions (VDFs) to prove the passage of real-world time.

A Verifiable Delay Function (VDF) is a cryptographic primitive that enforces a minimum computation time, even with parallel processing. For physical events, it acts as a trustless timer. The process works by:

  1. Setup & Commitment: An event (e.g., a race finish) generates a unique, unpredictable input (seed).
  2. Sequential Computation: A prover computes the VDF output. This requires a fixed, non-parallelizable number of sequential steps, intentionally taking a known duration (e.g., 60 seconds).
  3. Verification: Anyone can quickly verify the output is correct, confirming the prover must have spent the required time computing it.

By linking the seed to the event (e.g., a photo hash), the VDF output cryptographically proves the event occurred before the computation finished, creating an immutable timestamp.

VERIFIABLE DELAY FUNCTIONS

Common Issues and Troubleshooting

Practical solutions for developers implementing VDFs for physical event attestation, covering common pitfalls in randomness generation, timing, and verification.

A non-deterministic or unverifiable VDF output typically stems from an incorrect or inconsistent setup. The core issue is often the input seed.

Key checks:

  • Seed Integrity: Ensure the seed (e.g., a block hash, sensor reading) is identical for all parties. For physical events, this requires a commit-reveal scheme where the seed is committed to before the event occurs.
  • Parameter Consistency: The VDF's difficulty parameter t (number of sequential steps) and the underlying group (like an RSA modulus or class group) must be fixed and publicly known before computation begins.
  • Implementation Flaw: Verify you are using a sequential function like repeated squaring in a group of unknown order. Parallelizable hash functions (like SHA-256) are not VDFs.

Example: If using t=1000000 and RSA modulus N, the prover and all verifiers must use the exact same N, t, and input seed x. Any discrepancy breaks verification.

conclusion
IMPLEMENTATION PATH

Conclusion and Next Steps

You have explored the architecture for a Verifiable Delay Function (VDF) that anchors digital proofs to physical events. This final section outlines key considerations for launching your system and suggests further areas for development.

Launching a production-ready VDF system requires careful planning beyond the core cryptographic protocol. First, establish a robust oracle network to feed the physical event data (e.g., sensor readings, satellite imagery hashes) into the smart contract. Decentralized oracle services like Chainlink or API3 can provide reliable, tamper-resistant data feeds. Second, you must decide on the VDF parameters: the delay time T and the security parameter λ. A longer delay increases security but reduces responsiveness; T is often set between 10 minutes and 1 day for physical event applications. The iterative function, typically a repeated squaring in a RSA group or class group, must be implemented in a performant, audited language like Rust or C++.

Security and trust minimization are paramount. Your implementation must guard against precomputation attacks by ensuring the input seed is unpredictable and publicly revealed only at the start of the delay period. Use a commit-reveal scheme or a randomness beacon like drand for this. Furthermore, the prover's hardware must be attestable to prove it executed the delay correctly without shortcuts. Projects like Supranational's sloth and Ethereum's VDF research provide critical insights into trusted hardware setups and economic incentives for honest participation. Always conduct a formal security audit before mainnet deployment.

For next steps, consider enhancing your system's capabilities. Explore batching multiple proofs to amortize gas costs on-chain. Investigate privacy-preserving VDFs using techniques like zero-knowledge proofs to keep the physical event data confidential while still proving its timing. You could also design slashing mechanisms within the smart contract to penalize provers who submit invalid proofs. To dive deeper, review the Chia Network's VDF implementation for a real-world example of compute-intensive VDFs, or study Eth2's use of VDFs for randomness generation. The field is evolving rapidly, with new constructions like Wesolowski's proof system improving verification efficiency.

Finally, integrate your VDF with broader applications. It can serve as a decentralized timestamping service for supply chain logs, a fair ordering mechanism for cross-chain transactions, or a proof-of-sequential-work for consensus. Start with a testnet deployment on a network like Sepolia or Polygon Mumbai to simulate load and economic attacks. By carefully addressing these operational and cryptographic challenges, you can launch a VDF system that brings verifiable trust in time to the physical world.