project screenshot 1
project screenshot 2
project screenshot 3

Golden Ticket

NFT Raffle on Polygon using Chainlink VRF for drawing the winner

Golden Ticket

Created At

Scaling Ethereum

Project Description

This project is a Raffle dApp deployed on Polygon. A Raffle has the following actors:

  • Admin: Deploys the raffle, decides the ticket price, and when to call the draw
  • Donor: The address owning the NFT to be raffled.
  • Recipient: All ticket revenue goes to this address. Could be the address of an individual, business, DAO, or charity.
  • Participants: Addresses that pay into the raffle contract, and receive a proportionate number of tickets.

The project uses the Chainlink VRF oracle (random number generator), which allows the dApp to draw a winner in a way that can't be gamed.

We currently built the demo with NFTs that exist only on L2. But I think it would be really cool if we could create a custodial contract of some sort which allows the raffle to take place on L2 but the NFT to exist on L1. This would allow for higher transaction-output operations to occur on the L2, and operators could use a bridge to transfer the L1 NFT to the raffle winner's address.

How it's Made

We used the following technologies:

Polygon

Chainlink VRF

Vue/React

Figma for UI mock-ups

The UI is made with React, and Chainlink VRF + Polygon was used for the on-chain information. Most notable part of this is how Chainlink VRF allows for provably rare raffles that can be verified by all participants.

We impressed ourselves by how quickly the team was able to come together, agree on a concept, and quickly ship a working product. We're also surprised by how modular this can be with L1<>L2 bridges, which would allow for L2 raffles to occur, communicate the results through the bridge, and affect the transfer of the L1 NFT to the winner's address.

background image mobile

Join the mailing list

Get the latest news and updates