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

# End-to-end Walkthrough

> Run every flow once: Predict price, scaffolded event, vault, agent fleet, OO.

Run every flow at least once so you understand the system. Each flow is also documented in `SETUP.md` and verified live on testnet.

<Note>
  Prerequisites: [Quickstart](/quickstart) completed. Backend stack up, frontend running, env populated.
</Note>

## Flow A. Predict price market

1. **Connect.** "Connect Wallet" or "Sign in with Google". Address chip populates.
2. **Open a market.** `/markets` to click any BTC oracle card.
3. **Pick a strike.** `RecentFills` lists strikes. Click YES or NO on any row.
4. **Trade.** Type `$10` in `BuyPanel` to **Trade**. If your PredictManager balance is too low, panel surfaces a `Deposit DUSDC` CTA first.
5. **Verify.** Wait \~5s. Refresh `/positions`. Or:
   ```bash theme={"system"}
   curl -s http://localhost:8081/v1/positions/<your-addr> | jq
   ```
6. **Audit on chain.** `sui client object <managerId>` shows the debited balance. `PositionMinted` event lands in the `fills` table.

## Flow B. Create a binary event market

See [Create a Binary Market](/guides/create-event-market).

## Flow C. Trade on DeepBook V3

`/markets` Events tab to click your scaffolded market. The **Trade on DeepBook** panel renders once registry has pool ids.

* **Buy YES.** Enter DUSDC amount. Estimate from `get_quantity_out_input_fee` (matches the swap's fee math).
* **Sell YES.** Swaps YES to DUSDC. Same panel toggle.
* **Slippage floor** 1%.

On-chain verified both directions:

* Buy: `$1 -> 1.8 YES @ $0.55` tx `CVTtziK1wQVoAvudpPZaLbX34b3Tk6HiSkgaUmq6MQmH`.
* Sell: `1.8 YES -> $0.765 @ $0.45` tx `7up4SZRjbJccs6PQh6ewRtt8nQyZMMbGQCeWqA9zeaxn`.

## Flow D. Mint a YES + NO pair

On the event-market page, **Mint pair** panel:

1. Set `$10` in amount.
2. **Mint pair**.
3. `My Position` card now shows `YES held: 10.00` + `NO held: 10.00`.

On-chain audit:

```bash theme={"system"}
sui client objects --json | jq '.[] | select(.data.type | endswith("::yes::YES>"))'
sui client objects --json | jq '.[] | select(.data.type | endswith("::no::NO>"))'
```

## Flow E. Burn pair

Pre-resolution, **Burn pair** takes the smaller of YES + NO balances and pays back the matching DUSDC.

## Flow F. Resolve + redeem

See [Settling Markets](/guides/settling).

## Flow G. Dark Pool vault

See [Vault Deposit Flow](/guides/vault-flow).

## Flow H. AI Agent fleet

See [Running an Agent](/guides/running-agent).

## Flow I. Optimistic Oracle

See [Optimistic Oracle Walkthrough](/guides/oo-flow).

## Submission checklist

* Move tests: 19+/19+ pass
* All TS packages typecheck clean
* At least one published binary market with a non-trivial label
* At least one Predict mint executed from the UI
* One vault deposit + redeem cycle on resolved market
* One Agent in the registered list with > 0 trades
* One OO proposal that finalized
* DUSDC sweep >= 80% honored (Jun 23 + Jun 28)
