2/7 * The order book (OB) for each pair is run on a single thread, with its own I/O queues. * User data UD is deterministically sharded among different threads * Liquidation engine (LE) is a set of threads with direct mem access to user data threads (positions, balances, ..)
-
-
Show this thread
-
3/7 * LE interacts with OB via in-mem priority queue. * LE adds to a liquidation-order (LEO) enough meta-info for the order book thread to evaluate if liquidation should still happen, bankruptcy price, ...
Show this thread -
4/7 * Each LE sorts users by risk (probability of getting liquidated). * Improvement: a single shared sorted map can be generated across the threads
Show this thread -
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 -
-
-
I wonder how this would perform using FPGA with high logic density and I/O count
-
LOL, I was just now in a side discussion on TG about using FPGAs to improve networking part and maybe moving some risk management feature there. Unfortunately I did not have much time to play around it, but it is definitely my preferred solution to play around with.
- Show replies
New conversation -
-
-
Good read, thanks for the insight in the LE Paolo
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
10 million users in this Ponzi
just warm everyone @J0E007 will dump on them like Thursday and that will help your potential sharding issue. -
Dude, what currency isn't a ponzi. If you're a US citizen you even pay into one that's not a currency called called Social Security. Stocks could be considered a ponzi. That wasn't even what his thread was about. A+ to
@J0E007@john_j_brown
End of conversation
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.