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: try to match against multiple of makers orders #316

Merged
merged 9 commits into from
Jan 11, 2023

Conversation

crispheaney
Copy link
Member

No description provided.

slot,
market.amm.order_tick_size,
)?;
let mut maker_order_indexes = find_maker_orders(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maker_order_indexes do we wanna rename this since its the price and index?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah can do

@@ -1339,6 +1328,20 @@ fn fulfill_perp_order(
emit!(order_record)
}

let maker_risk_reducing = if let Some(maker) = maker {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder if checking before/after reduce allows for some intermediate risk increasing orders to go through..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't matter as long as the final state is lower risk, it just affects the margin requirement check we enforce anyway

@crispheaney crispheaney merged commit 321ffa5 into master Jan 11, 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

2 participants