> ## 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: raydium-clmm

> 17 exports of the raydium-clmm venue integration in @eco-incorp/sauce/svm, including raydiumClmm, fetchRaydiumClmmConfig, RAYDIUM_CLMM_PROGRAM_ID, RAYDIUM_CLMM_MAX_BOUNDARIES, raydiumClmmArrayStartIndex, raydiumClmmWindowStartTicks.

Solana venue integration `raydium-clmm` under `svm/venues/raydium-clmm`.

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

### `raydiumClmm`

*Variable* · `sdk/dist/svm/venues/raydium-clmm/index.d.ts`

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

```typescript theme={null}
raydiumClmm: {
    slug: string;
    programId: Address<"CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK">;
    tokenProgram: Address<"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA">;
    token2022Program: Address<"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb">;
    memoProgram: Address<"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr">;
    fetchPoolConfig: typeof fetchRaydiumClmmConfig;
}
```

### `fetchRaydiumClmmConfig`

*Function* · `sdk/dist/svm/venues/raydium-clmm/index.d.ts`

Fetch + gate one Raydium CLMM pool (see the header for the gate list) and
freeze both directions' boundary windows. Read-only against the loader.

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

### `RAYDIUM_CLMM_PROGRAM_ID`

*Variable* · `sdk/dist/svm/venues/raydium-clmm/index.d.ts`

```typescript theme={null}
RAYDIUM_CLMM_PROGRAM_ID: Address<"CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK">
```

### `RAYDIUM_CLMM_MAX_BOUNDARIES`

*Variable* · `sdk/dist/svm/venues/raydium-clmm/index.d.ts`

Shipped initialized-tick boundaries per direction (matches whirlpool: each
crossed boundary is a walk step \~tens of k CU on the interpreter). Moves in
lockstep with the fragment's unrolled setup (ladder.ts) and the mirror.

```typescript theme={null}
RAYDIUM_CLMM_MAX_BOUNDARIES = 4
```

### `raydiumClmmArrayStartIndex`

*Function* · `sdk/dist/svm/venues/raydium-clmm/index.d.ts`

floor division toward negative infinity (TickArrayState::get\_array\_start\_index).

```typescript theme={null}
export declare function arrayStartIndex(tickIndex: number, tickSpacing: number): number;
```

### `raydiumClmmWindowStartTicks`

*Function* · `sdk/dist/svm/venues/raydium-clmm/index.d.ts`

The three swap-sequence array starts for a direction: the array containing
the live tick, then two more in the walk direction (down for zero\_for\_one).
Raydium's first swap array is always the live-tick array (no whirlpool-style
shifted-window rule - next\_initialized\_tick searches within it first).

```typescript theme={null}
export declare function windowStartTicks(tickCurrentIndex: number, tickSpacing: number, zeroForOne: boolean): [
    number,
    number,
    number
];
```

### `RAYDIUM_CLMM_POOL_DISCRIMINATOR`

*Variable* · `sdk/dist/svm/venues/raydium-clmm/index.d.ts`

sha256('account:PoolState')\[0..8] (shared with raydium-cp - size+owner discriminate).

```typescript theme={null}
POOL_DISCRIMINATOR: number[]
```

### `RAYDIUM_CLMM_TICK_ARRAY_DISCRIMINATOR`

*Variable* · `sdk/dist/svm/venues/raydium-clmm/index.d.ts`

sha256('account:TickArrayState')\[0..8].

```typescript theme={null}
TICK_ARRAY_DISCRIMINATOR: number[]
```

### `RAYDIUM_CLMM_AMM_CONFIG_DISCRIMINATOR`

*Variable* · `sdk/dist/svm/venues/raydium-clmm/index.d.ts`

sha256('account:AmmConfig')\[0..8].

```typescript theme={null}
AMM_CONFIG_DISCRIMINATOR: number[]
```

### `RaydiumClmmPoolConfig`

