> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# svm venue: phoenix

> 14 exports of the phoenix venue integration in @eco-incorp/sauce/svm, including PHOENIX_PROGRAM_ID, PHOENIX_MARKET_DISCRIMINANT, OFF_TAKER_FEE_BPS, BIDS_NODES_BASE, PHOENIX_MAX_ORDERS, phoenix.

Solana venue integration `phoenix` under `svm/venues/phoenix`.

<Note>
  Generated from the type declarations shipped in `@eco-incorp/sauce` 0.99.4. Each entry shows the package authors' JSDoc and declaration for this SDK version. For runtime compatibility and deployed addresses, see [architecture and deployments](/programmable-transactions/sauce/architecture-and-deployments).
</Note>

### `PHOENIX_PROGRAM_ID`

*Variable* · `sdk/dist/svm/venues/phoenix/index.d.ts`

```typescript theme={null}
PHOENIX_PROGRAM_ID: Address<"PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY">
```

### `PHOENIX_MARKET_DISCRIMINANT`

*Variable* · `sdk/dist/svm/venues/phoenix/index.d.ts`

u64 LE
@ 0 - accounts.rs `check_discriminants` asserts this exact value for MarketHeader.

```typescript theme={null}
MARKET_DISCRIMINANT = 8167313896524341111n
```

### `OFF_TAKER_FEE_BPS`

*Variable* · `sdk/dist/svm/venues/phoenix/index.d.ts`

```typescript theme={null}
OFF_TAKER_FEE_BPS: number
```

### `BIDS_NODES_BASE`

*Variable* · `sdk/dist/svm/venues/phoenix/index.d.ts`

Node array start of the `bids` tree - market-invariant (the allocator header is fixed size).

```typescript theme={null}
BIDS_NODES_BASE: number
```

### `PHOENIX_MAX_ORDERS`

*Variable* · `sdk/dist/svm/venues/phoenix/index.d.ts`

Shipped top-of-book levels per direction. Half of manifest's 16 (a
heavier per-level walk: two budget checks plus the fee-adjusted-budget
setup) - MEASURED (not guessed): 588,522 CU
@ 2 rungs / 831,135 CU
@ 4
rungs on the real engine against the checked-in real SOL/USDC fixture
(`the consuming app cu e2e test`, `CU_FAMILIES.phoenix` in budget.ts), both
comfortably under the \~1.19M admission budget with room for a companion
slot. At this depth the shipped bid window alone absorbs \~713 SOL before
exhausting (see `docs/phoenix-evidence.md`) - far beyond a typical trade - so 8 is not a binding liquidity constraint at this snapshot; raise it
only if a future measurement shows CU headroom AND a real market where 8
levels genuinely caps absorption.

```typescript theme={null}
PHOENIX_MAX_ORDERS = 8
```

### `phoenix`

*Variable* · `sdk/dist/svm/venues/phoenix/index.d.ts`

Family facade for the recipe orchestrator (ladder-only - no v1 adapter).

```typescript theme={null}
phoenix: {
    slug: string;
    programId: Address<"PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY">;
    tokenProgram: Address<"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA">;
    fetchPoolConfig: typeof fetchPhoenixConfig;
}
```

### `phoenixWindowFor`

*Function* · `sdk/dist/svm/venues/phoenix/index.d.ts`

The direction's window (the ladder adapter and the orchestrator gate read through this).

```typescript theme={null}
export declare function phoenixWindowFor(cfg: PhoenixPoolConfig): PhoenixWindow;
```

### `fetchPhoenixConfig`

*Function* · `sdk/dist/svm/venues/phoenix/index.d.ts`

Fetch + gate one Phoenix market (account size/discriminant, classic-SPL
mints - the Swap ix has no separate mint accounts, so it is Tokenkeg-only,
mirroring manifest's identical gate) and freeze both directions' top-of-book
order windows. Read-only against the loader.

```typescript theme={null}
export declare function fetchPhoenixConfig(load: AccountLoader, pool: Address): Promise<PhoenixPoolConfig>;
```

### `referenceQuote`

*Function* · `sdk/dist/svm/venues/phoenix/index.d.ts`

Exact mirror of the emitted fragment given the SAME cfg + params + live fee
the blob was prepared with. `readFee` supplies `taker_fee_bps` from the SAME
live account bytes (the fragment reads it live too - see the module header).

```typescript theme={null}
export declare function referenceQuote(base: PoolConfig, state: AccountBytesMap, params: readonly bigint[]): (x: bigint) => bigint;
```

### `referenceCapacities`

*Function* · `sdk/dist/svm/venues/phoenix/index.d.ts`

Pointwise mirror of the emitted `lx` capacity booking - the productive gross input consumed.

```typescript theme={null}
export declare function referenceCapacities(base: PoolConfig, state: AccountBytesMap, params: readonly bigint[]): (grid: readonly bigint[]) => bigint[];
```

### `depthReserves`

*Function* · `sdk/dist/svm/venues/phoenix/index.d.ts`

Depth for the relative filter: the shipped top-of-book aggregate (atoms).

```typescript theme={null}
export declare function depthReserves(base: PoolConfig, state: AccountBytesMap): {
    reserveIn: bigint;
    reserveOut: bigint;
};
```

### `PhoenixOrder`

*Interface* · `sdk/dist/svm/venues/phoenix/index.d.ts`

```typescript theme={null}
export interface PhoenixOrder {
    nodeIndex: number;
    orderSequenceNumber: bigint;
}
```

### `PhoenixWindow`

*Interface* · `sdk/dist/svm/venues/phoenix/index.d.ts`

```typescript theme={null}
export interface PhoenixWindow {
    orders: PhoenixOrder[];
}
```

### `PhoenixPoolConfig`

*Interface* · `sdk/dist/svm/venues/phoenix/index.d.ts`

```typescript theme={null}
export interface PhoenixPoolConfig extends PoolConfig {
    venue: typeof SLUG;
    direction: "baseIn" | "quoteIn";
    baseMint: Address;
    quoteMint: Address;
    baseVault: Address;
    quoteVault: Address;
    baseDecimals: number;
    quoteDecimals: number;
    baseLotSize: bigint;
    quoteLotSize: bigint;
    baseLotsPerBaseUnit: bigint;
    tickSizeInQuoteLotsPerBaseUnit: bigint;
    asksNodesBase: number;
    windows: {
        baseIn: PhoenixWindow;
        quoteIn: PhoenixWindow;
    };
}
```
