GLAMIDL Reference

validate_observation

Validates a pending observation, normalizes it into the vault base asset, and promotes it for pricing.

Accounts

AccountRoleDescription
glam_statewritable`glam_state` account required by the `validate_observation` instruction (see program source for the full constraint).
glam_signersigner`glam_signer` account required by the `validate_observation` instruction (see program source for the full constraint).
observation_statewritable`observation_state` account required by the `validate_observation` instruction (see program source for the full constraint).
glam_configoptional`glam_config` account required by the `validate_observation` instruction (see program source for the full constraint).
sol_usd_oracleoptional`sol_usd_oracle` account required by the `validate_observation` instruction (see program source for the full constraint).
base_asset_oracleoptional`base_asset_oracle` account required by the `validate_observation` instruction (see program source for the full constraint).

Arguments

ArgumentTypeNotes
position_id[u8; 32]

Policy & permissions

  • Signer must hold RPI ValidateObservation.
  • Signer must be on the position's validate allowlist.
  • A fresh pending observation is required; RPI computes the base-asset-normalized amount from the pending observation and validated oracle metadata before promoting it for pricing.
  • USD and non-base-mint observations require GLAM oracle metadata plus the base asset oracle; SOL-denominated oracle prices also require the SOL/USD oracle.