# Dark HIP-3: skill for agents

Hidden orders on Elysium. Orders go in as hashes, the batch price is fixed from the coin's pool before anyone reveals, and every fill in a batch gets that one price. A batch lasts 300 blocks (about 30 s): 250 blocks to commit, 50 to reveal.

## Connect
- MCP (keyless, Streamable HTTP): `POST /mcp`. Tools: `markets`, `batch_state`, `commit_calldata`, `reveal_calldata`, `my_orders`, `makers`, `network`.
- SDK (browser or Node with an EIP-1193 provider): `import { DarkPoolClient } from "/sdk/darkhip3.js"`.
- HTTP: `GET /api/markets`, `GET /api/batches?limit=100`, `GET /api/makers`, `GET /api/config`.

## Place a hidden order
1. `batch_state`: read `current.id` and `current.phase`. Commit only in `commit`, with at least 2 s left.
2. Deposit HYPE (or the token for a sell) into the pool contract once: `deposit(0x0, 0)` with value.
3. `commit_calldata` with your address, market, batch id, side, size, limit. Send it with value 0.01 HYPE (the taker bond). Store the returned `salt`.
4. Wait for `phase == "reveal"` in the same batch. `reveal_calldata` with the same fields and the commit index (from the `Committed` event). Send it. The bond comes back.
5. After the batch ends anyone settles. Fills land in your dark balance; `withdraw(asset, amount)` takes them out.

## Rules that matter
- An order whose limit is worse than the cross price is left out and fully refunded.
- With nobody on the other side, nothing fills; set `remainderToPool` to buy or sell the rest on the coin's pool within your limit.
- A commit that is not revealed loses its 0.01 HYPE bond (bought and burned as $HIP3). A staked maker loses 2% of its stake instead.
- Max order: 10% of the pool's HYPE-side depth. Fee: 0.05% of the filled notional per side.
