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

chore: Don't count "in-market" limit order to the max number of limit orders per account #2433

Closed
fleupold opened this issue Feb 25, 2024 · 0 comments · Fixed by #2456
Closed
Assignees
Labels
good first issue Good for newcomers

Comments

@fleupold
Copy link
Contributor

Background

We are limiting the number of limit orders a single account can have to something like 50 (to avoid uncontrolled growth of the orderbook). This limit would historically not apply to market orders (swap orders that are expected to execute immediately).

However, with the recent change of submitting all orders with 0 fee amount, the backend no longer differentiates between swap (in market) limit orders and potentially long standing (out of market) limit orders.

This can cause issues with certain use cases where users are trying to create a lot of short lived swaps (e.g. dump.services).

Details

This issue tracks work to distinguish between limit orders that are currently expected to be executed (in market price) and not count those towards the total order limit per user.

Acceptance criteria

A user can dump more than 50 tokens at the same time without running into order limit restrictions.

@fleupold fleupold added the good first issue Good for newcomers label Feb 25, 2024
@m-lord-renkse m-lord-renkse self-assigned this Feb 28, 2024
m-lord-renkse added a commit that referenced this issue Mar 5, 2024
# Description
Only check for order limits when the orders are class "Limit". I kept
the legacy code/behavior, in order not to make a regression breaking
change.

# Changes
- Only do the order limit check if the order is class "Limit" and it is
not "in-market"

## How to test
1. Unit test
2. e2e test

Fixes #2433
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants