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

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

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

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

### `fetchWoofiConfig`

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

Fetch + gate one WooFi pool. QUOTE-PAIRED ONLY (see file header): exactly
one of the bundle's two sides must equal `quoteTokenMint`, else this is a
genuine base-to-base pair and this adapter throws (not yet wired - a
follow-up, not a permission gate).

```typescript theme={null}
export declare function fetchWoofiConfig(owned: OwnedAccountLoader, pool: Address): Promise<WoofiPoolConfig>;
```

### `woofiSwapAccounts`

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

The 17-account order `Swap` expects (swap.rs, verified against 6 real mainnet transactions).

```typescript theme={null}
export declare function woofiSwapAccounts(c: WoofiPoolConfig, user: SwapUser, make: (ref: string, addr: Address, writable?: boolean) => VenueAccount, refFor?: (role: string) => string): VenueAccount[];
```

### `WOOFI_PROGRAM_ID`

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

```typescript theme={null}
WOOFI_PROGRAM_ID: Address<"WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb">
```

### `WOOFI_SWAP_DISCRIMINATOR`

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

Anchor `sha256("global:swap")[0..8]` - program-independent (same bytes obric-v2/meteora use for their own "swap" ix).

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

### `WOOFI_AMM_POOL_SIZE`

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

```typescript theme={null}
WOOFI_AMM_POOL_SIZE = 617
```

### `WOOFI_WOOPOOL_SIZE`

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

```typescript theme={null}
WOOFI_WOOPOOL_SIZE = 284
```

### `WOOFI_WOORACLE_SIZE`

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

```typescript theme={null}
WOOFI_WOORACLE_SIZE = 363
```

### `WOOFI_PRICE_UPDATE_SIZE`

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

```typescript theme={null}
WOOFI_PRICE_UPDATE_SIZE = 134
```

### `OFF_AMM_WOORACLE_A`

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

```typescript theme={null}
OFF_AMM_WOORACLE_A = 73
```

### `OFF_AMM_WOOPOOL_A`

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

```typescript theme={null}
OFF_AMM_WOOPOOL_A = 105
```

### `OFF_AMM_TOKEN_MINT_A`

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

```typescript theme={null}
OFF_AMM_TOKEN_MINT_A = 201
```

### `OFF_AMM_TOKEN_VAULT_A`

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

```typescript theme={null}
OFF_AMM_TOKEN_VAULT_A = 233
```

### `OFF_AMM_WOORACLE_B`

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

```typescript theme={null}
OFF_AMM_WOORACLE_B = 265
```

### `OFF_AMM_WOOPOOL_B`

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

```typescript theme={null}
OFF_AMM_WOOPOOL_B = 297
```

### `OFF_AMM_TOKEN_MINT_B`

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

```typescript theme={null}
OFF_AMM_TOKEN_MINT_B = 393
```

### `OFF_AMM_TOKEN_VAULT_B`

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

```typescript theme={null}
OFF_AMM_TOKEN_VAULT_B = 425
```

### `OFF_AMM_QUOTE_TOKEN_MINT`

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

```typescript theme={null}
OFF_AMM_QUOTE_TOKEN_MINT = 457
```

### `OFF_ORACLE_WOOCONFIG`

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

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

### `OFF_ORACLE_PRICE_UPDATE`

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

```typescript theme={null}
OFF_ORACLE_PRICE_UPDATE = 136
```

### `OFF_ORACLE_MAXIMUM_AGE`

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

```typescript theme={null}
OFF_ORACLE_MAXIMUM_AGE = 168
```

### `OFF_ORACLE_PRICE_DECIMALS`

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

```typescript theme={null}
OFF_ORACLE_PRICE_DECIMALS = 176
```

### `OFF_ORACLE_QUOTE_DECIMALS`

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

```typescript theme={null}
OFF_ORACLE_QUOTE_DECIMALS = 177
```

### `OFF_ORACLE_UPDATED_AT`

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

```typescript theme={null}
OFF_ORACLE_UPDATED_AT = 179
```

### `OFF_ORACLE_STALE_DURATION`

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

```typescript theme={null}
OFF_ORACLE_STALE_DURATION = 187
```

### `OFF_ORACLE_BOUND`

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

```typescript theme={null}
OFF_ORACLE_BOUND = 195
```

### `OFF_ORACLE_PRICE`

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

```typescript theme={null}
OFF_ORACLE_PRICE = 203
```

### `OFF_ORACLE_COEFF`

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

```typescript theme={null}
OFF_ORACLE_COEFF = 219
```

### `OFF_ORACLE_SPREAD`

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

```typescript theme={null}
OFF_ORACLE_SPREAD = 227
```

### `OFF_ORACLE_RANGE_MIN`

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

```typescript theme={null}
OFF_ORACLE_RANGE_MIN = 235
```

