> ## 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: moonit

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

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

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

### `MOONIT_PROGRAM_ID`

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

```typescript theme={null}
MOONIT_PROGRAM_ID: Address
```

### `moonit`

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

```typescript theme={null}
moonit: {
    slug: "moonit";
    programId: Address;
    fetchPoolConfig(owned: OwnedAccountLoader, pool: Address): Promise<MoonitPoolConfig>;
}
```

### `_referenceBuyForTest`

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

BUY: exact gross collateral `y` in (fee taken off the input) -> tokens out, capped at the curve's live inventory.

```typescript theme={null}
declare function _referenceBuyForTest(y: bigint, m: bigint, aw: bigint, bw: bigint, td: bigint, feeBps: bigint, curveAmount: bigint): bigint;
```

### `_referenceSellForTest`

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

SELL: exact tokens `x` in (fee taken off the output) -> collateral out. Saturates at the live sold position (never over-sells).

```typescript theme={null}
declare function _referenceSellForTest(x: bigint, m: bigint, aw: bigint, bw: bigint, td: bigint, feeBps: bigint): bigint;
```

### `_bakeCoefficientsForTest`

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

Derive coefA/coefB's fixed-point bakes from the CurveAccount's static fields (exact bigint, no rounding until the single final step).

```typescript theme={null}
declare function _bakeCoefficientsForTest(totalSupplyRaw: bigint, coefBRaw: bigint, marketcapThresholdRaw: bigint, decimals: bigint): {
    awHi: bigint;
    awLo: bigint;
    bwFixed: bigint;
    tdScale: bigint;
};
```

### `_isqrtForTest`

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

Floor integer square root (mirrors the engine's SQRT op - same algorithm as obric-v2's isqrt).

```typescript theme={null}
declare function _isqrtForTest(value: bigint): bigint;
```

### `MoonitPoolConfig`

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

```typescript theme={null}
export interface MoonitPoolConfig extends PoolConfig {
    venue: typeof SLUG;
    direction: "quoteToBase" | "baseToQuote";
    mint: Address;
    curveTokenAccount: Address;
    dexFee: Address;
    helioFee: Address;
    awHi: bigint;
    awLo: bigint;
    bwFixed: bigint;
    tdScale: bigint;
    feeBps: bigint;
}
```


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