From 080c563882f6c2fa379bbcc51078ae96420a1e05 Mon Sep 17 00:00:00 2001 From: clemlak Date: Tue, 2 Apr 2024 17:19:31 +0400 Subject: [PATCH] fix: computeNextLiquidity in G3MMath --- src/GeometricMean/G3MMath.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GeometricMean/G3MMath.sol b/src/GeometricMean/G3MMath.sol index 76fea8bc..cdbd8236 100644 --- a/src/GeometricMean/G3MMath.sol +++ b/src/GeometricMean/G3MMath.sol @@ -199,7 +199,7 @@ function computeNextLiquidity( findRootLiquidity ); - if (rootInput == 0) { + if (computeTradingFunction(rX, rY, rootInput, params) == 0) { L = rootInput; } else { L = lowerInput;