### `OFF_ORACLE_RANGE_MAX`

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

```typescript theme={null}
OFF_ORACLE_RANGE_MAX = 251
```

### `OFF_ORACLE_QUOTE_PRICE_UPDATE`

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

```typescript theme={null}
OFF_ORACLE_QUOTE_PRICE_UPDATE = 331
```

### `OFF_POOL_FEE_RATE`

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

```typescript theme={null}
OFF_POOL_FEE_RATE = 105
```

### `OFF_POOL_MAX_GAMMA`

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

```typescript theme={null}
OFF_POOL_MAX_GAMMA = 107
```

### `OFF_POOL_MAX_NOTIONAL_SWAP`

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

```typescript theme={null}
OFF_POOL_MAX_NOTIONAL_SWAP = 123
```

### `OFF_POOL_CAP_BAL`

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

```typescript theme={null}
OFF_POOL_CAP_BAL = 139
```

### `OFF_POOL_MIN_SWAP_AMOUNT`

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

`min_swap_amount`, a u128 at bytes 155..171 (state/woopool.rs:54). The swap returns `Ok(())` before
any transfer when `from_amount <= min_swap_amount` (instructions/swap.rs:100). There is no separate
"reserve" field inside it: the former `OFF_POOL_RESERVE = 157` was bytes 2..10 of this u128, and the
bisection that "found" it made every swap a no-op (an early success) rather than enabling one.

```typescript theme={null}
OFF_POOL_MIN_SWAP_AMOUNT = 155
```

### `OFF_POOL_UNCLAIMED_FEE`

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

`unclaimed_fee`, a u128 at bytes 171..187 (state/woopool.rs:56). On the QUOTE pool it is subtracted
from the quote vault's balance (`util/token.rs:7-20`); a sellBase whose gross quote exceeds the
remainder reverts `NotEnoughOut`, and a ledger above the vault reverts `ReserveLessThanFee`.

```typescript theme={null}
OFF_POOL_UNCLAIMED_FEE = 171
```

### `OFF_POOL_TOKEN_MINT`

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

```typescript theme={null}
OFF_POOL_TOKEN_MINT = 187
```

### `OFF_POOL_TOKEN_VAULT`

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

```typescript theme={null}
OFF_POOL_TOKEN_VAULT = 219
```

### `OFF_POOL_BASE_DECIMALS`

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

```typescript theme={null}
OFF_POOL_BASE_DECIMALS = 283
```

### `OFF_PYTH_VERIFICATION_TAG`

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

```typescript theme={null}
OFF_PYTH_VERIFICATION_TAG = 40
```

### `OFF_PYTH_PRICE`

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

```typescript theme={null}
OFF_PYTH_PRICE = 73
```

### `OFF_PYTH_EXPONENT`

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

```typescript theme={null}
OFF_PYTH_EXPONENT = 89
```

### `OFF_PYTH_PUBLISH_TIME`

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

```typescript theme={null}
OFF_PYTH_PUBLISH_TIME = 93
```

### `PYTH_VERIFICATION_FULL`

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

```typescript theme={null}
PYTH_VERIFICATION_FULL = 1
```

### `ONE_E18`

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

```typescript theme={null}
ONE_E18 = 1000000000000000000n
```

### `ONE_E5`

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

```typescript theme={null}
ONE_E5 = 100000n
```

### `WoofiPoolConfig`

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

```typescript theme={null}
export interface WoofiPoolConfig extends PoolConfig {
    venue: typeof SLUG;
    direction: "sellBase" | "sellQuote";
    wooconfig: Address;
    wooracleBase: Address;
    woopoolBase: Address;
    tokenMintBase: Address;
    tokenVaultBase: Address;
    priceUpdateBase: Address;
    wooracleQuote: Address;
    woopoolQuote: Address;
    quoteTokenMint: Address;
    quoteTokenVault: Address;
    priceUpdateQuote: Address;
    tokenProgram: Address;
    priceDec: bigint;
    quoteDec: bigint;
    baseDec: bigint;
    coeff: bigint;
    feeRate: bigint;
    maxGamma: bigint;
    maxNotionalSwap: bigint;
    capBal: bigint;
    minSwapAmount: bigint;
    bound: bigint;
    staleDuration: bigint;
    rangeMin: bigint;
    rangeMax: bigint;
    maximumAge: bigint;
    pythQuoteDecPow: bigint;
}
```

### `woofi`

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

```typescript theme={null}
woofi: {
    slug: string;
    programId: Address<"WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb">;
    fetchPoolConfig: typeof fetchWoofiConfig;
    quoteAccounts(cfg: PoolConfig): VenueAccount[];
    buildSwap(cfg: PoolConfig, user: SwapUser, amountIn: bigint): VenueSwap;
}
```


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