You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon further evaluation with @mattverse and @czarcas7ic , we have decided to implement a new module for concentrating liquidity instead of trying to extend PoolI.
Problem Statement:
Option1: refactor PoolI so that we extract the existing JoinPool, ExitPool methods and change them into cfmm extenstions. Then we use refactored interface for concentrated liquidity.
Advantages:
Reduce code duplication that would happen when we create a separate module.
Pool ID management
Logic for managing pool addresses
Logic for transferring coins after LPing
IL protection
Swapping related API from PoolI
Option2: Make concentrated liquidity a separate module
Advantages:
PoolI and the current gamm structure is not efficient for storing the different stores that the concentrated liquidity pools need.
Concentrated liquidity pool needs 3 types of state:
Per-pool
Per-state
Per-tick
Integrating these states into the current design would constitute significant effort.
No need to change existing messages and tx for pools
Existing messages that we avoid changing if we were to implement concentrated liquidity:
JoinPool
ExitPool
JoinSwapExternAmountIn
JoinSwapShareAmountOut
ExitSwapExternAmountOut
ExitSwapShareAmountIn
Existing methods that we avoid extracting or refactoring:
Background
We should implement a new concentrated liquidity pool in the
pool-models
package. Call itconcentrated
.It should implement all of the methods defined on the pool interface.
Suggested Design
Implement pool interface
Panic in every method with "not implemented"
Acceptance Criteria
concentrated
The text was updated successfully, but these errors were encountered: