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

fix: bug in order book and pool orders calculation #323

Merged
merged 3 commits into from
Jul 4, 2022
Merged

Conversation

hallazzang
Copy link
Contributor

@hallazzang hallazzang commented Jul 4, 2022

Description

This PR fixes some bugs in order book and pool orders calculation.

  • do not add order with zero matchable amount to order book
  • check if result of BuyAmountTo/SellAmountUnder is positive
  • set matched to true only when order distribution has happened
  • fix bug in pool order amount calculation(use swap price instead of adjusted price)

- do not add order with zero matchable amount to order book
- check if result of `BuyAmountTo`/`SellAmountUnder` is positive
- set matched to true only when order distribution has happened
@hallazzang hallazzang marked this pull request as ready for review July 4, 2022 09:32
@hallazzang hallazzang merged commit a87f4fb into main Jul 4, 2022
@dongsam dongsam removed the c-sync label Jul 5, 2022
dongsam pushed a commit that referenced this pull request Aug 31, 2022
fix: bug in order book and pool orders calculation #323
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants