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: increase threshold of panic for negative amtInDiff #213

Closed
wants to merge 1 commit into from

Conversation

kingcre
Copy link
Contributor

@kingcre kingcre commented Sep 14, 2023

Description

When matching almost all(e.g. 100 / 100.01) quantity of a pool order, there might be an amplification of decimal precision error in calculation of amtInDiff.
This PR increases the threshold to 1 and prevent the chain to be halted because of an insignificant error. Note that the probability of having negative amtInDiff is relatively very low compared to positive amtInDiff.

@kingcre kingcre self-assigned this Sep 14, 2023
@github-actions github-actions bot added the x/amm label Sep 14, 2023
@kingcre kingcre changed the title fix: increase threshold for panic for negative amtInDiff fix: increase threshold of panic for negative amtInDiff Sep 14, 2023
@kingcre kingcre closed this Sep 27, 2023
@kingcre
Copy link
Contributor Author

kingcre commented Sep 27, 2023

Closing since this PR is outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant