Crates.io | draffle |
lib.rs | draffle |
version | 0.1.0 |
source | src |
created_at | 2021-11-05 01:25:16.283548 |
updated_at | 2021-11-05 01:25:16.283548 |
description | dRaffle program |
homepage | |
repository | |
max_upload_size | |
id | 477131 |
size | 46,919 |
The goal of the program is to provide permissionless raffles.
An arbitrary number of prizes can be placed in each raffle, the end time, max entrants, the proceeds mint and ticket price are defined at creation.
Once the raffle ends time is reached, a permissionless call fixes the current blockhash as the randomness seed
Then each prize can be claimed by the public key matching the winning ticket index. The winning ticket index for each prize is obtained deriving the randomness using the prize index, hashed then modulo the total of entrants.
https://docs.chain.link/docs/chainlink-vrf-best-practices/#getting-multiple-random-number