> ## 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: orca-whirlpool

> 30 exports of the orca-whirlpool venue integration in @eco-incorp/sauce/svm, including whirlpoolSqrtPriceAtTick, CREMA_MAX_TICK_INDEX, CREMA_MIN_TICK_INDEX, CROPPER_POOL_ACCOUNT_SIZE, CROPPER_TICK_ARRAY_ACCOUNT_SIZE, windowStartTicks.

Solana venue integration `orca-whirlpool` under `svm/venues/orca-whirlpool`.

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

### `whirlpoolSqrtPriceAtTick`

*Function* · `sdk/dist/svm/venues/orca-whirlpool/tick-math.d.ts`

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

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

### `CREMA_MAX_TICK_INDEX`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/tick-math.d.ts`

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

### `CREMA_MIN_TICK_INDEX`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/tick-math.d.ts`

Orca Whirlpools tick math - exact transcription of
programs/whirlpool/src/math/tick\_math.rs sqrt\_price\_from\_tick\_index:
positive ticks accumulate in Q96 with (r*C) >> 96 steps and a final >> 32,
negative ticks accumulate in Q64 with (r*C) >> 64 steps. Verified against
the source's own pinned bit-value test table (see the unit suite).

Shared by fetchPoolConfig (deriving the shipped boundary sqrt prices), the
ladder mirror and the test fixtures. sqrt\_price\_from\_tick\_index is a pure
function of the tick, which is why a prepare-shipped sqrt price is exact
by construction - the engine-side fragment never recomputes it (an in-VM
bit ladder costs \~54k CU per call on the interpreter).

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

### `CROPPER_POOL_ACCOUNT_SIZE`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
WHIRLPOOL_ACCOUNT_SIZE = 653
```

### `CROPPER_TICK_ARRAY_ACCOUNT_SIZE`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
TICK_ARRAY_ACCOUNT_SIZE = 9988
```

### `windowStartTicks`

*Function* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

The program's expected window start indexes for a direction
(sparse\_swap.rs get\_start\_tick\_indexes), unfiltered: exactly three,
including any outside the initializable range (those PDAs never exist and
stay beyond `readable`).

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

### `fetchOrcaWhirlpoolConfig`

*Function* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

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

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

### `ORCA_WHIRLPOOL_PROGRAM_ID`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
ORCA_WHIRLPOOL_PROGRAM_ID: Address<"whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc">
```

### `WHIRLPOOL_ACCOUNT_SIZE`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
WHIRLPOOL_ACCOUNT_SIZE = 653
```

### `TICK_ARRAY_ACCOUNT_SIZE`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
TICK_ARRAY_ACCOUNT_SIZE = 9988
```

### `WHIRLPOOL_DISCRIMINATOR`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

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

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

### `TICK_ARRAY_DISCRIMINATOR`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

sha256('account:TickArray')\[0..8] - the FIXED tick array (the only readable kind).

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

### `TICK_ARRAY_SIZE`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
TICK_ARRAY_SIZE = 88
```

### `MAX_TICK_INDEX`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/tick-math.d.ts`

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

### `MIN_TICK_INDEX`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/tick-math.d.ts`

Orca Whirlpools tick math - exact transcription of
programs/whirlpool/src/math/tick\_math.rs sqrt\_price\_from\_tick\_index:
positive ticks accumulate in Q96 with (r*C) >> 96 steps and a final >> 32,
negative ticks accumulate in Q64 with (r*C) >> 64 steps. Verified against
the source's own pinned bit-value test table (see the unit suite).

Shared by fetchPoolConfig (deriving the shipped boundary sqrt prices), the
ladder mirror and the test fixtures. sqrt\_price\_from\_tick\_index is a pure
function of the tick, which is why a prepare-shipped sqrt price is exact
by construction - the engine-side fragment never recomputes it (an in-VM
bit ladder costs \~54k CU per call on the interpreter).

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

### `WHIRLPOOL_MAX_BOUNDARIES`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

Shipped initialized-tick boundaries per direction. Sized against the
engine's measured per-step cost (a crossed boundary is \~45k CU in the
walk); raising it widens per-slot capacity at \~3 cfg words + one walk
iteration apiece and must move in lockstep with the fragment's unrolled
setup (ladder.ts) and the mirror.

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

### `OFF_TICK_SPACING`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
OFF_TICK_SPACING = 41
```

### `OFF_FEE_TIER_INDEX`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
OFF_FEE_TIER_INDEX = 43
```

### `OFF_FEE_RATE`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
OFF_FEE_RATE = 45
```

### `OFF_LIQUIDITY`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
OFF_LIQUIDITY = 49
```

### `OFF_SQRT_PRICE`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
OFF_SQRT_PRICE = 65
```

### `OFF_TICK_CURRENT`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
OFF_TICK_CURRENT = 81
```

### `OFF_TA_START`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

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

### `OFF_TA_TICKS`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
OFF_TA_TICKS = 12
```

### `TICK_LEN`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
TICK_LEN = 113
```

### `OFF_TA_WHIRLPOOL`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
OFF_TA_WHIRLPOOL = 9956
```

### `WhirlpoolBoundary`

*Interface* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

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

### `WhirlpoolWindow`

*Interface* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

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

### `OrcaWhirlpoolPoolConfig`

*Interface* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

```typescript theme={null}
export interface OrcaWhirlpoolPoolConfig extends PoolConfig {
    venue: typeof SLUG;
    direction: "aToB" | "bToA";
    tokenMintA: Address;
    tokenMintB: Address;
    tokenVaultA: Address;
    tokenVaultB: Address;
    oracle: Address;
    tickSpacing: number;
    feeRate: number;
    liquidity: bigint;
    sqrtPrice: bigint;
    tickCurrentIndex: number;
    windows: {
        aToB: WhirlpoolWindow;
        bToA: WhirlpoolWindow;
    };
}
```

### `orcaWhirlpool`

*Variable* · `sdk/dist/svm/venues/orca-whirlpool/index.d.ts`

Family facade for the recipe orchestrator (this venue is ladder-only - it
has no v1 SvmVenueAdapter and is not in the v1 registry).

```typescript theme={null}
orcaWhirlpool: {
    slug: string;
    programId: Address<"whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc">;
    tokenProgram: Address<"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA">;
    fetchPoolConfig: typeof fetchOrcaWhirlpoolConfig;
}
```
