Skip to main content
Solana venue integration metric under svm/venues/metric.
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.

METRIC_PROGRAM_ID

Variable · sdk/dist/svm/venues/metric/index.d.ts

METRIC_ORACLE_PROGRAM_ID

Variable · sdk/dist/svm/venues/metric/index.d.ts

METRIC_OFF_MINT_A

Variable · sdk/dist/svm/venues/metric/index.d.ts

METRIC_OFF_VAULT_A

Variable · sdk/dist/svm/venues/metric/index.d.ts

METRIC_OFF_MINT_B

Variable · sdk/dist/svm/venues/metric/index.d.ts

METRIC_OFF_VAULT_B

Variable · sdk/dist/svm/venues/metric/index.d.ts

METRIC_OFF_ORACLE_CONFIG

Variable · sdk/dist/svm/venues/metric/index.d.ts

METRIC_PRICE_ACCOUNT_OFFSET_IN_ORACLE_CONFIG

Variable · sdk/dist/svm/venues/metric/index.d.ts Byte offset of the paired price account’s pubkey inside the oracle config account.

METRIC_SWAP_DISCRIMINATOR

Variable · sdk/dist/svm/venues/metric/index.d.ts swap’s single-byte discriminator.

METRIC_CAP_DIVISOR

Variable · sdk/dist/svm/venues/metric/index.d.ts Conservative quotable-capacity divisor (see module doc) - the ladder never quotes more than liveReserveOut / CAP_DIVISOR output. Mirrors zerofi’s own CAP_DIVISOR precedent and rationale: the venue’s real depth model (the pool’s own variable-length bin tail) is unrecovered, so an unbounded flat-price quote would be unsafe; this is a deliberately conservative substitute, not a measured true capacity.

metricScaleParams

Function · sdk/dist/svm/venues/metric/index.d.ts Fold a Q64.64 price (quote-per-base atoms-agnostic) plus the two mints’ decimals into a gcd-reduced (num, den) atoms-to-atoms scale: outAtoms = inAtoms * num / den. reciprocal computes the OTHER direction’s scale from the SAME price (division, not a second baked value) - mirrors zerofi’s ieee754ScaleParams direction-flip (swap num<->den AND which side carries the decimals adjustment). A METRIC_QUOTE_HAIRCUT_PPM haircut is folded in (num scaled down by (1e6 - haircut)/1e6) so the result is a lower bound on the realized fill - see that constant’s doc for the measurement that sized it. The haircut rides in the exact (num, den) pair, so referenceQuote stays lamport- exact against the SAME params the emitted fragment uses.

metric

Variable · sdk/dist/svm/venues/metric/index.d.ts

metricSwapAccounts

Function · sdk/dist/svm/venues/metric/index.d.ts The 15-account order for Metric’s swap (disc 0x01) - see module doc. userAtaA/userAtaB ride FIXED slots 6/7 regardless of direction (always mintA’s / mintB’s side respectively); the direction BYTE in the instruction data (not account order) tells the program which way to move value.

MetricPoolConfig

Interface · sdk/dist/svm/venues/metric/index.d.ts