/// Owner authority which can add new reservesowner:Pubkey,/// Currency market prices are quoted in/// e.g. "USD" null padded (`*b"USD\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\ 0\0\0\0\0\0\0\0\0"`) or a SPL token mint pubkey
quote_currency: [u8; 32],
SetLendingMarketOwner
Description: Sets the new owner of a lending market
Tag: 1
Accounts
0. `[writable]` Lending market account.1. `[signer]` Current owner.
Parameters
/// The new ownernew_owner:Pubkey,
InitReserve
Description: Initializes a new lending market reserve
Tag: 2
Accounts
0. `[writable]` Reserve account - uninitialized.1. `[]` Reserve liquidity SPL Token mint.2. `[]` Reserve liquidity supply SPL Token account.3. `[]` Reserve liquidity fee receiver.4. `[]` Pyth product account when is_lp is falseAny account when is_lp is true5. `[]` Reserve liquidity pyth oracle account when is_lp is false; BridgePool account of bridge program when is_lp is true6. `[]` Reserve liquidity larix oracle account when is_lp is falseLpPrice account of bridge program when is_lp is true7. `[]` Reserve collateral SPL Token mint.8. `[]` Reserve collateral token supply.9 `[]` Lending market account.10 `[signer]` Lending market owner.11 `[]` Un_coll_supply_account12 `[]` Clock sysvar.13 `[]` Rent sysvar.14 `[]` Token program id.
Description: Refresh an obligation's accrued interest and collateral and liquidity prices. Requires refreshed reserves, as all obligation collateral deposit reserves in order, followed by all liquidity borrow reserves in order.
Tag: 7
Accounts
0. `[writable]` Obligation account.1. `[]` Collateral deposit reserve accounts - refreshed, all, in order.2. `[]` Liquidity borrow reserve accounts - refreshed, all, in order.
DepositObligationCollateral
Description: Deposit collateral to an obligation. Requires a refreshed reserve.
Tag: 8
Accounts
0. `[writable]` Source collateral token account.Minted by deposit reserve collateral mint.$authority can transfer $collateral_amount.1. `[writable]` Destination deposit reserve collateral supply SPL Token account.2. `[]` Deposit reserve account - refreshed.3. `[writable]` Obligation account.4. `[]` Lending market account.5. `[]` Derived lending market authority.6. `[signer]` Obligation owner.7. `[signer]` User transfer authority ($authority).8. `[]` Token program id.
Parameters
/// Amount of collateral tokens to depositcollateral_amount:u64,
WithdrawObligationCollateral
Description: Withdraw collateral from an obligation. Requires a refreshed obligation and reserve.
/// Amount of collateral tokens to withdraw - u64::MAX for up to 100% of deposited amountcollateral_amount:u64,
BorrowObligationLiquidity
Description: Borrow liquidity from a reserve by depositing collateral tokens; Requires a refreshed obligation and reserve.
Tag: 10
Accounts
::UselessThe current account will not be used.It is used to make up the account number, in order to keep the size of the current instruction is equals to liquidate obligation instruction, to avoid the situation that the current transaction is successful but the liquidate cannot be performed.
0. `[writable]` Source borrow reserve liquidity supply SPL Token account.1. `[writable]` Destination liquidity token account.Minted by borrow reserve liquidity mint.2. `[writable]` Borrow reserve account - refreshed.3. `[writable]` Obligation account - refreshed.4. `[]` Lending market account.5. `[]` Derived lending market authority.6. `[signer]` Obligation owner.7. `[]` Token program id.8. `[]` Larix oracle program account-Useless9. `[]` Mine mint account -Useless10.`[]` Mine supply account -Useless
Parameters
/// Amount of liquidity to borrow - u64::MAX for 100% of borrowing power liquidity_amount:u64,
RepayObligationLiquidit
Description: Repay borrowed liquidity to a reserve; Requires a refreshed obligation and reserve.
Tag: 11
Accounts
0. `[writable]` Source liquidity token account.Minted by repay reserve liquidity mint.$authority can transfer $liquidity_amount.1. `[writable]` Destination repay reserve liquidity supply SPL Token account.2. `[writable]` Repay reserve account - refreshed.3. `[writable]` Obligation account - refreshed.4. `[]` Lending market account.5. `[signer]` User transfer authority ($authority).6. `[]` Token program id.
Parameters
/// Amount of liquidity to repay - u64::MAX for 100% of borrowed amountliquidity_amount:u64,
LiquidateObligation
Description: Repay borrowed liquidity to a reserve to receive collateral at a discount from an unhealthy obligation; Requires a refreshed obligation and reserves.
/// Amount of liquidity to repay - u64::MAX for up to 100% of borrowed amountliquidity_amount:u64,
FlashLoan
Description: Make a flash loan
Tag: 13
Accounts
0. `[writable]` Source liquidity token account.Minted by reserve liquidity mint.Mustmatch the reserve liquidity supply.1. `[writable]` Destination liquidity token account.Minted by reserve liquidity mint.2. `[writable]` Reserve account.3. `[writable]` Flash loan fee receiver account.Mustmatch the reserve liquidity fee receiver.4. `[writable]` Host fee receiver.5. `[]` Lending market account.6. `[]` Derived lending market authority.7. `[]` Token program id.8. `[]` Flash loan receiver program id.Must implement an instruction that has tag of 0 and a signature of `(amount:u64)`This instruction must return the amount to the source liquidity account.9. `[signer]` Flash loan authority10. `[any]` Additional accounts expected by the receiving program's `ReceiveFlashLoan` instruction.The flash loan receiver program that is to be invoked should contain an instruction with tag `0` and accept the total amount (including fee) that needs to be returned back after its execution has completed.Flash loan receiver should have an instruction with the following signature:0. `[writable]` Source liquidity (matching the destination from above).1. `[writable]` Destination liquidity (matching the source from above).2. `[]` Token program id3. `[any]` Additional accounts provided to the lending program's `FlashLoan` instruction aboveReceiveFlashLoan {// Amount that must be repaid by the receiver programamount:u64}
Parameters
/// The amount that is to be borrowed - u64::MAX for up to 100% of available liquidityamount:u64,call_back_data:Vec<u8>
SetConfig
Description: Set Configures
Tag: 14
Parameters
config_type:ConfigType
InitMining
Description: Initializes mining int he obligation account.
Description: Repay borrowed liquidity to a reserve to receive collateral at a discount from an unhealthy obligation. Requires a refreshed obligation and reserves.