> For the complete documentation index, see [llms.txt](https://polycake.gitbook.io/polycake-finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://polycake.gitbook.io/polycake-finance/product-information/lottery.md).

# 🎰Lottery

**General Lottery Details**

* Cost to enter: 1 ticket = 2 PCAKE (Later price will be changed)
* Lottery Entry Limit: No overall limit, but only 50 tickets can be bought at a single time through the UI
* When you purchase a ticket, you will receive a random 4 digit combination, each digit ranges between 1-14, for example “3-9-8-14”. This 4 digit combination is to be used to to compare to the winning numbers for your chance to win!

**The Rules to Win**

In order to win any of the prizes, a user must match the 4 numbers on a ticket with the winning numbers (**must be in the same position, order DOES matter**).&#x20;

Additionally, there are prizes for matching 2 and 3 numbers in the corresponding positions!\
&#x20;&#x20;

**Winning Payouts & Rollovers**

* Match all 4 numbers in the exact order = win 50% of the pot (or split the pot if more than 1 winner).&#x20;
* Match 3 numbers in the exact order = win or split 12% of the pot.
* Match 2 numbers in the exact order = win or split 8% of the pot.
* 15% of the pot will always be rolled over for the next lottery
* 15% of the pot will always be burned&#x20;

In the event of no winners, the match 2, 3, and 4 rewards will be rolled over as well. So in that situation 85% would rollover, and 15% would be burnt.&#x20;

Let's look at an example! If the final 4 winning numbers are “3-9-8-14” then…

* “1-2-3-4” = match 0
* “1-9-8-4” = match 2
* “3-2-3-14” = match 2
* “1-9-8-14” = match 3
* “3-9-8-14” = match all 4

### **Lottery Phases**

The lottery will occur every 24 hours with the winning number draw occurring at 02:00 UTC! Right after the winners are selected, there is a 1 hour period where ticket purchases are unavailable.

An example of the a lottery session is below:&#x20;

Phase 1 - Purchase Tickets (1 hour after the previous draw ends, between 03:00 UTC - 01:59 UTC)

* You have 22 hours and 59 minutes to buy tickets (starting at 03:00 UTC).
* For every 2 PCAKE spent, you will receive 1 ticket.
* Every ticket purchased is added to the lottery jackpot, which you can see in the upper right of the page!

Phase 2 - Lottery Draws (02:00 UTC)

* The winning lottery numbers are drawn and will appear on the page.&#x20;
* Each participant’s winnings will be automatically calculated based on their ticket numbers and shown on the page.
* If you won you can claim your winnings! Go tweet and share that you won!&#x20;
* Additionally you can see the total results of all users who matched 2, 3 and 4 numbers
* The next lottery will start immediately after

**Winning Number Draw Process**

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.&#x20;

* 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 PCAKE 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.
