> ## 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: spl-token-swap-forks

> The spl-token-swap-forks Solana venue: the declaration and description of each of the 15 exports of @eco-incorp/sauce/svm.

Solana venue integration `spl-token-swap-forks`, exported from `@eco-incorp/sauce/svm`.

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

### `TOKEN_SWAP_V1_PROGRAM_ID`

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

Token Swap - the original solana-labs/solana-program-library deployment.

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

### `tokenSwapV1`

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

```typescript theme={null}
tokenSwapV1: SplTokenSwapForkAdapter
```

### `DEXLAB_PROGRAM_ID`

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

DexLab - GATED (see `unresolvedGate` above): a real-CPI probe against the
live mainnet binary (a real SOL/USDC pool, `4KizLX56YSbTtc8NJQWDBz3iiwSTpJRHFUXAvB4v6MM3`,
dumped 2026-07-31) shows the deployed `Swap` instruction reads MORE than
the standard spl-token-swap 10 (or 11, with the optional host-fee account)
accounts - it still fails `NotEnoughAccountKeys` with 10 or 11 provided,
and only clears that check at 14 (10 + 4 arbitrary dummy reads), at which
point it fails a DIFFERENT (custom code 24) check - meaning DexLab's fork
genuinely extends the account list with something this repo hasn't
identified (no public source was available to cross-reference). Gated
rather than guessed at: a wrong account list here would revert every
dexlab cook in production, and DexLab is otherwise the single
deepest-liquidity fork of the six (2,097 live constant-product pools).

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

### `dexlab`

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

```typescript theme={null}
dexlab: SplTokenSwapForkAdapter
```

### `SAROS_PROGRAM_ID`

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

The program id of Saros's AMM, a fork of SPL Token Swap. The `saros` adapter quotes it with the fork formula's stored trade and owner fee rates (30 bps on the pool measured), while the program charged about 4 bps: on the 14 trades sampled, the quote never exceeded the output the swap delivered.

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

### `saros`

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

```typescript theme={null}
saros: SplTokenSwapForkAdapter
```

### `ORCA_V1_PROGRAM_ID`

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

Orca V1 - the ORIGINAL Orca token-swap deployment, a DIFFERENT program from
the already-wired `orca-legacy-token-swap` ("Orca V2",
`9W959DqEETiGZocYWCQPaJ6sBmUzgfxXfqGeTEdp3aQP`). Confirmed distinct live
(routePlan ammKey `6fTRDD7sYxCN7oyoSQaN1AWC3P2m8A6gVZzGrpej9DvL`, owner
`DjVE6JNiYqPL2QXyCUUh8rNjHrbz9hXHNYt99MQ59qw1`).

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

### `orcaV1`

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

```typescript theme={null}
orcaV1: SplTokenSwapForkAdapter
```

### `PENGUIN_PROGRAM_ID`

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

Penguin.

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

### `penguin`

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

```typescript theme={null}
penguin: SplTokenSwapForkAdapter
```

### `STEPN_PROGRAM_ID`

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

StepN (Dooar).

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

### `stepn`

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

```typescript theme={null}
stepn: SplTokenSwapForkAdapter
```

### `makeSplTokenSwapForkAdapter`

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

One adapter per deployed spl-token-swap fork - SAME math/layout as
orca-legacy-token-swap (see module header), parameterized only by the
fork's own program id (the CPI target AND the swap-authority PDA domain).

`unresolvedGate`, when passed, makes `fetchPoolConfig` throw UNCONDITIONALLY
for every pool of this family (naming the reason) - the SAME mechanism
`orca-legacy-token-swap` uses to keep its stable-curve pools out of the
electable universe (see that adapter's `curve_type` check), just applied to
the WHOLE family instead of a per-pool byte. `resolveSvmPoolSpec` catches
any `fetchPoolConfig` throw and drops the candidate - one venue's gate
never breaks discovery or any other family, and (critically) it means the
family is WIRED (program id, discovery filter, CU entry all present and
exercised) while being STRUCTURALLY UNABLE to enter a cook until the gate
is lifted, so there is zero production revert/mispricing risk from an
unresolved integration question.

```typescript theme={null}
export declare function makeSplTokenSwapForkAdapter(slug: string, programId: Address, unresolvedGate?: string): SplTokenSwapForkAdapter;
```

### `SplTokenSwapForkPoolConfig`

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

```typescript theme={null}
export interface SplTokenSwapForkPoolConfig extends PoolConfig {
    swapAuthority: Address;
    tokenProgram: Address;
    vaultIn: Address;
    vaultOut: Address;
    poolMint: Address;
    poolFeeAccount: Address;
    inputMint: Address;
    outputMint: Address;
    tradeFeeNumerator: bigint;
    tradeFeeDenominator: bigint;
    ownerTradeFeeNumerator: bigint;
    ownerTradeFeeDenominator: bigint;
    bumpSeed: number;
}
```

### `SplTokenSwapForkAdapter`

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

```typescript theme={null}
export interface SplTokenSwapForkAdapter {
    slug: string;
    kind: "constant-product";
    programId: Address;
    fetchPoolConfig(owned: OwnedAccountLoader, pool: Address): Promise<SplTokenSwapForkPoolConfig>;
    quoteAccounts(cfg: SplTokenSwapForkPoolConfig): VenueAccount[];
    emitQuote(cfg: SplTokenSwapForkPoolConfig, i: number, amountIn: bigint): string;
    buildSwap(cfg: SplTokenSwapForkPoolConfig, user: SwapUser, amountIn: bigint): VenueSwap;
    referenceQuote(cfg: SplTokenSwapForkPoolConfig, state: AccountBytesMap, amountIn: bigint, _now: bigint): bigint;
}
```


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