# TokenDraw

TokenDraw allows users to participate in a lottery system where they can purchase tickets using different tokens, preferably Wonderland tokens, and stand a chance to win a prize pool in PLS. The system is designed to foster collaborations by accepting multiple tokens, making it versatile and inclusive.

{% embed url="<https://app.wonderland.cool/app/tokendraw>" %}
TokenDraw Page
{% endembed %}

### How It Works

1. **Prize Pool**: The prize for each cycle is set in PLS, ensuring the prize remains consistent and valuable for each lottery cycle.
2. **Ticket Purchase**: Users buy tickets using tokens. The ticket price and the accepted tokens are set to accommodate various collaborations and token holders. The cost per ticket and the tokens accepted can be adjusted as needed.
3. **Token Reward Pool**: The tokens collected from ticket sales contribute to the contract’s balance. These tokens ensure the contract can sustain future payouts for [WonderDraw](/funhouse/wonderdraw.md) and support DAO operations.
4. **End Cycle**: The lottery cycle continues until the endCycle function is called. The winner is then selected, and the prize is distributed accordingly.

### Steps to Participate

**Connect Your Wallet**

* Ensure your wallet is connected to the PulseChain network.
* You can connect your wallet through the TokenDraw interface using the connect button.

**Buy Tickets**

* Specify the number of tickets you want to purchase.
* The total cost will be calculated and displayed in the token you choose.
* Click the "Buy Tickets" button to complete your purchase and confirm the transaction in your wallet.

**Winning and Rewards**

1. When the cycle ends, a winner is randomly selected.
2. The winner receives the prize pool in PLS.
3. A portion of the tokens collected from ticket sales is transferred to the DAO.

### Questions

**How do I know the lottery is fair?**

TokenDraw leverages smart contracts to handle all operations, ensuring transparency and fairness. All transactions are recorded on the blockchain and can be verified independently.

**What happens if I don’t win?**

If you don’t win, your ticket purchase still contributes to the prize pool, supporting future lotteries. You can participate in the next cycle for another chance to win.

**Can I withdraw my tickets or tokens once purchased?**

Tickets cannot be withdrawn once purchased. They are automatically entered into the current cycle.


---

# 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.wonderland.cool/funhouse/tokendraw.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.
