goonfi-v2 under svm/venues/goonfi-v2.
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.denomAdjustedFor
Function · sdk/dist/svm/venues/goonfi-v2/index.d.ts
denomAdjusted = ASSUMED_DENOM * 10^decimalsA / 10^decimalsB - the single scale constant the
live-price formula divides (xToY) or multiplies (yToX) by. Shared between fetchPoolConfig
(threshold baking) and the ladder (the runtime param) so the two can never diverge.
goonfiSwapAccounts
Function · sdk/dist/svm/venues/goonfi-v2/index.d.ts
The 14-account order for GoonFi’s real swap (shared by v1 buildSwap and v2 buildSwapV2) - read
back off a real captured transaction’s own writable/signer flags (not guessed):
0 user(signer,w) · 1 pool(w) · 2 user mintA-ATA(w) · 3 user mintB-ATA(w) · 4 vaultA(w) ·
5 vaultB(w) · 6 mintA · 7 mintB · 8 oracle-relay · 9 GOONFI_GLOBAL_STATE · 10 ix-sysvar ·
11 token program · 12 token program (again) · 13 GOONFI_CONST_ACCOUNT_13.
User ATA order is FIXED (mintA-ATA, mintB-ATA) regardless of direction - only the tag-1 direction
byte decides which side is pulled from vs paid into, exactly like vaultA/vaultB.
GOONFI_V2_PROGRAM_ID
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
GOONFI_GLOBAL_STATE
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
The 719,000-byte account every sampled pool’s swap attaches read-only (account #9) - owned by
the GoonFi program itself, NOT written by swap (confirmed via the real tx’s writable-flags
decode), so it is genuine keeper-maintained state the swap only consults. Its internal layout
is >98% zero-padded and not yet decoded; this adapter does not read it directly (the per-pool
oracle-relay account below carries the live price signal instead).
GOONFI_SWAP_TAG
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
sha256-style single-byte tag observed on all 4 real captured swaps.
GOONFI_OFF_MINT_A
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
GOONFI_OFF_MINT_B
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
GOONFI_OFF_VAULT_A
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
GOONFI_OFF_VAULT_B
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
GOONFI_OFF_ORACLE
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
The per-pool oracle-relay account (swap account #8; see module doc).
OFF_ORACLE_P1
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
OFF_ORACLE_P2
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
OFF_ORACLE_SLOT
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
OFF_ORACLE_DENOM
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
GOONFI_ASSUMED_DENOM
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
The denominator observed on all 4 sampled oracle-relay accounts - a fail-closed assumption:
the live denom is still read and gated against this at cook time (see ladder.ts), so a future
pool with a genuinely different denom self-deactivates instead of silently mispricing.
GoonfiFeeSchedule
Interface · sdk/dist/svm/venues/goonfi-v2/index.d.ts
The empirically-validated fee schedule (ppm, i.e. parts-per-1e6) - see module doc for the
measurement this pins against (tier 5 = 2200 ppm = 22.00 bps, matching a real Jupiter-quoted
10,000 USDC price impact of ~21.8 bps). Read LIVE from the pool’s own bytes (not baked) so a
pool with a genuinely different admin-configured schedule is priced from its own table.
GoonfiV2PoolConfig
Interface · sdk/dist/svm/venues/goonfi-v2/index.d.ts
goonfiV2
Variable · sdk/dist/svm/venues/goonfi-v2/index.d.ts
