> ## 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.

# DarkPool

> Prediction markets on DeepBook V3. Privacy vault, AI agents, and a Move-native Optimistic Oracle. Built for Sui Overflow 2026.

DarkPool is the canonical reference application on top of **DeepBook Predict**, Mysten Labs' prediction-market primitive that shipped on Sui testnet six weeks before this project began. Predict solved the cold-start liquidity problem with a shared vault, oracle-driven pricing, and composable binary and range positions.

But Predict's positions are public, its oracle is price-only, and it has no native interface for AI agents. **DarkPool closes those three gaps.**

<CardGroup cols={3}>
  <Card title="Event Markets on V3" icon="layer-group" href="/concepts/binary-event-markets">
    Any YES/NO question becomes its own published Move package. Both legs are real `Coin` types. Mint a pair from DUSDC, trade either leg on DeepBook V3 pools, redeem the winner for \$1 at resolution.
  </Card>

  <Card title="Dark-Pool Privacy Vault" icon="user-secret" href="/concepts/dark-pool-vault">
    A pooled DeepBook V3 BalanceManager held by the vault gives traders position privacy via k-anonymity. Deposit DUSDC for receipt shares. The keeper mints and quotes through the vault's BalanceManager via TradeCap.
  </Card>

  <Card title="Native AI Agents" icon="robot" href="/agents/overview">
    Connect GPT, Claude, or Llama through one OpenAI-compatible client. The model researches live markets, forms a thesis, and trades under runtime-owned guardrails. Delegated via V3 TradeCap. Key-less, fully revocable.
  </Card>
</CardGroup>

Plus a **Move-native Optimistic Oracle**. Propose, dispute, DAO-vote, and settle in 30 minutes for sports, politics, and geopolitics. Polymarket's UMA window is 7 days.

## What you get

* **7 production Move modules** deployed to Sui testnet (package `0x21c96c85…`) with 17/17 unit tests passing.
* **Per-market binary scaffolder** that publishes a full `YES + NO + Settlement` Move package per event in one command.
* **Backend stack** with REST + WebSocket API, Sui event indexer, quote worker, auto-settle keeper, and self-sponsorship endpoint. All in one Docker compose.
* **React + Vite frontend** with dApp Kit, Enoki zkLogin, TanStack Query, Tailwind. 10 routes covering markets, events, vault, positions, agents, profile.
* **AI agent runtime** with heuristic and LLM strategies, swappable providers (Groq, Anthropic, OpenAI, Ollama), and per-agent markdown mandates.

## How the pieces fit

<Frame caption="DarkPool layers cleanly on top of Predict and V3 without forking either. The frontend signs PTBs against Predict and scaffolded markets. The backend reads events and pushes live quotes. The keeper settles on expiry. Pyth Hermes feeds prices.">
  <img src="https://mintcdn.com/dp-550c5f99/JGb2CwQJQBcRkGfn/images/architecture.png?fit=max&auto=format&n=JGb2CwQJQBcRkGfn&q=85&s=060f9a0b344aa0da37b7f260523b2540" alt="DarkPool architecture overview. Frontend signs PTBs against DeepBook Predict, DeepBook V3, the DarkPool package, and per-market binary packages. Off-chain services: api (Fastify REST + WebSocket), indexer (Sui events to Postgres), quote-worker (devInspect to Redis), resolver (auto-settle keeper), agent-service (LLM or heuristic). Pyth Hermes feeds prices via SSE." width="1536" height="1024" data-path="images/architecture.png" />
</Frame>

## Start here

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Clone the repo, publish the Move package, and run the full local stack in under 30 minutes.
  </Card>

  <Card title="Architecture" icon="sitemap" href="/architecture">
    The three augmentations on top of Predict, the component diagram, and the tradeoffs behind each pick.
  </Card>

  <Card title="Move Modules" icon="cube" href="/move/overview">
    Module-by-module spec for the 7 on-chain modules and the per-market binary template.
  </Card>

  <Card title="API Reference" icon="server" href="/backend/rest-api">
    Every REST endpoint and WebSocket channel served by `@darkpool/server`.
  </Card>
</CardGroup>

## Track context

* **Event.** Sui Overflow 2026, DeepBook Track (single submission).
* **Build window.** 6 to 8 weeks.
* **Status.** v0.3 (DeepBook V3 pivot). Phases P0 to P6 shipped. Live on testnet with vault deposits, keeper minting through TradeCap, and YES/NO order books seeded.
* **Spec.** [`darkpool_spec.md`](https://github.com/AbhimanyuAjudiya/DarkPool/blob/main/darkpool_spec.md). 2,600 lines of architectural rationale.
* **Repo.** [`AbhimanyuAjudiya/DarkPool`](https://github.com/AbhimanyuAjudiya/DarkPool). Apache-2.0, open source.

<Note>
  DarkPool **does not fork Predict**. Every mint, redeem, and supply goes through Predict's modules unchanged. Our `predict_facade` emits attribution events alongside, keeping DarkPool inside the DeepBook ecosystem rather than splintering it.
</Note>
