Skip to main content
DarkPool is not a reimplementation of a prediction market. DeepBook Predict already provides the core primitives: markets, oracle-priced positions, shared vault liquidity, PLP shares. DarkPool augments Predict with three things Predict does not have on its own: position privacy, agent-native delegation, and arbitrary-event resolution.

The three augmentations

LayerPredict providesDarkPool adds
MarketsPrice-only via OracleSVITemplated per-market YES/NO Move packages trading on DeepBook V3 pools, plus oo_resolution for non-price questions (30-min auto-finalize)
PrivacyPublic positionsDarkPoolVault. Pooled V3 BalanceManager (k-anonymity), live on testnet with a TradeCap keeper loop
AgentsNoneTradeAgent registry + TradeCap delegation (no withdrawal rights) + native LLM mode
SettlementPer-user redeemAuto-settle keeper + settlement::distribute_fees (1% protocol / 0.5% resolver / 0.5% creator)
BackendPredict server REST@darkpool/server. Indexer to Postgres, quote poller to Redis + WS push, write-on-tx confirm
FrontendNoneReact + Vite app with live Pyth ticker, TradingView chart, strike book, event markets, mark-to-market positions, agent fleet view, profile P&L

What the V3 pivot bought us

The v0.3 thesis is that DeepBook V3 is the trading engine for everything:
LayerJobDeepBook primitive
Price markets (/markets)BTC up/down strikesDeepBook Predict (existing)
Event markets (/markets Events tab)YES/NO binaries on anythingDeepBook V3 pools (per-market Pool<YES,DUSDC> + Pool<NO,DUSDC>)
Dark-pool vault (/dark-pool)Position privacyDeepBook V3 BalanceManager held by the vault
AI agents (/agents)Key-less delegated tradingDeepBook V3 TradeCap
The v0.2 internal AMM and Seal-encrypted intent ledger were deleted. They served their purpose but don’t fit V3-native architecture.

Full system

On-chain layering

Sui-unique advantages

  1. Atomic PTB settlement. Pyth price update + OracleSVI settle + position redemption + fee distribution in one transaction.
  2. TradeCap delegation. Agents trade without withdrawal rights via DeepBook V3’s existing capability pattern.
  3. Move-native Optimistic Oracle. Bond-backed propose/dispute on-chain, settles in minutes.
  4. PLP share-based liquidity. AI agents act as 24/7 vault suppliers.

Phase tracker

[x] P0  Cleanup: drop internal AMM, Seal intent, dead env
[x] P1  Binary market template + create-binary-market scaffolder
[x] P2  V3 trading surface (server + frontend + mint/burn/redeem)
[x] P3  DarkPool vault on V3 (BalanceManager + TradeCap), live on-chain
[x] P4  Real TradeCap agents (TradeCap id field + registration)
[x] P5  Resolution + redeem wiring (resolve-binary-market script)
[x] P6  Polish + tests + SETUP.md walkthrough

Invariants

  1. Attribution. predict_facade::attribute_* is wired into the resolver’s settlement PTB and scripts/supply-plp.ts. Frontend and agent-service mints are unattributed.
  2. Predict pin. predict-testnet-4-16. Never reference main.
  3. Env. .env is gitignored, .env.example is the schema, zod throws on missing required vars.
  4. Binary market = one Move publish. Slug must match /^[a-z0-9_]+$/. Registry on disk is authoritative.
  5. DUSDC is the only quote asset Predict accepts: 0xe95040…::dusdc::DUSDC.
  6. agent::pause and resume emit no events. Authoritative source is sui.getObject(TradeAgent).is_active.
Full list: Invariants & Conventions.