GLAM Protocol StagingStaging
jupiter_swap_v2
Executes a Jupiter swap for vault-held assets under GLAM policies and delegate permissions, with oracle price guardrails.
Accounts
| Account | Role | Description |
|---|---|---|
| glam_state | writable | GLAM state account that stores vault configuration, integration ACLs, delegate permissions, policies, assets, mint linkage, and pricing records. |
| glam_vault | writable | Vault PDA associated with the GLAM state and used as the vault authority. |
| glam_signer | signer, writable | Calling authority or fee payer. |
| cpi_program | read-only | Downstream program invoked by this instruction. |
| input_stake_pool | optional | Stake, stake-pool, or staking-related account. |
| output_stake_pool | optional | Stake, stake-pool, or staking-related account. |
| glam_config | optional | Global GLAM configuration account for fee and asset/oracle metadata. |
| sol_usd_oracle | optional | Oracle or price account used for valuation or downstream validation. |
| input_token_oracle | optional | Oracle or price account used for valuation or downstream validation. |
| output_token_oracle | optional | Oracle or price account used for valuation or downstream validation. |
Arguments
| Argument | Type | Notes |
|---|---|---|
| skip_quote_price_check | bool | |
| data | bytes |
Policy & permissions
- SingleAssetVault states are rejected.
- Caller: GLAM owner, or a delegate with one of GLAM Protocol / Jupiter Swap /
SwapToAny,SwapFromAny,SwapAllowlisted, orSwapLst— selected from the configuredJupiterSwapPolicyallowlist and from whether both mints resolve as LSTs through the supplied stake-pool accounts. - Slippage is bounded by the
JupiterSwapPolicy.max_slippage_bpssetting. - The instruction performs a quote-vs-oracle price check using the supplied SOL/input/output oracles validated against
glam_configasset metas. The check is skipped only when the signer holds GLAM Protocol / Jupiter Swap /SkipQuotePriceCheck(unconditional skip), orSkipQuotePriceCheckLimitedand the output token has no oracle configured inglam_config(limited skip). remaining_accountsmay not include vault token accounts other than the input and output ATAs.
TypeScript SDK usage
await glamClient.jupiterSwap.swapV2({
quoteParams,
skipQuotePriceCheck: false,
trackingAccount,
});