Fairly and Securely Selecting Lady Luck Winners Using Chainlink VRF

Lady Luck
5 min readMay 7, 2021

Lady Luck is pleased to announce our live integration of Chainlink Verifiable Random Function (VRF) to access secure and verifiable random numbers used to select winners for each Lady Luck Lottery draw. By leveraging Chainlink VRF — the industry-leading Random Number Generator (RNG) solution for smart contracts — Lady Luck is now able to host fully decentralised, automated, and provably fair lotteries.

Transparency and trust are two core principles of Lady Luck. Trust is obtained through the security of VRF, making it impossible for the Lady Luck developers, oracles, or the public to tamper with the winner selection process. Additionally, the seed used to generate the VRF result is made completely public after each VRF call, providing transparent verification of the RNG’s integrity. In line with these core principles, Lady Luck has been designed to work entirely on-chain, negating the need for trusting any 3rd party organisations or services.

Lady Luck’s On-Chain Ethereum Lotteries

Lady Luck is one of the first fully decentralised, automated, and fair lotteries hosted entirely on the Ethereum blockchain. Holders have the chance to win a Mega lottery and Super lottery, creating two winners on a weekly basis.

A 3% transaction fee is taken from each ticket holder, with 2% going towards the “Mega Jackpot” and 1% towards marketing and gas fees to allow the network to operate efficiently and independently. The second lottery is also compiled on a weekly basis, with 1% of holders’ wallets being taken every Friday and placed in a “Super Jackpot”.

Why Is It Important to Generate Verifiable Randomness?

Randomness on the blockchain is an intricate issue, and how to fairly generate a random number has proven to be difficult. Oracle services calling external APIs from the internet is an unsatisfactory solution since it’s opaque and does not provide any transparent guarantees that it’s not been influenced or gamified by the API provider.

Common randomness methods using on-chain data suffer from security risks as well, such as existing methods involving blockhashes or timestamps. For example, miners can take advantage of their ability to sequence transactions into blocks and choose to publish a block only when this would generate more favorable results for themselves.

To solve both of these issues and minimize trust, Chainlink VRF combines block data that is still unknown when the request is made with the oracle node’s pre-committed private key to generate both a random number and a cryptographic proof. The Lady Luck smart contract will only accept the random number input if it has a valid cryptographic proof, and the cryptographic proof can only be generated if the VRF process is tamper-proof. This provides users with automated and verifiable assurances directly on-chain that each Lady Luck Lottery drawing is provably fair and cannot be tampered with by the oracle, outside entities, or the Lady Luck team

A typical VRF request

Why Is Verifiable Randomness Essential for Lady Luck?

The chance of being selected as a winner increases based on the number of LUCK, the native token of the Lady Luck dApp, held in your wallet. The more LUCK held, the better the chances of winning.

Investors who hold high amounts of LUCK also pay 1% of their wallets towards the Super Lottery, hence users need to be assured the process is verifiably fair. The random number produced by VRF is used to select a winning token. Pseudo or deterministic randomness is not an option — fairness is essential to Lady Luck Principles.

It is essential that as a decentralised application, users are not expected to have to trust an external service. With the code being fully transparent and visible on the blockchain, everyone can review and verify the steps taken to produce the random number as well as how it is utilised in the contract.

Why Chainlink?

“Integrating secure random number generation is a core part of the Lady Luck project. By using Chainlink VRF, we are ensuring that our users have the most secure and transparent on-chain randomness available. As a result, we’re able to build new decentralised products for the gaming industry that leverage provably fair and unbiased randomness from the onset!” said Lady Luck Lead Lando.

Chainlink has the industry’s top reputation for providing high quality oracle solutions to some of the world’s leading cryptocurrency projects. Their proven technology secures billions in value across DeFi, Gaming, NFTs, and more. In addition to VRF, Lady Luck plans to expand its use of Chainlink by leveraging its forthcoming Chainlink Keeper Network to further automate the running and scheduling of key platform tasks.

About Chainlink

Chainlink is the most widely used and secure way to power universally connected 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, subscribe to the Chainlink newsletter, and follow @chainlink on Twitter.

Docs | Discord | Reddit | YouTube | Telegram | Events | GitHub | Price Feeds | DeFi | VRF

About Lady Luck

Lady Luck is a revolutionary blockchain based lottery token that operates entirely on-chain with 100% of the prizes going to the winners. Blockchains provide an ideal framework for hosting a decentralised lottery, however, existing solutions either rely heavily on external services or use a pseudo random number. Lady Luck has been designed to be fully decentralised and automated whilst ensuring verifiable randomness through integration with Chainlink.

Want to learn more about Lady Luck?

Website | Whitepaper | Telegram | Twitter

--

--

Lady Luck

Marketing lead at Lady Luck. A fully decentralised and verifiably random crypto lottery.