# Lottery

There two main motivations behind MOOX lottery:

1. Giving an award to MOOX buyers for encouraging people to buy more
2. Creating a utility for the token, so, people can buy and spend their MOOX

### Ticket Award For Buying MOOX

Each 25 BUSD worth buy over **Pancakeswap MOOX/BUSD pair** is awarded with a lottery ticket.

25 BUSD threshold can be fulfilled within multiple buys. For example, 10 BUSD + 13 BUSD + 2 BUSD buys will be awarded with a ticket.

{% hint style="info" %}
Ticket awards are sent to **tx.origin** which means if you are buying MOOX to a contract adress like a multisig wallet, the address triggering the transaction will earn the ticket award.
{% endhint %}

### Buying Tickets

For those, who don't want to involve MOOX token but join a draw, buying ticket is available.

Lottery ticket price is 1 BUSD.

You can keep your tickets in your wallet to use them at a later time, or, immediately join the draw.

Ticket payments in BUSD are converted to MOOX and transferred to lottery fund.

### Lottery Fund

0.4% of each trade over **Pancakeswap MOOX/BUSD pair** and ticket sale income are collected on DrawManager contract.

The only way transferring MOOX from this contract is holding a draw. And, only randomly picked winners can receive prize.

### How does lottery work

You only need to join the draw with the tickets bought or earned from buying/staking MOOX.

Each ticket joined the draw has an index.

Tickets are divided into as many groups as winner count.

A random number is acquired from Chainlink's VRF service.

And, the ticket having the corresponding index for the random number is a winner.

For each group, a new number is generated based on the Chainlink's random number and the corresponding ticked is picked as a winner.

{% hint style="info" %}
%5 of the total prize is transferred to marketing wallet and 10% goes to the charity wallet.
{% endhint %}

### Total award and winner count

There are two basic rules:

* Minimum award per winner is 10 BUSD worth of MOOX.
* The maximum winner count is 50.

The total award and winner count for a draw is calculated by the below steps:

1. Total Raw Prize In MOOX: (MOOX Balance of DrawManager Contract / 3) \* 0.85
2. BUSD value of **Total Raw Prize In MOOX** when it is sold.
3. If the BUSD value is less than or equal to 10 BUSD, there is only one winner.
4. If BUSD value is greater than 10 BUSD, the floor of dividing this value to 10 is the number of winner count. And each winner gets 10 BUSD award in MOOX.
5. If the floor value is greater than 50, only randomly selected 50 winners share the all prize.

{% hint style="info" %}
If a wallet joins the draw with more than one ticket, it may win more than one awards.
{% endhint %}


---

# 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://docs.moox.one/moox-ecosystem/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.
