> For the complete documentation index, see [llms.txt](https://docs.wonderland.cool/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wonderland.cool/funhouse/wonderdraw.md).

# WonderDraw

**WonderDraw** is a lottery system where users can win Wonderland ecosystem tokens by purchasing tickets using Pulse (PLS). Each ticket represents a chance to win the prize pool, which consists of a set amount of Wonderland tokens and a portion of the Pulse tokens collected from ticket sales.

{% embed url="<https://app.wonderland.cool/app/wonderdraw>" %}
wonderdraw page
{% endembed %}

## How It Works

1. **Prize Pool**: A certain amount of Wonderland tokens is set as the prize for the current cycle. This amount will be updated regularly to reflect the current prize value.
2. **Ticket Purchase**: Users buy tickets using Pulse (PLS). Each ticket costs a fixed amount of PLS. The cost per ticket is determined by the contract owner and can be adjusted as needed.
3. **Pulse Reward Pool**: The Pulse tokens collected from ticket sales form a reward pool, which is split between the winner and our DAO wallet when the cycle ends.
4. **End Cycle**: The lottery runs continuously until the endcycle function is called and the prize is distributed.

<figure><img src="/files/x4WPhP6XA2Ob4TFkKuew" alt=""><figcaption><p>example cycle</p></figcaption></figure>

## Steps to Participate

**Connect Your Wallet**

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

**Buy Tickets**

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

**Winning and Rewards**

* When the cycle ends, a winner is randomly selected.
* The winner receives the prize pool of Wonderland tokens.
* The Pulse reward pool is split between the winner and the DAO.

## Questions

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

WonderDraw uses 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 PLS once purchased?**

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