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: calculate AMM tradable volume purely in position to avoid precis… #11617

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

wwestgarth
Copy link
Contributor

closes #11616

TradableVolumeInRange() has been re-written to do everything in positions instead of hopping between positions and prices. This stops precision loss from every time we did a hop.

@wwestgarth wwestgarth requested a review from a team as a code owner August 27, 2024 14:42
@wwestgarth wwestgarth force-pushed the 11616-rework-tradable-volume branch from 356a42d to 890d2eb Compare August 27, 2024 15:20
@wwestgarth wwestgarth merged commit 8031219 into develop Aug 27, 2024
16 checks passed
@wwestgarth wwestgarth deleted the 11616-rework-tradable-volume branch August 27, 2024 16:13
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.

[Bug]: Precision loss when going from position -> fair-price -> position causes crossed market
2 participants