A documentation changelog entry. For the index of all updates, see
reference/changelog. For the protocol’s own historical timeline, see introduction/history-and-milestones.x·y=k) AMM. It does not change any live trading behavior — there were no OpenBook orders left to stop placing.
TL;DR for integrators
- Swap / Deposit / Withdraw keep working without changes. Transactions built with the old account layouts still execute — the removed Serum/market accounts are simply ignored (no validation, no CPI).
SwapBaseIn/SwapBaseOutstill expect 17 (+1 optional) accounts;DepositandWithdrawlayouts are unchanged. You do not have to ship a client update to keep existing flows alive. - Migrate to the V2 swap entrypoints.
SwapBaseInV2/SwapBaseOutV2carry no market accounts and noamm_open_orders(8 accounts total), so transactions are smaller and cheaper. Routers/aggregators should route through V2. WithdrawPnlis a hard breaking change (admin only). It goes 17 (+1 optional) → 10 accounts with no compatibility parsing; the old layout misaligns (old #5 wasamm_open_orders) and fails validation. Admin tooling must be updated.SetParamsis a hard breaking change (admin only). Accounts shrink to[amm, admin], and theparamenum is renumbered (Fees9 → 2,SetOpenTime11 → 3);AmmOwner,LastOrderDistance,UpdateOpenOrderand the grid params are removed.- Several instructions are no longer callable.
Initialize,PreInitialize,MonitorStep,MigrateToOpenBook,WithdrawSrm,SimulateInfo, andAdminCancelOrdersnow revert. UseInitialize2to create pools. - On-chain account layouts are byte-stable, and error codes are unchanged.
AmmInfo/StateDatakeep their layout (old OpenBook fields retained but deprecated/frozen); theAmmErrornumbering is preserved, with only a newNotAllowedappended.
Why this matters (for traders, LPs, and integrators)
- Traders see no change in swap behavior or pricing — the constant-product curve is unchanged. V2-layout swaps are cheaper to land because they carry ~8 fewer accounts.
- LPs keep the same deposit/withdraw economics. Liquidity has long sat entirely in the pool vaults, so pool value is fully on-pool; this upgrade only deletes the stale market plumbing.
- Integrators get smaller, simpler transactions and a quoting model that reads straight from the vaults. Existing integrations do not break (except admin
WithdrawPnl/SetParams), but the v1-swap compatibility shim is temporary — migrate to V2 at your convenience.
Instruction-level changes
Still callable, layout unchanged (backward compatible)
Initialize2, Deposit, Withdraw, SwapBaseIn, SwapBaseOut, CreateConfigAccount, and UpdateConfigAccount keep their existing account lists. On SwapBaseIn / SwapBaseOut, Deposit, and Withdraw the OpenBook/market accounts are still accepted positionally but are no longer validated or used — no CPI is issued and pool reserves are computed vault-only. The account count must still match, so existing transactions continue to execute unchanged.
SwapBaseInV2 / SwapBaseOutV2 — recommended path
Omit the market accounts and amm_open_orders entirely (8 accounts; tags 16 / 17). Quote math is identical to v1. New integrations and routers should use V2.
WithdrawPnl — 17 (+1 optional) → 10 accounts (⚠️ hard breaking, no compatibility path)
amm_open_orders and all six market accounts are removed. The new fixed 10-account, admin-only layout has no compatibility parsing; the old layout misaligns and fails with errors such as InvalidCoinVault.
SetParams — reduced to [amm, admin] (⚠️ hard breaking) + renumbered params
The authority, open-orders, target-orders, vault, and all market accounts are removed. The param enum is renumbered and trimmed:
| Param | Old value | New value |
|---|---|---|
Status | 0 | 0 |
State | 1 | 1 |
Fees | 9 | 2 |
SetOpenTime | 11 | 3 |
OrderNum, Depth, AmountWave, MinPriceMultiplier, MaxPriceMultiplier, MinSize, VolMaxCutRatio, InitOrderDepth, SetSwitchTime, ClearOpenTime, Seperate) plus AmmOwner, LastOrderDistance, and UpdateOpenOrder are removed. The SetParamsInstruction struct drops new_pubkey and last_order_distance.
No longer callable (revert at runtime; builders removed)
| Instruction | tag | Replacement |
|---|---|---|
Initialize | 0 | Initialize2 |
MonitorStep | 2 | none (order-book crank, retired) |
MigrateToOpenBook | 5 | none |
WithdrawSrm | 8 | none (SRM fee discount, retired) |
PreInitialize | 10 | Initialize2 |
SimulateInfo | 12 | off-chain / SDK quoting |
AdminCancelOrders | 13 | none |
Reserve / state changes
- Pool-asset formula. Total pool assets are now
vault balances − pending PnL (need_take_pnl); the OpenBook open-order term — already zero in practice — is dropped. Quoting code can read straight from the vault balances. - Deprecated state fields.
StateData.total_pnl_pc,total_pnl_coin,orderbook_to_init_time,swap_coin_in_amount,swap_pc_out_amount,swap_acc_pc_fee,swap_pc_in_amount,swap_coin_out_amount, andswap_acc_coin_feeare retained for layout compatibility but no longer updated. Consumers relying on theswap_*volume counters should switch to trade logs. AmmInfoinit.coin_lot_size,pc_lot_size, andmin_sizeare now initialized to0.- Removed dependency and CPIs. The
serum_dexcrate is dropped fromCargo.toml; all Serum DEX CPIs (invoke_dex_new_order_v3,invoke_dex_cancel_order_v2,invoke_dex_settle_funds,invoke_dex_init_open_orders, …) are removed frominvokers.rs. Removed data structs:LastOrderDistance,SimulateParams,RunCrankData,GetPoolData,GetSwapBaseInData,GetSwapBaseOutData.

