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

1 stream consumption against opposite swaps #37

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

drikssy
Copy link
Contributor

@drikssy drikssy commented Jan 8, 2025

During the processing of limit swaps, only one stream is consumed on each swap, either against the opposite swaps or against the pool.

When we swapping against the opposite swaps:

  • we calculate the amountOut of the opposite swaps based on their limit price
  • we consume multiple price keys with a starting price key at the highest price key (opposite one), we are not trying to find the opposite price anymore.

few function refactoring

@drikssy drikssy requested review from shakeib98 and immaxkent January 8, 2025 07:52
@drikssy drikssy self-assigned this Jan 8, 2025
@immaxkent
Copy link
Collaborator

being merged on the premise global tests are dependant

@immaxkent immaxkent merged commit af6f6b1 into main Jan 9, 2025
2 checks passed
@drikssy drikssy deleted the feature/oneStreamAgainstOppSwaps branch January 9, 2025 08:58
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.

2 participants