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
↓ 5 callers
Function
user_metadata
(program_id: &Pubkey, owner: &Pubkey)
libs/klend-interface/src/pda.rs:93
↓ 4 callers
Method
active_borrows
(&self)
programs/klend/src/state/obligation.rs:451
↓ 4 callers
Method
active_deposits
(&self)
programs/klend/src/state/obligation.rs:447
↓ 4 callers
Function
approximate_compounded_interest
(rate: Fraction, elapsed_slots: u64)
programs/klend/src/state/reserve.rs:2215
↓ 4 callers
Method
borrow
Borrow liquidity from a reserve against this obligation.
libs/klend-interface/src/helpers/context.rs:8
↓ 4 callers
Function
build_deposit_reserves_remaining
(obligation: &ObligationInfo)
libs/klend-interface/src/helpers/common.rs:65
↓ 4 callers
Function
build_reserve_info_for
( reserve: &Pubkey, lending_market: &Pubkey, liquidity_mint: &Pubkey, pyth_oracle: &Pubkey, )
libs/klend-interface/tests/integration/setup.rs:577
↓ 4 callers
Function
check_in_range
( range: RangeInclusive<u128>, )
programs/klend/src/lending_market/config_items.rs:243
↓ 4 callers
Function
check_orders_supported_after_user_operation
(obligation: &mut Obligation)
programs/klend/src/state/obligation_order_operations.rs:166
↓ 4 callers
Function
check_permissions
( market: &LendingMarket, op_reserves: &[&Reserve], op: PermissionedOp, permissioning_acct: Op
programs/klend/src/utils/permissioning.rs:77
↓ 4 callers
Method
condition_type
(&self)
programs/klend/src/state/obligation.rs:1420
↓ 4 callers
Method
debt_farms
(&self, reserve_address: &Pubkey)
libs/klend-interface/src/helpers/info.rs:363
↓ 4 callers
Method
dequeue
(&mut self, collateral_amount: u64, ticket_closed: bool)
programs/klend/src/state/reserve.rs:1052
↓ 4 callers
Method
execution_bonus_rate_range
(&self)
programs/klend/src/state/obligation.rs:1444
↓ 4 callers
Method
find_liquidity_index_in_borrows
(&self, borrow_reserve: Pubkey)
programs/klend/src/state/obligation.rs:421
↓ 4 callers
Method
fraction_collateral_to_liquidity
(&self, collateral_amount: Fraction)
programs/klend/src/state/reserve.rs:1460
↓ 4 callers
Method
get_debt_term_end_timestamp
(&self, reserve_config: &ReserveConfig)
programs/klend/src/state/obligation.rs:968
↓ 4 callers
Method
get_elevation_group
(&self, id: u8)
programs/klend/src/state/lending_market.rs:376
↓ 4 callers
Function
get_max_ltv_and_liquidation_threshold
( deposit_reserve: &Reserve, elevation_group: Option<&ElevationGroup>, )
programs/klend/src/lending_market/lending_operations.rs:4032
↓ 4 callers
Method
init
(&mut self, params: InitReserveParams)
programs/klend/src/state/reserve.rs:152
↓ 4 callers
Function
init_user
Build instructions to initialize user metadata. Prerequisite for creating obligations. Returns: `[init_user_metadata]`
libs/klend-interface/src/helpers/lifecycle.rs:17
↓ 4 callers
Method
is_emergency_mode
(&self)
programs/klend/src/state/reserve.rs:1731
↓ 4 callers
Method
is_marked_for_deleveraging
(&self)
programs/klend/src/state/obligation.rs:527
↓ 4 callers
Method
is_twap_enabled
(&self)
programs/klend/src/state/token_info.rs:113
↓ 4 callers
Method
is_usage_blocked
(&self)
programs/klend/src/state/reserve.rs:926
↓ 4 callers
Function
maybe_price_account
( price_account: Option<&'a AccountInfo<'info>>, )
programs/klend/src/handlers/handler_refresh_reserves_batch.rs:11
↓ 4 callers
Method
opportunity_type
(&self)
programs/klend/src/state/obligation.rs:1430
↓ 4 callers
Function
panicking_shl
(number: U256, bit_count: u32)
programs/klend/src/utils/fraction.rs:461
↓ 4 callers
Function
process_impl
( accounts: &RepayObligationLiquidity, remaining_accounts: impl Iterator<Item = &'a AccountInfo<'info>
programs/klend/src/handlers/handler_repay_obligation_liquidity.rs:50
↓ 4 callers
Function
redeem_reserve_collateral
( reserve: &mut Reserve, collateral_amount: u64, clock: &Clock, RedeemCollateralOptions {
programs/klend/src/lending_market/lending_operations.rs:574
↓ 4 callers
Function
referrer_token_state
( program_id: &Pubkey, referrer: &Pubkey, reserve: &Pubkey, )
libs/klend-interface/src/pda.rs:78
↓ 4 callers
Method
remaining_borrow_capacity
(&self)
programs/klend/src/state/reserve.rs:394
↓ 4 callers
Function
to_days_fractional
(secs: u64)
programs/klend/src/utils/secs.rs:8
↓ 4 callers
Method
withdraw_freely_available
(&mut self, liquidity_amount: u64)
programs/klend/src/state/reserve.rs:901
↓ 4 callers
Method
zip_exact
( self, rights: impl IntoIterator<Item = R::Item, IntoIter = R>, )
programs/klend/src/utils/validation.rs:4
↓ 3 callers
Method
active_deposits_mut
(&mut self)
programs/klend/src/state/obligation.rs:455
↓ 3 callers
Function
add_referrer_fee
( borrow_reserve: &mut Reserve, referrer_token_state: &mut ReferrerTokenState, referrer_fee: Fract
programs/klend/src/lending_market/lending_operations.rs:2431
↓ 3 callers
Function
add_second_reserve
Create a second reserve (reserve B) in the same lending market as the test env. Returns (reserve_keypair, liquidity_mint, pyth_oracle).
libs/klend-interface/tests/integration/test_multi_reserve.rs:10
↓ 3 callers
Function
add_to_withdrawal_accum
( caps: &mut WithdrawalCaps, requested_amount: u64, curr_timestamp: u64, )
programs/klend/src/lending_market/withdrawal_cap_operations.rs:122
↓ 3 callers
Method
borrow_factor_adjusted_debt_value
Borrow-factor-adjusted debt value as a raw u128 scaled fraction.
libs/klend-interface/src/state/obligation.rs:96
↓ 3 callers
Function
borrow_obligation_liquidity_process_impl
( accounts: &BorrowObligationLiquidity<'info>, remaining_accounts: &[AccountInfo<'info>], borrow_s
programs/klend/src/handlers/handler_borrow_obligation_liquidity.rs:61
↓ 3 callers
Function
borrow_obligation_liquidity_transfer
( token_program: AccountInfo<'a>, liquidity_mint: AccountInfo<'a>, reserve_liquidity: AccountInfo<
programs/klend/src/utils/token_transfer.rs:298
↓ 3 callers
Function
calculate_autodeleverage_bonus_rate
( reserve_min_deleveraging_bonus_bps: u16, deleveraging_bonus_increase_bps_per_day: u64, reserve_m
programs/klend/src/state/liquidation_operations.rs:847
↓ 3 callers
Function
capture_obligation_borrows_accounting
( obligation: &Obligation, source_reserve_address: Pubkey, target_reserve_address: Pubkey, )
programs/klend/src/handlers/handler_rollover_fixed_term_borrow.rs:182
↓ 3 callers
Function
check_min_withdraw_ticket_value
( lending_market: &LendingMarket, reserve: &Reserve, collateral_amount: u64, )
programs/klend/src/lending_market/lending_operations.rs:944
↓ 3 callers
Method
check_not_marked_for_deleveraging
(&self)
programs/klend/src/state/obligation.rs:544
↓ 3 callers
Function
check_only_supported_extensions_on_liquidity_mint
( mint_acc_info: &AccountInfo, )
programs/klend/src/utils/constraints.rs:83
↓ 3 callers
Function
clear_expired_borrow_order_on_initiating_obligation_ownership_transfer
( obligation: &mut Obligation, clock: &Clock, )
programs/klend/src/lending_market/lending_operations.rs:2418
↓ 3 callers
Method
clear_if_past_fillable_timestamp
(&mut self, timestamp: u64)
programs/klend/src/state/obligation.rs:1627
↓ 3 callers
Function
clear_obligation_orders_if_no_debt
(obligation: &mut Obligation)
programs/klend/src/lending_market/lending_operations.rs:3542
↓ 3 callers
Function
compute_discriminator
Compute the 8-byte Anchor discriminator for a given instruction name. Uses the convention: `sha256("global:<snake_case_name>")[..8]`
libs/klend-interface/src/discriminators.rs:5
↓ 3 callers
Function
deposit_initial_reserve_liquidity_transfer
( source_liquidity_deposit: AccountInfo<'a>, destination_liquidity_deposit: AccountInfo<'a>, sourc
programs/klend/src/utils/token_transfer.rs:75
↓ 3 callers
Function
deposit_to_reserve_a
Deposit into reserve A via the obligation.
libs/klend-interface/tests/integration/test_multi_reserve.rs:40
↓ 3 callers
Function
evaluate_stop_loss
( current_value: Fraction, condition_threshold: Fraction, liquidation_threshold: Fraction, )
programs/klend/src/state/obligation_order_operations.rs:452
↓ 3 callers
Method
find_collateral_in_deposits
( &self, deposit_reserve: Pubkey, )
programs/klend/src/state/obligation.rs:318
↓ 3 callers
Function
flash_loan
Build instructions for a flash loan (borrow + repay pair). The returned instructions must be placed in a single transaction. The caller can insert ar
libs/klend-interface/src/helpers/flash.rs:24
↓ 3 callers
Method
full_mul_int_ratio
(&self, numerator: impl Into<U256>, denominator: impl Into<U256>)
programs/klend/src/utils/fraction.rs:145
↓ 3 callers
Method
get_price_status
(&self)
programs/klend/src/state/last_update.rs:115
↓ 3 callers
Function
get_secs_since_deleveraging_started
( deleveraging_margin_call_period_secs: u64, secs_since_margin_call_started: u64, )
programs/klend/src/state/liquidation_operations.rs:810
↓ 3 callers
Method
get_secs_since_reserve_debt_term_end
( &self, reserve_config: &ReserveConfig, timestamp: u64, )
programs/klend/src/state/obligation.rs:959
↓ 3 callers
Function
has_ata_address
( account: &impl Key, owner: &Pubkey, mint: &Pubkey, token_program: &Pubkey, )
programs/klend/src/utils/accounts.rs:48
↓ 3 callers
Method
has_twap
(&self)
programs/klend/src/state/token_info.rs:243
↓ 3 callers
Method
is_auto_rollover_enabled
(&self)
programs/klend/src/state/obligation.rs:1109
↓ 3 callers
Function
is_default_array
(array: &[T])
programs/klend/src/utils/accounts.rs:42
↓ 3 callers
Method
is_supported_by
(&self, obligation: &Obligation)
programs/klend/src/state/obligation_order_operations.rs:252
↓ 3 callers
Method
is_zero
(&self)
programs/klend/src/state/types.rs:42
↓ 3 callers
Method
liquidity_amount_to_market_value
(&self, liquidity_amount: Fraction)
programs/klend/src/state/reserve.rs:1197
↓ 3 callers
Method
liquidity_to_collateral
(&self, liquidity_amount: u64)
programs/klend/src/state/reserve.rs:1520
↓ 3 callers
Method
max_borrow_rate_bps
(&self)
programs/klend/src/state/reserve.rs:1770
↓ 3 callers
Function
owner_queued_collateral_vault
( program_id: &Pubkey, reserve: &Pubkey, owner: &Pubkey, )
libs/klend-interface/src/pda.rs:124
↓ 3 callers
Method
ownership_transfer_state
(&self)
programs/klend/src/state/obligation.rs:587
↓ 3 callers
Function
repay
Build instructions to repay borrowed liquidity. `obligation_reserves` should contain [`ReserveInfo`] for every deposit and borrow reserve on the obli
libs/klend-interface/src/helpers/repay.rs:26
↓ 3 callers
Function
repay_obligation_liquidity_transfer
( token_program: AccountInfo<'a>, liquidity_mint: AccountInfo<'a>, user_liquidity: AccountInfo<'a>
programs/klend/src/utils/token_transfer.rs:271
↓ 3 callers
Function
setup_with_deposit
Helper: set up env, create user+obligation, deposit via ObligationContext.
libs/klend-interface/tests/integration/test_obligation_context.rs:23
↓ 3 callers
Function
sub_from_withdrawal_accum
( caps: &mut WithdrawalCaps, requested_amount: u64, curr_timestamp: u64, )
programs/klend/src/lending_market/withdrawal_cap_operations.rs:135
↓ 3 callers
Method
symbol
(&self)
programs/klend/src/state/token_info.rs:184
↓ 3 callers
Function
ten_pow
(exponent: u32)
programs/klend/src/utils/prices/utils.rs:28
↓ 3 callers
Method
to_account_infos
(&self)
programs/klend/src/utils/account_loader_trait.rs:207
↓ 3 callers
Method
to_account_metas
(&self, is_signer: Option<bool>)
programs/klend/src/utils/account_loader_trait.rs:190
↓ 3 callers
Method
total_redeemable_collateral_amount
(&self)
programs/klend/src/state/reserve.rs:303
↓ 3 callers
Function
update_elevation_group_debt_trackers_on_repay
( repay_amount: u64, obligation: &mut Obligation, obligation_borrow_index: usize,
programs/klend/src/lending_market/lending_operations.rs:3373
↓ 3 callers
Method
update_has_debt
(&mut self)
programs/klend/src/state/obligation.rs:515
↓ 3 callers
Function
validate_referrer_token_state
( program_id: &Pubkey, referrer_token_state: &ReferrerTokenState, referrer_token_state_key: Pubkey
programs/klend/src/lending_market/lending_checks.rs:846
↓ 3 callers
Function
withdraw
Build instructions to withdraw collateral from an obligation **and** redeem it for the underlying liquidity tokens. `obligation_reserves` should cont
libs/klend-interface/src/helpers/withdraw.rs:29
↓ 3 callers
Function
withdraw_collateral
Build instructions to withdraw collateral (cTokens) from an obligation without** redeeming them for liquidity. `obligation_reserves` should contain [
libs/klend-interface/src/helpers/withdraw.rs:84
↓ 3 callers
Function
withdraw_fees_from_reserve
( token_program: AccountInfo<'a>, reserve_liquidity_mint: AccountInfo<'a>, reserve_supply_liquidit
programs/klend/src/utils/token_transfer.rs:382
↓ 3 callers
Function
withdraw_ticket
( program_id: &Pubkey, reserve: &Pubkey, sequence_number: u64, )
libs/klend-interface/src/pda.rs:109
↓ 2 callers
Method
accrue_interest
(&mut self, current_slot: Slot, referral_fee_bps: u16)
programs/klend/src/state/reserve.rs:555
↓ 2 callers
Method
add
(&mut self, op: PermissionedOp)
programs/klend/src/utils/permissioning.rs:43
↓ 2 callers
Method
allowed_borrow_value
Allowed borrow value (weighted-avg LTV) as a raw u128 scaled fraction.
libs/klend-interface/src/state/obligation.rs:86
↓ 2 callers
Method
borrow_limit_crossed
(&self)
programs/klend/src/state/reserve.rs:868
↓ 2 callers
Function
borrow_obligation_liquidity_v2
( accounts: BorrowObligationLiquidityV2Accounts, liquidity_amount: u64, remaining_accounts: Vec<Ac
libs/klend-interface/src/instructions/borrow.rs:28
↓ 2 callers
Function
build_refresh_obligation_remaining_accounts
( obligation: &ObligationInfo, )
libs/klend-interface/src/helpers/common.rs:23
↓ 2 callers
Function
build_update_reserve_config_ix
( signer: &Pubkey, lending_market: &Pubkey, reserve: &Pubkey, mode: u8, value: Vec<u8>,
libs/klend-interface/tests/integration/setup.rs:230
↓ 2 callers
Function
burn
( token_mint: AccountInfo<'info>, user_token_ata: AccountInfo<'info>, user: AccountInfo<'info>,
programs/klend/src/utils/spltoken.rs:37
↓ 2 callers
Function
calculate_autodeleverage_bonus_rate_from_coll_and_debt_reserves
( lending_market: &LendingMarket, collateral_reserve: &Reserve, debt_reserve: &Reserve, obliga
programs/klend/src/state/liquidation_operations.rs:688
↓ 2 callers
Method
calculate_borrow_all_available
( &self, max_borrow_factor_adjusted_debt_value: Fraction, referral_fee_bps: u16,
programs/klend/src/state/reserve.rs:744
↓ 2 callers
Method
calculate_borrow_exact
( &self, receive_amount: u64, max_borrow_factor_adjusted_debt_value: Fraction,
programs/klend/src/state/reserve.rs:777
↓ 2 callers
Method
calculate_borrow_fees
( &self, borrow_amount: Fraction, fee_calculation: FeeCalculation, referral_fe
programs/klend/src/state/reserve.rs:2094
↓ 2 callers
Method
calculate_fees
( &self, amount: Fraction, fee_sf: u64, fee_calculation: FeeCalculation,
programs/klend/src/state/reserve.rs:2130
← previous
next →
101–200 of 1,058, ranked by callers