Function dflow_sdk::client::instructions::init_auction_state
source · [−]pub fn init_auction_state(
program: &Program,
auction_id: u64,
auction_owner: Pubkey,
bid_mint_account: Pubkey,
vote_mint_account: Pubkey,
min_notional_order_size: u64,
max_notional_order_size: u64,
notional_decimals: u8,
batch_notional_size: u64,
vote_size: u64,
supported_pairs_count: u8,
vote_period: u32,
claim_period: u32
) -> Instruction
Expand description
This instruction initializes an auction for order flow, and describes the specifications of the order flow account.
This instruction is only callable by an auction owner. Once the auction is initialized, it remains in a Halted state until the auction owner sets the auction state to Trading.
Arguments
auction_id
An unsigned 64 bit integer. The auction ID used as a seed to generate the program derived addressauction_owner
The public key of the auction_owner account.bid_mint_account
The public key of the bid_mint_account account.vote_mint_account
The public key of the vote_mint_account account.min_notional_order_size
The minimum notional size accepted by this newly initialized auction. The notional size of all order flow purchased in this auction must be greater than or equal to this valuemax_notional_order_size
The maximum notional size accepted by this newly initialized auction. The notional size of all order flow purchased in this auction must be less than or equal to this valuenotional_decimals
The number of decimals inmin_notional_order_size
,max_notional_order_size
, andbatch_notional_size
batch_notional_size
The total notional size of the orders that will be routed to the market maker when the market maker wins this auction. A winning market maker will receive order flow with a total notional size in the range [batch_notional_size, batch_notional_size- max_notional_order_size)
vote_size
The amount of tokens in the currency of the vote mint that the arbiter will need to stake every time the arbiter votes on a fill.supported_pairs_count
The number of token pairs for which order flow is sold in this auction.vote_period
The length in seconds of the voting period for orders routed through this auction.claim_period
The length in seconds of the reward claiming period for orders routed through this auction.
Returns an instruction