From dbd53429cd07c0c8363d5b73022b78a0edb0b0a5 Mon Sep 17 00:00:00 2001 From: c9s Date: Mon, 28 Oct 2024 14:57:25 +0800 Subject: [PATCH] liqmaker: add more logs to the liq order generator --- pkg/strategy/liquiditymaker/generator.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/strategy/liquiditymaker/generator.go b/pkg/strategy/liquiditymaker/generator.go index 6f8c066e8..069fc0e3c 100644 --- a/pkg/strategy/liquiditymaker/generator.go +++ b/pkg/strategy/liquiditymaker/generator.go @@ -46,6 +46,14 @@ func (g *LiquidityOrderGenerator) Generate( g.logger = logger } + g.logger.Infof("generating %s orders with total amount %s from price %s to price %s with %d layers", + side, + totalAmount.String(), + startPrice.String(), + endPrice.String(), + numLayers, + ) + layerSpread := endPrice.Sub(startPrice).Div(fixedpoint.NewFromInt(int64(numLayers - 1))) switch side { case types.SideTypeSell: @@ -59,6 +67,8 @@ func (g *LiquidityOrderGenerator) Generate( } } + g.logger.Infof("side %s layer spread: %s", side, layerSpread.String()) + quantityBase := 0.0 var layerPrices []fixedpoint.Value var layerScales []float64