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

conservativeFeePpm

Function ยท @eco-incorp/sauce/svm Bakes ONE conservative fee-ppm constant from a fetch-time snapshot of the instrumentโ€™s fee inputs. ZeroFees (mask bit 0x1) is a protocol invariant that zeros BOTH the AMM fee_rate and the protocol swap_fee_rate (lib.rsโ€™s quote(), both branches check it first) - trusted exactly, no margin. Otherwise: FixedFees (0x2) uses the admin-set static fixed_fee_rate; the default case uses the DYNAMIC day_volatility * spot_fee_rate * FEE_RATE_STEP, which can drift between this snapshot and the eventual cook (it is a live, per-trade-recalculated statistic, not frozen). Either way the raw ppm is DOUBLED plus a flat +20ppm floor: the margin absorbs (a) day_volatility drift and (b) the deployed binaryโ€™s protocol-level swap_fee_rate (currently the constant 0 in the drv-models crate, but not independently re-derivable from account state, and a bigger assumed fee only ever LOWERS the predicted output - the safe direction; assuming it stays 0 is the unsafe one). This is the ONLY fee derivation this adapter does off-chain; the ladder never reads day_volatility/fixed_fee_rate live.

deriverseSwapAccounts

Function ยท @eco-incorp/sauce/svm The 14-account order for Deriverseโ€™s Swap (disc 26 - SwapInstruction:: MIN_ACCOUNTS), shared by v1 buildSwap and v2 buildSwapV2: [signer, asset mint, crncy mint, asset vault, crncy vault, instrument, {asks_tree, ask_orders} on buy / {bids_tree, bid_orders} on sell, lines, maps, client infos, asset-side user ATA, crncy-side user ATA, token program]. User ATAs are POSITIONAL BY MINT (asset vs crncy), not by direction - the same trap documented on solfi-v2/quantum.

DERIVERSE_PROGRAM_ID

Variable ยท @eco-incorp/sauce/svm

DERIVERSE_AUTH

Variable ยท @eco-incorp/sauce/svm find_program_address([b"ndxnt"], programId) - ONE PDA for the whole program (drv-smart-contract-commonโ€™s DRVS_SEED), independent of any pool. Hardcoded (verified against mainnet via an offline PDA derivation, not read from any account) exactly like raydium-amm-v4โ€™s AMM_AUTHORITY.

INSTR_ACCOUNT_HEADER_MIN_SIZE

Variable ยท @eco-incorp/sauce/svm The front slice of InstrAccountHeader this adapter reads (1064 bytes, drv-smart-contract-common v0.2.68). The LIVE deployed account is larger (2344 bytes observed on both checked instruments) - the extra bytes are unread reserved tail space (candle/history buffers not yet promoted to named fields), exactly the pattern jupiter-deriverseโ€™s own AccountsHolder::from_account relies on (&data[0..size_of::<T>()]). fetchPoolConfig accepts anything >= this size, never an exact match.

OFF_MASK

Variable ยท @eco-incorp/sauce/svm

OFF_LAST_PX

Variable ยท @eco-incorp/sauce/svm

OFF_ASSET_TOKENS

Variable ยท @eco-incorp/sauce/svm

OFF_CRNCY_TOKENS

Variable ยท @eco-incorp/sauce/svm

OFF_DEC_FACTOR

Variable ยท @eco-incorp/sauce/svm

MASK_SUSPENDED

Variable ยท @eco-incorp/sauce/svm

DeriversePoolConfig

Interface ยท @eco-incorp/sauce/svm

deriverse

Variable ยท @eco-incorp/sauce/svm