Skip to content

Commit

Permalink
symmetry threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
timlind committed Apr 27, 2022
1 parent 36a58ce commit ed3411b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/clp/keeper/calculations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit ed3411b

Please sign in to comment.