in-solana by Supanode

Phoenix — Program ID & Overview

PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY

Phoenix is a high-performance on-chain orderbook on Solana built by Ellipsis Labs. It uses a FIFO (first-in, first-out) matching engine and settles trades atomically within the same transaction, eliminating the need for cranking.

Program ID

PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY

Key differences from OpenBook

FeaturePhoenixOpenBook V2
SettlementAtomic (same tx)Requires cranking
MatchingFIFOPrice-time priority
Event processingInlineEvent heap
Token-2022Not supportedSupported
Seat systemRequired for makersOpen orders account

Market structure

AccountDescription
MarketSingle account containing all orderbook state
SeatPer-maker authorization to post orders
Base vaultSPL Token account for base token
Quote vaultSPL Token account for quote token

Phoenix compresses the entire orderbook into a single market account, reducing the number of accounts needed per transaction.

Seat system

To place limit orders (make markets), traders must have a seat. Seats are approved by the market authority. Taker orders (market orders, IOC) do not require a seat.

Order types

TypeDescription
LimitRests on the book at a specified price
IOC (Immediate-or-cancel)Fills immediately, cancels unfilled portion
FOK (Fill-or-kill)Fills entirely or cancels entirely
Post-onlyRests on book only, rejected if it would match

Key instructions

InstructionDescription
PlaceLimitOrderPlaces a limit order on the book
SwapExecutes a market order (taker)
CancelOrderCancels a specific order
CancelAllOrdersCancels all of a maker’s open orders
RequestSeatRequests maker authorization
WithdrawFundsWithdraws settled funds

Reading the orderbook

import * as phoenix from "@ellipsis-labs/phoenix-sdk";

const client = await phoenix.Client.create(connection);
const marketAddress = new PublicKey("...");

const market = client.markets.get(marketAddress.toBase58());
const ladder = market.getUiLadder(5); // 5 levels

console.log("Bids:", ladder.bids);
console.log("Asks:", ladder.asks);

FAQ

Why does Phoenix not need cranking? Phoenix settles trades atomically within the order placement transaction. When a taker order matches against resting orders, balances are updated immediately. This eliminates the event queue and crank step that OpenBook requires.

What tokens are traded on Phoenix? Phoenix markets focus on high-volume pairs: SOL/USDC, SOL/USDT, and select other tokens. Market creation is permissioned — new markets require approval from the Phoenix team.

Is Phoenix routed through Jupiter? Yes. Jupiter includes Phoenix as a liquidity source, so Phoenix liquidity is available to any swap routed through Jupiter’s aggregator.

Updated: