# VDF-Based On-Chain Random Beacon: Practice and Challenges

- Channel: [ETHTokyo](https://streameth.org/ethtokyo)
- Date: 2024-09-18
- Duration: 24:02
- Topics: blockchain, cryptocurrency, ethereum, developers, security
- Watch: https://streameth.org/watch/66ea96545378de9b4a49e45c

## Description

This talk will discuss constructing a VDF-based on-chain Distributed Random Beacon (DRB), introduce two VDF mechanisms, share optimization techniques, and compare applications of Commit-Reveal schemes enhanced by VDF, noting the challenges in blockchain environments. The video discusses the development of a distributed random beacon (DRV) for an L2 blockchain due to the lack of support from existing oracle services. The DRV is essential for applications that require secure random numbers, such as leader elections and lotteries. The presenter emphasizes the importance of liveness in DRVs, which ensures that random numbers are generated even if some participants disrupt the process. They introduce the commit-reveal-recover scheme using VDF (Verifiable Delay Function) as a solution to achieve strong liveness, allowing recovery of random numbers if the process is interrupted.

The challenges of implementing VDF on Ethereum Virtual Machine (EVM) are addressed, focusing on verifying VDF evaluations within smart contracts. Two types of VDFs, Pitchfork and Wesolowski's, are compared in terms of gas costs and implementation complexity. The video also touches on the concept of hash-to-prime functions.

Finally, strategies for implementing these VDFs are discussed, with insights into optimizing gas usage by balancing protocol repetitions and modular exponentiation checks on EVM for Pitchfork VDF implementation.
