MCPcopy Create free account

hub / github.com/Kamino-Finance/scope / functions

Functions364 in github.com/Kamino-Finance/scope

↓ 27 callersFunctionget_price
( oracle_mappings: &OracleMappings, oracle_twaps: &OracleTwaps, entry_id: usize, twap_type: Em
programs/scope/src/oracles/twap.rs:58
↓ 25 callersMethodget
(&self)
programs/scope/src/oracles/jito_restaking.rs:211
↓ 14 callersFunctionaccount_deserialize
( account: &AccountInfo<'_>, )
programs/scope/src/utils/mod.rs:22
↓ 12 callersFunctiondeserialize
(deserializer: D)
programs/scope/src/states/mints_to_scope_chains.rs:54
↓ 11 callersMethodreset_entry
(&mut self, entry_id: usize)
programs/scope/src/states/oracle_twaps.rs:89
↓ 10 callersMethodis_twap_enabled_for_ema_type
(&self, ema_type: EmaType)
programs/scope/src/states/oracle_twaps.rs:129
↓ 10 callersFunctionprocess
(ctx: Context<ResetTwap>, token: usize, _: String)
programs/scope/src/handlers/handler_reset_twap.rs:23
↓ 8 callersFunctionchainlink_bigint_value_parse
(value: &BigInt)
programs/scope/src/oracles/chainlink.rs:568
↓ 7 callersFunctionestimate_slot_update_from_ts
(clock: &solana_program::clock::Clock, ts: u64)
programs/scope/src/utils/math.rs:267
↓ 7 callersMethodget_entry_type
(&self, entry_id: usize)
programs/scope/src/states/oracle_mappings.rs:49
↓ 7 callersFunctionten_pow
(exponent: impl Into<u32>)
programs/scope/src/utils/math.rs:143
↓ 7 callersMethodto_bytes
(&self)
programs/adrena-perp-itf/src/state/limited_string.rs:41
↓ 7 callersFunctionvalidate_mapping_cfg
(mapping: Option<&AccountInfo>, generic_data: &[u8])
programs/scope/src/oracles/pyth_lazer.rs:235
↓ 6 callersFunctioncheck_context
(ctx: &Context<T>)
programs/scope/src/oracles/mod.rs:48
↓ 6 callersMethodto_generic_data
(&self)
programs/scope/src/oracles/chainlink.rs:100
↓ 5 callersFunctionreject_self_source
(idx: u16, own_index: u16, name: &str)
programs/scope/src/oracles/conditional.rs:262
↓ 5 callersFunctionrequire_valid_source
(idx: u16, name: &str)
programs/scope/src/oracles/conditional.rs:254
↓ 5 callersFunctionvalidate_observations_timestamp
( observations_ts: u64, last_observations_ts: u64, clock: &Clock, )
programs/scope/src/oracles/chainlink.rs:164
↓ 5 callersFunctionvalidate_report_feed_id
(feed_id: &FeedID, mapping: &Pubkey)
programs/scope/src/oracles/chainlink.rs:153
↓ 5 callersFunctionwarn_if_same_source
(idx1: u16, name1: &str, idx2: u16, name2: &str)
programs/scope/src/oracles/conditional.rs:273
↓ 4 callersFunctionclamp_timestamp_to_now
Clamps a timestamp to the current clock time and converts it to u64. This prevents future timestamps from being used in DatedPrice. # Arguments `time
programs/scope/src/utils/math.rs:284
↓ 4 callersMethodget_ref_price_tolerance_bps
(&self, entry_id: usize)
programs/scope/src/states/oracle_mappings.rs:145
↓ 4 callersFunctionget_source_price
(oracle_prices: &OraclePrices, index: u16)
programs/scope/src/oracles/conditional.rs:90
↓ 4 callersMethodis_entry_used
(&self, entry_id: usize)
programs/scope/src/states/oracle_mappings.rs:173
↓ 4 callersMethodis_frozen
(&self, entry_id: usize)
programs/scope/src/states/oracle_mappings.rs:54
↓ 4 callersFunctionupdate_ema_twap
( twap: &mut EmaTwap, price: Price, price_ts: u64, twap_enabled_bitmask: TwapE
programs/scope/src/oracles/twap.rs:121
↓ 4 callersFunctionvalidate_account
(token_account: Option<&AccountInfo>)
programs/scope/src/oracles/spl_balance.rs:98
↓ 3 callersFunctionbool_to_dated_price
(result: bool, sources: &[&DatedPrice])
programs/scope/src/oracles/conditional.rs:100
↓ 3 callersFunctioncheck_confidence_interval
Check that `deviation` represent only a fraction of `price` This function can be used to check that an absolute standard deviation or confidence inte
programs/scope/src/utils/math.rs:200
↓ 3 callersFunctioncheck_ref_price_difference
( curr_price: Price, ref_price: Price, ref_price_tolerance_bps: Option<u16>, )
programs/scope/src/utils/price_impl.rs:30
↓ 3 callersMethodget_name
(&self)
programs/scope/src/states/token_metadatas.rs:20
↓ 3 callersMethodis_twap_enabled
(&self)
programs/scope/src/states/oracle_twaps.rs:125
↓ 3 callersFunctionmaybe_get_entry_name
( oracle_mappings: &'_ OracleMappings, metadatas: &'a [TokenMetadata], entry_id: usize, )
programs/scope/src/handlers/handler_update_mapping_and_metadata.rs:360
↓ 3 callersMethodreset
(&mut self)
programs/scope/src/states/oracle_twaps.rs:66
↓ 3 callersFunctionupdate_twaps
( oracle_twaps: &mut OracleTwaps, entry_id: usize, price: &DatedPrice, twap_enabled_bitmask: T
programs/scope/src/oracles/twap.rs:27
↓ 3 callersFunctionvalidate_pool_account
(pool: Option<&AccountInfo>)
programs/scope/src/oracles/meteora_dlmm.rs:97
↓ 3 callersFunctionvalidate_valid_price
( pyth_price: &pyth_client::Price, oracle_confidence_factor: u32, )
programs/scope/src/oracles/pyth.rs:95
↓ 2 callersFunctioncalc_price_from_sqrt_price
(price: u128, decimals_a: u64, decimals_b: u64)
programs/scope/src/oracles/ktokens.rs:439
↓ 2 callersMethodcmp
(&self, other: &Self)
programs/scope/src/states/dated_price.rs:33
↓ 2 callersMethodcmp
(&self, other: &Self)
programs/scope/src/oracles/spl_stake.rs:170
↓ 2 callersMethodcmp
(&self, other: &Self)
programs/scope-types/src/states/dated_price.rs:33
↓ 2 callersMethodcondition
(&self)
programs/scope/src/oracles/conditional.rs:82
↓ 2 callersMethoderase_old_samples
Erase the sample tracker points that are older than the ema_period.
programs/scope/src/oracles/twap.rs:363
↓ 2 callersFunctionget_clmm
( pool: &'a AccountInfo<'info>, position: &'a AccountInfo<'info>, strategy: &WhirlpoolStrategy, )
programs/scope/src/oracles/ktokens.rs:164
↓ 2 callersFunctionget_most_recent_price_from_sources
Helper function to find the most recent price from a list of source entries with age and divergence validation
programs/scope/src/oracles/most_recent_of.rs:64
↓ 2 callersFunctionget_token_x_per_share
Gives the number of token (A or B) per kToken This is the total holdings of the given underlying asset divided by the number of shares issued Underly
programs/scope/src/oracles/ktokens_token_x.rs:34
↓ 2 callersMethodget_twap_source
(&self, entry_id: usize)
programs/scope/src/states/oracle_mappings.rs:116
↓ 2 callersMethodget_twap_source_or_ref_price_tolerance_bps
( &self, entry_id: usize, )
programs/scope/src/states/oracle_mappings.rs:91
↓ 2 callersMethodget_twap_source_or_ref_price_tolerance_bps
( &self, entry_id: usize, )
programs/scope-types/src/states/oracle_mappings.rs:91
↓ 2 callersMethodis_twap
(&self, entry_id: usize)
programs/scope/src/states/oracle_mappings.rs:66
↓ 2 callersMethodis_twap
(&self, entry_id: usize)
programs/scope-types/src/states/oracle_mappings.rs:66
↓ 2 callersFunctionparse_generic_data
(generic_data: &[u8; 20])
programs/scope/src/oracles/fixed_price.rs:5
↓ 2 callersFunctionparse_mint
(account_info: &AccountInfo)
programs/scope/src/oracles/total_mint_supply.rs:20
↓ 2 callersFunctionparse_stake_account
(account_info: &AccountInfo)
programs/scope/src/oracles/staked_sol_balance.rs:10
↓ 2 callersFunctionparse_token_account
(account_info: &AccountInfo)
programs/scope/src/oracles/spl_balance.rs:6
↓ 2 callersFunctionpow
(base: u64, exp: u64)
programs/scope/src/oracles/ktokens.rs:348
↓ 2 callersFunctionprice_of_lamports_to_price_of_tokens
Convert a Price A lamport to B lamport to a price of A token to B tokens
programs/scope/src/utils/math.rs:79
↓ 2 callersFunctionq64x64_price_to_price
(x64_price: U192)
programs/scope/src/utils/math.rs:45
↓ 2 callersFunctionsqrt_price_from_scope_prices
( price_a: &yvaults::utils::price::Price, price_b: &yvaults::utils::price::Price, deci
programs/scope/src/oracles/ktokens.rs:430
↓ 2 callersFunctionsqrt_price_to_price
( a_to_b: bool, sqrt_price: u128, decimals_a: u8, decimals_b: u8, )
programs/scope/src/utils/math.rs:24
↓ 2 callersFunctionsqrt_price_to_x64_price
Transform sqrt price to normal price scaled by 2^64
programs/scope/src/utils/math.rs:12
↓ 2 callersFunctionstrip_frozen_flag
Strip the frozen flag (bit 7) from a raw `price_types` byte, returning only the oracle type bits (0–6).
programs/scope/src/states/oracle_mappings.rs:44
↓ 2 callersFunctionstrip_frozen_flag
Strip the frozen flag (bit 7) from a raw `price_types` byte, returning only the oracle type bits (0–6).
programs/scope-types/src/states/oracle_mappings.rs:44
↓ 2 callersFunctiontime_left_s
(maturity_timestamp: i64, clock: &Clock)
programs/scope/src/oracles/discount_to_maturity.rs:88
↓ 2 callersMethodto_ema_type
(&self)
programs/scope/src/states/oracle_type.rs:180
↓ 2 callersFunctionvalidate_mapping_v7_v9
(price_account: Option<&AccountInfo>)
programs/scope/src/oracles/chainlink.rs:553
↓ 2 callersFunctionvalidate_mapping_v8_v10
( price_account: Option<&AccountInfo>, generic_data: &[u8], )
programs/scope/src/oracles/chainlink.rs:530
↓ 2 callersFunctionvalidate_most_recent_of_params
Helper function to validate common MostRecentOf parameters
programs/scope/src/oracles/most_recent_of.rs:119
↓ 2 callersFunctionvalidate_price_account
(price_data_account: Option<&AccountInfo>)
programs/scope/src/oracles/redstone.rs:69
↓ 2 callersFunctionvalidate_price_update_v2_info
(price_info: Option<&AccountInfo>)
programs/scope/src/oracles/pyth_pull.rs:71
↓ 2 callersFunctionvalidate_report_based_on_market_status
( report_market_status: u32, report_last_update_timestamp: u64, mapping_generic_data: &[u8], c
programs/scope/src/oracles/chainlink.rs:185
↓ 2 callersFunctionvalidate_source_entries
Validates a source entries array: - At least one valid entry (< MAX_ENTRIES_U16) is required. - Repeated zeros are rejected (catches zeroed/uninitiali
programs/scope/src/utils/source_entries.rs:7
↓ 2 callersFunctionzero_copy_deserialize
( account: &'info AccountInfo, )
programs/scope/src/utils/mod.rs:52
↓ 1 callersFunctiona_to_b
( a: &yvaults::utils::price::Price, b: &yvaults::utils::price::Price, )
programs/scope/src/oracles/ktokens.rs:369
↓ 1 callersFunctionabs_diff
(a: i32, b: i32)
programs/scope/src/oracles/ktokens.rs:352
↓ 1 callersMethodallows_zero_price
Whether this oracle type can legitimately report a zero value.
programs/scope/src/states/oracle_type.rs:158
↓ 1 callersMethodas_dated_price
(&self, ema_type: EmaType)
programs/scope/src/states/states_internal.rs:58
↓ 1 callersFunctionassert_prices_within_max_divergence
( smaller: Price, greater: Price, max_divergence_bps: u16, )
programs/scope/src/oracles/most_recent_of.rs:103
↓ 1 callersMethodcalc_lamports_from_msol_amount
(&self, msol_amount: u64)
programs/scope/src/oracles/msol_stake.rs:219
↓ 1 callersMethodcalc_lamports_withdraw_amount
(&self, pool_tokens: u64)
programs/scope/src/oracles/spl_stake.rs:314
↓ 1 callersFunctioncalc_sqrt_price_from_scope_price
( price: &yvaults::utils::price::Price, decimals_a: u64, decimals_b: u64, )
programs/scope/src/oracles/ktokens.rs:395
↓ 1 callersFunctioncheck_accounts
( state: &VaultState, state_account_key: Pubkey, vault_account_key: Pubkey, mint_account_key:
programs/scope/src/oracles/securitize.rs:81
↓ 1 callersFunctioncheck_confidence_interval_decimal
( price: Decimal, deviation: Decimal, tolerance_factor: u32, )
programs/scope/src/utils/math.rs:225
↓ 1 callersFunctioncheck_confidence_interval_decimal_bps
Checks that that `deviation` represents only a fraction of `price` but takes the tolerance as a confidence bps instead of a factor
programs/scope/src/utils/math.rs:239
↓ 1 callersFunctioncheck_execution_ctx
Ensure that the refresh instruction is executed directly to avoid any manipulation: - Check that the current instruction is executed by our program i
programs/scope/src/handlers/handler_refresh_prices.rs:188
↓ 1 callersFunctioncheck_fees
(stake_pool: &StakePool)
programs/scope/src/oracles/spl_stake.rs:75
↓ 1 callersFunctioncheck_mint_pk
(pool_pk: &Pubkey, expected_mint_pk: &Pubkey, bump: u8)
programs/jup-perp-itf/src/utils.rs:9
↓ 1 callersFunctionconfidence_bps_to_factor
Convert a confidence in bps to a confidence factor the result can be used as [`check_price_deviation_tolerance`] input For example 2% confidence (200
programs/scope/src/utils/math.rs:187
↓ 1 callersFunctioncreate_pyth_lazer_verify_ix
( accounts: &RefreshPythLazerPrice, serialized_pyth_message: &[u8], ed25519_instruction_index: u16
programs/scope/src/handlers/handler_refresh_pyth_lazer_price.rs:177
↓ 1 callersFunctiondebug_format_generic_data
( d: &mut DebugStruct<'_, '_>, price_type: OracleType, generic_data: &[u8; 20], )
programs/scope/src/oracles/mod.rs:470
↓ 1 callersFunctiondecimal_to_price
(decimal: Decimal)
programs/scope/src/utils/price_impl.rs:56
↓ 1 callersFunctiondecimals_factor
(decimals_a: u64, decimals_b: u64)
programs/scope/src/oracles/ktokens.rs:360
↓ 1 callersMethodfreeze
(&mut self, entry_id: usize)
programs/scope/src/states/oracle_mappings.rs:58
↓ 1 callersFunctionget_adjusted_smoothing_factor
Get the adjusted smoothing factor (alpha) based on the time between the last two samples. N = number of samples per period alpha = smoothing factor a
programs/scope/src/oracles/twap.rs:99
↓ 1 callersFunctionget_component_px_last_update
Returns the last updated slot and unix timestamp of the least-recently updated component price Excludes rewards prices as they do not form part of the
programs/scope/src/oracles/ktokens.rs:210
↓ 1 callersFunctionget_discounted_price
(time_left_s: u64, discount_per_year_bps: u16)
programs/scope/src/oracles/discount_to_maturity.rs:93
↓ 1 callersFunctionget_ema_with_custom_verification_level
( price_account: &PriceUpdateV2, )
programs/scope/src/oracles/pyth_pull_ema.rs:64
↓ 1 callersMethodget_entry_mapping_pk
(&self, entry_id: usize)
programs/scope/src/states/oracle_mappings.rs:178
↓ 1 callersMethodget_entry_type
(&self, entry_id: usize)
programs/scope-types/src/states/oracle_mappings.rs:49
↓ 1 callersMethodget_name
(&self)
programs/scope-types/src/states/token_metadatas.rs:20
next →1–100 of 364, ranked by callers