You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a user places an order that doesn't get matched and then places a new order on top (without cancelling the old one), the second one may not make it into the auction because they may not have enough balance.
We used to evaluate the balance for orders sorted by order creation time (desc) to make sure we prioritise newer orders over older ones. I cannot find this logic anymore (in fact we filter out insufficient balance orders unsorted here)
Impact
Users may not get their replacement orders (or more recent limit orders) matched.
To reproduce
Place a small order with minimum slippage and a small amount (likely resulting in a negative objective value), which won't get matched. Then place another order with large slippage and see it also doesn't get matched until you cancel the first one. You'll also not see the order in the auction that the autopilot creates.
Expected behaviour
Second order is matched even without cancelling the first one.
# Description
When we build the auction in the autopilot we filter out orders that are
unlikely to be filled to shrink the auction to a more manageable size.
One step is to filter out fill-or-kill orders where the owner doesn't
have enough sell_token for all of the open orders. The new logic sorts
orders by `creation_timestamp` (desc) to first use the user's existing
balance on recent orders rather than old ones.
Fixes: #1997
Problem
If a user places an order that doesn't get matched and then places a new order on top (without cancelling the old one), the second one may not make it into the auction because they may not have enough balance.
We used to evaluate the balance for orders sorted by order creation time (desc) to make sure we prioritise newer orders over older ones. I cannot find this logic anymore (in fact we filter out insufficient balance orders unsorted here)
Impact
Users may not get their replacement orders (or more recent limit orders) matched.
To reproduce
Place a small order with minimum slippage and a small amount (likely resulting in a negative objective value), which won't get matched. Then place another order with large slippage and see it also doesn't get matched until you cancel the first one. You'll also not see the order in the auction that the autopilot creates.
Expected behaviour
Second order is matched even without cancelling the first one.
Screenshots/logs
The text was updated successfully, but these errors were encountered: