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

> 7 exports of the moonit venue integration in @eco-incorp/sauce/svm, including MOONIT_PROGRAM_ID, moonit, _referenceBuyForTest, _referenceSellForTest, _bakeCoefficientsForTest, _isqrtForTest.

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

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

### `MOONIT_PROGRAM_ID`

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

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

### `moonit`

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

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

### `_referenceBuyForTest`

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

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 referenceBuy(y: bigint, m: bigint, aw: bigint, bw: bigint, td: bigint, feeBps: bigint, curveAmount: bigint): bigint;
```

### `_referenceSellForTest`

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

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 referenceSell(x: bigint, m: bigint, aw: bigint, bw: bigint, td: bigint, feeBps: bigint): bigint;
```

### `_bakeCoefficientsForTest`

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

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 bakeCoefficients(totalSupplyRaw: bigint, coefBRaw: bigint, marketcapThresholdRaw: bigint, decimals: bigint): {
    awHi: bigint;
    awLo: bigint;
    bwFixed: bigint;
    tdScale: bigint;
};
```

### `_isqrtForTest`

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

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

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

### `MoonitPoolConfig`

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

```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;
}
```
