> ## 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: meteora-dlmm

> The meteora-dlmm Solana venue: the declaration and description of each of the 16 exports of @eco-incorp/sauce/svm.

> [!NOTE]
>
> Archived documentation for `@eco-incorp/sauce@0.99.16`. Install this release with `npm install --save-exact @eco-incorp/sauce@0.99.16`. Links to guides outside this tab open current documentation.

Solana venue integration `meteora-dlmm`, exported from `@eco-incorp/sauce/svm`.

Generated from the type declarations of `@eco-incorp/sauce`.

### `meteoraDlmm`

*Variable* · `@eco-incorp/sauce/svm`

The Meteora DLMM venue: a liquidity book of discrete price bins.

```typescript theme={null}
meteoraDlmm: {
    slug: string;
    programId: Address<"LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo">;
    tokenProgram: Address<"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA">;
    fetchPoolConfig: typeof fetchMeteoraDlmmConfig;
    fetchPoolConfigBytes: typeof fetchMeteoraDlmmConfigBytes;
}
```

### `fetchMeteoraDlmmConfig`

*Function* · `@eco-incorp/sauce/svm`

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

```typescript theme={null}
export declare function fetchMeteoraDlmmConfig(load: AccountLoader, pair: Address): Promise<MeteoraDlmmPoolConfig>;
```

### `fetchMeteoraDlmmConfigBytes`

*Function* · `@eco-incorp/sauce/svm`

Fetch from a 32-byte pair key, reusing its bytes for every bin-array and bitmap PDA seed.

```typescript theme={null}
export declare function fetchMeteoraDlmmConfigBytes(load: AccountLoader, pair: Uint8Array): Promise<MeteoraDlmmPoolConfig>;
```

### `METEORA_DLMM_PROGRAM_ID`

*Variable* · `@eco-incorp/sauce/svm`

```typescript theme={null}
METEORA_DLMM_PROGRAM_ID: Address<"LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo">
```

### `METEORA_DLMM_MAX_BINS`

*Variable* · `@eco-incorp/sauce/svm`

Shipped liquid bins per direction.

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

### `LB_PAIR_DISCRIMINATOR`

*Variable* · `@eco-incorp/sauce/svm`

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

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

### `BIN_ARRAY_DISCRIMINATOR`

*Variable* · `@eco-incorp/sauce/svm`

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

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

### `meteoraDlmmWindowArrayIndexes`

*Function* · `@eco-incorp/sauce/svm`

The three bin-array indexes the walk touches: the active array then two more in the walk direction.

```typescript theme={null}
export declare function meteoraDlmmWindowArrayIndexes(activeId: number, swapForY: boolean): [
    number,
    number,
    number
];
```

### `MeteoraDlmmPoolConfig`

*Interface* · `@eco-incorp/sauce/svm`

```typescript theme={null}
export interface MeteoraDlmmPoolConfig extends PoolConfig {
    venue: typeof SLUG;
    direction: "xToY" | "yToX";
    tokenXMint: Address;
    tokenYMint: Address;
    reserveX: Address;
    reserveY: Address;
    oracle: Address;
    bitmapExtension: Address;
    bitmapExtensionExists: boolean;
    binStep: number;
    activeId: number;
    baseFactor: number;
    baseFeePowerFactor: number;
    variableFeeControl: number;
    maxVolatilityAccumulator: number;
    reductionFactor: number;
    filterPeriod: number;
    decayPeriod: number;
    collectFeeMode: number;
    windows: {
        xToY: DlmmWindow;
        yToX: DlmmWindow;
    };
}
```

### `DlmmWindow`

*Interface* · `@eco-incorp/sauce/svm`

```typescript theme={null}
export interface DlmmWindow {
    binArrays: [
        Address,
        Address,
        Address
    ];
    arrayIndexes: [
        number,
        number,
        number
    ];
    bins: DlmmBin[];
    readable: number;
}
```

### `DlmmBin`

*Interface* · `@eco-incorp/sauce/svm`

```typescript theme={null}
export interface DlmmBin {
    arrayIndex: number;
    offset: number;
    binId: number;
    price: bigint;
}
```

### `dlmmPriceFromId`

*Function* · `@eco-incorp/sauce/svm`

get\_price\_from\_id(bin\_id, bin\_step): (1 + bin\_step/1e4)^bin\_id in Q64.64.

```typescript theme={null}
export declare function dlmmPriceFromId(binId: number, binStep: number): bigint;
```

### `dlmmPow`

*Function* · `@eco-incorp/sauce/svm`

pow(base, exp) in Q64.64 - the u64x64\_math.rs binary-exponentiation with
per-step `>> 64`, the reciprocal trick for base >= ONE, and the final invert
for negative exponents. Returns null on the venue's overflow/exp-cap aborts.

```typescript theme={null}
export declare function dlmmPow(base: bigint, exp: number): bigint | null;
```

### `dlmmAmountOut`

*Function* · `@eco-incorp/sauce/svm`

get\_amount\_out(amount\_in, price, swap\_for\_y, rounding).

```typescript theme={null}
export declare function dlmmAmountOut(amountIn: bigint, price: bigint, swapForY: boolean, rounding: Rounding): bigint;
```

### `dlmmAmountIn`

*Function* · `@eco-incorp/sauce/svm`

get\_amount\_in(amount\_out, price, swap\_for\_y, rounding).

```typescript theme={null}
export declare function dlmmAmountIn(amountOutValue: bigint, price: bigint, swapForY: boolean, rounding: Rounding): bigint;
```

### `dlmmBinArrayIndex`

*Function* · `@eco-incorp/sauce/svm`

floor(bin\_id / 70) - the bin array index (toward negative infinity).

```typescript theme={null}
export declare function dlmmBinArrayIndex(binId: number): number;
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.