1๏ธLending Core
The core entry of NAVI Protocol.
As a developer, your primary interactions with the NAVI Protocol will take place through the functions within the lending_core::incentive_v3 module. This module serves as the entry point for all write transactions, including deposits, withdrawals, borrowing, repayment, liquidations, and reward claims
Entry Functions
entry_deposit
public entry fun entry_deposit<CoinType>(
clock: &Clock,
storage: &mut Storage,
pool: &mut Pool<CoinType>,
asset: u8,
deposit_coin: Coin<CoinType>,
amount: u64,
incentive_v2: &mut IncentiveV2,
incentive_v3: &mut Incentive,
ctx: &mut TxContext
) {}entry_withdraw_v2
entry_borrow_v2
entry_repay
claim_reward_entry
entry_liquidation_v2
Non-entry Functions
deposit_with_account_cap
withdraw_v2
withdraw_with_account_cap_v2
borrow_v2
borrow_with_account_cap_v2
repay
repay_with_account_cap
claim_reward
For users who want to implement customized and native reward claiming, we provide the following instructions:
Step-by-Step Process
Retrieve Claimable Rewards
Use
get_user_claimable_rewardsto fetch claimable reward information.Parse the response using
parse_claimable_rewardsto determine RewardCoinType, coin_types, and rule_ids
get_user_claimable_rewards
parse_claimable_rewards
The
coin_typesare derived from the asset tokens involved.The
rule_idsare extracted from the parsed claimable rewards.
Execute
claim_reward
claim_reward_with_account_cap
Sample: Provide the appropriate parameters:
Full Claim Contract Demo
example: https://suivision.xyz/txblock/5Nr7nkQg8GGLepEPVRmZ2CamkUgsSoNMqDyhNGbVqjjW
Last updated