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

feat: CL superfluid position migration onto the new full range of [10^-30, 10^38] #6322

Open
Tracked by #5726
p0mvn opened this issue Sep 5, 2023 · 0 comments
Open
Tracked by #5726
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 Sep 5, 2023

Context

To support the new min spot price, we will migrate only the superfluid positions as per TDD:
https://hackmd.io/FrJNXgqySVyCxorFmNzgAA

Given our current mainnet pools, there will be a 0.01% capital efficiency decrease in the worst case which is to be reviewed by governance.

Development Plan

In the v20 upgrade handler, iterate over CL pools.

For each pool, retrieve all position IDs.

For each position ID, check if the position has a lock ID associated with it.

If yes, retrieve the position from the state, and validate that it is a full range position. Next, force superfluid undelegate, withdraw this position, and create a new one on behalf of the owner at the new spot price range.

In the migrated logic, validate that the SF liquidity for each CL pool is zero between withdrawing the original position and creating a new one.

Testing Strategy

  • Test unbonding CL SF position
  • Test bonded CL SF position
  • Test that full range positions are unaffected
  • Test that non-full range positions are unaffected
  • Test that full-range and SF positions can be successfully created after migration
  • Test that can swap against the pool after migration
  • Add basic e2e test for this migration

Acceptance Criteria

  • migration implemented
  • tested
  • e2e added
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Osmosis Chain Development Sep 5, 2023
@p0mvn p0mvn added the F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board label Sep 6, 2023
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
Status: Needs Triage 🔍
Development

No branches or pull requests

1 participant