*Interface* · `sdk/dist/svm/venues/raydium-clmm/index.d.ts`

```typescript theme={null}
export interface RaydiumClmmPoolConfig extends PoolConfig {
    venue: typeof SLUG;
    direction: "0to1" | "1to0";
    ammConfig: Address;
    tokenMint0: Address;
    tokenMint1: Address;
    tokenVault0: Address;
    tokenVault1: Address;
    observation: Address;
    bitmapExtension: Address;
    tickSpacing: number;
    tradeFeeRate: number;
    liquidity: bigint;
    sqrtPrice: bigint;
    tickCurrentIndex: number;
    windows: {
        "0to1": RaydiumClmmWindow;
        "1to0": RaydiumClmmWindow;
    };
}
```

### `RaydiumClmmWindow`

*Interface* · `sdk/dist/svm/venues/raydium-clmm/index.d.ts`

```typescript theme={null}
export interface RaydiumClmmWindow {
    tickArrays: [
        Address,
        Address,
        Address
    ];
    startTicks: [
        number,
        number,
        number
    ];
    boundaries: RaydiumClmmBoundary[];
    edge: {
        tick: number;
        sqrtPrice: bigint;
    } | null;
    readable: number;
}
```

### `RaydiumClmmBoundary`

*Interface* · `sdk/dist/svm/venues/raydium-clmm/index.d.ts`

```typescript theme={null}
export interface RaydiumClmmBoundary {
    arrayIndex: number;
    offset: number;
    tick: number;
    sqrtPrice: bigint;
}
```

### `raydiumSqrtPriceAtTick`

*Function* · `sdk/dist/svm/venues/raydium-clmm/tick-math.d.ts`

sqrt\_price\_from\_tick\_index (Q64.64) over the UNBIASED tick.

```typescript theme={null}
export declare function raydiumSqrtPriceAtTick(tick: number): bigint;
```

### `RAYDIUM_MIN_TICK`

*Variable* · `sdk/dist/svm/venues/raydium-clmm/tick-math.d.ts`

Raydium CLMM tick math - exact transcription of
raydium-clmm/programs/amm/src/libraries/tick\_math.rs `get_sqrt_price_at_tick`:
the STANDARD Uniswap-V3 magic-constant ladder, but emitting a Q64.64
sqrt price directly (each factor is `2^64 / 1.0001^(2^(i-1))`, accumulated
with `(ratio * magic) >> 64`, then reciprocated as `(2^128 - 1) / ratio`
for positive ticks). This is NOT Orca's whirlpool table - Raydium's
MAX\_SQRT\_PRICE (79226673521066979257578248091) differs from Orca's
(79226673515401279992447579055), so the two families need separate math.

Verified against the source's pinned bounds AND the live SOL/USDC 0.04%
pool 3ucNos4N... (tick 0 -> 2^64; tick -25007 -> 5283561491725923125,
just below the pool's live mid-tick sqrt 5283759320557551589).

Used ONLY off-chain (prepare + the mirror): a shipped boundary's sqrt price
is drift-invariant (a pure function of the PDA-pinned tick), so the in-VM
fragment never recomputes it (an in-VM bit ladder is unaffordable).

```typescript theme={null}
MIN_TICK = -443636
```

### `RAYDIUM_MAX_TICK`

*Variable* · `sdk/dist/svm/venues/raydium-clmm/tick-math.d.ts`

```typescript theme={null}
MAX_TICK = 443636
```

### `MIN_SQRT_PRICE_X64`

*Variable* · `sdk/dist/svm/venues/raydium-clmm/tick-math.d.ts`

```typescript theme={null}
MIN_SQRT_PRICE_X64 = 4295048016n
```

### `MAX_SQRT_PRICE_X64`

*Variable* · `sdk/dist/svm/venues/raydium-clmm/tick-math.d.ts`

```typescript theme={null}
MAX_SQRT_PRICE_X64 = 79226673521066979257578248091n
```
