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): Add inverse relationship testing between CreatePosition and WithdrawPosition #4057

Merged
merged 3 commits into from
Jan 20, 2023

Conversation

mattverse
Copy link
Member

What is the purpose of the change

Part of adding different invariant testings to the cl module.

This test adds inverse relationship testing between CreatePosition and WithdrawPosition
We specifically test the following four invariants upon the two methods

  1. amount for denom0 and denom1 upon creating and withdraw position should be same
  2. user balance and pool balance after creating / withdrawing position should be same
  3. Position should be deleted
  4. pool state should come back to original state

Brief Changelog

Add inverse relationship testing between CreatePosition and WithdrawPosition

Testing and Verifying

Changes existing test code structure to avoid code duplication upon test cases and adds new test cases

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? (yes / no)
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? (yes / no)
  • How is the feature or change documented? (not applicable / specification (x/<module>/spec/) / Osmosis docs repo / not documented)

@mattverse mattverse added the F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board label Jan 18, 2023
@mattverse mattverse added the V:state/compatible/no_backport State machine compatible PR, depends on prior breaks label Jan 18, 2023
Copy link
Member

@p0mvn p0mvn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing

x/concentrated-liquidity/lp_test.go Outdated Show resolved Hide resolved
x/concentrated-liquidity/lp_test.go Outdated Show resolved Hide resolved
mattverse and others added 2 commits January 19, 2023 21:45
Co-authored-by: Roman <roman@osmosis.team>
Co-authored-by: Roman <roman@osmosis.team>
@p0mvn p0mvn merged commit 6286934 into main Jan 20, 2023
@p0mvn p0mvn deleted the mattverse/cl-invariant-1 branch January 20, 2023 05:10
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 V:state/compatible/no_backport State machine compatible PR, depends on prior breaks
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants