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

(CL Test): Inverse relationship between swaps #4065

Closed
mattverse opened this issue Jan 18, 2023 · 1 comment
Closed

(CL Test): Inverse relationship between swaps #4065

mattverse opened this issue Jan 18, 2023 · 1 comment
Assignees
Labels
C:x/concentrated-liquidity F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board

Comments

@mattverse
Copy link
Member

mattverse commented Jan 18, 2023

This issue is a part of invariant testing.

Upon doing swaps in a concentrated liquidity pool, we want to make sure that we get preserved the same amount when we do a swap from denom1 -> denom2 and the back from denom2 -> denom1 using the amount out in the first swap.

This testing should be done for both SwapOutGivenIn and SwapInGivenOut.

We should be abstracting the testing vectors used in existing test cases to remove code duplication upon testing the same things as done in #4057

We do not expect them to be exactly equal due to roundings and swap fees, but expect them to be within the expected margin of error

@mattverse mattverse changed the title Inverse relationship between swap back and forth between token0 and token1 (CL Test): Inverse relationship between swaps Jan 18, 2023
@mattverse mattverse self-assigned this Jan 18, 2023
@mattverse mattverse added C:x/concentrated-liquidity F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board labels Jan 18, 2023
@github-project-automation github-project-automation bot moved this to Needs Review 🔍 in Osmosis Chain Development Jan 18, 2023
@p0mvn
Copy link
Member

p0mvn commented Jan 30, 2023

Looks like this can be closed

@p0mvn p0mvn closed this as completed Jan 30, 2023
@github-project-automation github-project-automation bot moved this from Needs Review 🔍 to Done ✅ in Osmosis Chain Development Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:x/concentrated-liquidity F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants