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

# Raffles

Spend the **Embers** your dragons earned on raffle tickets. Every entry is written to Hedera as it happens, and the winners are drawn with **Hedera's own random number generator**, so anyone can check the result afterwards.

👉 Open it at [hash-ly.com/raffles](https://hash-ly.com/raffles).

***

## ⚙️ How Raffles Work

### 🔥 Tickets Cost Embers

Tickets are paid with Embers, which you earn by [staking your dragons](/hashly-docs/rewards/staking.md). Your balance shows at the top of the Raffles page. Buying a ticket spends the Embers right away, and an entry can't be cancelled.

### 📋 What Each Raffle Shows

Each raffle sets its own terms, and the raffle card shows them:

| Term                       | What it means                                               |
| -------------------------- | ----------------------------------------------------------- |
| 🔥 **Ticket price**        | Embers per ticket                                           |
| 🎫 **Tickets in**          | Total tickets bought so far, by everyone                    |
| 🏆 **Winners**             | How many wallets will win                                   |
| ⏳ **Time left**            | When entries close                                          |
| 🐉 **Holding requirement** | NFTs you must hold to enter, for example 1 Sanctuary Dragon |
| 🔗 **Prize token**         | The token you must associate to receive the prize           |
| 🔢 **Ticket limit**        | Maximum tickets per wallet, when the raffle has one         |

Once anyone has entered a raffle, its terms can't be changed.

***

## ✅ Before You Enter

### 🐉 Holding Requirement

If a raffle asks you to hold certain NFTs, the card shows how many you hold (for example, `1 Sanctuary Dragon · you have 3`). Your wallet is checked when you buy a ticket **and again at the draw**: if you no longer hold what the raffle asks for at that moment, your tickets are left out of the draw.

### 🔗 Associate the Prize Token

On Hedera, an account can't receive a token it hasn't associated. When a raffle's prize is a token or an NFT, you must **associate that token before you can enter**:

1. Connect your wallet on the Raffles page.
2. If the card shows **Associate the token**, click it.
3. Approve the association in your wallet. It costs a small HBAR network fee.
4. Once it's confirmed, the card shows **Token associated** and you can enter.

> ⚠️ **Important:** If a prize can't be delivered, for example because the winning account isn't associated with the prize token when the prize is sent, Hashly may give it to another entrant.

***

## 🎯 How to Enter

1. Go to [hash-ly.com/raffles](https://hash-ly.com/raffles) and connect your wallet.
2. Pick a raffle under **Open now** and check its requirements.
3. Enter how many tickets you want.
4. Click **Enter for N** (the button shows the total in Embers).
5. Your tickets appear on the card (`N yours`), together with your share of all tickets.

The button tells you when something is missing: **You do not qualify**, **Need N embers**, **Only N left** or **All N tickets yours**.

***

## 👥 Who's In and Your Odds

Click **see the odds** on a raffle card to open its list of entrants. For each wallet (or its Hashly name) it shows:

* 🎫 **Tickets** bought
* 📊 **Share** of all tickets

With **one winner**, your share is exactly your chance of winning. With **several winners**, nobody can win twice, so your chance of taking a place is higher than your share.

***

## 🎲 How the Draw Works

After a raffle closes, Hashly runs the draw:

1. 🐉 **Requirement re-check**: entrants who no longer hold what the raffle asks for are left out.
2. 🎲 **Random number from Hedera**: Hashly requests a number with a Hedera `PrngTransaction`. The consensus nodes generate it, it's stored in the transaction record, and it's public on HashScan.
3. ⚖️ **Weighted by tickets**: each ticket occupies one number the roll can land on, so 10 tickets are 10 chances.
4. 🔁 **One roll per winner**: after each winner is picked, their tickets are removed and the next roll uses the remaining ones.

If Hedera's random number generator isn't available, the draw doesn't run. Hashly never falls back to a number it picks itself.

> **📌 Example:** A raffle has 20 tickets: you hold 10, and three other wallets hold 5, 3 and 2. The roll is a number from 0 to 19, and 10 of those 20 numbers are yours: a 50% chance with one winner.

### 🏅 Results

Drawn raffles move to **Already drawn**. Each winner shows:

* 🥇 Their **place** (1st, 2nd, 3rd...)
* 👛 Their **wallet**
* 🎯 The number the roll **landed on**, out of how many tickets
* 🔗 A **See the roll** link to the random number transaction on HashScan

A raffle that has closed but hasn't been drawn yet shows **Awaiting draw**.

***

## ⛓️ On-Chain Record

Raffles are written to the **raffles topic** on the Hedera Consensus Service: [`0.0.10855136`](https://hashscan.io/mainnet/topic/0.0.10855136). The topic has no admin key, and only Hashly can write to it.

| Message            | When                    | What it includes                                                                   |
| ------------------ | ----------------------- | ---------------------------------------------------------------------------------- |
| 📣 `raffle_opened` | The raffle is published | Title, ticket price, number of winners, closing time, holding requirement          |
| 🎫 `raffle_entry`  | Someone buys tickets    | Wallet, tickets bought, running ticket total                                       |
| 🎲 `raffle_drawn`  | The draw runs           | Total tickets, and each winner's place, wallet, roll and random number transaction |

**Entry message format:**

```json
{
  "type": "raffle_entry",
  "version": 1,
  "raffle": "raffle-slug",
  "wallet": "0.0.xxxxx",
  "tickets": 2,
  "total_tickets": 56,
  "timestamp": 1234567890
}
```

* ✅ An entry is written right after the purchase. If the topic can't be reached at that moment, your tickets are still valid.
* 🗄️ Ember **balances** aren't on-chain: they're kept in Hashly's database. The entries and the rolls are what make a draw checkable.

Entries and draws are public and permanent, together with your account ID. See the [Privacy Policy](https://hash-ly.com/privacy).

***

## 🎁 Prizes

* 🤝 Prizes can come from Hashly or from partner projects.
* 🔗 To receive a token or NFT prize, the winning account has to be associated with that token. A prize that can't be delivered may go to another entrant.
* 🛠️ Hashly can cancel, pause or redraw a raffle if something fails technically or if it finds abuse.
* 🌍 Raffles are void wherever the law doesn't allow them, and winners are responsible for any taxes on their prizes.
* 🔞 You must be at least 18 to use Hashly.

Questions about a prize: <contact@hash-ly.com>.

***

## 💡 Tips

* 🔗 **Associate first**: you can't enter until the prize token is associated, and doing it early avoids a rush before closing.
* 🐉 **Keep holding until the draw**: selling the required NFTs before the draw leaves your tickets out.
* 📊 **Check the entrants list**: it shows how many tickets each wallet has before you decide how many to buy.
* 🔥 **Stake to earn more**: Embers keep building while you wait for the next raffle.

***

> ⚖️ **Please note:** Embers, XP, points and cosmetics have no monetary value outside Hashly, and they can't be sold, transferred, withdrawn or exchanged for money or crypto. Hashly doesn't guarantee what any prize is worth. NFTs a raffle asks you to hold, such as Santuario Hedera dragons, are utility tokens that unlock features on Hashly. They aren't securities or investment contracts, they aren't offered as an investment, and their marketplace prices are set by buyers and sellers. Nothing on Hashly is financial or investment advice. See the [Terms of Use](https://hash-ly.com/terms).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://hashly.gitbook.io/hashly-docs/rewards/raffles.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
