Instruction

InitLendingMarket

  • Description: Initializes a new lending market.

  • Tag: 0

  • Accounts

0. `[signer]` Init lending market authority
1. `[writable]` Lending market account - uninitialized.
2. `[]` Rent sysvar.
3. `[]` Token program id.
4. `[]` Pyth oracle program id.
5. `[]` Larix oracle program id.
6. `[]` Larix oracle id.
  • Parameters

/// Owner authority which can add new reserves
owner: 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

  • Parameters

InitReserve

  • Description: Initializes a new lending market reserve

  • Tag: 2

  • Accounts

  • Parameters

RefreshReserve

  • Description: Accrue interest and update market price of liquidity on a reserve.

  • Tag: 3

  • Accounts:

DepositReserveLiquidity

  • Description: Deposit liquidity into a reserve in exchange for collateral. Collateral represents a share

  • Tag: 4

  • Accounts

  • Parameters

RedeemReserveCollateral

  • Description: Redeem collateral from a reserve in exchange for liquidity.

  • Tag: 5

  • Accounts

  • Parameters

InitObligation

  • Description: Initializes a new lending market obligation

  • Tag: 6

  • Accounts

RefreshObligation

  • 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

DepositObligationCollateral

  • Description: Deposit collateral to an obligation. Requires a refreshed reserve.

  • Tag: 8

  • Accounts

  • Parameters

WithdrawObligationCollateral

  • Description: Withdraw collateral from an obligation. Requires a refreshed obligation and reserve.

  • Tag: 9

  • Accounts

  • parameters

BorrowObligationLiquidity

  • Description: Borrow liquidity from a reserve by depositing collateral tokens; Requires a refreshed obligation and reserve.

  • Tag: 10

  • Accounts

  • Parameters

RepayObligationLiquidit

  • Description: Repay borrowed liquidity to a reserve; Requires a refreshed obligation and reserve.

  • Tag: 11

  • Accounts

  • Parameters

LiquidateObligation

  • Description: Repay borrowed liquidity to a reserve to receive collateral at a discount from an unhealthy obligation; Requires a refreshed obligation and reserves.

  • Tag: 12

  • Accounts

  • Parameters

FlashLoan

  • Description: Make a flash loan

  • Tag: 13

  • Accounts

  • Parameters

SetConfig

  • Description: Set Configures

  • Tag: 14

  • Parameters

InitMining

  • Description: Initializes mining int he obligation account.

  • Tag: 16

  • Accounts

DepositMining

  • Description: Deposits the mining benefits to the obligation account.

  • Tag: 18

  • Account

  • Parameters

WithdrawMining

  • Description: Withdraws mining benefits.

  • Tag: 19

  • Account

  • Parameters

ClaimMiningMine

  • Description: Claims the owner of the mining benefits.

  • Tag: 20

  • Account

ClaimObligationMine

  • Description: Claims the obligation.

  • Tag: 21

  • Account

ClaimOwnerFee

  • Description: Claim owner's fee.

  • Tag: 22

  • Account

ReceivePendingOwner

  • Description: Receive pending owner.

  • Tag: 23

  • Account

RefreshReserves

  • Description: Refresh the current reserves

  • Tag: 24

  • Account

LiquidateObligation2

  • Description: Repay borrowed liquidity to a reserve to receive collateral at a discount from an unhealthy obligation. Requires a refreshed obligation and reserves.

  • Tag: 25

  • Account

  • Parameters

Last updated

Was this helpful?