πŸ€Lottery

We are pleased to announce that Polywhale, the first yield farming platform on the Polygon network, has integrated Chainlink Verifiable Random Function (VRF) on mainnet to secure the Polywhale Lottery system. As the industry-leading Random Number Generator (RNG) solution for smart contracts, Chainlink VRF provides Polywhale with a verifiable source of on-chain randomness directly on Polygon that’s used to choose winners in a tamper-proof, low-cost, and provably unbiased manner. The Polywhale lottery is a gamified on-chain experience that allows users to purchase tickets for 0.1 KRILL tokens each, which gives them the chance to win a portion of the pool. With each ticket, users will supply a four digit combination where each digit needs to be between 1–14 (e.g. 1–9–3–2). Users need to match all four numbers in the right order to win 50% of the pool, match three numbers in the exact order to win 20% of the pool, or match two numbers in the exact order to win 10% of the pool; with the remaining 20% of the pot is burned. Chainlink VRF works by combining 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 Polywhale smart contract only accepts the random number if it has a valid cryptographic proof backing it, which can only be generated if the VRF process hasn’t been tampered with.

The use of Chainlink VRF provides users with automated and verifiable assurances directly on-chain that each lottery drawing is provably fair and was not tampered with by the oracle, outside entities, or the Polywhale team. You can read the full article on our integration with Chainlink here.

Lottery Details

  • Lottery Ticket Fee for 1 ticket: 0.1 KRILL

  • Single User Lottery Entry Limit: No limit

  • Paying for one ticket (0.1 KRILL) will give users a random 4 digit combination with each digit being between 1-14, for e.g. β€œ1-9-3-2”

  • In the UI, users can choose to enter a multiple of 0.1 KRILL, which will buy them multiple tickets.

How to Win

To win the lottery jackpot (50% of the entire lottery pool), users need to match all 4 numbers on their tickets in the same position as the 4 winning numbers.

If you don’t match all 4, no need to worry. As long as you match 2 or more numbers in the correct position, you are guaranteed to win a reward.

Winning Ratio

  • Match all 4 numbers in the exact order = win 50% of the pot (or split the pot if more than 1 winner).

  • Match 3 numbers in the exact order = win or split 20% of the pot.

  • Match 2 numbers in the exact order = win or split 10% of the pot.

  • Burn the remaining 20% of the pot.

Please note - in the event that no participants were able to match 3 numbers on any draw, the 20% allocated to winners will then be burned accordingly.

For example, if the final 4 winning numbers are β€œ1-9-3-2”:

- β€œ1-9-3-2” = match all 4

- β€œ1-9-2-2” = match 3

- β€œ2-3-3-2” = match 2

- β€œ1-2-1-2” = match 2

Lottery phases

Each full lottery session is completed every 6 hours (4 per day).

An example of a lottery session starting at 5 PM is below:

Phase 1 - Buy Tickets (5 PM to 10 PM)

  • You have 1 hour to buy tickets.

  • The lottery jackpot will accumulate at the top of the page with each ticket bought.

  • Users will receive a ticket (comprised of 4 digits) for each 0.1 KRILL paid.

Phase 2 - Lottery Draw! (10 PM)

  • The 4 winning lottery numbers are drawn and will appear on the page.

  • Each participant’s winnings will be automatically calculated based on their ticket numbers and shown on the page.

  • Users can claim winnings if they have any.

  • Users will also be able to see the lottery results: How many users matched all 4 numbers, 3 numbers and 2 numbers.

Phase 3 - Celebration and Sharing (10 PM - 11PM)

If you won, congrats! Share with your friends or in our community groups.

The next lottery starts in 1 hour!

How are ticket numbers drawn?

The lottery aims to be completely random. Even though the ticket numbers given out are determined by a front-end logic, there is an extremely low chance that anyone is able to determine the 4 winning numbers ahead of time.

  • The 1st lottery number will be determined based on the %10 remainder of a hash encoded by the blockhash and the number of participating users at the entry deadline.

  • The 2nd lottery number will be determined based on the %10 remainder of a hash encoded by the blockhash and the total pooled KRILL balance at the entry deadline.

  • The 3rd lottery number will be determined based on the %10 remainder of a hash encoded by the blockhash and the timestamp of the last lottery participant at the entry deadline.

  • The 4th lottery number will be determined based on the %10 remainder of a hash encoded by the blockhash and the block difficulty at the entry deadline.

For the exact code on how the the details above is calculated, please reach out to us on admin@polywhale.finance.

Last updated