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

refactor: compute swap step #4427

Closed
Tracked by #4424
p0mvn opened this issue Feb 27, 2023 · 0 comments · Fixed by #4500
Closed
Tracked by #4424

refactor: compute swap step #4427

p0mvn opened this issue Feb 27, 2023 · 0 comments · Fixed by #4500
Assignees
Labels
F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board

Comments

@p0mvn
Copy link
Member

p0mvn commented Feb 27, 2023

Background

Compute swap step logic is currently convoluted and poorly tested. We should refactor it to make it simpler to follow.

Suggested Design

Separate ComputeSwapStep interface into ComputeSwapStepOutGivenIn and ComputeSwapStepInGivenOut.

Implement all for each swap strategy ("zero for one" and "one for zero")

Acceptance Criteria

  • swap strategy interface refactored
  • implementation for each interface
  • update tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board
Projects
Archived in project
1 participant