diff --git a/pkg/strategy/grid2/strategy.go b/pkg/strategy/grid2/strategy.go index 6a38c5f1f..e8247099b 100644 --- a/pkg/strategy/grid2/strategy.go +++ b/pkg/strategy/grid2/strategy.go @@ -484,7 +484,7 @@ func (s *Strategy) processFilledOrder(o types.Order) { // use the profit to buy more inventory in the grid if s.Compound || s.EarnBase { // if it's not using the platform fee currency, reduce the quote quantity for the buy order - if feeCurrency == s.Market.QuoteCurrency { + if feeCurrency == s.Market.QuoteCurrency && fee.Sign() > 0 { orderExecutedQuoteAmount = orderExecutedQuoteAmount.Sub(fee) } @@ -517,7 +517,7 @@ func (s *Strategy) processFilledOrder(o types.Order) { } } - if feeCurrency == s.Market.BaseCurrency { + if feeCurrency == s.Market.BaseCurrency && fee.Sign() > 0 { newQuantity = newQuantity.Sub(fee) }