DropShop - Drops Democratized
  • Welcome
  • Background - Limited Release Product Drops
    • History
    • The Problem
    • Solution Attributes
  • DropShop Lottery
    • Overview
    • Users
      • Sponsors
      • Participants
    • Lottery Process
      • Lottery Creation
      • Tickets, the Pool, and the Ticket Weight Factor
      • The Purse, Sponsor Take and Residual
      • Lottery Outcomes
  • Platform Information
    • Platform Economics
    • Additional and Future Features
      • Secondary Marketplace
      • Generalized User-to-User Transactions
      • dApp to DAO
    • Logic
      • Distribution Score Function
      • Ticket Weight Factor Function
      • Selection Function
    • Team
  • Also...
    • Glossary
    • References
    • Acknowledgements
    • Github
    • Whitepaper
    • Images
Powered by GitBook
On this page
  1. Platform Information
  2. Logic

Selection Function

The Selection Function takes in an array containing the key:value pair {address:TWF} for all participant tickets submitted into the Lottery. It then normalizes these weights across an interval between 0 and 1, with each ticket randomly assigned a share of this interval in proportion to its weight.

The Selection function uses a Mersenne Twister seeded with a Chainlink VRF call to pick a random number between 0 and 1. Whichever ticket contains that number is declared a winner and the address sent back to the MSC. That ticket is removed from the pool and the process repeats, with the total number of draws equal to the quantity of the good in the lottery.

PreviousTicket Weight Factor FunctionNextTeam

Last updated 3 years ago