Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Kamino-Finance/klend
/ functions
Functions
1,058 in github.com/Kamino-Finance/klend
⨍
Functions
1,058
◇
Types & classes
302
↓ 2 callers
Function
calculate_price_ratio
(numerator_reserve: &Reserve, denominator_reserve: &Reserve)
programs/klend/src/state/obligation_order_operations.rs:490
↓ 2 callers
Function
capture_borrowed_amount
(obligation: &Obligation, borrow_reserve_address: Pubkey)
programs/klend/src/handlers/handler_rollover_fixed_term_borrow.rs:193
↓ 2 callers
Function
check_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 callers
Function
check_below_reserve_utilization_limit
( reserve: &Reserve, borrow_amount: Fraction, )
programs/klend/src/lending_market/lending_operations.rs:1406
↓ 2 callers
Function
check_borrow_possible
( market: &LendingMarket, reserve: &Reserve, obligation: &Obligation, clock: &
programs/klend/src/lending_market/lending_operations.rs:3556
↓ 2 callers
Function
check_elevation_group_borrowing_enabled
( market: &LendingMarket, obligation: &Obligation, )
programs/klend/src/lending_market/lending_operations.rs:3172
↓ 2 callers
Function
check_gte
( min: T, )
programs/klend/src/lending_market/config_items.rs:264
↓ 2 callers
Function
check_lte
( max: T, )
programs/klend/src/lending_market/config_items.rs:277
↓ 2 callers
Function
check_non_elevation_group_borrowing_enabled
(obligation: &Obligation)
programs/klend/src/lending_market/lending_operations.rs:3643
↓ 2 callers
Function
check_not_updated
(name: &str, current: &T, new: T)
programs/klend/src/state/borrow_order_operations.rs:407
↓ 2 callers
Function
check_obligation_fully_refreshed_and_not_null
( obligation: &Obligation, slot: Slot, )
programs/klend/src/lending_market/lending_operations.rs:4050
↓ 2 callers
Function
check_only_supported_extensions_on_liquidity_ta
( token_acc_info: &AccountInfo, )
programs/klend/src/utils/constraints.rs:165
↓ 2 callers
Function
check_order_remaining_debt_value
( remaining_debt_amount: u64, lending_market: &LendingMarket, reserve: &Reserve, )
programs/klend/src/state/borrow_order_operations.rs:286
↓ 2 callers
Method
check_ownership_transfer_in_initiated_state
(&self)
programs/klend/src/state/obligation.rs:615
↓ 2 callers
Function
check_permissions_and_strip
( market: &LendingMarket, op_reserves: &[&Reserve], op: PermissionedOp, remaining_accounts: &'
programs/klend/src/utils/permissioning.rs:100
↓ 2 callers
Function
check_price_age
( price_timestamp: u64, max_age_seconds: u64, current_timestamp: u64, )
programs/klend/src/utils/prices/checks.rs:104
↓ 2 callers
Function
check_remaining_accounts
(ctx: &Context<T>)
programs/klend/src/utils/constraints.rs:16
↓ 2 callers
Function
check_repay_possible
( reserve: &Reserve, obligation: &Obligation, clock: &Clock, )
programs/klend/src/lending_market/lending_operations.rs:3617
↓ 2 callers
Function
check_rollover_possible
( market: &LendingMarket, source_reserve_address: Pubkey, source_reserve: &Reserve, target_res
programs/klend/src/lending_market/lending_operations.rs:1156
↓ 2 callers
Function
check_same_elevation_group
(obligation: &Obligation, reserve: &Reserve)
programs/klend/src/lending_market/lending_operations.rs:3651
↓ 2 callers
Method
checked_fraction_collateral_to_liquidity
( &self, collateral_amount: Fraction, )
programs/klend/src/state/reserve.rs:1435
↓ 2 callers
Function
close_account_loader
( close_account: bool, owner: &Signer<'info>, account_to_be_closed: &AccountLoader<'info, T>, )
programs/klend/src/utils/account_ops.rs:10
↓ 2 callers
Function
compress_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 callers
Function
configure_reserve
( svm: &mut LiteSVM, admin: &Keypair, lending_market: &Pubkey, reserve: &Pubkey, pyth_orac
libs/klend-interface/tests/integration/setup.rs:323
↓ 2 callers
Function
create_mint
(svm: &mut LiteSVM, payer: &Keypair, decimals: u8)
libs/klend-interface/tests/integration/setup.rs:415
↓ 2 callers
Function
create_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 callers
Method
current_borrow_rate
(&self)
programs/klend/src/state/reserve.rs:165
↓ 2 callers
Method
deposit
(&mut self, liquidity_amount: u64)
programs/klend/src/state/reserve.rs:1136
↓ 2 callers
Method
deposit
Deposit liquidity into a reserve and credit collateral to this obligation.
libs/klend-interface/src/helpers/context.rs:31
↓ 2 callers
Function
deposit_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 callers
Method
deposit_limit_crossed
(&self)
programs/klend/src/state/reserve.rs:863
↓ 2 callers
Function
deposit_obligation_collateral
( lending_market: &LendingMarket, deposit_reserve: &mut Reserve, obligation: &mut Obligation,
programs/klend/src/lending_market/lending_operations.rs:319
↓ 2 callers
Function
deposit_reserve_liquidity
( reserve: &mut Reserve, clock: &Clock, liquidity_amount: u64, )
programs/klend/src/lending_market/lending_operations.rs:122
↓ 2 callers
Function
deposit_reserve_liquidity_and_obligation_collateral_v2
( accounts: DepositReserveLiquidityAndObligationCollateralV2Accounts, liquidity_amount: u64, )
libs/klend-interface/src/instructions/deposit.rs:136
↓ 2 callers
Function
deposit_reserve_liquidity_transfer
( source_liquidity_deposit: AccountInfo<'a>, destination_liquidity_deposit: AccountInfo<'a>, user_
programs/klend/src/utils/token_transfer.rs:34
↓ 2 callers
Function
deserialize
(deserializer: D)
programs/klend/src/utils/permissioning.rs:136
↓ 2 callers
Function
deserialize
(deserializer: D)
programs/klend/src/state/mod.rs:326
↓ 2 callers
Method
div_ceil
(&self, denum: &Self)
programs/klend/src/utils/fraction.rs:173
↓ 2 callers
Function
evaluate_take_profit
( current_value: Fraction, condition_threshold: Fraction, )
programs/klend/src/state/obligation_order_operations.rs:477
↓ 2 callers
Function
farms_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 callers
Method
find_or_add_liquidity_to_borrows
( &mut self, borrow_reserve: Pubkey, cumulative_borrow_rate: BigFraction, )
programs/klend/src/state/obligation.rs:399
↓ 2 callers
Method
fmt
(&self, f: &mut std::fmt::Formatter<'_>)
programs/klend/src/lending_market/config_items.rs:387
↓ 2 callers
Function
for_object
(target: &mut H)
programs/klend/src/lending_market/config_items.rs:82
↓ 2 callers
Method
full_mul_int_ratio_ceil
( &self, numerator: impl Into<U256>, denominator: impl Into<U256>, )
programs/klend/src/utils/fraction.rs:157
↓ 2 callers
Function
get_autodeleverage_liquidation_params
( autodeleverage_reserve: &Reserve, obligation: &Obligation, secs_since_deleveraging_started: u64,
programs/klend/src/state/liquidation_operations.rs:724
↓ 2 callers
Method
get_debt_maturity_timestamp
(&self)
programs/klend/src/state/reserve.rs:1750
↓ 2 callers
Function
get_emode_max_liquidation_bonus
( lending_market: &LendingMarket, collateral_reserve: &ReserveConfig, debt_reserve: &ReserveConfig
programs/klend/src/state/liquidation_operations.rs:305
↓ 2 callers
Method
get_market_price
(&self)
programs/klend/src/state/reserve.rs:1284
↓ 2 callers
Method
get_min_debt_term_seconds
(&self)
programs/klend/src/state/obligation.rs:1619
↓ 2 callers
Function
get_price
( token_info: &TokenInfo, pyth_price_account_info: Option<&AccountInfo>, switchboard_price_feed_in
programs/klend/src/utils/prices/mod.rs:30
↓ 2 callers
Function
get_price_usd
( scope_prices: &ScopePrices, tokens_chain: ScopeConversionChain, )
programs/klend/src/utils/prices/scope.rs:78
↓ 2 callers
Method
get_secs_since_debt_maturity_reached
(&self, current_timestamp: u64)
programs/klend/src/state/reserve.rs:1762
↓ 2 callers
Function
get_switchboard_price
( switchboard_feed_info: &AccountInfo, clock: &Clock, )
programs/klend/src/utils/prices/switchboard.rs:34
↓ 2 callers
Function
global_config
(program_id: &Pubkey)
libs/klend-interface/src/pda.rs:105
↓ 2 callers
Method
has_debt
(&self)
programs/klend/src/state/obligation.rs:523
↓ 2 callers
Method
has_obsolete_reserves
(&self)
programs/klend/src/state/obligation.rs:555
↓ 2 callers
Function
identify_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 callers
Function
init_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 callers
Function
init_reserve
( svm: &mut LiteSVM, admin: &Keypair, market: &Keypair, reserve: &Keypair, liquidity_mint:
libs/klend-interface/tests/integration/setup.rs:287
↓ 2 callers
Function
initialize_pda_token_account
( payer: &AccountInfo<'info>, token_account: &AccountInfo<'info>, token_mint: &InterfaceAccount<'i
programs/klend/src/utils/account_ops.rs:25
↓ 2 callers
Method
is_borrow_order_execution_enabled
(&self)
programs/klend/src/state/lending_market.rs:431
↓ 2 callers
Method
is_flash_forbidden_cpi_call
(&self)
programs/klend/src/lending_market/ix_utils.rs:18
↓ 2 callers
Method
is_forbidden_cpi_call
(&self)
programs/klend/src/lending_market/ix_utils.rs:44
↓ 2 callers
Method
is_obligation_borrow_rollover_configuration_enabled
(&self)
programs/klend/src/state/lending_market.rs:443
↓ 2 callers
Method
is_permissioned_market
(&self)
programs/klend/src/state/lending_market.rs:511
↓ 2 callers
Function
is_price_refresh_needed
( reserve: &Reserve, market: &LendingMarket, current_ts: clock::UnixTimestamp, )
programs/klend/src/lending_market/lending_operations.rs:100
↓ 2 callers
Method
is_price_triggered_liquidation_disabled
(&self)
programs/klend/src/state/lending_market.rs:403
↓ 2 callers
Function
is_term_satisfied
(min_requested_seconds: Option<u64>, max_offered_seconds: Option<u64>)
programs/klend/src/state/borrow_order_operations.rs:422
↓ 2 callers
Function
is_update_reserve_config_mode_global_admin_only
(mode: UpdateConfigMode)
programs/klend/src/lending_market/lending_operations.rs:4133
↓ 2 callers
Method
is_used
(&self, min_initial_deposit_amount: u64)
programs/klend/src/state/reserve.rs:919
↓ 2 callers
Method
liquidity_to_collateral_ceil
(&self, liquidity_amount: u64)
programs/klend/src/state/reserve.rs:1539
↓ 2 callers
Method
market_value
(&self)
programs/klend/src/state/obligation.rs:943
↓ 2 callers
Method
mint_factor
(&self)
programs/klend/src/state/reserve.rs:1189
↓ 2 callers
Method
mul
(self, rhs: Self)
programs/klend/src/utils/fraction.rs:326
↓ 2 callers
Function
obligation_has_no_active_borrow_orders_check
(obligation: &Obligation)
programs/klend/src/lending_market/lending_checks.rs:931
↓ 2 callers
Function
obligation_ownership_transfer_execution_context_checks
( instruction_sysvar_account: &AccountInfo, )
programs/klend/src/lending_market/lending_checks.rs:913
↓ 2 callers
Function
obligation_ownership_transfer_precondition_checks
( instruction_sysvar_account: &AccountInfo, obligation: &Obligation, )
programs/klend/src/lending_market/lending_checks.rs:921
↓ 2 callers
Method
only_element
(self)
programs/klend/src/utils/validation.rs:12
↓ 2 callers
Method
position_of_collateral_in_deposits
(&self, deposit_reserve: Pubkey)
programs/klend/src/state/obligation.rs:356
↓ 2 callers
Function
post_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 callers
Function
process
( ctx: Context<RepayAndWithdraw>, repay_amount: u64, withdraw_collateral_amount: u64, )
programs/klend/src/handlers/handler_repay_and_withdraw_redeem.rs:15
↓ 2 callers
Function
process_impl
( accounts: &SocializeLoss, remaining_accounts: &[AccountInfo], liquidity_amount: u64, )
programs/klend/src/handlers/handler_socialize_loss.rs:62
↓ 2 callers
Function
process_impl
( accounts: &WithdrawObligationCollateralAndRedeemReserveCollateral, collateral_amount: u64, ltv_m
programs/klend/src/handlers/handler_withdraw_obligation_collateral_and_redeem_reserve_collateral.rs:72
↓ 2 callers
Function
process_impl
( accounts: &DepositObligationCollateral, collateral_amount: u64, permission_account: Option<&Acco
programs/klend/src/handlers/handler_deposit_obligation_collateral.rs:56
↓ 2 callers
Function
process_impl
( accounts: &DepositReserveLiquidityAndObligationCollateral, liquidity_amount: u64, max_reserves_a
programs/klend/src/handlers/handler_deposit_reserve_liquidity_and_obligation_collateral.rs:64
↓ 2 callers
Function
process_impl
(accounts: &WithdrawObligationCollateral, collateral_amount: u64)
programs/klend/src/handlers/handler_withdraw_obligation_collateral.rs:46
↓ 2 callers
Function
process_impl
( accounts: &LiquidateObligationAndRedeemReserveCollateral, remaining_accounts: &[AccountInfo], li
programs/klend/src/handlers/handler_liquidate_obligation_and_redeem_reserve_collateral.rs:80
↓ 2 callers
Function
process_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 callers
Method
queued_liquidity_amount
(&self)
programs/klend/src/state/reserve.rs:234
↓ 2 callers
Function
recover_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 callers
Function
redeem
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 callers
Function
redeem_reserve_collateral_checks
(accounts: &RedeemReserveCollateralAccounts)
programs/klend/src/lending_market/lending_checks.rs:268
↓ 2 callers
Function
redeem_reserve_collateral_transfer
( collateral_token_program: AccountInfo<'a>, liquidity_token_program: AccountInfo<'a>, reserve_liq
programs/klend/src/utils/token_transfer.rs:162
↓ 2 callers
Method
reduce_exp_lossy
(self, target_exp: u32)
programs/klend/src/utils/prices/types.rs:63
↓ 2 callers
Function
refresh_obligation_borrows
( program_id: &Pubkey, obligation: &mut Obligation, lending_market: &LendingMarket, clock: &Cl
programs/klend/src/lending_market/lending_operations.rs:1675
↓ 2 callers
Function
refresh_obligation_deposits
( obligation: &mut Obligation, lending_market: &LendingMarket, slot: Slot, elevation_group: Op
programs/klend/src/lending_market/lending_operations.rs:1536
↓ 2 callers
Function
refresh_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 callers
Function
remaining_withdrawal_caps_amount
(caps: &WithdrawalCaps, timestamp: u64)
programs/klend/src/lending_market/withdrawal_cap_operations.rs:152
↓ 2 callers
Method
repay
Repay borrowed liquidity.
libs/klend-interface/src/helpers/context.rs:100
↓ 2 callers
Function
requires_permission
( market: &LendingMarket, op_reserves: &[&Reserve], op: PermissionedOp, )
programs/klend/src/utils/permissioning.rs:65
← previous
next →
201–300 of 1,058, ranked by callers