-
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: try to match against multiple of makers orders #316
Conversation
slot, | ||
market.amm.order_tick_size, | ||
)?; | ||
let mut maker_order_indexes = find_maker_orders( |
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.
maker_order_indexes
do we wanna rename this since its the price and index?
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.
yeah can do
@@ -1339,6 +1328,20 @@ fn fulfill_perp_order( | |||
emit!(order_record) | |||
} | |||
|
|||
let maker_risk_reducing = if let Some(maker) = maker { |
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.
wonder if checking before/after reduce allows for some intermediate risk increasing orders to go through..
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.
shouldn't matter as long as the final state is lower risk, it just affects the margin requirement check we enforce anyway
No description provided.