Using Chainlink VRF for Randomness Generation in PoolTogether

Leighton Cusack
PoolTogether
Published in
3 min readOct 22, 2020

--

The PoolTogether V3 Protocol improves randomness generation by utilizing the Chainlink VRF (verifiable randomness function). This integration enables the protocol to randomly-select prize pool winners without needing to rely on the core team.

Chainlink VRF is a secure RNG (random number generator) purpose-built for smart contracts that generates a provably fair source of on-chain randomness. The VRF can be independently verified by users as unbiased through a cryptographic proof. Chainlink VRF will be used for pools hosted on pooltogether.com as well as user-generated pools from the Prize Pool Builder released in v3. This allows users to create their own pools, invite participants, and securely select winners with auditable, on-chain randomness!

Why Chainlink VRF?

As we discussed in our previous blog post, random inputs are a notoriously difficult problem to solve while simultaneously preserving the trustlessness and determinism of a smart contract. In the past, PoolTogether v2 used a centralized randomness solution with a commit-reveal scheme to select pool winners. This was not ideal as it represented a single point of failure at the generation of the source of randomness, which we have been actively moving towards decentralizing.

A core focus of PoolTogether v3 is to bolster the trustlessness and determinism of all aspects of the PoolTogether protocol, as well as widening the availability of Pools by allowing users to create their own. This requires an improved solution to randomness generation.

Chainlink VRF offers a unique set of security guarantees ensuring that no one, including us as the developers, can tamper with the supplied randomness in order to manipulate the outcome of a contract. Additionally, Chainlink VRF allows our users to verify on-chain that pool prize smart contract distributions based on VRF were executed with provably fair and tamper proof randomness.

With Chainlink VRF, we are able to overcome our current reliance on a centralized authority in order to supply the randomness necessary for picking pool winners.

About PoolTogether

PoolTogether is a protocol for no loss savings games on Ethereum. No loss savings games allow users to have a chance to win prizes without risking their deposits.

Website: https://www.pooltogether.com/

Twitter: @PoolTogether_

Github: pooltogether

Discord: https://discord.gg/hxPhPDW

About Chainlink

Chainlink is the most widely used and secure way to power universal smart contracts. With Chainlink, developers can connect any blockchain with high quality data sources from other blockchains as well as real world data. Managed by a global, decentralized community of hundreds of thousands of people, Chainlink is introducing a fairer model for contracts. Its network currently secures billions of dollars in value for smart contracts across the decentralized finance (DeFi), insurance, and gaming ecosystems, among others.

Chainlink is trusted by hundreds of organizations to deliver definitive truth via secure, reliable data feeds. To learn more, visit chain.link and follow @chainlink on Twitter.

--

--