> ## 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: perps-jlp

> 19 exports of the perps-jlp venue integration in @eco-incorp/sauce/svm, including bakedDecimalScale, custodyPda, transferAuthorityPda, perpetualsPda, eventAuthorityPda, fetchPerpsJlpConfig.

Solana venue integration `perps-jlp` under `svm/venues/perps-jlp`.

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

### `bakedDecimalScale`

*Function* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

Baked scale for `floor(c1 * c2 * 10^(e1+e2-te))` - the shared shape of
every `checkedDecimalMul(c1, e1, c2, e2, te)` call this venue's math uses
(both the exchange-rate conversion and every USD conversion). Because
decimals/exponents are all baked (governance/feed constants), the SIGN of
`targetPower` is known off-chain, so the fragment never needs a runtime
branch: exactly one of `scaleUp`/`scaleDown` is ever != 1, so
`floor(c1 * c2 * scaleUp / scaleDown)` reproduces the reference's two-way
branch with ONE unconditional expression.

```typescript theme={null}
export declare function bakedDecimalScale(e1: number, e2: number, targetExponent: number): {
    scaleUp: bigint;
    scaleDown: bigint;
};
```

### `custodyPda`

*Function* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

`findProgramAddress(["custody", pool, mint], PERPS_JLP_PROGRAM_ID)` - verified against real SOL custody.

```typescript theme={null}
export declare function custodyPda(pool: Address, mint: Address): Promise<Address>;
```

### `transferAuthorityPda`

*Function* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

`findProgramAddress(["transfer_authority"], PERPS_JLP_PROGRAM_ID)` - cached (program-wide constant).

```typescript theme={null}
export declare function transferAuthorityPda(): Promise<Address>;
```

### `perpetualsPda`

*Function* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

`findProgramAddress(["perpetuals"], PERPS_JLP_PROGRAM_ID)` - cached (program-wide constant).

```typescript theme={null}
export declare function perpetualsPda(): Promise<Address>;
```

### `eventAuthorityPda`

*Function* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

`findProgramAddress(["__event_authority"], PERPS_JLP_PROGRAM_ID)` - matches the published constant.

```typescript theme={null}
export declare function eventAuthorityPda(): Promise<Address>;
```

### `fetchPerpsJlpConfig`

*Function* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

