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
↓ 144 callers
Method
key
(&self)
programs/klend/src/utils/account_loader_trait.rs:213
↓ 111 callers
Method
set
(self, source: &[u8])
programs/klend/src/lending_market/config_items.rs:151
↓ 95 callers
Method
load
(&self)
programs/klend/src/utils/account_loader_trait.rs:95
↓ 77 callers
Method
as_ref
(&self)
programs/klend/src/utils/account_loader_trait.rs:201
↓ 73 callers
Method
clone
(&self)
programs/klend/src/handlers/handler_withdraw_protocol_fees.rs:96
↓ 65 callers
Method
load_mut
(&self)
programs/klend/src/utils/account_loader_trait.rs:111
↓ 61 callers
Method
validating
(self, new: NV)
programs/klend/src/lending_market/config_items.rs:106
↓ 56 callers
Method
clone
(&self)
programs/klend/src/utils/accounts.rs:22
↓ 45 callers
Function
process
(ctx: Context<RedeemFees>)
programs/klend/src/handlers/handler_redeem_fees.rs:11
↓ 44 callers
Method
to_bits
(&self)
programs/klend/src/utils/fraction.rs:262
↓ 30 callers
Function
default_array
()
programs/klend/src/utils/accounts.rs:29
↓ 28 callers
Method
serialize
(&self, serializer: S)
programs/klend/src/state/reserve.rs:2065
↓ 28 callers
Method
total_available_liquidity_amount
(&self)
programs/klend/src/state/reserve.rs:213
↓ 27 callers
Function
create_token_account
( svm: &mut LiteSVM, payer: &Keypair, mint: &Pubkey, owner: &Pubkey, )
libs/klend-interface/tests/integration/setup.rs:445
↓ 27 callers
Method
mark_stale
(&mut self)
programs/klend/src/state/last_update.rs:102
↓ 26 callers
Function
setup_full_env
()
libs/klend-interface/tests/integration/setup.rs:56
↓ 23 callers
Function
check_reserve_emergency_mode
(reserve: &Reserve)
programs/klend/src/lending_market/lending_checks.rs:25
↓ 22 callers
Function
build_reserve_info
(env: &TestEnv)
libs/klend-interface/tests/integration/setup.rs:568
↓ 19 callers
Method
borrowed_amount
(&self)
programs/klend/src/state/obligation.rs:948
↓ 19 callers
Method
is_stale
(&self, slot: Slot, min_price_status: PriceStatusFlags)
programs/klend/src/state/last_update.rs:107
↓ 19 callers
Function
token_balance
(svm: &mut LiteSVM, token_account: &Pubkey)
libs/klend-interface/tests/integration/setup.rs:506
↓ 18 callers
Function
create_user_and_obligation
(env: &mut TestEnv)
libs/klend-interface/tests/integration/setup.rs:516
↓ 18 callers
Function
lending_market_authority
(program_id: &Pubkey, lending_market: &Pubkey)
libs/klend-interface/src/pda.rs:36
↓ 18 callers
Function
refresh_reserve
( reserve: &mut Reserve, clock: &Clock, price: Option<GetPriceResult>, referral_fee_bps: u16,
programs/klend/src/lending_market/lending_operations.rs:42
↓ 17 callers
Function
advance_clock_by_slots
(svm: &mut LiteSVM, slots: u64)
libs/klend-interface/tests/integration/setup.rs:499
↓ 16 callers
Method
borrow
(&mut self, borrow_f: Fraction, use_withdraw_queue: bool)
programs/klend/src/state/reserve.rs:467
↓ 16 callers
Function
build_obligation_info
( obligation: &Pubkey, reserve: &Pubkey, has_deposit: bool, has_borrow: bool, )
libs/klend-interface/tests/integration/setup.rs:595
↓ 16 callers
Function
build_refresh_reserve
(reserve: &ReserveInfo)
libs/klend-interface/src/helpers/common.rs:12
↓ 16 callers
Function
check_only_supported_liquidity_token_extensions
( mint_acc_info: &AccountInfo, token_acc_info: &AccountInfo, )
programs/klend/src/utils/constraints.rs:73
↓ 16 callers
Function
from_account_data
Cast raw account data (including the 8-byte Anchor discriminator) to `&T`. Verifies the discriminator matches `T::SPL_DISCRIMINATOR` before casting.
libs/klend-interface/src/state/mod.rs:66
↓ 15 callers
Method
loan_to_value
(&self)
programs/klend/src/state/obligation.rs:226
↓ 14 callers
Function
readonly
(pubkey: Pubkey)
libs/klend-interface/src/util.rs:25
↓ 13 callers
Method
find_reserve
(&self, address: &Pubkey)
libs/klend-interface/src/helpers/info.rs:342
↓ 13 callers
Method
is_active
(&self)
programs/klend/src/state/obligation.rs:756
↓ 13 callers
Function
mint_to
( svm: &mut LiteSVM, authority: &Keypair, mint: &Pubkey, destination: &Pubkey, amount: u64
libs/klend-interface/tests/integration/setup.rs:473
↓ 13 callers
Function
optional_account
Build an `AccountMeta` for an optional account. When `opt` is `None`, the program ID is substituted (Anchor 0.29 convention for optional accounts).
libs/klend-interface/src/util.rs:6
↓ 12 callers
Function
build_refresh_obligation
( lending_market: &Pubkey, obligation: &ObligationInfo, )
libs/klend-interface/src/helpers/common.rs:51
↓ 12 callers
Method
get_mut
(&self)
programs/klend/src/utils/account_loader_trait.rs:22
↓ 12 callers
Method
is_enabled
(&self)
programs/klend/src/state/token_info.rs:234
↓ 12 callers
Function
post_transfer_vault_balance_liquidity_reserve_checks
( final_reserve_vault_balance: u64, final_reserve_available_liquidity: u64, initial_reserve_vault_
programs/klend/src/lending_market/lending_checks.rs:454
↓ 11 callers
Function
calculate_market_value_from_liquidity_amount
( reserve: &Reserve, liquidity_amount: Fraction, )
programs/klend/src/lending_market/lending_operations.rs:3056
↓ 11 callers
Method
collateral_exchange_rate
(&self)
programs/klend/src/state/reserve.rs:549
↓ 11 callers
Method
to_ceil
(&self)
programs/klend/src/utils/fraction.rs:188
↓ 11 callers
Method
to_floor
(&self)
programs/klend/src/utils/fraction.rs:183
↓ 11 callers
Function
writable
(pubkey: Pubkey)
libs/klend-interface/src/util.rs:33
↓ 10 callers
Function
build_refresh_all_obligation_reserves
Build refresh instructions for all unique obligation reserves, skipping any already-refreshed ones. This ensures that `refresh_obligation` won't fail
libs/klend-interface/src/helpers/common.rs:80
↓ 10 callers
Function
deposit_to_obligation
Build instructions to deposit liquidity into a reserve and credit the resulting collateral to an obligation. `obligation_reserves` should contain [`R
libs/klend-interface/src/helpers/deposit.rs:61
↓ 9 callers
Method
all_reserve_infos
(&self)
libs/klend-interface/src/helpers/info.rs:346
↓ 9 callers
Function
check_reserve_status_and_version
(reserve: &Reserve)
programs/klend/src/lending_market/lending_checks.rs:33
↓ 9 callers
Method
condition_threshold
(&self)
programs/klend/src/state/obligation.rs:1425
↓ 9 callers
Method
find_liquidity_in_borrows
( &self, borrow_reserve: Pubkey, )
programs/klend/src/state/obligation.rs:368
↓ 9 callers
Function
get_elevation_group
( elevation_group_id: u8, market: &LendingMarket, )
programs/klend/src/lending_market/lending_operations.rs:4004
↓ 9 callers
Function
non_default
Helper: returns `Some(key)` if it is not `Pubkey::default()`.
libs/klend-interface/src/helpers/info.rs:46
↓ 9 callers
Method
to_string
(&self)
programs/klend/src/utils/permissioning.rs:53
↓ 9 callers
Method
total_supply
(&self)
programs/klend/src/state/reserve.rs:1123
↓ 8 callers
Method
get_debt_term_seconds
(&self)
programs/klend/src/state/reserve.rs:1736
↓ 8 callers
Method
is_active_borrows_empty
(&self)
programs/klend/src/state/obligation.rs:433
↓ 8 callers
Method
load_init
(&self)
programs/klend/src/utils/account_loader_trait.rs:134
↓ 8 callers
Function
process_v1
(ctx: Context<SocializeLoss>, liquidity_amount: u64)
programs/klend/src/handlers/handler_socialize_loss.rs:39
↓ 8 callers
Function
process_v2
(ctx: Context<SocializeLossV2>, liquidity_amount: u64)
programs/klend/src/handlers/handler_socialize_loss.rs:44
↓ 8 callers
Method
rendering
(self, new: NR)
programs/klend/src/lending_market/config_items.rs:129
↓ 8 callers
Method
repay
(&mut self, repay_amount: u64, settle_amount: Fraction)
programs/klend/src/state/reserve.rs:1145
↓ 8 callers
Method
total_borrow
(&self)
programs/klend/src/state/reserve.rs:1131
↓ 7 callers
Function
borrow
Build instructions to borrow liquidity from a reserve against an obligation. `obligation_reserves` should contain [`ReserveInfo`] for every deposit a
libs/klend-interface/src/helpers/borrow.rs:27
↓ 7 callers
Function
build_context
Helper: build an ObligationContext using manual ReserveInfo (matches test env setup).
libs/klend-interface/tests/integration/test_obligation_context.rs:6
↓ 7 callers
Method
collateral_farms
(&self, reserve_address: &Pubkey)
libs/klend-interface/src/helpers/info.rs:350
↓ 7 callers
Method
collateral_to_liquidity
(&self, collateral_amount: u64)
programs/klend/src/state/reserve.rs:1404
↓ 7 callers
Method
find_liquidity_in_borrows_mut
( &mut self, borrow_reserve: Pubkey, )
programs/klend/src/state/obligation.rs:383
↓ 7 callers
Method
get
(&self)
programs/klend/src/utils/account_loader_trait.rs:25
↓ 7 callers
Method
get_pubkey
(&self)
programs/klend/src/utils/account_loader_trait.rs:29
↓ 7 callers
Method
is_active_deposits_empty
(&self)
programs/klend/src/state/obligation.rs:427
↓ 7 callers
Function
obligation
( program_id: &Pubkey, tag: u8, id: u8, owner: &Pubkey, lending_market: &Pubkey, seed1
libs/klend-interface/src/pda.rs:40
↓ 7 callers
Function
reserve_collateral_mint
(program_id: &Pubkey, reserve: &Pubkey)
libs/klend-interface/src/pda.rs:70
↓ 7 callers
Method
unhealthy_loan_to_value
(&self)
programs/klend/src/state/obligation.rs:237
↓ 6 callers
Method
active_borrows_count
(&self)
programs/klend/src/state/obligation.rs:443
↓ 6 callers
Method
freely_available_liquidity_amount
(&self)
programs/klend/src/state/reserve.rs:219
↓ 6 callers
Method
get_index
(&self)
programs/klend/src/state/lending_market.rs:595
↓ 6 callers
Method
load_instruction_at
(&self, index: usize)
programs/klend/src/lending_market/ix_utils.rs:114
↓ 6 callers
Method
named
(mut self, name: impl Into<String>)
programs/klend/src/lending_market/config_items.rs:99
↓ 6 callers
Method
next
(&mut self)
programs/klend/src/utils/validation.rs:67
↓ 6 callers
Function
price_to_fraction
(price: Price<T>)
programs/klend/src/utils/prices/utils.rs:10
↓ 6 callers
Function
refresh_reserve_limit_timestamps
(reserve: &mut Reserve, timestamp: u64)
programs/klend/src/lending_market/lending_operations.rs:117
↓ 5 callers
Method
active_deposits_count
(&self)
programs/klend/src/state/obligation.rs:439
↓ 5 callers
Method
borrow_factor_f
(&self, is_in_elevation_group: bool)
programs/klend/src/state/reserve.rs:174
↓ 5 callers
Method
borrow_reserve_address
(&self)
programs/klend/src/state/obligation.rs:1329
↓ 5 callers
Function
capture_reserve_accounting_and_balance
( reserve: &Reserve, reserve_liquidity_vault: &InterfaceAccount<TokenAccount>, )
programs/klend/src/handlers/handler_rollover_fixed_term_borrow.rs:169
↓ 5 callers
Function
check_enabled_rollover_config_integrity
( market: &LendingMarket, config: &FixedTermBorrowRolloverConfig, )
programs/klend/src/lending_market/lending_operations.rs:4502
↓ 5 callers
Function
deposit
( env: &mut setup::TestEnv, user: &solana_sdk::signature::Keypair, obligation: &solana_sdk::pubkey
libs/klend-interface/tests/integration/test_withdraw.rs:6
↓ 5 callers
Method
emit
(&self, event: impl Event)
programs/klend/src/utils/emit_cpi_support.rs:29
↓ 5 callers
Function
for_field
( field: &mut T, )
programs/klend/src/lending_market/config_items.rs:52
↓ 5 callers
Method
get_farm
(&self, mode: ReserveFarmKind)
programs/klend/src/state/reserve.rs:184
↓ 5 callers
Method
has_referrer
(&self)
programs/klend/src/state/obligation.rs:511
↓ 5 callers
Method
is_autodeleverage_enabled
(&self)
programs/klend/src/state/reserve.rs:1723
↓ 5 callers
Method
is_migration_to_fixed_enabled
(&self)
programs/klend/src/state/obligation.rs:1113
↓ 5 callers
Method
load_current_index
(&self)
programs/klend/src/lending_market/ix_utils.rs:118
↓ 5 callers
Method
next
(&mut self)
programs/klend/src/lending_market/ix_utils.rs:146
↓ 5 callers
Method
no_bf_loan_to_value
(&self)
programs/klend/src/state/obligation.rs:231
↓ 5 callers
Method
opportunity_parameter
(&self)
programs/klend/src/state/obligation.rs:1435
↓ 5 callers
Method
slots_elapsed
(&self, slot: Slot)
programs/klend/src/state/last_update.rs:84
↓ 5 callers
Method
status
(&self)
programs/klend/src/state/reserve.rs:1719
next →
1–100 of 1,058, ranked by callers