Skip to content
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

Merged
merged 40 commits into from
Feb 20, 2023
Merged

Conversation

crispheaney
Copy link
Member

No description provided.

@wphan
Copy link
Member

wphan commented Feb 16, 2023

should findJitAuctionNodesToFill also include taking limit orders?

sdk/src/dlob/DLOB.ts Outdated Show resolved Hide resolved
sdk/src/math/orders.ts Outdated Show resolved Hide resolved
sdk/src/dlob/DLOB.ts Show resolved Hide resolved
sdk/src/dlob/DLOB.ts Show resolved Hide resolved
sdk/src/dlob/DLOB.ts Show resolved Hide resolved
crispheaney and others added 16 commits February 16, 2023 10:15
…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
* 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)?;
Copy link
Member

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))
Copy link
Member

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?

@crispheaney crispheaney merged commit 0c4a4ba into master Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants