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
reserve_collateral_supply
(program_id: &Pubkey, reserve: &Pubkey)
libs/klend-interface/src/pda.rs:74
↓ 2 callers
Function
reserve_fee_receiver
(program_id: &Pubkey, reserve: &Pubkey)
libs/klend-interface/src/pda.rs:66
↓ 2 callers
Function
reserve_liquidity_supply
(program_id: &Pubkey, reserve: &Pubkey)
libs/klend-interface/src/pda.rs:62
↓ 2 callers
Method
to_display
(&self)
programs/klend/src/utils/fraction.rs:220
↓ 2 callers
Method
unhealthy_borrow_value
Unhealthy borrow value (liquidation threshold) as a raw u128 scaled fraction.
libs/klend-interface/src/state/obligation.rs:91
↓ 2 callers
Function
update_counter
( caps: &mut WithdrawalCaps, requested_amount: u64, action: WithdrawalCapAction,
programs/klend/src/lending_market/withdrawal_cap_operations.rs:44
↓ 2 callers
Function
update_elevation_group_debt_trackers_on_full_withdraw
( previous_debt_in_elevation_group: u64, elevation_group_id: u8, deposit_reserve: &mut
programs/klend/src/lending_market/lending_operations.rs:3470
↓ 2 callers
Method
update_slot
(&mut self, slot: Slot, price_status: impl Into<Option<PriceStatusFlags>>)
programs/klend/src/state/last_update.rs:92
↓ 2 callers
Method
using_setter_and_getter
( self, setter: S, getter: G, )
programs/klend/src/lending_market/config_items.rs:190
↓ 2 callers
Method
validate
(&self)
programs/klend/src/utils/borrow_rate_curve.rs:144
↓ 2 callers
Function
validate_pyth_confidence
( pyth_price: &PythPrice, oracle_confidence_factor: u64, )
programs/klend/src/utils/prices/pyth.rs:71
↓ 2 callers
Method
validate_token_info_config
( &self, pyth_info: Option<&AccountInfo>, switchboard_price_info: Option<&AccountInfo>
programs/klend/src/state/token_info.rs:76
↓ 2 callers
Method
withdraw
( &mut self, withdraw_amount: u64, collateral_index: usize, )
programs/klend/src/state/obligation.rs:255
↓ 2 callers
Method
withdraw
Withdraw collateral from this obligation and redeem it for liquidity.
libs/klend-interface/src/helpers/context.rs:54
↓ 2 callers
Function
withdraw_and_redeem_reserve_collateral_transfer
( collateral_token_program: AccountInfo<'a>, liquidity_token_program: AccountInfo<'a>, reserve_liq
programs/klend/src/utils/token_transfer.rs:203
↓ 2 callers
Method
withdraw_including_queued
(&mut self, liquidity_amount: u64)
programs/klend/src/state/reserve.rs:887
↓ 2 callers
Function
withdraw_obligation_collateral
( lending_market: &LendingMarket, withdraw_reserve: &mut Reserve, obligation: &mut Obligation,
programs/klend/src/lending_market/lending_operations.rs:413
↓ 2 callers
Function
withdraw_obligation_collateral_transfer
( token_program: AccountInfo<'a>, destination_collateral: AccountInfo<'a>, source_collateral: Acco
programs/klend/src/utils/token_transfer.rs:136
↓ 1 callers
Method
abort_ownership_transfer
(&mut self)
programs/klend/src/state/obligation.rs:674
↓ 1 callers
Method
accept_ownership
(&mut self)
programs/klend/src/state/obligation.rs:664
↓ 1 callers
Method
accumulate_early_repay_penalty
(&mut self, penalty_lamports: u64)
programs/klend/src/state/reserve.rs:1170
↓ 1 callers
Function
accumulate_referrer_fees
( program_id: &Pubkey, borrow_reserve_info_key: Pubkey, borrow_reserve: &mut Reserve, obligati
programs/klend/src/lending_market/lending_operations.rs:2446
↓ 1 callers
Method
active_borrows_mut
(&mut self)
programs/klend/src/state/obligation.rs:459
↓ 1 callers
Method
add_farm
(&mut self, farm_state: &Pubkey, mode: ReserveFarmKind)
programs/klend/src/state/reserve.rs:398
↓ 1 callers
Function
amount_for_obligation
( obligation: &Obligation, reserve_address: &Pubkey, farm_kind: ReserveFarmKind, )
programs/klend/src/handlers/handler_refresh_obligation_farms_for_reserve.rs:138
↓ 1 callers
Method
apply_pending_admin
(&mut self)
programs/klend/src/state/global_config.rs:88
↓ 1 callers
Method
approve_ownership_transfer
(&mut self)
programs/klend/src/state/obligation.rs:656
↓ 1 callers
Function
assert_obligation_liquidatable
( repay_reserve: &Reserve, withdraw_reserve: &Reserve, obligation: &Obligation,
programs/klend/src/lending_market/lending_operations.rs:4076
↓ 1 callers
Function
base_authority
(vault: Pubkey)
programs/klend/src/utils/seeds.rs:129
↓ 1 callers
Function
borrow_obligation_liquidity
( lending_market: &LendingMarket, borrow_reserve: &mut Reserve, obligation: &mut Obligation, b
programs/klend/src/lending_market/lending_operations.rs:177
↓ 1 callers
Function
borrow_obligation_liquidity_checks
(accounts: &BorrowObligationLiquidity)
programs/klend/src/lending_market/lending_checks.rs:47
↓ 1 callers
Method
borrowable_liquidity_amount_outside_elevation_group
( &self, timestamp: u64, )
programs/klend/src/state/reserve.rs:326
↓ 1 callers
Method
borrowed_amount
Total borrowed amount as a raw u128 scaled fraction.
libs/klend-interface/src/state/reserve.rs:45
↓ 1 callers
Method
borrowed_amount_at_expiration
(&self)
programs/klend/src/state/obligation.rs:953
↓ 1 callers
Function
build_init_lending_market_ix
(owner: &Pubkey, lending_market: &Pubkey)
libs/klend-interface/tests/integration/setup.rs:153
↓ 1 callers
Function
build_init_reserve_ix
( signer: &Pubkey, lending_market: &Pubkey, reserve: &Pubkey, liquidity_mint: &Pubkey, ini
libs/klend-interface/tests/integration/setup.rs:176
↓ 1 callers
Method
burn
(&mut self, collateral_amount: u64)
programs/klend/src/state/reserve.rs:1349
↓ 1 callers
Function
burn_with_signer
( token_mint: AccountInfo<'info>, token_ata: AccountInfo<'info>, authority: AccountInfo<'info>,
programs/klend/src/utils/spltoken.rs:59
↓ 1 callers
Function
calculate_autodeleverage_threshold
( autodeleverage_reserve: &Reserve, days_since_deleveraging_started: Fraction, )
programs/klend/src/state/liquidation_operations.rs:826
↓ 1 callers
Method
calculate_borrow
( &self, borrow_size: BorrowSize, max_borrow_factor_adjusted_debt_value: Fraction,
programs/klend/src/state/reserve.rs:690
↓ 1 callers
Method
calculate_early_repay_penalty
( &self, reserve: &Reserve, repay_amount: Fraction, current_timestamp: u64,
programs/klend/src/state/obligation.rs:993
↓ 1 callers
Method
calculate_flash_loan_fees
( &self, flash_loan_amount_f: Fraction, referral_fee_bps: u16, has_referrer: b
programs/klend/src/state/reserve.rs:2111
↓ 1 callers
Method
calculate_future_cumulative_borrow_rate
(&self, future_slot: u64)
programs/klend/src/state/reserve.rs:674
↓ 1 callers
Method
calculate_interest_for_period
( &self, amount: Fraction, time_period: Fraction, reserve: &Reserve, )
programs/klend/src/state/obligation.rs:915
↓ 1 callers
Function
calculate_liquidation
( collateral_reserve: &Reserve, debt_reserve: &Reserve, debt_amount_to_liquidate: u64, lending
programs/klend/src/state/liquidation_operations.rs:98
↓ 1 callers
Function
calculate_liquidation_amounts
( total_liquidation_value_including_bonus: Fraction, collateral: &ObligationCollateral, debt_liqui
programs/klend/src/state/liquidation_operations.rs:341
↓ 1 callers
Function
calculate_liquidation_bonus
( collateral_reserve_config: &ReserveConfig, debt_reserve_config: &ReserveConfig, max_allowed_ltv:
programs/klend/src/state/liquidation_operations.rs:394
↓ 1 callers
Function
calculate_obligation_collateral_market_value
( deposit_reserve: &Reserve, deposit: &ObligationCollateral, )
programs/klend/src/lending_market/lending_operations.rs:3066
↓ 1 callers
Function
calculate_obligation_liquidity_market_value
( borrow_reserve: &Reserve, borrow: &ObligationLiquidity, )
programs/klend/src/lending_market/lending_operations.rs:3080
↓ 1 callers
Function
calculate_order_execution_bonus_rate
( order: &ObligationOrder, condition_hit: &ConditionHit, user_no_bf_ltv: Fraction, )
programs/klend/src/state/liquidation_operations.rs:890
↓ 1 callers
Function
calculate_protocol_liquidation_fee
( amount_liquidated: u64, liquidation_bonus_rate: Fraction, protocol_liquidation_fee_pct: u8, )
programs/klend/src/state/liquidation_operations.rs:936
↓ 1 callers
Method
calculate_redeem_fees
(&self)
programs/klend/src/state/reserve.rs:855
↓ 1 callers
Method
calculate_repay
( &self, amount_to_repay: u64, borrowed_amount: Fraction, )
programs/klend/src/state/reserve.rs:836
↓ 1 callers
Function
cancel_withdraw_ticket
( lending_market: &LendingMarket, reserve: &mut Reserve, withdraw_ticket: &mut WithdrawTicket,
programs/klend/src/lending_market/lending_operations.rs:675
↓ 1 callers
Function
cancel_withdraw_ticket_checks
(accounts: &CancelWithdrawTicket)
programs/klend/src/lending_market/lending_checks.rs:657
↓ 1 callers
Method
capture_borrowed_amount_at_expiration
( &mut self, reserve_config: &ReserveConfig, timestamp: u64, )
programs/klend/src/state/obligation.rs:873
↓ 1 callers
Function
check_below_obligation_allowed_borrow_value
( obligation: &Obligation, reserve: &Reserve, borrowed_amount_increase: Fraction, )
programs/klend/src/lending_market/lending_operations.rs:1463
↓ 1 callers
Function
check_below_reserve_borrow_limit
(reserve: &Reserve, borrow_amount: Fraction)
programs/klend/src/lending_market/lending_operations.rs:1427
↓ 1 callers
Function
check_borrow_limit_outside_elevation_group_not_exceeded
(reserve: &Reserve)
programs/klend/src/lending_market/lending_operations.rs:1447
↓ 1 callers
Function
check_borrow_order_creation_enabled
(lending_market: &LendingMarket)
programs/klend/src/state/borrow_order_operations.rs:226
↓ 1 callers
Function
check_borrow_order_execution_enabled
(lending_market: &LendingMarket)
programs/klend/src/state/borrow_order_operations.rs:234
↓ 1 callers
Function
check_borrow_reserve_debt_term_reached
( &LiquidationCheckInputs { lending_market, collateral_reserve, liquidity,
programs/klend/src/state/liquidation_operations.rs:604
↓ 1 callers
Function
check_cpi_call
(instruction_sysvar_account_info: &AccountInfo)
programs/klend/src/utils/refresh_ix_utils.rs:35
↓ 1 callers
Function
check_debt_term_not_shortened_on_reserve_having_borrows
( previous_debt_term_seconds: Option<u64>, new_debt_term_seconds: Option<u64>, reserve_has_borrows
programs/klend/src/lending_market/lending_operations.rs:2894
↓ 1 callers
Function
check_default_account_state_initialized
(mint_acc_info: &AccountInfo)
programs/klend/src/utils/constraints.rs:217
↓ 1 callers
Function
check_elevation_group_borrow_limit_constraints
( obligation: &Obligation, elevation_group: Option<&ElevationGroup>, deposit_reserves_
programs/klend/src/lending_market/lending_operations.rs:3188
↓ 1 callers
Function
check_individual_autodeleverage_obligation
( &LiquidationCheckInputs { lending_market, collateral_reserve, debt_reserve,
programs/klend/src/state/liquidation_operations.rs:459
↓ 1 callers
Function
check_last_interval_elapsed
( caps: &mut WithdrawalCaps, curr_timestamp: u64, )
programs/klend/src/lending_market/withdrawal_cap_operations.rs:106
↓ 1 callers
Function
check_liquidate_obligation
( &LiquidationCheckInputs { lending_market, collateral_reserve, debt_reserve,
programs/klend/src/state/liquidation_operations.rs:250
↓ 1 callers
Function
check_ltv_not_worse_if_marked_for_deleveraging
( obligation: &Obligation, initial_ltv: Fraction, resulting_borrow_factor_adjusted_debt_value: Fra
programs/klend/src/lending_market/lending_operations.rs:1384
↓ 1 callers
Function
check_market_wide_autodeleverage_obligation
( &LiquidationCheckInputs { lending_market, collateral_reserve, debt_reserve,
programs/klend/src/state/liquidation_operations.rs:511
↓ 1 callers
Method
check_migration_to_fixed_term_possible
( &self, target_reserve_config: &ReserveConfig, )
programs/klend/src/state/obligation.rs:1193
↓ 1 callers
Function
check_min_withdrawn_queued_liquidity_value
( lending_market: &LendingMarket, reserve: &Reserve, liquidity_amount_to_withdraw: u64, ticket
programs/klend/src/lending_market/lending_operations.rs:1359
↓ 1 callers
Function
check_not_set_in_the_past
(subject_timestamp: u64, clock: &Clock)
programs/klend/src/lending_market/lending_operations.rs:4484
↓ 1 callers
Function
check_obligation_collateral_deposit_reserve
( deposit: &ObligationCollateral, deposit_reserve: &Reserve, deposit_reserve_pk: Pubke
programs/klend/src/lending_market/lending_operations.rs:3089
↓ 1 callers
Function
check_obligation_liquidity_borrow_reserve
( borrow: &ObligationLiquidity, borrow_reserve: &Reserve, borrow_reserve_pk: Pubkey,
programs/klend/src/lending_market/lending_operations.rs:3130
↓ 1 callers
Function
check_obligation_order_execution
( &LiquidationCheckInputs { lending_market, collateral_reserve, debt_reserve,
programs/klend/src/state/liquidation_operations.rs:646
↓ 1 callers
Function
check_obligation_seeds
( tag: u8, seed1_account: &AccountInfo, seed2_account: &AccountInfo, )
programs/klend/src/handlers/handler_init_obligation.rs:72
↓ 1 callers
Function
check_order_config_valid
( order_config: &BorrowOrderConfig, lending_market: &LendingMarket, reserve: &Reserve, timesta
programs/klend/src/state/borrow_order_operations.rs:242
↓ 1 callers
Method
check_ownership_transfer_approved
(&self)
programs/klend/src/state/obligation.rs:623
↓ 1 callers
Method
check_ownership_transfer_not_in_progress
(&self)
programs/klend/src/state/obligation.rs:597
↓ 1 callers
Function
check_price_heuristics
(token_price: Fraction, heuristic: &PriceHeuristic)
programs/klend/src/utils/prices/checks.rs:147
↓ 1 callers
Function
check_proper_fraction
(sf: &u64)
programs/klend/src/lending_market/lending_operations.rs:2998
↓ 1 callers
Function
check_reserve_debt_maturity_reached
( &LiquidationCheckInputs { lending_market, debt_reserve, obligation, time
programs/klend/src/state/liquidation_operations.rs:562
↓ 1 callers
Function
check_rollover_into_existing_slot_possible
( source_borrow: &ObligationLiquidity, target_borrow: &ObligationLiquidity, source_reserve: &Reser
programs/klend/src/lending_market/lending_operations.rs:1249
↓ 1 callers
Function
check_same_reserve_rollover_liquidity_available
( reserve: &Reserve, borrow: &ObligationLiquidity, )
programs/klend/src/lending_market/lending_operations.rs:1336
↓ 1 callers
Function
check_twap_in_tolerance
(price: Fraction, twap: Fraction, token_info: &TokenInfo)
programs/klend/src/utils/prices/checks.rs:130
↓ 1 callers
Function
check_within_rollover_window
( source_reserve: &Reserve, source_borrow: &ObligationLiquidity, rollover_window_duration_seconds:
programs/klend/src/lending_market/lending_operations.rs:1302
↓ 1 callers
Method
checked_pow
(&self, power: u32)
programs/klend/src/utils/fraction.rs:130
↓ 1 callers
Function
checked_secs_to_slots
(secs: Fraction)
programs/klend/src/utils/secs.rs:20
↓ 1 callers
Function
clone_reserve_config
( source_reserve: &Reserve, target_reserve: &mut Reserve, customizations: ReserveConfigCustomizati
programs/klend/src/lending_market/lending_operations.rs:2872
↓ 1 callers
Method
collateral_to_liquidity_ceil
(&self, collateral_amount: u64)
programs/klend/src/state/reserve.rs:1411
↓ 1 callers
Method
compound_interest
( &mut self, current_borrow_rate: Fraction, host_fixed_interest_rate: Fraction,
programs/klend/src/state/reserve.rs:1217
↓ 1 callers
Method
compute_depositable_amount_and_minted_collateral
( &self, liquidity_amount: u64, )
programs/klend/src/state/reserve.rs:405
↓ 1 callers
Method
consume
(&mut self, debt_repay_amount: u64)
programs/klend/src/state/obligation.rs:1462
↓ 1 callers
Function
cpi_initialize_farm_delegated
(ctx: &Context<InitFarmsForReserve>)
programs/klend/src/lending_market/farms_ixs.rs:17
↓ 1 callers
Function
cpi_initialize_farmer_delegated
( ctx: &Context<InitObligationFarmsForReserve>, obligation: &Pubkey, farm: Pubkey, )
programs/klend/src/lending_market/farms_ixs.rs:57
↓ 1 callers
Function
cpi_set_stake_delegated
( accounts_ctx: &RefreshObligationFarmsForReserveBase, reserve: &Reserve, mode: ReserveFarmKind,
programs/klend/src/lending_market/farms_ixs.rs:103
↓ 1 callers
Function
cpi_update_klend_queue_accounting
( ctx: &Context<WithdrawQueuedLiquidity>, withdraw_ticket_sequence_number: u64, ticketed_withdraw_
programs/klend/src/lending_market/kvault_ixs.rs:15
↓ 1 callers
Function
create_ata
( account: AccountInfo<'a>, owner: AccountInfo<'a>, mint: AccountInfo<'a>, token_program: Acco
programs/klend/src/utils/accounts.rs:59
← previous
next →
301–400 of 1,058, ranked by callers