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

# Kickchain Solana Program: Accounts and Verification

> Explore the Kickchain Solana program — how market and prediction accounts work, what data is stored, and how to verify your picks on-chain.

Kickchain is powered by a Solana program that lives entirely on-chain. Every market you see in the app, every prediction you submit, and every settlement result is stored in publicly readable accounts on Solana devnet — no middleman, no hidden state. If you want to go deeper than the app UI, this page explains exactly what's recorded and how to find it.

## Program Overview

The Kickchain program is deployed on **Solana devnet** at the following address:

```
BjWd1Wg2uHxSohdutYyQFZhWXZx3oZcYfyyN22DmwQLQ
```

The program manages two core account types:

* **Market accounts** — one per fixture/market combination, holding odds, status, and the final result
* **Prediction accounts** — one per wallet per market, holding your pick, your locked-in odds, your rarity tier, and your settlement outcome

Every read is free and permissionless — no API key or login is needed to inspect any account directly on the blockchain.

## Market Accounts

A Market account is created by Kickchain for each betting market on a fixture (for example, the Result market for Argentina vs France). When you browse the Matches screen, the app is reading live data directly from these accounts.

| Field         | What it means                                                                                                                               | Example      |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| `fixture_id`  | Unique ID for the match this market belongs to                                                                                              | `1042`       |
| `market_type` | The type of market — `0` = Result (1X2), `1` = Over/Under, `2` = Both Teams To Score, `3` = Team Scores 2+                                  | `0`          |
| `subject_id`  | Subject of the market — for most market types this matches `fixture_id`; for Team Scores 2+ it identifies the team (`0` = home, `1` = away) | `0`          |
| `line`        | Threshold value used for Over/Under markets (e.g. `25` = 2.5 goals); `0` for market types that don't use a line                             | `25`         |
| `kickoff_ts`  | Unix timestamp for the scheduled kick-off of the fixture                                                                                    | `1750000000` |
| `status`      | Current lifecycle stage — `0` = Scheduled, `1` = Live, `2` = Final                                                                          | `1`          |
| `odds[0]`     | Odds for outcome 0 (home win / over / yes) stored as an integer — decimal odds × 1000, e.g. `2100` = 2.10                                   | `2100`       |
| `odds[1]`     | Odds for outcome 1 (draw / under / no)                                                                                                      | `3400`       |
| `odds[2]`     | Odds for outcome 2 (away win) — only meaningful for Result markets; may be `0` otherwise                                                    | `3200`       |
| `result`      | The winning outcome index (0, 1, or 2) once the market is settled; `255` while unset                                                        | `2`          |
| `mint_count`  | Running count of prediction NFTs minted for this market; your `edition` number comes from this                                              | `47`         |

Odds are stored as integers equal to the decimal odds multiplied by 1,000 — so odds of 2.10 are stored as `2100`. The `result` field is only meaningful when `status` is `2` (Final); before settlement it is `255`.

## Prediction Accounts

When you submit a prediction, the program creates a **Prediction account** linked to your wallet and the relevant market. This account is your permanent on-chain record — it backs the NFT card you receive and is the source of truth for settlement.

| Field          | What it means                                                                           | Example     |
| -------------- | --------------------------------------------------------------------------------------- | ----------- |
| `user`         | Your wallet's public key                                                                | `7xKp…mQ3r` |
| `market`       | The public key of the Market account this prediction belongs to                         | `4nRt…wZ8s` |
| `fixture_id`   | The match this prediction is for                                                        | `1042`      |
| `market_type`  | Market type at time of prediction — `0`, `1`, `2`, or `3`                               | `0`         |
| `pick`         | Your chosen outcome index — e.g. `0` = home win on a Result market                      | `0`         |
| `odds_at_pick` | The exact odds locked in when you submitted, stored as an integer (decimal odds × 1000) | `2100`      |
| `rarity`       | Card rarity tier — `0` = Common, `1` = Rare, `2` = Epic, `3` = Legendary                | `1`         |
| `edition`      | Your sequential edition number for this market, assigned at the moment you predicted    | `14`        |
| `settled`      | Whether the prediction has been settled after the match — `true` or `false`             | `true`      |
| `won`          | Whether your prediction was correct — `true` or `false`                                 | `false`     |

Your `odds_at_pick` are frozen at the moment you tap **Submit** — they never change even if the market moves afterward. This is enforced by the program, not just the app. The app displays this as a decimal (e.g. `2100` on-chain is shown as 2.10 in the UI).

## One Prediction Per Market

The program uses a **Program Derived Address (PDA)** to enforce that each wallet can only hold one prediction per market. Your wallet address and the market's address are combined deterministically to produce a unique account address. If you try to predict the same market twice, the transaction fails with an "account already in use" error because that PDA slot is already occupied.

This means your prediction is final once submitted. Double-check your pick before confirming in your wallet.

<Info>
  PDAs are a Solana primitive — they're deterministic addresses derived from seeds, with no private key. The Kickchain program uses them to guarantee the one-prediction-per-market rule at the protocol level, not just in the app.
</Info>

## Verifying On-Chain

All prediction data is publicly readable. You can inspect your accounts directly on Solana Explorer without needing any special tools.

<Steps>
  <Step title="Open Solana Explorer on devnet">
    Go to [explorer.solana.com](https://explorer.solana.com/?cluster=devnet). Make sure the network selector in the top-right shows **Devnet**.
  </Step>

  <Step title="Search your wallet address">
    Paste your wallet's public key into the search bar and press Enter. You'll see a list of all accounts owned by your wallet.
  </Step>

  <Step title="Find your Prediction accounts">
    Look for accounts owned by the Kickchain program ID. Each one corresponds to a prediction you've made. Click any account to inspect its raw data fields.
  </Step>

  <Step title="Browse all Kickchain accounts">
    You can also search the program ID directly to see every Market and Prediction account ever created by the program.

    ```
    BjWd1Wg2uHxSohdutYyQFZhWXZx3oZcYfyyN22DmwQLQ
    ```
  </Step>
</Steps>

<Note>
  All prediction data — your picks, the odds you locked in, and whether you won — is public and permanent on Solana devnet. Anyone with your wallet address can verify your predictions independently, without trusting the Kickchain app or any off-chain service.
</Note>
