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][Concentrated Liquidity Module]: implement InitializePool #3582

Closed
p0mvn opened this issue Nov 30, 2022 · 1 comment
Closed

[CL][Concentrated Liquidity Module]: implement InitializePool #3582

p0mvn opened this issue Nov 30, 2022 · 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

@p0mvn
Copy link
Member

p0mvn commented Nov 30, 2022

Background

We need to implement and test this method:

func (k Keeper) InitializePool(ctx sdk.Context, pool swaproutertypes.PoolI, creatorAddress sdk.AccAddress) error {

This method should replace CreateNewConcentratedLiquidityPool since the only valid entry point for pool creation is InitializePool

Spec for it:

// InitializePool initializes the pool by running concentrated-liquidity specific initialization logic that includes:
// * minting liquidity share to the sender
// * saving the pool to state
// Returns nil on success, error otherwise

Suggested Design

  • Remove CreateNewConcentratedLiquidityPool method
  • In tests, replace all calls to it with the calls to swaprouter's CreatePool by suppling a CL CreatePoolMsg
  • Implement InitializePool
  • Test InitializePool
  • Add apptesting helpers for creationg CL pools via swaprouter

Acceptance Criteria

  • CreateNewConcentratedLiquidityPool is removed
    • All pre-existing callers go through swaprouter
    • In tests, apptesting helpers are utilized
  • InitializePool is implemented and tested
  • Helpers in apptesting created
  • New and old tests pass
@p0mvn p0mvn added C:x/concentrated-liquidity F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board labels Nov 30, 2022
@p0mvn p0mvn moved this to Needs Review 🔍 in Osmosis Chain Development Nov 30, 2022
@p0mvn
Copy link
Member Author

p0mvn commented Nov 30, 2022

This is blocked on: #3245 being implemented first

Repository owner moved this from Needs Review 🔍 to Done ✅ in Osmosis Chain Development Dec 16, 2022
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

No branches or pull requests

2 participants