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

19/amm-jit-base-amount-fix #280

Merged
merged 8 commits into from
Dec 8, 2022
Merged

Conversation

0xNineteen
Copy link
Contributor

No description provided.


let (base_asset_amount_fulfilled, quote_asset_amount) = calculate_fill_for_matched_orders(
base_asset_amount_left_to_fill,
maker_base_asset_amount,
Copy link
Member

Choose a reason for hiding this comment

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

so this was the key issue identified and remedied here? maker amount for match is now whatever the maker has offered rather than the taker's amount leftover

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yup

taker,
taker_stats,
taker_order_index,
let taker_base_asset_amount_left_to_fill =
Copy link
Member

Choose a reason for hiding this comment

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

i think we might be able to avoid all of this nesting if instead of calculating taker_base_asset_amount_left_to_fill, we just pull the base_asset_amount_unfilled off of the taker order after the jit block

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah great point

@crispheaney crispheaney merged commit 997d44d into master Dec 8, 2022
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

3 participants