#[repr(C)]
pub struct Market {
Show 22 fields pub version_tag: u64, pub airspace: Pubkey, pub orderbook_market_state: Pubkey, pub event_queue: Pubkey, pub asks: Pubkey, pub bids: Pubkey, pub underlying_token_mint: Pubkey, pub underlying_token_vault: Pubkey, pub ticket_mint: Pubkey, pub claims_mint: Pubkey, pub collateral_mint: Pubkey, pub underlying_oracle: Pubkey, pub ticket_oracle: Pubkey, pub fee_destination: Pubkey, pub seed: [u8; 32], pub orderbook_paused: bool, pub tickets_paused: bool, pub borrow_tenor: i64, pub lend_tenor: i64, pub origination_fee: u64, pub collected_fees: u64, pub nonce: u64, /* private fields */
}
Expand description

The Market contains all the information necessary to run the fixed term market

Utilized by program instructions to verify given transaction accounts are correct. Contains data about the fixed term market including the tenor and ticket<->token conversion rate

Fields

version_tag: u64

Versioning and tag information

airspace: Pubkey

The airspace the market is a part of

orderbook_market_state: Pubkey

The market state of the agnostic orderbook

event_queue: Pubkey

The orderbook event queue

asks: Pubkey

The orderbook asks byteslab

bids: Pubkey

The orderbook bids byteslab

underlying_token_mint: Pubkey

The token mint for the underlying asset of the tickets

underlying_token_vault: Pubkey

Token account storing the underlying asset accounted for by this ticket program

ticket_mint: Pubkey

The token mint for the tickets

claims_mint: Pubkey

Mint owned by fixed-term market to issue claims against a user. These claim notes are monitored by margin to ensure claims are repaid.

collateral_mint: Pubkey

Mint owned by fixed-term market to issue collateral value to a user The collateral notes are monitored by the margin program to track value

underlying_oracle: Pubkey

oracle that defines the value of the underlying asset

ticket_oracle: Pubkey

oracle that defines the value of the tickets

fee_destination: Pubkey

where fees can be withdrawn to

seed: [u8; 32]

The user-defined part of the seed that generated this market’s PDA

orderbook_paused: bool

Is the market taking orders

tickets_paused: bool

Can tickets be redeemed

borrow_tenor: i64

Length of time before a borrow is marked as due, in seconds

lend_tenor: i64

Length of time before a claim is marked as mature, in seconds

origination_fee: u64

assessed on borrows. scaled by origination_fee::FEE_UNIT

collected_fees: u64

amount of fees currently available to be withdrawn by market owner

nonce: u64

Used to generate unique order tags

Implementations

for signing CPIs with the market account

how much a borrower should receive from their fill after an origination fee is assessed

the size a borrow order should have including the requested amount plus the origination fee

Trait Implementations

Deserializes previously initialized account data. Should fail for all uninitialized accounts, where the bytes are zeroed. Implementations should be unique to a particular account type so that one can never successfully deserialize the data of one account type into another. For example, if the SPL token program were to implement this trait, it should be impossible to deserialize a Mint account into a token Account. Read more
Deserializes account data without checking the account discriminator. This should only be used on account initialization, when the bytes of the account are zeroed. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern. Read more
If this function returns true, then it must be valid to reinterpret bits as &Self. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.