10. `[signer]` Init lending market authority21. `[writable]` Lending market account - uninitialized.32. `[]` Rent sysvar.43. `[]` Token program id.54. `[]` Pyth oracle program id.65. `[]` Larix oracle program id.76. `[]` Larix oracle id.Copied!
1/// Owner authority which can add new reserves2owner: Pubkey,3/// Currency market prices are quoted in4/// 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 pubkey5quote_currency: [u8; 32],Copied!
10. `[writable]` Lending market account.21. `[signer]` Current owner.Copied!
1/// The new owner2new_owner: Pubkey,Copied!
10. `[writable]` Reserve account - uninitialized.21. `[]` Reserve liquidity SPL Token mint.32. `[]` Reserve liquidity supply SPL Token account.43. `[]` Reserve liquidity fee receiver.54. `[]` Pyth product account when is_lp is false6Any account when is_lp is true75. `[]` Reserve liquidity pyth oracle account when is_lp is8false; BridgePool account of bridge program when9is_lp is true106. `[]` Reserve liquidity larix oracle account when11is_lp is false12LpPrice account of bridge program when is_lp is true137. `[]` Reserve collateral SPL Token mint.148. `[]` Reserve collateral token supply.159 `[]` Lending market account.1610 `[signer]` Lending market owner.1711 `[]` Un_coll_supply_account1812 `[]` Clock sysvar.1913 `[]` Rent sysvar.2014 `[]` Token program id.Copied!
1/// Reserve configuration values2config: ReserveConfig,3total_mining_speed: u64,4kink_util_rate: u64,5use_pyth_oracle:bool,6is_lp:bool,Copied!
10. `[writable]` Reserve account.21. `[]` Reserve liquidity oracle account.3Must be the Pyth price account specified at4InitReserve.52. `[]` Larix oracleCopied!
10. `[writable]` Source liquidity token account.2$authority can transfer $liquidity_amount.31. `[writable]` Destination collateral token account.42. `[writable]` Reserve account.53. `[writable]` Reserve collateral SPL Token mint.64. `[writable]` Reserve liquidity supply SPL Token account.75. `[]` Lending market account.86. `[]` Derived lending market authority.97. `[signer]` User transfer authority ($authority).108. `[]` Token program id.Copied!
1/// Amount of liquidity to deposit in exchange for collateral tokens2liquidity_amount: u64,Copied!
10. `[writable]` Source collateral token account.2$authority can transfer $collateral_amount.31. `[writable]` Destination liquidity token account.42. `[writable]` Reserve account.53. `[writable]` Reserve collateral SPL Token mint.64. `[writable]` Reserve liquidity supply SPL Token account.75. `[]` Lending market account.86. `[]` Derived lending market authority.97. `[signer]` User transfer authority ($authority).108. `[]` Token program id.Copied!
1/// Amount of collateral tokens to redeem in exchange for liquidity2collateral_amount: u64,Copied!
10. `[writable]` Obligation account - uninitialized.21. `[]` Lending market account.32. `[signer]` Obligation owner.43. `[]` Token program id.Copied!
10. `[writable]` Obligation account.21. `[]` Collateral deposit reserve accounts - refreshed, all, in order.32. `[]` Liquidity borrow reserve accounts - refreshed, all, in order.Copied!
10. `[writable]` Source collateral token account.2Minted by deposit reserve collateral mint.3$authority can transfer $collateral_amount.41. `[writable]` Destination deposit reserve collateral supply SPL Token account.52. `[]` Deposit reserve account - refreshed.63. `[writable]` Obligation account.74. `[]` Lending market account.85. `[]` Derived lending market authority.96. `[signer]` Obligation owner.107. `[signer]` User transfer authority ($authority).118. `[]` Token program id.Copied!
1/// Amount of collateral tokens to deposit2collateral_amount: u64,Copied!
10. `[writable]` Source withdraw reserve collateral supply SPL Token account.21. `[writable]` Destination collateral token account.3Minted by withdraw reserve collateral mint.42. `[]` Withdraw reserve account - refreshed.53. `[writable]` Obligation account - refreshed.64. `[]` Lending market account.75. `[]` Derived lending market authority.86. `[signer]` Obligation owner.97. `[]` Token program id.Copied!
1/// Amount of collateral tokens to withdraw - u64::MAX for up to 100% of deposited amount2collateral_amount: u64,Copied!
1::Useless2The current account will not be used.3It 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.450. `[writable]` Source borrow reserve liquidity supply SPL Token account.61. `[writable]` Destination liquidity token account.7Minted by borrow reserve liquidity mint.82. `[writable]` Borrow reserve account - refreshed.93. `[writable]` Obligation account - refreshed.104. `[]` Lending market account.115. `[]` Derived lending market authority.126. `[signer]` Obligation owner.137. `[]` Token program id.148. `[]` Larix oracle program account- Useless159. `[]` Mine mint account - Useless1610.`[]` Mine supply account - UselessCopied!
1/// Amount of liquidity to borrow - u64::MAX for 100% of borrowing power2liquidity_amount: u64,Copied!
10. `[writable]` Source liquidity token account.2Minted by repay reserve liquidity mint.3$authority can transfer $liquidity_amount.41. `[writable]` Destination repay reserve liquidity supply SPL Token account.52. `[writable]` Repay reserve account - refreshed.63. `[writable]` Obligation account - refreshed.74. `[]` Lending market account.85. `[signer]` User transfer authority ($authority).96. `[]` Token program id.Copied!
1/// Amount of liquidity to repay - u64::MAX for 100% of borrowed amount2liquidity_amount: u64,Copied!
10. `[writable]` Source liquidity token account.2Minted by repay reserve liquidity mint.3$authority can transfer $liquidity_amount.41. `[writable]` Destination collateral token account.5Minted by withdraw reserve collateral mint.62. `[writable]` Repay reserve account - refreshed.73. `[writable]` Repay reserve liquidity supply SPL Token account.84. `[]` Withdraw reserve account - refreshed.95. `[writable]` Withdraw reserve collateral supply SPL Token account.106. `[writable]` Obligation account - refreshed.117. `[]` Lending market account.128. `[]` Derived lending market authority.139. `[signer]` User transfer authority ($authority).1410 `[]` Clock sysvar.1511 `[]` Token program id.Copied!
1/// Amount of liquidity to repay - u64::MAX for up to 100% of borrowed amount2liquidity_amount: u64,Copied!
10. `[writable]` Source liquidity token account.2Minted by reserve liquidity mint.3Must match the reserve liquidity supply.41. `[writable]` Destination liquidity token account.5Minted by reserve liquidity mint.62. `[writable]` Reserve account.73. `[writable]` Flash loan fee receiver account.8Must match the reserve liquidity fee receiver.94. `[writable]` Host fee receiver.105. `[]` Lending market account.116. `[]` Derived lending market authority.127. `[]` Token program id.138. `[]` Flash loan receiver program id.14Must implement an instruction that has tag of 0 and a signature15of `(amount: u64)`16This instruction must return the amount to the source liquidity account.179. `[signer]` Flash loan authority1810. `[any]` Additional accounts expected by the receiving program's19`ReceiveFlashLoan` instruction.202122The flash loan receiver program that is to be invoked should contain an23instruction with tag `0` and accept the total amount (including fee) that24needs to be returned back after its execution has completed.2526Flash loan receiver should have an instruction with the following signature:2728290. `[writable]` Source liquidity (matching the destination from above).301. `[writable]` Destination liquidity (matching the source from above).312. `[]` Token program id323. `[any]` Additional accounts provided to the lending program's `FlashLoan`33instruction above34ReceiveFlashLoan {35// Amount that must be repaid by the receiver program36amount: u6437}Copied!
1/// The amount that is to be borrowed - u64::MAX for up to 100% of available liquidity2amount: u64,3call_back_data: Vec<u8>Copied!
1config_type:ConfigTypeCopied!
10. `[]` Mining account21. `[signer]` Mining owner32. `[]` Lending market accountCopied!
10. `[Writable]` Source account21. `[Writable]` UnColl deposit supply SPL Token account.32. `[Writable]` Mining account43. `[]` Bonus account54. `[]` Lending market account.65. `[]` Derived lending market authority.76. `[]` Mining owner.87. `[signer]` User transfer authority ($authority).98. `[]` Token program id.Copied!
1/// The amount of mining benefits2amount:u64Copied!
10. `[writable]` Source account21. `[writable]` UnColl deposit supply SPL Token account.32. `[writable]` Mining account43. `[writable]` Reserve account54. `[]` Lending market account.65. `[]` Derived lending market authority.76. `[]` Mining owner.87. `[]` Token program id.Copied!
1/// The amount of mining benefits2amount:u64Copied!
10. `[writable]` Mining account21. `[]` Mine supply32. `[]` Destination account43. `[Signer]` Mining owner54. `[]` Lending market info65. `[]` Lending market authority76. `[]` Token program id87. `[]`9... ReservesCopied!
10. `[writable]` Source liquidity token account.2Minted by repay reserve liquidity mint.3$authority can transfer $liquidity_amount.41. `[writable]` Destination collateral token account.5Minted by withdraw reserve collateral mint.62. `[writable]` Repay reserve account - refreshed.73. `[writable]` Repay reserve liquidity supply SPL Token account.84. `[]` Withdraw reserve account - refreshed.95. `[writable]` Withdraw reserve collateral supply SPL Token account.106. `[writable]` Obligation account - refreshed.117. `[]` Lending market account.128. `[]` Derived lending market authority.139. `[signer]` User transfer authority ($authority).1410 `[]` Token program id.Copied!
1/// Amount of liquidity to repay - u64::MAX for up to 100% of borrowed amount2liquidity_amount: u64,Copied!