refactor: handle GetTotalPoolLiquidity
incompatibility with the CL pool
#4787
Labels
F: concentrated-liquidity
Tracking the development of concentrated liquidity feature to improve filtering on the project board
Background
Currently, we don't have
GetTotalPoolLiquidity
implemented for CL:osmosis/x/concentrated-liquidity/model/pool.go
Lines 269 to 272 in 17f4cd5
The reason is that we do not track the pool liquidity directly in the pool struct. Contraty to balancer and stableswap pools, CL only needs current tick liquidity and sqrt price for internal calculations. As a result, CL total liquidity can only be inferred from pool's bank balance.
Suggested Design
Therefore, it makes sense to move the query from
PoolI
interface to thePoolModuleI
interface. That way, we will be able to implement theGetTotalPoolLiquidity
in CL keeper by grabbing it from the pool's bank balanceAcceptance Criteria
PoolI
toPoolModuleI
The text was updated successfully, but these errors were encountered: