Skip to content

Commit

Permalink
liqmaker: add more logs to the liq order generator
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Oct 28, 2024
1 parent 2b0e4e0 commit dbd5342
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/strategy/liquiditymaker/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit dbd5342

Please sign in to comment.