# Lottery

**General Lottery Details**

* Cost to enter: 1 ticket = 1 GBONE
* 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 20% of the pot.
* Match 2 numbers in the exact order = win or split 10% of the pot.
* 20% 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 80% would rollover, and 20% 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 1 GBONE 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 GBONE 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://shibafantom.gitbook.io/shibafantom/shibaswap-1/lottery.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
