1/7 Problem: How to scale trading/liquidation engines up to 500k/1M/10M users? 100k users are manageable, but eventually single threaded architecture will bottleneck growing number of users.https://twitter.com/paoloardoino/status/1238965074427088903 …
-
-
5/7 * Depending on the size of the position to be liquidated, LEO can be run into the book or positions can be acquired by the system and sold via more complex algos. We call it liquidation stages (LS).
Show this thread -
6/7 * When a LEO gets processed, the OB thread evaluates (querying UD) if the user should still be liquidated and using which LS. * We tested this system with 100sK users + apocalyptic cascading liquidations and ended up always in ensuring the 0-sum game
Show this thread -
7/7 * Complexity of this solution relies in write tests (we have more than 1000 automated simulations running) * Happy to elaborate if not really clear. * These are the types of solutions used in huge brokers with M of customers. No much way around it.
Show this thread
End of conversation
New conversation -
-
-
Does the probability of getting liquidated only take into account the trader's liquidation margin?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Fun fact
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
so a hack to get faster order processing is to have a high chance of being liquidated
-
Why? Not sure from where you deducted that. Users get liquidated only when they should. The system is just more scalable.
- Show replies
New conversation -
-
-
Re improvement: perhaps an rbtree ordered by an f() that provides the same ordering but price-independent (so no need to re-sort on each tick as probabilities shift), 1 for longs, 1 for shorts. There is always a "first to be liquidated" position per side independent of price.
-
Yup, we are using RBTrees internally. Both for our books and for liquidation priority.
- Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.