Machine Trading Protocol/venues

Venue profile: OpenBook (openbook), v0

Status
draft
Source
github.com/lgalabru/machine-trading/tree/main/specs

OpenBook v2 is a permissionless central limit order book on Solana, program opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb. Anyone can create a market, so a market is identified by its address, not its name.

1. Instruments

Reference Meaning
openbook:spot:<SYMBOL> The OpenBook v2 market <SYMBOL> names in the table below.
openbook:spot:<ADDRESS> The OpenBook v2 market at the base58 address <ADDRESS>.

Named markets:

Symbol Market address Base Quote
SOL-USDC CFSMrBssNG8Ud1edW59jNLnq2cwrQ9uY5cM3wXmqRJj3 SOL (wrapped, So11111111111111111111111111111111111111112) USDC (EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v)

A market's name field is not a symbol: two markets can share a name.

2. Account

On each market in the universe, the account is the agent authority's open orders accounts on that market: the program's OpenOrders accounts the authority owns, as its OpenOrdersIndexer lists them, together with the authority's wallet token accounts for the market's base and quote mints.

The wallet matters for trading too, not only for holding: a take-only order (place_take_order) trades straight from the wallet's token accounts, without an open orders account.

3. Measurements

For a market with base lot size BL and quote lot size QL, each open orders account's position holds:

From them:

4. The benchmark's enforcer

No benchmark task enforces this profile yet. The first is planned to be a treasury sale of SOL on OpenBook and Phoenix, under a sell-only mandate with a price floor.