perps-jlp, exported from @eco-incorp/sauce/svm.
Generated from the type declarations of @eco-incorp/sauce.
bakedDecimalScale
Function · @eco-incorp/sauce/svm
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.
custodyPda
Function · @eco-incorp/sauce/svm
findProgramAddress(["custody", pool, mint], PERPS_JLP_PROGRAM_ID) - verified against real SOL custody.
transferAuthorityPda
Function · @eco-incorp/sauce/svm
findProgramAddress(["transfer_authority"], PERPS_JLP_PROGRAM_ID) - a program-wide constant.
perpetualsPda
Function · @eco-incorp/sauce/svm
findProgramAddress(["perpetuals"], PERPS_JLP_PROGRAM_ID) - a program-wide constant.
eventAuthorityPda
Function · @eco-incorp/sauce/svm
findProgramAddress(["__event_authority"], PERPS_JLP_PROGRAM_ID) - matches the published constant.
fetchPerpsJlpConfig
Function · @eco-incorp/sauce/svm
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.
PERPS_JLP_PROGRAM_ID
Variable · @eco-incorp/sauce/svm
JLP_POOL_ADDRESS
Variable · @eco-incorp/sauce/svm
The single production JLP pool (name “Pool”, 6 custodies as of 2026-07-31).
SWAP2_DISCRIMINATOR
Variable · @eco-incorp/sauce/svm
sha256(‘global:swap2’)[0..8].
CUSTODY_ACCOUNT_SIZE
Variable · @eco-incorp/sauce/svm
The full occupied Custody struct length (confirmed all-zero padding past this on 6 real mainnet custodies).
DOVES_PRICE_OFFSET
Variable · @eco-incorp/sauce/svm
DOVES_EXPO_OFFSET
Variable · @eco-incorp/sauce/svm
DOVES_TIMESTAMP_OFFSET
Variable · @eco-incorp/sauce/svm
DOVES_FEED_SIZE
Variable · @eco-incorp/sauce/svm
DOVES_MAX_AGE_SEC
Variable · @eco-incorp/sauce/svm
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.
PerpsJlpPoolConfig
Interface · @eco-incorp/sauce/svm
perpsJlp
Variable · @eco-incorp/sauce/svm
The Jupiter Perpetuals venue: swaps between the JLP pool’s custodies at the oracle price.
perpsJlpConfig
Function · @eco-incorp/sauce/svm
ORACLE_PRICE_SCALE
Variable · @eco-incorp/sauce/svm
getSwapPrice’s ORACLE_PRICE_SCALE / ORACLE_EXPONENT_SCALE constants.
