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

# Pages

> What each of the 10 routes does.

## Landing (`/`)

Hero strip + live market previews + feature cards. Restrained framer-motion entrances (`fadeUp` / `stagger`) calibrated to Sui's brand voice on the DeepBook product page.

## Markets (`/markets`)

One grid for every market kind. BTC strikes by duration + binary event markets. Limitless-style category tabs (URL-backed `?cat`), sidebar filters, sort, and header-search `?q=` filtering across all kinds.

* **Crypto tab** opens with the `UpDownStrip` quick cards (15 Min / Hourly / Daily). Baseline = Pyth price at window open rounded to \$1; Up/Down buttons deep-link to the market page with strike + side preselected.
* **Events tab** lists scaffolded binary markets from `/v1/binary-markets`.
* Settled / expired markets are **hidden** here (filtered in the `allMarkets` memo); reachable from Positions / Profile.
* Parallel testnet oracles sharing one (asset, expiry) are deduped to the freshest book (`lastUpdateMs` hour-bucket, `fillCount` tiebreak).

## MarketDetail (`/markets/:oracleId`)

Limitless-style `PriceLineChart` by default (Pyth history, green above / red below the selected strike, dashed STRIKE rule, 15m/1H/1D/1W ranges) with the TradingView candles widget one toggle away. Live strike book (WS quotes), `BuyPanel` / `CustomStrike` / `RangeMint`, expiry countdown.

Reads `?strike=` / `?side=` (from Up/Down cards) to prefill + auto-select. Trading is blocked once the oracle expires (`BuyPanel` short-circuits + shows a banner).

## EventMarketDetail (`/event-markets/:id`)

Scaffolded binary market page:

* **Trade on DeepBook** panel. Buy/Sell × YES/NO market orders via `pool::swap_exact_quantity` with a zero-DEEP coin. Live estimate + mid price; 1% slippage floor. Renders only when registry entry has pool ids; "order book pending" otherwise.
* **Mint pair** panel. `$X` DUSDC to equal YES + NO.
* **Burn pair** panel. Redeem the matching DUSDC pre-resolution.
* **Redeem** panel. Winning leg to DUSDC, post-resolution.
* **Live order book card.** Limitless layout (asks / mid+spread / bids, cumulative notional, depth bars), YES/NO toggle, 5s refresh.
* **`OOPanel`.** Propose / dispute / finalize forms when the registry has `ooMarketLinkId`.

## DarkPool (`/dark-pool`)

Vault UI. Lists open vaults (reads `/v1/vaults`), shows TVL + label + state. **Deposit privately** opens a confirm sheet. **Withdraw** post-settlement redeems the receipt for the pro-rata share.

## Positions (`/positions`)

Two sections:

1. **Predict positions** marked to live `fairPerToken` via `useStrikeQuote` (entry, value, unrealized P\&L per row).
2. **Event-market holdings** read straight from wallet `Coin<YES>/Coin<NO>` balances per registry market via `getBalance` (15s refetch), marked to pool mid (\$1 once resolved). Losing-side coins of resolved markets are hidden. No cost basis since V3 fills aren't indexed.

## Agents (`/agents`)

Trader-card surface:

* **Hero strip.** Agents · trades settled · combined realized P\&L · top agent.
* **Fleet cards.** Live pulse dot + realized-P\&L hero + equity sparkline + win rate + recent settlements.
* **Leaderboard.** Ranked by computed realized P\&L (the on-chain TradeAgent PnL stays \$0 until facade attribution ships). Every row navigates to `/agents/:agentId`.
* **Create agent wizard.** One-PTB BalanceManager + TradeCap + (optional) deposit + register. Groq model selector + downloadable mandate.

## AgentDetail (`/agents/:agentId`)

Per-agent surface:

* **Performance hero.** 3xl realized P\&L + full `PortfolioChart` equity curve.
* **Open positions** + **scrollable settlement history**.
* **Live runtime card.** Matched off configured `/status` URLs (pulse + tick/mint/skip/error counters + 30-line action feed).
* **Owner controls.** Reclaim + Pause/Resume (rendered when connected signer matches owner).
* **Identity card.** TradeAgent, owner, BalanceManager (live DUSDC balance), TradeCap.
* **Custody model explainer**.

## Profile (`/profile`)

Limitless-style portfolio dashboard:

* Live **Portfolio Value** headline + unrealized P\&L (mark-to-market via `usePositionsValue`).
* `lightweight-charts` realized-P\&L baseline chart with 1D/1W/1M/All tabs.
* **Stat tiles.** Available · Positions Value · To Win · Unrealized P\&L · Realized P\&L.
* **Recent activity.** Fills (Buy) merged with redemptions (Redeem/Sell) with Suiscan links.
* **PredictManager controls.** Create / Deposit / Withdraw (gated on connected signer == profile address).
* **Send DUSDC** card (recipient + amount + MAX). Only way for zkLogin users to move DUSDC out of the app.

## AuthCallback (`/auth/callback`)

Enoki zkLogin redirect handler. Parses the OAuth code, completes the flow, redirects to `/`.
