liqmaker: add more logs to the liq order generator

This commit is contained in:
c9s 2024-10-28 14:57:25 +08:00
parent 2b0e4e0512
commit dbd53429cd
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -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