Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mm: bot should account for orders-to-be-canceled during calculating allocations #3151

Open
norwnd opened this issue Jan 19, 2025 · 0 comments

Comments

@norwnd
Copy link
Contributor

norwnd commented Jan 19, 2025

When I have open orders on some market (be it manually placed orders, or MM-bot placed orders from my past run when I didn't explicitly stop MM bot so it cancels those orders) and I start MM bot for that same market - MM bot will cancel those orders.

That's fine, the issue is MM bot calculates its allocations (both, Balance required to fund orders and Fee reserves) before cancelling those orders looks like (or as if funds will stay locked in those orders, even though these funds are shortly released due to cancels MM bot issues). This means bot thinks he has less funds (and fee reserves) to work with than what he actually could/should use.

I guess the solution would be for MM bot to wait until all cancels he issued succeed (releasing all the funds on the market he'll be operating on) and only then initialize his market-making projections & start acting on these.

the issue is MM bot calculates its allocations (both, Balance required to fund orders and Fee reserves) before cancelling those orders looks like

I should note it might not reproduce every time, so maybe there is a race condition(s) that needs to be resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant