-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
program: limit order auctions #355
Conversation
should |
…r effect on initial margin (#350) * bigz/improve-calculate_size_premium_liability_weight * fmt fix * margin.ts: sync w/ contract * CHANGELOG --------- Co-authored-by: Chris Heaney <[email protected]>
* sdk: change modify order params to be object * Update CHANGELOG.md
…ot matching resting limit orders
* sdk: add look up table to config * add ability to send version tx with retry sender * tweak LOOK UP to LOOKUP * add fetchMarketLookupTableAccount to driftClient * CHANGELOG
) -> DriftResult<Vec<PerpFulfillmentMethod>> { | ||
let mut fulfillment_methods = vec![]; | ||
|
||
let can_fill_with_amm = amm_is_available | ||
&& valid_oracle_price.is_some() | ||
&& is_auction_complete(taker_order.slot, taker_order.auction_duration, slot)?; | ||
&& is_amm_available_liquidity_source(taker_order, min_auction_duration, slot)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should help fills atm as well, since auction duration could be higher than min_auction_duration rn
return isMarketOrder(order) && !isAuctionComplete(order, slot); | ||
return ( | ||
!isAuctionComplete(order, slot) && | ||
(!order.auctionStartPrice.eq(ZERO) || !order.auctionEndPrice.eq(ZERO)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be &&
? can an order have only one of auction start/end price and still be valid?
No description provided.