Instructions Reference#
All Seesaw protocol instructions, with discriminators, accounts, and arguments.
Instruction Overview#
Instruction Discriminators#
| # | Instruction | Discriminator | Category |
|---|---|---|---|
| 0 | initialize_config | 0x00 | Configuration |
| 1 | update_authority | 0x01 | Authority |
| 2 | claim_authority | 0x02 | Authority |
| 3 | create_market | 0x03 | Market Lifecycle |
| 4 | snapshot_end | 0x04 | Market Lifecycle |
| 5 | resolve_market | 0x05 | Market Lifecycle |
| 6 | expire_market | 0x06 | Market Lifecycle |
| 7 | mint_shares | 0x07 | Token/Settlement |
| 8 | deposit_funds | 0x08 | Free Funds |
| 9 | withdraw_funds | 0x09 | Free Funds |
| 10 | withdraw_shares | 0x0A | Token/Settlement |
| 11 | place_order | 0x0B | Trading |
| 12 | place_multiple_post_only_orders | 0x0C | Trading |
| 13 | swap_with_free_funds | 0x0D | Trading |
| 14 | place_limit_order_with_free_funds | 0x0E | Trading |
| 15 | place_multiple_post_only_orders_with_free_funds | 0x0F | Trading |
| 16 | cancel_order | 0x10 | Trading |
| 17 | cancel_multiple_orders_by_id | 0x11 | Trading |
| 18 | cancel_all_orders | 0x12 | Trading |
| 19 | cancel_up_to | 0x13 | Trading |
| 20 | reduce_order | 0x14 | Trading |
| 21 | cancel_multiple_orders_by_id_with_free_funds | 0x15 | Trading |
| 22 | cancel_all_orders_with_free_funds | 0x16 | Trading |
| 23 | cancel_up_to_with_free_funds | 0x17 | Trading |
| 24 | reduce_order_with_free_funds | 0x18 | Trading |
| 25 | reclaim_expired_order | 0x19 | Trading |
| 26 | redeem | 0x1A | Token/Settlement |
| 27 | force_close | 0x1B | Token/Settlement |
| 28 | mark_position_settled | 0x1C | Token/Settlement |
| 29 | close_position | 0x1D | Token/Settlement |
| 30 | close_market | 0x1E | Market Lifecycle |
| 31 | update_fee_config | 0x1F | Admin |
| 32 | update_treasury_recipients | 0x20 | Admin |
| 33 | set_referrer | 0x21 | Referral |
| 34 | init_referrer_earnings_account | 0x22 | Referral |
| 35 | claim_creator_fees | 0x23 | Fees |
| 36 | claim_referrer_earnings | 0x24 | Referral |
| 37 | pause | 0x25 | Admin |
| 38 | unpause | 0x26 | Admin |
| 39 | enable_post_only_mode | 0x27 | Admin |
| 40 | disable_post_only_mode | 0x28 | Admin |
| 41 | update_tick_size | 0x29 | Admin |
| 42 | update_min_resting_notional | 0x2A | Admin |
| 43 | update_market_cap | 0x2B | Admin |
| 44 | set_market_emergency_status | 0x2C | Admin |
| 45 | force_cancel_market_orders | 0x2D | Admin |
| 46 | ensure_trader_ledger_space | 0x2E | Market Lifecycle |
| 47 | update_operational_params | 0x2F | Admin |
| 48 | propose_pyth_program_id | 0x30 | Admin |
| 49 | apply_pyth_program_id | 0x31 | Admin |
| 50 | update_market_defaults | 0x32 | Admin |
| 51 | ensure_deep_orderbook_space | 0x33 | Market Lifecycle |
| 52 | set_pauser | 0x34 | Admin |
| 53 | top_up_closer_rewards | 0x35 | Market Lifecycle |
| - | log | 0xFF | Internal Event |
Compute units: The "Compute Units" figures in the per-instruction sections below are approximate estimates for budgeting only. Actual consumption varies with account state, matching depth, and runtime version — always benchmark against the deployed program and size your transaction CU limits with headroom.
initialize_config#
One-time protocol initialization. Creates the config PDA, records the initial authority and treasury, validates the default settlement mint, and writes the default capped-linear-decay fee curve and three-way split.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | config | - | W | Config PDA |
| 1 | authority | S | W | Initial admin |
| 2 | treasury | - | - | Protocol fee recipient |
| 3 | default_settlement_mint | - | - | Settlement mint |
| 4 | system_program | - | - | System Program |
| 5 | program_data | - | - | Upgradeable program data account |
Arguments#
| Field | Type | Description |
|---|---|---|
| taker_fee_bps | u16 | Legacy peak taker fee parameter |
| tick_size_bps | u16 | Price tick size |
The v2 fee fields are initialized from protocol defaults: fee_cap_bps = 200, decay_rate_bps = 600, protocol_fee_bps = 5_000, default_creator_fee_bps = 1_000, and referral_share_bps_of_fee = 4_000.
Constraint: authority must sign and must match the upgrade authority stored in program_data.
Compute Units#
~6,000 CU
create_market#
Create a new market for a configured Pyth feed and duration. The instruction initializes all market PDAs, validates the settlement mint, captures the first valid Pyth start price, and transitions the market into trading.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | market | - | W | Market PDA |
| 1 | orderbook | - | W | Orderbook PDA |
| 2 | vault | - | W | SPL Token vault PDA |
| 3 | yes_mint | - | W | YES mint PDA |
| 4 | no_mint | - | W | NO mint PDA |
| 5 | asset_state | - | W | Per-feed asset state PDA |
| 6 | config | - | W | Protocol config; increments markets_created |
| 7 | pyth_feed | - | - | Pyth price feed |
| 8 | settlement_mint | - | - | USDT/SPL settlement mint |
| 9 | payer | S | W | Rent payer and market creator |
| 10 | system_program | - | - | System Program |
| 11 | token_program | - | - | SPL Token Program |
| 12 | yes_escrow | - | W | Market-owned YES escrow token account |
| 13 | no_escrow | - | W | Market-owned NO escrow token account |
| 14 | trader_ledger | - | W | Market-owned trader ledger PDA |
Arguments#
| Field | Type | Description |
|---|---|---|
| max_confidence_ratio_bps | u16 | Max Pyth confidence interval as bps of price; 0 disables this market guard |
| duration_seconds | u64 | Market duration, bounded by protocol min/max |
| max_oracle_jump_bps | u32 | Optional per-market start-to-end jump guard; 0 uses the protocol default |
| bids_size | u32 | Deep-orderbook bid-side capacity tier: 64, 128, 256, 512, 1024, 2048, or 4096 |
| asks_size | u32 | Deep-orderbook ask-side capacity tier; must equal bids_size |
| num_seats | u32 | Trader-ledger seat count; must be one of the nine allowed tier values |
| oracle_mode | u8 | 0 = Push (feed account); 1 = Pull (ephemeral PriceUpdateV2) |
market_id is derived from the current timestamp and duration_seconds; clients do not pass it directly in the current instruction data. bids_size and asks_size select the symmetric deep-orderbook tier and must be one of 64, 128, 256, 512, 1024, 2048, 4096. num_seats must be one of TRADER_LEDGER_SEAT_OPTIONS — see Market Capacity.
Compute Units#
~25,000 CU
snapshot_end#
Capture closing price from Pyth.
Accounts#
Same accounts as create_market (market, config, pyth_feed, payer, system_program).
Arguments#
None.
Compute Units#
~15,000 CU (includes order cancellation)
Side Effects#
- All open orders are cancelled
- Collateral/shares returned to users
place_order#
Submit a limit order.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | market | - | W | Market PDA |
| 1 | orderbook | - | W | Orderbook PDA |
| 2 | user_position | - | W | User position PDA |
| 3 | user_token_account | - | W | User's settlement-token account |
| 4 | vault | - | W | Market vault |
| 5 | user | S | W | Order owner |
| 6 | config | - | - | Protocol config |
| 7 | treasury_token_account | - | W | Protocol fee recipient |
| 8 | token_program | - | - | SPL Token Program |
| 9 | system_program | - | - | System Program, used when creating position PDA |
| 10 | settlement_mint | - | - | Settlement mint |
| 11 | yes_escrow | - | W | Market-owned YES escrow |
| 12 | no_escrow | - | W | Market-owned NO escrow |
| 13 | user_yes_ata | - | W | User YES token account |
| 14 | user_no_ata | - | W | User NO token account |
| 15 | yes_mint | - | W | YES mint PDA |
| 16 | no_mint | - | W | NO mint PDA |
| 17 | trader_ledger | - | W | Market-owned trader ledger PDA |
| 18-20 | referral tail (optional) | - | Mixed | Referrer wallet, referrer earnings PDA, treasury |
Arguments#
| Field | Type | Description |
|---|---|---|
| side | u8 | 0=BuyYes, 1=SellYes, 2=BuyNo, 3=SellNo |
| price_bps | u16 | Limit price [1, 9999] |
| quantity | u64 | Share quantity |
| order_type | u8 | 0=Limit, 1=PostOnly, 2=IOC |
| worst_acceptable_price_bps | u16 | Slippage guard; 0 means default |
| min_fill_quantity | u64 | Minimum fill for IOC-style semantics |
| match_limit | u8 | Max opposing orders to match; 0 auto |
| self_trade_behavior | u8 | Self-trade handling mode |
| max_age_seconds | u32 | Optional stale-order guard |
| reject_post_only_would_cross | u8 | Post-only crossing behavior |
| protocol_treasury_index | u8 | Index ∈ [0, 8) selecting which config.treasury_recipients entry receives the fee for this trade |
Compute Units#
~15,000 - 50,000 CU (depends on matching)
cancel_order#
Remove an open order.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | market | - | W | Market PDA |
| 1 | orderbook | - | W | Orderbook PDA |
| 2 | position | - | W | User position PDA |
| 3 | user_token_account | - | W | User's USDT |
| 4 | vault | - | W | Market vault |
| 5 | user | S | - | Order owner |
| 6 | token_program | - | - | SPL Token |
Arguments#
| Field | Type | Description |
|---|---|---|
| order_id | u64 | Order to cancel |
Compute Units#
~8,000 CU
resolve_market#
Determine outcome from snapshots.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | market | - | W | Market PDA |
| 1 | cranker | S | W | Crank operator |
| 2 | config | - | - | Protocol config |
| 3 | treasury | - | W | Crank reward source |
| 4 | system_program | - | - | System Program |
Arguments#
None.
Compute Units#
~6,000 CU
Resolution Logic#
mint_shares (0x07)#
Deposit USDT to receive equal YES + NO tokens.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | market | - | W | Market PDA |
| 1 | yes_mint | - | W | YES token mint PDA |
| 2 | no_mint | - | W | NO token mint PDA |
| 3 | user_yes_ata | - | W | User's YES token account |
| 4 | user_no_ata | - | W | User's NO token account |
| 5 | user_stablecoin_ata | - | W | User's USDT account |
| 6 | vault | - | W | Market vault (USDT) |
| 7 | user | S | - | User (signer) |
| 8 | token_program | - | - | SPL Token Program |
Arguments#
| Field | Type | Description |
|---|---|---|
| amount | u64 | Amount of USDT to deposit |
Compute Units#
~15,000 CU
redeem (0x1A)#
Burn winning tokens for USDT after resolution.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | market | - | W | Market PDA |
| 1 | yes_mint | - | W | YES token mint PDA |
| 2 | no_mint | - | W | NO token mint PDA |
| 3 | user_yes_ata | - | W | User's YES token account |
| 4 | user_no_ata | - | W | User's NO token account |
| 5 | user_stablecoin_ata | - | W | User's USDT account |
| 6 | vault | - | W | Market vault (USDT) |
| 7 | user | S | - | User (signer) |
| 8 | token_program | - | - | SPL Token Program |
Arguments#
| Field | Type | Description |
|---|---|---|
| amount | u64 | Amount of tokens to redeem |
| token_type | u8 | Which token to redeem (0=Yes, 1=No) |
Compute Units#
~15,000 CU
Payout Calculation#
withdraw_shares (0x0A)#
Convert trader-ledger free YES/NO share credits to SPL tokens.
Compute Units#
~10,000 CU
force_close (0x1B)#
Force-close position in expired/unresolved market. Returns full collateral.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | market | - | W | Market PDA |
| 1 | position | - | W | User position PDA |
| 2 | vault | - | W | Market vault |
| 3 | user_stablecoin_ata | - | W | User's USDT account |
| 4 | caller | S | - | Caller (permissionless) |
| 5 | config | - | - | Protocol config |
| 6 | token_program | - | - | SPL Token Program |
| 7 | settlement_mint | - | - | Settlement token mint |
Prerequisites#
current_time >= t_end + expiration_window AND outcome == 0
Compute Units#
~12,000 CU
close_market (0x1E)#
Close resolved market after 7-day timeout. Transfers rent to creator.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | market | - | W | Market PDA |
| 1 | creator | - | W | Market creator (rent target) |
| 2 | caller | S | - | Caller (permissionless) |
| 3 | config | - | - | Protocol config |
| 4 | system_program | - | - | System Program |
| 5 | vault | - | W | Market settlement vault |
| 6 | token_program | - | - | SPL Token Program |
| 7 | orderbook | - | W | Market orderbook PDA |
| 8 | yes_escrow | - | W | YES escrow PDA |
| 9 | no_escrow | - | W | NO escrow PDA |
| 10 | trader_ledger | - | W | Dynamic ledger PDA |
| 11 | creator_ata | - | W | Creator settlement ATA |
| 12 | yes_mint | - | W | Optional YES mint PDA |
| 13 | no_mint | - | W | Optional NO mint PDA |
Valid account totals are 12, 14, or 16: the 12-account base shape, the base
shape plus optional YES/NO mint pair, and either shape with the optional
self_program, log_authority recorder tail.
Prerequisites#
current_time >= resolved_at + 604800 AND outcome != 0
Compute Units#
~8,000 CU
State Transitions#
Error Codes#
Seesaw uses a custom #[repr(u32)] error enum (SeesawError) with
category-prefixed hex codes that surface as ProgramError::Custom(code). Codes
are not in the Anchor 6000+ range. A representative selection (see the
SeesawError enum in the program source for the exhaustive list):
| Code | Name | Category | Description |
|---|---|---|---|
| 0x1001 | MarketExists | Market | Market already exists |
| 0x1002 | InvalidState | Market | Wrong market state for the operation |
| 0x1005 | AlreadyResolved | Market | Market already resolved |
| 0x1011 | InvalidStateTransition | Market | Illegal lifecycle transition |
| 0x2001 | OracleMismatch | Oracle | Oracle account does not match market |
| 0x2002 | StaleOracle | Oracle | Oracle price too old |
| 0x2003 | InvalidPrice | Oracle | Non-positive / invalid oracle price |
| 0x2005 | FeedIdMismatch | Oracle | Pyth feed id mismatch |
| 0x3001 | InvalidQuantity | Order | Order quantity out of range |
| 0x3004 | WouldCross | Order | Post-only order would cross the book |
| 0x3007 | SlippageExceeded | Order | Fill price worse than slippage guard |
| 0x4001 | MathOverflow | Math | Checked arithmetic overflowed |
| 0x5003 | InvalidPDA | Account | PDA derivation mismatch |
| 0x5005 | InsolvencyDetected | Account | Solvency invariant would break |
| 0x6001 | ProtocolPaused | Position | Protocol is paused |
| 0x7004 | SolvencyViolation | Token | Token operation breaks solvency |
| 0x8002 | InvalidFeeSplit | Fee | Fee split does not sum to 10,000 |
| 0x9001 | NoPendingAuthority | Authority | No pending authority to claim |
Category ranges: Market 0x1001+, Oracle 0x2001+, Order 0x3001+, Math
0x4001, Account 0x5001+, Position 0x6001, Token 0x7001+, Fee/Treasury
0x8001+, Authority 0x9001+.
claim_creator_fees (0x23)#
Sweep deferred creator fees from the market vault to the creator's token account.
Permissionless — anyone may call it, but fees are always sent to market.creator.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | market | - | W | Market PDA |
| 1 | vault | - | W | Market vault (SPL Token, holds accumulated fees) |
| 2 | creator_token_account | - | W | Creator's token account for market.settlement_mint |
| 3 | settlement_mint | - | - | Settlement mint (TransferChecked) |
| 4 | caller | S | - | Permissionless caller (signer) |
| 5 | token_program | - | - | SPL Token Program |
Arguments#
None.
Prerequisites#
market.outcome != 0 (resolved or expired)
market.accumulated_creator_fees > 0
creator_token_account.owner == market.creator
creator_token_account.mint == market.settlement_mint
Compute Units#
~10,000 CU
Side Effects#
- Transfers
accumulated_creator_feesUSDT from vault to creator's token account viaTransferChecked. - Zeroes
market.accumulated_creator_fees. - Emits
CreatorFeesClaimedevent.
update_fee_config (0x1F)#
Admin-only. Retunes the capped-linear-decay curve (fee_cap_bps, decay_rate_bps) and the three-way split (protocol_fee_bps, default_creator_fee_bps, referral_share_bps_of_fee).
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | config | - | W | Config PDA |
| 1 | authority | S | - | Protocol authority |
Arguments#
| Field | Type | Description |
|---|---|---|
| protocol_fee_bps | u16 | Protocol share (bps of total fee) |
| default_creator_fee_bps | u16 | Creator share (bps of total fee) |
| referral_share_bps_of_fee | u16 | Referral share (bps of total fee) |
| fee_cap_bps | u16 | New curve ceiling in bps of notional |
| decay_rate_bps | u16 | New curve slope in bps of notional |
Constraints:
protocol_fee_bps + default_creator_fee_bps + referral_share_bps_of_fee == 10_000fee_cap_bps <= 500(hard ceiling of 5.00%)
Compute Units#
~3,500 CU
set_referrer (0x21)#
Permissionless. Binds a ReferralAccount PDA to a user, recording the referrer and the attribution timestamp. First-touch and immutable; an existing referral account cannot be overwritten.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | referral_account | - | W | ReferralAccount PDA (user-scoped, to create) |
| 1 | user | S | W | User being attributed (pays rent) |
| 2 | referrer | - | - | Referrer wallet |
| 3 | referrer_earnings_account | - | - | Existing ReferrerEarningsAccount PDA for referrer |
| 4 | system_program | - | - | System Program |
Arguments#
None (referrer is read from accounts[2]).
Prerequisites#
referral_account does not yet exist
referrer != user (self-referral rejected)
referrer_earnings_account.referrer == referrer
Compute Units#
~5,000 CU
Side Effects#
- Writes
ReferralAccount { referee: user, referrer, created_at: now, expires_at: now + REFERRAL_DURATION_SECONDS, ... }to PDA. - Emits
ReferrerSetevent.
init_referrer_earnings_account (0x22)#
Permissionless. Creates the per-referrer earnings escrow (ReferrerEarningsAccount PDA) if it doesn't exist. The referrer signs and pays rent. Also records which treasury shard the referrer is associated with for future claim_referrer_earnings calls.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | referrer_earnings_account | - | W | ReferrerEarningsAccount PDA (to create) |
| 1 | referrer | S | W | Referrer wallet and rent payer |
| 2 | referrer_treasury_k | - | W | Shard PDA matching treasury_index, lazily created |
| 3 | settlement_mint | - | - | Must match config.default_settlement_mint |
| 4 | config | - | - | Protocol config |
| 5 | system_program | - | - | System Program |
| 6 | token_program | - | - | SPL Token Program |
Arguments#
| Field | Type | Description |
|---|---|---|
| treasury_index | u8 | Treasury shard index ∈ [0, 8) for this referrer's fees |
Compute Units#
~5,000 CU
claim_referrer_earnings (0x24)#
Sweep accumulated referrer earnings from the sharded referrer_treasury_k PDA to the referrer's token account. Permissionless — anyone may call it, but funds always go to the referrer.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | referrer_earnings_account | - | W | Referrer's ReferrerEarningsAccount PDA |
| 1 | referrer_treasury_k | - | W | Sharded referral escrow token account selected by the earnings account treasury_index |
| 2 | referrer_token_account | - | W | Referrer's token account for settlement_mint |
| 3 | settlement_mint | - | - | Settlement mint (TransferChecked) |
| 4 | referrer | S | - | Referrer wallet |
| 5 | token_program | - | - | SPL Token Program |
| 6 | config | - | - | Config PDA |
Arguments#
None.
Prerequisites#
referrer_earnings_account.accumulated > 0
referrer_token_account.owner == referrer
referrer_token_account.mint == config.default_settlement_mint
Compute Units#
~10,000 CU
Side Effects#
- Transfers
accumulatedUSDT fromreferrer_treasury_ktoreferrer_token_accountviaTransferChecked. - Zeroes
referrer_earnings_account.accumulated, bumpstotal_claimed, and writeslast_claim_at. - Emits
ReferralClaimedevent.
ensure_trader_ledger_space (0x2E)#
Pre-grow the TraderLedgerAccount PDA before CreateMarket. Because Solana
caps account growth at MAX_PERMITTED_DATA_INCREASE (10,240 bytes) per
instruction, ledgers larger than ~141 seats require multiple invocations.
CreateMarket rejects a ledger that has not been fully pre-grown.
Idempotent: a no-op once the PDA is at target_size.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | trader_ledger | - | W | Trader-ledger PDA (may not yet exist) |
| 1 | market | - | - | Parent market PDA (seeds for ledger PDA) |
| 2 | payer | S | W | Rent payer (any caller) |
| 3 | system_program | - | - | System Program |
Arguments#
| Field | Type | Description |
|---|---|---|
| target_size | u32 | Final byte size the ledger should reach (56 + num_seats × 72) |
Compute Units#
~5,000 CU per call
Usage#
ceil(target_size / 10240) invocations required before CreateMarket.
SDKs (@seesaw/core, sdk-rust, sdk-python) bundle this prelude automatically.
update_operational_params (0x2F)#
Admin-only. Post-deploy setter for six previously write-once operational
parameters: closer_reward_lamports, max_price_staleness_seconds,
market_expiration_window_seconds, min_market_duration_seconds,
max_market_duration_seconds, and max_order_size. Rate-limited to once per
OPERATIONAL_PARAMS_RATE_LIMIT_SECONDS (3,600 s).
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | config | - | W | Config PDA |
| 1 | authority | S | - | Protocol authority |
Arguments#
| Field | Type | Description |
|---|---|---|
| closer_reward_lamports | u64 | SOL reward per lifecycle closer; 0 = no change |
| max_price_staleness_seconds | u64 | Oracle freshness window; 0 = no change |
| market_expiration_window_seconds | u64 | Force-expiry delay override; 0 = no change |
| min_market_duration_seconds | u64 | Min market duration override; 0 = no change |
| max_market_duration_seconds | u64 | Max market duration override; 0 = no change |
| max_order_size | u64 | Max order size override; 0 = no change |
Constraint: Rate-limited by last_operational_params_update_at; returns
OperationalParamsRateLimit (0x800D) if called within the cooldown window.
Compute Units#
~3,500 CU
propose_pyth_program_id (0x30)#
Frozen compatibility instruction. The discriminator, account list, and payload
shape remain stable for SDK/test-vector compatibility, but current on-chain
execution rejects with OracleProgramIdFrozen before staging any program-ID
change. The upgraded Pyth Core push-feed derivation program and Receiver owner
program are hard-pinned in source; future owner-program changes require a
program upgrade plus audit/release evidence, not a config-governance re-point.
The target selector is decoded for wire compatibility only: 0 historically
selected pyth_program_id and 1 historically selected
pyth_receiver_program_id.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | config | - | W | Config PDA |
| 1 | authority | S | - | Protocol authority |
Arguments#
| Field | Type | Description |
|---|---|---|
| new_program_id | [u8; 32] | Proposed new program ID (32 bytes) |
| target | u8 | 0 = push PDA derivation program (pyth_program_id), 1 = pull receiver |
Arg size: 33 bytes total ([u8;32] + u8). The payload is inert because
the handler rejects with OracleProgramIdFrozen.
Compute Units#
~3,500 CU
Side Effects#
- None. The handler rejects with
OracleProgramIdFrozenbefore mutating config.
apply_pyth_program_id (0x31)#
Frozen compatibility instruction. The discriminator and account list remain
stable for SDK/test-vector compatibility, but current on-chain execution rejects
with OracleProgramIdFrozen; there is no live pending Pyth program-ID update to
apply.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | config | - | W | Config PDA |
| 1 | authority | S | - | Protocol authority |
Arguments#
None.
Compute Units#
~3,000 CU
Side Effects#
- None. The handler rejects with
OracleProgramIdFrozenbefore mutating config or emitting an apply event.
update_market_defaults (0x32)#
Admin-only fee setter. Post-init settlement-mint rotation is disabled because the default mint is coupled to protocol treasury recipients and referrer treasury shards. No timelock; subject only to authority check.
Accounts#
| # | Account | Signer | Writable | Description |
|---|---|---|---|---|
| 0 | config | - | W | Config PDA |
| 1 | authority | S | - | Protocol authority |
Arguments#
| Field | Type | Description |
|---|---|---|
| settlement_mint | [u8; 32] | Must be [0; 32]; nonzero mint rotation is rejected |
| taker_fee_bps | u16 | Updated legacy taker_fee_bps display field |
Arg size: 34 bytes total.
Compute Units#
~3,000 CU