MCPcopy Create free account

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

Functions1,058 in github.com/Kamino-Finance/klend

↓ 2 callersFunctioncalculate_price_ratio
(numerator_reserve: &Reserve, denominator_reserve: &Reserve)
programs/klend/src/state/obligation_order_operations.rs:490
↓ 2 callersFunctioncapture_borrowed_amount
(obligation: &Obligation, borrow_reserve_address: Pubkey)
programs/klend/src/handlers/handler_rollover_fixed_term_borrow.rs:193
↓ 2 callersFunctioncheck_and_update_withdrawal_caps
( caps: &mut WithdrawalCaps, requested_amount: u64, curr_timestamp: u64, actio
programs/klend/src/lending_market/withdrawal_cap_operations.rs:177
↓ 2 callersFunctioncheck_below_reserve_utilization_limit
( reserve: &Reserve, borrow_amount: Fraction, )
programs/klend/src/lending_market/lending_operations.rs:1406
↓ 2 callersFunctioncheck_borrow_possible
( market: &LendingMarket, reserve: &Reserve, obligation: &Obligation, clock: &
programs/klend/src/lending_market/lending_operations.rs:3556
↓ 2 callersFunctioncheck_elevation_group_borrowing_enabled
( market: &LendingMarket, obligation: &Obligation, )
programs/klend/src/lending_market/lending_operations.rs:3172
↓ 2 callersFunctioncheck_gte
( min: T, )
programs/klend/src/lending_market/config_items.rs:264
↓ 2 callersFunctioncheck_lte
( max: T, )
programs/klend/src/lending_market/config_items.rs:277
↓ 2 callersFunctioncheck_non_elevation_group_borrowing_enabled
(obligation: &Obligation)
programs/klend/src/lending_market/lending_operations.rs:3643
↓ 2 callersFunctioncheck_not_updated
(name: &str, current: &T, new: T)
programs/klend/src/state/borrow_order_operations.rs:407
↓ 2 callersFunctioncheck_obligation_fully_refreshed_and_not_null
( obligation: &Obligation, slot: Slot, )
programs/klend/src/lending_market/lending_operations.rs:4050
↓ 2 callersFunctioncheck_only_supported_extensions_on_liquidity_ta
( token_acc_info: &AccountInfo, )
programs/klend/src/utils/constraints.rs:165
↓ 2 callersFunctioncheck_order_remaining_debt_value
( remaining_debt_amount: u64, lending_market: &LendingMarket, reserve: &Reserve, )
programs/klend/src/state/borrow_order_operations.rs:286
↓ 2 callersMethodcheck_ownership_transfer_in_initiated_state
(&self)
programs/klend/src/state/obligation.rs:615
↓ 2 callersFunctioncheck_permissions_and_strip
( market: &LendingMarket, op_reserves: &[&Reserve], op: PermissionedOp, remaining_accounts: &'
programs/klend/src/utils/permissioning.rs:100
↓ 2 callersFunctioncheck_price_age
( price_timestamp: u64, max_age_seconds: u64, current_timestamp: u64, )
programs/klend/src/utils/prices/checks.rs:104
↓ 2 callersFunctioncheck_remaining_accounts
(ctx: &Context<T>)
programs/klend/src/utils/constraints.rs:16
↓ 2 callersFunctioncheck_repay_possible
( reserve: &Reserve, obligation: &Obligation, clock: &Clock, )
programs/klend/src/lending_market/lending_operations.rs:3617
↓ 2 callersFunctioncheck_rollover_possible
( market: &LendingMarket, source_reserve_address: Pubkey, source_reserve: &Reserve, target_res
programs/klend/src/lending_market/lending_operations.rs:1156
↓ 2 callersFunctioncheck_same_elevation_group
(obligation: &Obligation, reserve: &Reserve)
programs/klend/src/lending_market/lending_operations.rs:3651
↓ 2 callersMethodchecked_fraction_collateral_to_liquidity
( &self, collateral_amount: Fraction, )
programs/klend/src/state/reserve.rs:1435
↓ 2 callersFunctionclose_account_loader
( close_account: bool, owner: &Signer<'info>, account_to_be_closed: &AccountLoader<'info, T>, )
programs/klend/src/utils/account_ops.rs:10
↓ 2 callersFunctioncompress_block
Compress a single 64-byte block into the state, returning the new state. Uses value semantics to avoid `&mut` (not available in const fn on Rust 1.74)
libs/klend-interface/src/discriminators.rs:36
↓ 2 callersFunctionconfigure_reserve
( svm: &mut LiteSVM, admin: &Keypair, lending_market: &Pubkey, reserve: &Pubkey, pyth_orac
libs/klend-interface/tests/integration/setup.rs:323
↓ 2 callersFunctioncreate_mint
(svm: &mut LiteSVM, payer: &Keypair, decimals: u8)
libs/klend-interface/tests/integration/setup.rs:415
↓ 2 callersFunctioncreate_pyth_price_account
Create a mock Pyth `PriceUpdateV2` account and inject it into the SVM. Returns the account's pubkey.
libs/klend-interface/tests/integration/pyth.rs:9
↓ 2 callersMethodcurrent_borrow_rate
(&self)
programs/klend/src/state/reserve.rs:165
↓ 2 callersMethoddeposit
(&mut self, liquidity_amount: u64)
programs/klend/src/state/reserve.rs:1136
↓ 2 callersMethoddeposit
Deposit liquidity into a reserve and credit collateral to this obligation.
libs/klend-interface/src/helpers/context.rs:31
↓ 2 callersFunctiondeposit_first
( env: &mut setup::TestEnv, user: &solana_sdk::signature::Keypair, obligation: &solana_sdk::pubkey
libs/klend-interface/tests/integration/test_borrow_repay.rs:5
↓ 2 callersMethoddeposit_limit_crossed
(&self)
programs/klend/src/state/reserve.rs:863
↓ 2 callersFunctiondeposit_obligation_collateral
( lending_market: &LendingMarket, deposit_reserve: &mut Reserve, obligation: &mut Obligation,
programs/klend/src/lending_market/lending_operations.rs:319
↓ 2 callersFunctiondeposit_reserve_liquidity
( reserve: &mut Reserve, clock: &Clock, liquidity_amount: u64, )
programs/klend/src/lending_market/lending_operations.rs:122
↓ 2 callersFunctiondeposit_reserve_liquidity_and_obligation_collateral_v2
( accounts: DepositReserveLiquidityAndObligationCollateralV2Accounts, liquidity_amount: u64, )
libs/klend-interface/src/instructions/deposit.rs:136
↓ 2 callersFunctiondeposit_reserve_liquidity_transfer
( source_liquidity_deposit: AccountInfo<'a>, destination_liquidity_deposit: AccountInfo<'a>, user_
programs/klend/src/utils/token_transfer.rs:34
↓ 2 callersFunctiondeserialize
(deserializer: D)
programs/klend/src/utils/permissioning.rs:136
↓ 2 callersFunctiondeserialize
(deserializer: D)
programs/klend/src/state/mod.rs:326
↓ 2 callersMethoddiv_ceil
(&self, denum: &Self)
programs/klend/src/utils/fraction.rs:173
↓ 2 callersFunctionevaluate_take_profit
( current_value: Fraction, condition_threshold: Fraction, )
programs/klend/src/state/obligation_order_operations.rs:477
↓ 2 callersFunctionfarms_user_state
Farms user state PDA for an obligation on a specific farm. Seeds: `[b"user", farm_state, obligation]` on [`crate::FARMS_PROGRAM_ID`].
libs/klend-interface/src/pda.rs:146
↓ 2 callersMethodfind_or_add_liquidity_to_borrows
( &mut self, borrow_reserve: Pubkey, cumulative_borrow_rate: BigFraction, )
programs/klend/src/state/obligation.rs:399
↓ 2 callersMethodfmt
(&self, f: &mut std::fmt::Formatter<'_>)
programs/klend/src/lending_market/config_items.rs:387
↓ 2 callersFunctionfor_object
(target: &mut H)
programs/klend/src/lending_market/config_items.rs:82
↓ 2 callersMethodfull_mul_int_ratio_ceil
( &self, numerator: impl Into<U256>, denominator: impl Into<U256>, )
programs/klend/src/utils/fraction.rs:157
↓ 2 callersFunctionget_autodeleverage_liquidation_params
( autodeleverage_reserve: &Reserve, obligation: &Obligation, secs_since_deleveraging_started: u64,
programs/klend/src/state/liquidation_operations.rs:724
↓ 2 callersMethodget_debt_maturity_timestamp
(&self)
programs/klend/src/state/reserve.rs:1750
↓ 2 callersFunctionget_emode_max_liquidation_bonus
( lending_market: &LendingMarket, collateral_reserve: &ReserveConfig, debt_reserve: &ReserveConfig
programs/klend/src/state/liquidation_operations.rs:305
↓ 2 callersMethodget_market_price
(&self)
programs/klend/src/state/reserve.rs:1284
↓ 2 callersMethodget_min_debt_term_seconds
(&self)
programs/klend/src/state/obligation.rs:1619
↓ 2 callersFunctionget_price
( token_info: &TokenInfo, pyth_price_account_info: Option<&AccountInfo>, switchboard_price_feed_in
programs/klend/src/utils/prices/mod.rs:30
↓ 2 callersFunctionget_price_usd
( scope_prices: &ScopePrices, tokens_chain: ScopeConversionChain, )
programs/klend/src/utils/prices/scope.rs:78
↓ 2 callersMethodget_secs_since_debt_maturity_reached
(&self, current_timestamp: u64)
programs/klend/src/state/reserve.rs:1762
↓ 2 callersFunctionget_switchboard_price
( switchboard_feed_info: &AccountInfo, clock: &Clock, )
programs/klend/src/utils/prices/switchboard.rs:34
↓ 2 callersFunctionglobal_config
(program_id: &Pubkey)
libs/klend-interface/src/pda.rs:105
↓ 2 callersMethodhas_debt
(&self)
programs/klend/src/state/obligation.rs:523
↓ 2 callersMethodhas_obsolete_reserves
(&self)
programs/klend/src/state/obligation.rs:555
↓ 2 callersFunctionidentify_instruction
Identify a Klend instruction from its raw instruction data. Returns `Some(variant)` if the first 8 bytes match a known discriminator, `None` otherwis
libs/klend-interface/src/discriminators.rs:335
↓ 2 callersFunctioninit_obligation
Build instructions to initialize an obligation. The obligation PDA and user-metadata PDA are derived automatically. For a vanilla obligation (tag=0)
libs/klend-interface/src/helpers/lifecycle.rs:42
↓ 2 callersFunctioninit_reserve
( svm: &mut LiteSVM, admin: &Keypair, market: &Keypair, reserve: &Keypair, liquidity_mint:
libs/klend-interface/tests/integration/setup.rs:287
↓ 2 callersFunctioninitialize_pda_token_account
( payer: &AccountInfo<'info>, token_account: &AccountInfo<'info>, token_mint: &InterfaceAccount<'i
programs/klend/src/utils/account_ops.rs:25
↓ 2 callersMethodis_borrow_order_execution_enabled
(&self)
programs/klend/src/state/lending_market.rs:431
↓ 2 callersMethodis_flash_forbidden_cpi_call
(&self)
programs/klend/src/lending_market/ix_utils.rs:18
↓ 2 callersMethodis_forbidden_cpi_call
(&self)
programs/klend/src/lending_market/ix_utils.rs:44
↓ 2 callersMethodis_obligation_borrow_rollover_configuration_enabled
(&self)
programs/klend/src/state/lending_market.rs:443
↓ 2 callersMethodis_permissioned_market
(&self)
programs/klend/src/state/lending_market.rs:511
↓ 2 callersFunctionis_price_refresh_needed
( reserve: &Reserve, market: &LendingMarket, current_ts: clock::UnixTimestamp, )
programs/klend/src/lending_market/lending_operations.rs:100
↓ 2 callersMethodis_price_triggered_liquidation_disabled
(&self)
programs/klend/src/state/lending_market.rs:403
↓ 2 callersFunctionis_term_satisfied
(min_requested_seconds: Option<u64>, max_offered_seconds: Option<u64>)
programs/klend/src/state/borrow_order_operations.rs:422
↓ 2 callersFunctionis_update_reserve_config_mode_global_admin_only
(mode: UpdateConfigMode)
programs/klend/src/lending_market/lending_operations.rs:4133
↓ 2 callersMethodis_used
(&self, min_initial_deposit_amount: u64)
programs/klend/src/state/reserve.rs:919
↓ 2 callersMethodliquidity_to_collateral_ceil
(&self, liquidity_amount: u64)
programs/klend/src/state/reserve.rs:1539
↓ 2 callersMethodmarket_value
(&self)
programs/klend/src/state/obligation.rs:943
↓ 2 callersMethodmint_factor
(&self)
programs/klend/src/state/reserve.rs:1189
↓ 2 callersMethodmul
(self, rhs: Self)
programs/klend/src/utils/fraction.rs:326
↓ 2 callersFunctionobligation_has_no_active_borrow_orders_check
(obligation: &Obligation)
programs/klend/src/lending_market/lending_checks.rs:931
↓ 2 callersFunctionobligation_ownership_transfer_execution_context_checks
( instruction_sysvar_account: &AccountInfo, )
programs/klend/src/lending_market/lending_checks.rs:913
↓ 2 callersFunctionobligation_ownership_transfer_precondition_checks
( instruction_sysvar_account: &AccountInfo, obligation: &Obligation, )
programs/klend/src/lending_market/lending_checks.rs:921
↓ 2 callersMethodonly_element
(self)
programs/klend/src/utils/validation.rs:12
↓ 2 callersMethodposition_of_collateral_in_deposits
(&self, deposit_reserve: Pubkey)
programs/klend/src/state/obligation.rs:356
↓ 2 callersFunctionpost_transfer_owner_queued_collateral_vault_balance_checks
( final_owner_queued_collateral_vault_balance: u64, final_queued_collateral: u64, initial_owner_qu
programs/klend/src/lending_market/lending_checks.rs:567
↓ 2 callersFunctionprocess
( ctx: Context<RepayAndWithdraw>, repay_amount: u64, withdraw_collateral_amount: u64, )
programs/klend/src/handlers/handler_repay_and_withdraw_redeem.rs:15
↓ 2 callersFunctionprocess_impl
( accounts: &SocializeLoss, remaining_accounts: &[AccountInfo], liquidity_amount: u64, )
programs/klend/src/handlers/handler_socialize_loss.rs:62
↓ 2 callersFunctionprocess_impl
( accounts: &WithdrawObligationCollateralAndRedeemReserveCollateral, collateral_amount: u64, ltv_m
programs/klend/src/handlers/handler_withdraw_obligation_collateral_and_redeem_reserve_collateral.rs:72
↓ 2 callersFunctionprocess_impl
( accounts: &DepositObligationCollateral, collateral_amount: u64, permission_account: Option<&Acco
programs/klend/src/handlers/handler_deposit_obligation_collateral.rs:56
↓ 2 callersFunctionprocess_impl
( accounts: &DepositReserveLiquidityAndObligationCollateral, liquidity_amount: u64, max_reserves_a
programs/klend/src/handlers/handler_deposit_reserve_liquidity_and_obligation_collateral.rs:64
↓ 2 callersFunctionprocess_impl
(accounts: &WithdrawObligationCollateral, collateral_amount: u64)
programs/klend/src/handlers/handler_withdraw_obligation_collateral.rs:46
↓ 2 callersFunctionprocess_impl
( accounts: &LiquidateObligationAndRedeemReserveCollateral, remaining_accounts: &[AccountInfo], li
programs/klend/src/handlers/handler_liquidate_obligation_and_redeem_reserve_collateral.rs:80
↓ 2 callersFunctionprocess_impl_refresh_obligation_farms_for_reserve
( account_ctx: &RefreshObligationFarmsForReserveBase, farm_kind: ReserveFarmKind, )
programs/klend/src/handlers/handler_refresh_obligation_farms_for_reserve.rs:21
↓ 2 callersMethodqueued_liquidity_amount
(&self)
programs/klend/src/state/reserve.rs:234
↓ 2 callersFunctionrecover_withdraw_queue_collateral_transfer
( collateral_token_program: AccountInfo<'a>, reserve_collateral_mint: AccountInfo<'a>, owner_queue
programs/klend/src/utils/token_transfer.rs:244
↓ 2 callersFunctionredeem
Build instructions to redeem cTokens for underlying liquidity (no obligation). Returns: `[refresh_reserve, redeem_reserve_collateral]`
libs/klend-interface/src/helpers/withdraw.rs:128
↓ 2 callersFunctionredeem_reserve_collateral_checks
(accounts: &RedeemReserveCollateralAccounts)
programs/klend/src/lending_market/lending_checks.rs:268
↓ 2 callersFunctionredeem_reserve_collateral_transfer
( collateral_token_program: AccountInfo<'a>, liquidity_token_program: AccountInfo<'a>, reserve_liq
programs/klend/src/utils/token_transfer.rs:162
↓ 2 callersMethodreduce_exp_lossy
(self, target_exp: u32)
programs/klend/src/utils/prices/types.rs:63
↓ 2 callersFunctionrefresh_obligation_borrows
( program_id: &Pubkey, obligation: &mut Obligation, lending_market: &LendingMarket, clock: &Cl
programs/klend/src/lending_market/lending_operations.rs:1675
↓ 2 callersFunctionrefresh_obligation_deposits
( obligation: &mut Obligation, lending_market: &LendingMarket, slot: Slot, elevation_group: Op
programs/klend/src/lending_market/lending_operations.rs:1536
↓ 2 callersFunctionrefresh_reserves_batch
Build a `refresh_reserves_batch` instruction from a slice of reserve infos. The remaining_accounts list is built automatically: for each reserve, the
libs/klend-interface/src/helpers/refresh.rs:33
↓ 2 callersFunctionremaining_withdrawal_caps_amount
(caps: &WithdrawalCaps, timestamp: u64)
programs/klend/src/lending_market/withdrawal_cap_operations.rs:152
↓ 2 callersMethodrepay
Repay borrowed liquidity.
libs/klend-interface/src/helpers/context.rs:100
↓ 2 callersFunctionrequires_permission
( market: &LendingMarket, op_reserves: &[&Reserve], op: PermissionedOp, )
programs/klend/src/utils/permissioning.rs:65
← previousnext →201–300 of 1,058, ranked by callers