> ## Documentation Index
> Fetch the complete documentation index at: https://docs.horse.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# How It Works

> Complete race cycle from entry to payout

## Race Cycle Overview

Every race follows a predictable 2.5-minute cycle:

<img src="https://mintcdn.com/horsefun/6mQofQyufC13v-13/images/race-cycle.svg?fit=max&auto=format&n=6mQofQyufC13v-13&q=85&s=980afbe4471d75275bfb94cf8e581abc" alt="Race Cycle Diagram" width="1200" height="340" data-path="images/race-cycle.svg" />

| Phase     | Duration    | Actions                                                     |
| --------- | ----------- | ----------------------------------------------------------- |
| **Entry** | 120 seconds | Players submit entries on horses                            |
| **Race**  | 30 seconds  | Outcome fixed by VRF, race animation shown, payouts settled |

This creates **576 races per day**, running continuously 24/7.

***

## Step-by-Step Process

<Steps>
  <Step title="Entry Phase (120 seconds)">
    **What happens:**

    * Players analyze horse probabilities for current track
    * Place entries on horses they think will win
    * Pool accumulates for each horse
    * Live pool distribution visible to all players

    **Smart strategy:** Watch pool distribution to find value entries where probability exceeds pool share.
  </Step>

  <Step title="Entries Close">
    **What happens:**

    * No more entries accepted
    * All entry pools are locked
    * Protocol requests randomness from Switchboard VRF
    * Prize pools are calculated from total volume

    **Prize Pool Allocation:**

    ```
    Total entries: 10,000 SOL

    1st place pool (60%): 6,000 SOL
    2nd place pool (20%): 2,000 SOL
    3rd place pool (10%): 1,000 SOL
    Blazing Hoof (2%): 200 SOL
    King's Run (2%): 200 SOL
    Buyback-and-burn (1%): 100 SOL
    Protocol fee (5%): 500 SOL
    ```
  </Step>

  <Step title="VRF Randomness Generation">
    Switchboard oracle network generates verifiable randomness:

    * Multiple oracle nodes create random values
    * Cryptographic proofs ensure validity
    * 256-bit random seed posted on-chain

    The seed determines everything: winners, jackpots, next track.
  </Step>

  <Step title="Race Phase (30 seconds)">
    The outcome is fixed by the VRF seed the moment entries close; the race is then shown as an animation of that predetermined result while payouts settle.

    **Winner Selection (Plackett-Luce):**

    * Horses are drawn one position at a time, each with probability proportional to its remaining weight
    * This yields the full finishing order (1st, 2nd, 3rd, …)
    * Each horse wins with exactly its assigned probability, deterministically verifiable on-chain

    **Jackpot Checks:**

    * Blazing Hoof: 1/125 chance
    * King's Run: 1/12500 chance
    * A trigger pays out only if the race passes the volume gate (minimum-volume threshold); otherwise it is void and the pot keeps growing
  </Step>

  <Step title="Payout Distribution">
    Winners can claim their share:

    **Payout Formula:**

    ```
    Your payout = (Your entry / Total entries on horse) * Prize pool
    ```

    **Example:**

    * You enter 100 SOL on Horse #5
    * Total entries on Horse #5: 1,000 SOL
    * Horse #5 wins 1st place
    * Your payout: (100/1,000) \* 6,000 = 600 SOL

    Payouts are available to claim after race resolution.
  </Step>

  <Step title="HORSE Token Distribution">
    All players receive HORSE tokens (volume-linked emission):

    ```
    Race emission E = min(c * total volume, cap)   // bootstrap: c = 0.5, cap = 25
    Your tokens = E * (Your entry / Total race volume)
    ```

    Below the cap this is simply `c × your entry`. When staked, these tokens increase your share of future jackpots.
  </Step>

  <Step title="Next Race Setup">
    The VRF seed also determines:

    * Next track (Doubloon Downs, Stampede Canyon, Synthwave Strip, or Crown Meadows)
    * Probability permutation for horses

    New entry phase begins immediately.
  </Step>
</Steps>

***

## Key Mechanics

### Pari-Mutuel System

All entries pool together, winners share proportionally:

* No fixed payout ratios - payouts depend on pool distribution
* Popular horses = lower returns per SOL
* Unpopular horses = higher returns per SOL

### Progressive Jackpots

Every race contributes to two jackpot pools:

**Blazing Hoof (Normal Jackpot):**

* 2% of volume per race
* Triggers \~4.6 times daily (\~every 5.2 hours)
* Size depends on accumulated volume

**King's Run (Super Jackpot):**

* 2% of volume per race
* Triggers \~every 21.7 days
* Size depends on accumulated volume

Only players who backed the **winning horse** are eligible.

### HORSE Token Economy

* **Emission**: volume-linked (`c × volume`, capped per race) to all players
* **Utility**: jackpot share scales with entry × (1 + λ·staked tokens)
* **Burning**: winners burn 10% (normal) or 50% (super) of their staked tokens
* **Buyback**: 1% of volume buys HORSE from the pool and burns it

***

## Economic Flow

Where your entry goes:

```
100 SOL Entry
    │
    ├─> 60 SOL: 1st Place Winners
    ├─> 20 SOL: 2nd Place Winners
    ├─> 10 SOL: 3rd Place Winners
    ├─> 2 SOL: Blazing Hoof
    ├─> 2 SOL: King's Run
    ├─> 1 SOL: HORSE Buyback-and-Burn
    └─> 5 SOL: Protocol Fee
```

**Return to players:** 95% (90% prizes + 4% jackpots + 1% buyback value)
**Protocol sustainability:** 5%

***

## Verification

Everything is verifiable on-chain:

<Steps>
  <Step title="Check VRF Seed">
    Verify the random seed and its cryptographic proof
  </Step>

  <Step title="Verify Winners">
    Recalculate winner selection using the seed
  </Step>

  <Step title="Confirm Payouts">
    Check that payouts match the pari-mutuel formula
  </Step>
</Steps>

All data is permanently stored on Solana for transparency.

***

## Why This Design?

<CardGroup cols={2}>
  <Card title="High Frequency" icon="bolt">
    576 races daily means constant availability and liquidity
  </Card>

  <Card title="Provably Fair" icon="shield-check">
    VRF ensures trustless, verifiable randomness
  </Card>

  <Card title="Self-Balancing" icon="scale-balanced">
    The pari-mutuel pool is self-funding — the protocol never takes a position
  </Card>

  <Card title="Sustainable" icon="seedling">
    5% fee funds development without token inflation
  </Card>
</CardGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Track Types" icon="road" href="/core-concepts/track-types">
    Understand the four track probability profiles
  </Card>

  <Card title="Entry Strategy" icon="chess" href="/entries/placing-entries">
    Learn optimal entry strategies
  </Card>

  <Card title="Jackpot System" icon="trophy" href="/jackpots/jackpots">
    How progressive jackpots work
  </Card>

  <Card title="Quick Start" icon="rocket" href="/introduction/quick-start">
    Start playing in minutes
  </Card>
</CardGroup>
