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

# Pot, fee and price helpers: Pool prices

> Pool prices: the declaration and description of each of the 5 exports of @eco-incorp/sauce.

Root exports for a Pot and for pool prices. `v12PredictPot(owner, salt?, kitchen?)` derives a Pot's address without reading a chain, `potSalt` and `DEFAULT_POT_SALT` give its salt, and `kitchenExecutionFee()` builds the read of the Kitchen's fee per cook. `sqrtPriceX96FromPrice` and `priceFromSqrtPriceX96` convert between a price and a pool's `sqrtPriceX96`.

```typescript theme={null}
import { v12PredictPot, kitchenExecutionFee, sqrtPriceX96FromPrice } from "@eco-incorp/sauce";
```

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

### `MAX_SQRT_PRICE_X96`

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

```typescript theme={null}
MAX_SQRT_PRICE_X96 = 1461446703485210103287273052203988822378723970342n
```

### `MIN_SQRT_PRICE_X96`

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

The bounds a V3 or V4 pool's price is held within: `TickMath.MIN_SQRT_RATIO` and `MAX_SQRT_RATIO`.

```typescript theme={null}
MIN_SQRT_PRICE_X96 = 4295128739n
```

### `priceFromSqrtPriceX96`

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

The price a pool at `sqrtPriceX96` trades at, in quote tokens per one base token as a decimal
string: the inverse of `sqrtPriceX96FromPrice`. Rounded to `fractionDigits` decimal places
(default 18), half up, without trailing zeros.

```typescript theme={null}
export declare function priceFromSqrtPriceX96(sqrtPriceX96: bigint, tokens: PoolPriceTokens, options?: {
    readonly fractionDigits?: number;
}): string;
```

### `sqrtPriceX96FromPrice`

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

The `sqrtPriceX96` of a pool trading at `price` units of the quote token per one base token, in
whole tokens: 2,700 USDC per WETH is `sqrtPriceX96FromPrice("2700", { baseDecimals: 18,
quoteDecimals: 6, baseIsToken0 })`. Rounded down. Throws a `RangeError` for a price a pool cannot
hold, outside \[`MIN_SQRT_PRICE_X96`, `MAX_SQRT_PRICE_X96`).

As a swap's price limit it bounds both directions: selling token0 moves the pool's price down, so
the limit is a floor; selling token1 moves it up, so the limit is a ceiling.

```typescript theme={null}
export declare function sqrtPriceX96FromPrice(price: string | number | bigint, tokens: PoolPriceTokens): bigint;
```

### `PoolPriceTokens`

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

The two tokens a price is quoted in, and which of them is the pool's token0.

```typescript theme={null}
export interface PoolPriceTokens {
    readonly baseDecimals: number;
    readonly quoteDecimals: number;
    readonly baseIsToken0: boolean;
}
```


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