metric, exported from @eco-incorp/sauce/svm.
Generated from the type declarations of @eco-incorp/sauce.
METRIC_PROGRAM_ID
Variable ยท @eco-incorp/sauce/svm
METRIC_ORACLE_PROGRAM_ID
Variable ยท @eco-incorp/sauce/svm
METRIC_OFF_MINT_A
Variable ยท @eco-incorp/sauce/svm
METRIC_OFF_VAULT_A
Variable ยท @eco-incorp/sauce/svm
METRIC_OFF_MINT_B
Variable ยท @eco-incorp/sauce/svm
METRIC_OFF_VAULT_B
Variable ยท @eco-incorp/sauce/svm
METRIC_OFF_ORACLE_CONFIG
Variable ยท @eco-incorp/sauce/svm
METRIC_PRICE_ACCOUNT_OFFSET_IN_ORACLE_CONFIG
Variable ยท @eco-incorp/sauce/svm
Byte offset of the paired price accountโs pubkey inside the oracle config account.
METRIC_SWAP_DISCRIMINATOR
Variable ยท @eco-incorp/sauce/svm
swapโs single-byte discriminator.
METRIC_CAP_DIVISOR
Variable ยท @eco-incorp/sauce/svm
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 ยท @eco-incorp/sauce/svm
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 ยท @eco-incorp/sauce/svm
metricSwapAccounts
Function ยท @eco-incorp/sauce/svm
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 ยท @eco-incorp/sauce/svm
