Struct phoenix::program::InitializeParams
source · pub struct InitializeParams {
pub market_size_params: MarketSizeParams,
pub num_quote_lots_per_quote_unit: u64,
pub tick_size_in_quote_lots_per_base_unit: u64,
pub num_base_lots_per_base_unit: u64,
pub taker_fee_bps: u16,
pub fee_collector: Pubkey,
pub raw_base_units_per_base_unit: Option<u32>,
}Fields§
§market_size_params: MarketSizeParamsThese parameters define the number of orders on each side of the market as well as the maximum
number of supported traders. They are used to deserialize the market state (see dispatch_market.rs).
num_quote_lots_per_quote_unit: u64Number of quote lots to make up a full quote unit. Quote lots are the smallest measurement for the quote currency that can be processed by the market. 1 “unit” is the standard measure of a currency (e.g. 1 US Dollar, 1 Euro, or 1 BTC).
Assume the quote mint is USDC. If num_quote_lots_per_quote_unit is equal to 10000, this means that the smallest unit that the exchange can process is $0.0001. Because USDC has 6 decimals, this means the equivalent quote_lot_size (quote atoms per quote lot) is equal to 1e6 / 10000 = 100.
tick_size_in_quote_lots_per_base_unit: u64Tick size, in quote lots per base units. A tick is the smallest price increment for a market.
Assume the quote mint is USDC and num_quote_lots_per_quote_unit is equal to 10000 (quote_lot_size = 100). If tick size is equal to $0.01 (10000 atoms), this means that tick_size_in_quote_lots_per_base_unit is equal to tick_size / quote_lot_size = 10000 / 100 = 100.
num_base_lots_per_base_unit: u64Number of base lots to make up a full base unit. Base lots are the smallest measurement for the base currency that can be processed by the market.
Assume the base mint is SOL. If num_base_lots_per_base_unit is equal to 1000, this means that the smallest unit that the exchange can process is 0.0001 SOL. Because SOL has 9 decimals, this means the equivalent base_lot_size is equal to 1e9 / 1000 = 1e6.
taker_fee_bps: u16Market fee charged to takers, in basis points (0.01%). This fee is charged on the quote currency.
fee_collector: PubkeyThe Pubkey of the account that will receive fees for this market.
raw_base_units_per_base_unit: Option<u32>1 raw base unit is defined as 10^base_mint_decimals atoms.
By default, raw_base_units_per_base_unit is set to 1 (if the Option is passed in as None).
It is highly recommended to be a power of 10.
If this parameter is supplied, the market will treat the number of base atoms in a base unit as
(10^base_mint_decimals) * raw_base_units_per_base_unit.