`custodyIn` is the account to decode DIRECTLY (its `mint` field IS mintIn - self-discovered, never taken on faith from a caller) - the address-source
derives it deterministically from `pair.inMint` (see ladder discovery
wiring), so this function never needs the input mint as a separate
argument. `mintOut` is the ONE piece of information genuinely external:
a basket has no single account embedding both sides, so SOMETHING must
name which of the OTHER custodies this trade targets. Both this function's
callers (the discovery resolver and the pre-codegen re-fetch) have it - the former from the requested pair directly, the latter from the spec's
own `direction` string (this family stores `mintOut`'s base58 there, see
the consuming app SVM solver entry's FAMILIES entry) - so `fetchPoolConfig` never needs
a signature wider than every other family's `(load, pool)` PLUS this one
extra, always-a-plain-string `direction` parameter already threads through
both call sites unchanged.

```typescript theme={null}
export declare function fetchPerpsJlpConfig(load: AccountLoader, custodyIn: Address, mintOut: Address, now?: bigint): Promise<PerpsJlpPoolConfig>;
```

### `PERPS_JLP_PROGRAM_ID`

*Variable* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

```typescript theme={null}
PERPS_JLP_PROGRAM_ID: Address<"PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu">
```

### `JLP_POOL_ADDRESS`

*Variable* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

The single production JLP pool (name "Pool", 6 custodies as of 2026-07-31).

```typescript theme={null}
JLP_POOL_ADDRESS: Address<"5BUwFW4nRbftYTDMbgxykoFWqWHPzahFSNAaaaJtVKsq">
```

### `SWAP2_DISCRIMINATOR`

*Variable* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

sha256('global:swap2')\[0..8].

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

### `CUSTODY_ACCOUNT_SIZE`

*Variable* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

The full occupied Custody struct length (confirmed all-zero padding past this on 6 real mainnet custodies).

```typescript theme={null}
CUSTODY_ACCOUNT_SIZE = 1117
```

### `DOVES_PRICE_OFFSET`

*Variable* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

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

### `DOVES_EXPO_OFFSET`

*Variable* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

```typescript theme={null}
DOVES_EXPO_OFFSET = 81
```

### `DOVES_TIMESTAMP_OFFSET`

*Variable* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

```typescript theme={null}
DOVES_TIMESTAMP_OFFSET = 82
```

### `DOVES_FEED_SIZE`

*Variable* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

```typescript theme={null}
DOVES_FEED_SIZE = 91
```

### `DOVES_MAX_AGE_SEC`

*Variable* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

A "the feed is dead, not just latent" sanity ceiling (seconds) - the
real on-chain custody enforces its OWN much tighter `oracle.maxPriceAgeSec`
(observed 5s on the real mainnet SOL/USDC custodies 2026-07-31) at swap2
execution time; that live, on-chain check is the authoritative freshness
backstop and reverts the whole cook for this slot if violated, exactly
like every other venue's runtime-failure self-drop. Trying to replicate a
5s bound OFF-CHAIN at prepare time would self-drop this venue almost
unconditionally (any nonzero prepare-to-cook latency exceeds it) - a
"NO PREMATURE GATING" violation, not a safety measure. This constant only
catches a feed that has stopped updating entirely (an abandoned/broken
Doves keeper), not ordinary staleness.

```typescript theme={null}
DOVES_MAX_AGE_SEC = 3600n
```

### `PerpsJlpPoolConfig`

*Interface* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

```typescript theme={null}
export interface PerpsJlpPoolConfig extends PoolConfig {
    venue: typeof SLUG;
    pool: Address;
    mintIn: Address;
    mintOut: Address;
    custodyIn: Address;
    custodyOut: Address;
    tokenAccountIn: Address;
    tokenAccountOut: Address;
    dovesOracleIn: Address;
    dovesOracleOut: Address;
    pythAccountIn: Address;
    pythAccountOut: Address;
    tokenProgram: Address;
    transferAuthority: Address;
    perpetuals: Address;
    eventAuthority: Address;
    decimalsIn: number;
    decimalsOut: number;
    fxScaleUp: bigint;
    fxScaleDown: bigint;
    usdScaleUpIn: bigint;
    usdScaleDownIn: bigint;
    usdScaleUpOut: bigint;
    usdScaleDownOut: bigint;
    isStableIn: boolean;
    isStableOut: boolean;
    targetRatioBpsIn: bigint;
    targetRatioBpsOut: bigint;
    baseFeeBps: bigint;
    taxFeeBps: bigint;
    multiplier: bigint;
    externalMultiplierBps: bigint;
    poolAumUsdOffset: bigint;
    poolFeesOffset: bigint;
}
```

### `perpsJlp`

*Variable* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

Family facade for the recipe orchestrator (ladder-only - not in the v1 registry; see quantum/solfi-v2).

```typescript theme={null}
perpsJlp: {
    slug: string;
    programId: Address<"PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu">;
    tokenProgram: Address<"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA">;
    fetchPoolConfig: typeof fetchPerpsJlpConfig;
}
```

### `perpsJlpConfig`

*Function* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

```typescript theme={null}
declare function perpsJlpConfig(cfg: PoolConfig): PerpsJlpPoolConfig;
```

### `ORACLE_PRICE_SCALE`

*Variable* · `sdk/dist/svm/venues/perps-jlp/index.d.ts`

`getSwapPrice`'s ORACLE\_PRICE\_SCALE / ORACLE\_EXPONENT\_SCALE constants.

```typescript theme={null}
ORACLE_PRICE_SCALE = 1000000000n
```
