Grid end balance and liquidity while exiting by the bottom

Bug info:

  • Bot URL →
    Gainium app

  • [Optional] Steps to reproduce →
    Open a grid, wait for it to exit by bottom and let it open (range).
    While looking after this point (still range), I detected 2 problems that might be related :

  • quote (usdc) balance is too high (about half of bot value) and base (link) amount is too low (half of bot value while it should be fully in base)
  • spotted a previous bot that displays an error of not enough base (link) while just bellow the grid, the amount was enough (looks like the more price fall, the more it requires base for an already set bot)
  • Expected result →
    Bot end with all its value in base and not quote (or just few dust).
    Once bot is under the grid, the amount of base required is stable and don’t change over time depending on base price.

Let me send even more details.
First came the not enough liquidity on base (LINK) :

  • so bot was calculated and ran OK
  • price fall to bellow grid : exit grid by bottom
  • at this point, bot is in range and liquidity are OK (no errors)
  • price fall more and bot not closed : it started asking for more base (what ?!? But all your sell orders are already created… )
  • and I did 2 separate buy to stabilise it :sweat_smile: but it’s not normal as bot was the same
  • the idea is to wait if it can get back in range (requested base must be the same as we are ranging, can’t ask more, illogical)
  • I’m unsure but I might ended closing it without further looking, exit by top)
  • also I speak of 5% of bot liquidity (of it’s base), it can’t be just dust issue as I had to buy more than dust (and 2 times)

Second came the weird bot’s end balance (current balance) :

  • it’s the bot with url above
  • so I closed it (by bottom) and in this situation, I need to get the amount of base (LINK) of the current balance (to avoid spending them at lower grid prices)
  • as usual, I’m expecting to see about 0 quote (usdc) and all remaining value in base (link) : just sell orders remaining
  • but I see about half in both (how is it possible? Exceptional?)

I’m yet unsure if it’s just related to that bot, to connection issues we recently had etc. Bot was about 20 days running and if price is bellow the grid, it can only have empty quote and full base.

The current balance is important in my strategy (while closing, recording and starting another one).
I falled back to check current LINK in the portfolio page (the above url bot started with basically no base in account as empty or about and bought its own base itself, meaning that before that bot ran, no LINK was present and after bot close, all LINK was related to that bot current balance).

My problem is that I see about 40 LINK in portfolio page while bot current balance show about half in base and the rest in quote.

Last point is that this time, to stop the bot, it talked about canceling order excepted partially filled. I canceled all orders with no exception. I don’t believe that it could come from this option.

Thx

We can see that there were errors a few weeks ago, related to the server resources issue. At that time is possible that the bot missed some orders which explains the error you see now. I will mark it as not bug for now but keep an eye on it and let us know if it still happens.