Skip to main content
Solana venue integration solfi-v2, exported from @eco-incorp/sauce/svm. Generated from the type declarations of @eco-incorp/sauce.

solfiSwapAccounts

Function ยท @eco-incorp/sauce/svm The 13-account order for SolFi V2โ€™s swap (disc 0x07), shared by v1 buildSwap and v2 buildSwapV2. Decoded from landed simulations, not docs (no IDL/docs exist for this venue): [signer, pool, oracle, registry, vaultA, vaultB, userA, userB, mintA, mintB, TOKEN, TOKEN (slot repeated), instructions sysvar]. userA/userB are POSITIONAL BY MINT, never by direction.

readAccountU64

Function ยท @eco-incorp/sauce/svm Re-exported for the ladder mirror + tests (avoids a second copy of the offset table).

SOLFI_V2_PROGRAM_ID

Variable ยท @eco-incorp/sauce/svm

OFF_ORACLE

Variable ยท @eco-incorp/sauce/svm

OFF_MINT_A

Variable ยท @eco-incorp/sauce/svm

OFF_MINT_B

Variable ยท @eco-incorp/sauce/svm

OFF_VAULT_A

Variable ยท @eco-incorp/sauce/svm

OFF_VAULT_B

Variable ยท @eco-incorp/sauce/svm

OFF_REGISTRY

Variable ยท @eco-incorp/sauce/svm

CFG

Variable ยท @eco-incorp/sauce/svm

OFF_SPLINE_D1

Variable ยท @eco-incorp/sauce/svm Four splines, stride 0x88 from CFG; d0/d1 select by TRADE DIRECTION (not stride order).

OFF_SPLINE_D0

Variable ยท @eco-incorp/sauce/svm

OFF_SPLINE_AGE

Variable ยท @eco-incorp/sauce/svm

OFF_SPLINE_SF

Variable ยท @eco-incorp/sauce/svm

OFF_CACHED_TS

Variable ยท @eco-incorp/sauce/svm

OFF_SPREAD_DIR1

Variable ยท @eco-incorp/sauce/svm

OFF_SPREAD_DIR0

Variable ยท @eco-incorp/sauce/svm

OFF_THRESHOLD

Variable ยท @eco-incorp/sauce/svm

OFF_SKEW_NUM

Variable ยท @eco-incorp/sauce/svm

OFF_SKEW_DEN

Variable ยท @eco-incorp/sauce/svm

OFF_SKEW_HI

Variable ยท @eco-incorp/sauce/svm

OFF_SKEW_LO_MAG

Variable ยท @eco-incorp/sauce/svm

OFF_DECAY_PPM

Variable ยท @eco-incorp/sauce/svm

OFF_LAST_SWAP_SLOT

Variable ยท @eco-incorp/sauce/svm

OFF_FEE_SCALE

Variable ยท @eco-incorp/sauce/svm

SPLINE_X_STRIDE

Variable ยท @eco-incorp/sauce/svm Spline struct: x[0..7] u64 @+0x00, y[0..7] u64 @+0x40, len u64 @+0x80. 136 bytes.

SPLINE_Y_STRIDE

Variable ยท @eco-incorp/sauce/svm

SPLINE_LEN_STRIDE

Variable ยท @eco-incorp/sauce/svm

SPLINE_SIZE

Variable ยท @eco-incorp/sauce/svm

ORACLE_OFF_EXP

Variable ยท @eco-incorp/sauce/svm

ORACLE_OFF_MAN

Variable ยท @eco-incorp/sauce/svm

ORACLE_OFF_SLOT

Variable ยท @eco-incorp/sauce/svm

ORACLE_OFF_TS

Variable ยท @eco-incorp/sauce/svm

ORACLE_OFF_CONF

Variable ยท @eco-incorp/sauce/svm

ORACLE_OFF_EXPIRY_SLOT

Variable ยท @eco-incorp/sauce/svm

ORACLE_OFF_FEE_WORD

Variable ยท @eco-incorp/sauce/svm

ORACLE_KEY_WORDS

Variable ยท @eco-incorp/sauce/svm 168-byte XOR keystream (21 u64 words), recovered from fn 0x26328 (0x26380-0x264a8 stores it as 21 immediates; XOR loop at 0x264c0-0x26518). Word i covers plaintext bytes [8i, 8i+8). Only the words this adapter actually reads are listed; word 3 (bytes 24..31, the ms timestamp) is literally 0 - that field is plaintext in the raw account.

POOL_K

Variable ยท @eco-incorp/sauce/svm The one un-derived additive constant (units of 1e-7 impact), keyed by POOL. FIXED (2026-07): this table used to be keyed by REGISTRY, not pool, on the false premise that every pool sharing a registry shares its K. It does not: registry QoFvFhDZg9TaZEi4SsasWpH5xXzk3zBqfRyicGexfNQ alone carries at least two pools with DIFFERENT, independently-fitted K (K in [0, 12000] bisected against drift-free bursts) - FkEB6uvyzuoaGpgs4yRtFtxC4WJxhejNFbUkj5R6wR32 (USDT/USDC) needs K=0, 2Q6S8p9iZNzMvpTemiC56HqCJ3F3szNoyRkvqEKfCanY needs K=5832 - and the old registry-keyed table quoted BOTH with 5832, so the USDT pool was systematically wrong by 5832 units of 1e-7 impact (5.832 bps), understating the true impact and so OVER-quoting the output by that amount on every trade - not the โ€<=1 unit, always-safeโ€ residual the old comment claimed (that claim was true of ONE pool, 65ZHSArsโ€ฆ, and was written as if venue-wide). fetchPoolConfig read the registry key blindly, admitting all ~18 pools on that registry with an unverified, borrowed K. Fixed: keyed by POOL. A pool whose K has not been independently verified throws at fetchPoolConfig instead of borrowing its registry-mateโ€™s value - REFUSE, donโ€™t guess (see fetchPoolConfig below). Each entry below is verified wei-exact against fresh mainnet simulateTransaction calls at that SPECIFIC pool.

SolfiV2PoolConfig

Interface ยท @eco-incorp/sauce/svm

solfiV2

Variable ยท @eco-incorp/sauce/svm