Previously, freeing would be impossible if a canceling fill or out event
was already in-flight - then the order would no longer be on the
orderbook.
Now, FillEvent and OutEvent store the order id and can check if the open
order slot on the account has been reused already. That allows canceling
orders to always free up the user slot immediately.
Previously, the separate job and the post-liquidation rebalance could
run at the same time and would occasionally perform the same action at
the same time, leading to overshooting.
Now rebalancing never happens twice. In the future it should potentially
just run separately from liquidation, but that needs a review of the
assumptions the liquidation job is making first.
(cherry picked from commit e8e7e445d3)
- Don't just restart on new listings, but also on significant changes to
old listings such as oracle changes.
- Cover the liquidator and settler in addition to the keeper.
(cherry picked from commit ce16d79b13)
Previously, the separate job and the post-liquidation rebalance could
run at the same time and would occasionally perform the same action at
the same time, leading to overshooting.
Now rebalancing never happens twice. In the future it should potentially
just run separately from liquidation, but that needs a review of the
assumptions the liquidation job is making first.
- since there's no borrowing or asset weight, don't put staleness or
confidence restrictions on the oracle
- disable the tcs fees, they are not enabled anywhere yet
(cherry picked from commit 5f8f717430)
- since there's no borrowing or asset weight, don't put staleness or
confidence restrictions on the oracle
- disable the tcs fees, they are not enabled anywhere yet
- limit deposits (via deposit, flash loan, tcs)
- limit potential deposits via openbook settle
by restricting placable orders via potential_serum_tokens
- introduce Serum3PlaceOrderV2 for this purpose
- account for new limits in liquidator, max_swap
(cherry picked from commit 42e31ae859)
- track min bid, max ask
- track maximal token outflow from oo
- add serum3_place_order_v2 with mutable receiver bank
- placing openbook orders is restricted to a certain distance from the
oracle
(cherry picked from commit 81501837a9)
- limit deposits (via deposit, flash loan, tcs)
- limit potential deposits via openbook settle
by restricting placable orders via potential_serum_tokens
- introduce Serum3PlaceOrderV2 for this purpose
- account for new limits in liquidator, max_swap