diff --git a/adapters/lynex/src/sdk/pools.ts b/adapters/lynex/src/sdk/pools.ts index 60d3fd31..79c1c880 100644 --- a/adapters/lynex/src/sdk/pools.ts +++ b/adapters/lynex/src/sdk/pools.ts @@ -173,16 +173,8 @@ const getV3PositionReserves = (position: V3Position) => { const sqrtRatioB = Math.sqrt(1.0001 ** tickUpper); const sqrtPrice = _sqrtPrice / 2 ** 96; - // Onlye return active TVL - if (currentTick < tickLower) { - reserve0 = BigInt( - Math.floor( - liquidity * ((sqrtRatioB - sqrtRatioA) / (sqrtRatioA * sqrtRatioB)) - ) - ); - } else if (currentTick >= tickUpper) { - reserve1 = BigInt(Math.floor(liquidity * (sqrtRatioB - sqrtRatioA))); - } else if (currentTick >= tickLower && currentTick < tickUpper) { + // Only return active TVL + if (currentTick >= tickLower && currentTick < tickUpper) { reserve0 = BigInt( Math.floor( liquidity * ((sqrtRatioB - sqrtPrice) / (sqrtPrice * sqrtRatioB))