From ed3411be138a1444c314bc9e4537ce1449da1764 Mon Sep 17 00:00:00 2001 From: Tim Lind Date: Wed, 27 Apr 2022 09:13:24 +0200 Subject: [PATCH] symmetry threshold --- x/clp/keeper/calculations.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/clp/keeper/calculations.go b/x/clp/keeper/calculations.go index 46927b5ec7..63af32d0a2 100644 --- a/x/clp/keeper/calculations.go +++ b/x/clp/keeper/calculations.go @@ -282,7 +282,7 @@ func CalculatePoolUnits(oldPoolUnits, nativeAssetBalance, externalAssetBalance, } slipAdjustment = sdk.NewDec(1).Sub(slipAdjustment) - if !slipAdjustment.Equal(sdk.OneDec()) { + if sdk.OneDec().Sub(slipAdjustment).GT(sdk.NewDecWithPrec(1, 4)) { return sdk.ZeroUint(), sdk.ZeroUint(), types.ErrAsymmetricAdd }