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
Right now, when an order is matched, we move the funds owed to the maker into their market account. This means the market is susceptible to DOS attack by making many small limit orders to gum up execution. This is dealt with using a minimum size configuration for the market. This however results in a fragmentation of markets, where we would prefer to have just one market for every pair.
I propose that we simply remove the part where funds are moved from the matching algorithm, instead in favor of using a withdraw function called on the maker side once their orders are filled.
This would allow us to perform matching without having to address every order one-by-one, meaning we could perform matching with O(log(N)) writes instead of O(M*log(N) + M) writes where M is the match size and N is the order book size. This is more efficient, and allows us to get rid of the minimum size parameter that exists on every market due to its increased security.
The text was updated successfully, but these errors were encountered:
For clarity, this would be a step on the path to removing all market parameters except base type and quote type. It's required if we ever intend to do that.
Addendum: doing this will also allow us to eliminate the need to have at least one dedicated account per pair because it will no longer be necessary to gain the associated optimization
A fill must necessarily be a write operation, as it is essential to update the orderbook state with those fills to make sure that any subsequent fill is performed on the orderbook as it is after that order was made.
This would allow us to perform matching without having to address every order one-by-one, meaning we could perform matching with O(log(N)) writes instead of O(M*log(N) + M) writes where M is the match size and N is the order book size.
No. I’m not sure you understand how an orderbook works.
This is more efficient, and allows us to get rid of the minimum size parameter that exists on every market due to its increased security.
Eliminating minimum size would still allow someone to spam the book with a ton of extremely small orders, and it’s irrelevant how many fills each order constitutes - even if each order only results in one fill, it's problematic.
I don’t understand why you think this is more secure either.
Right now, when an order is matched, we move the funds owed to the maker into their market account. This means the market is susceptible to DOS attack by making many small limit orders to gum up execution. This is dealt with using a minimum size configuration for the market. This however results in a fragmentation of markets, where we would prefer to have just one market for every pair.
I propose that we simply remove the part where funds are moved from the matching algorithm, instead in favor of using a withdraw function called on the maker side once their orders are filled.
This would allow us to perform matching without having to address every order one-by-one, meaning we could perform matching with O(log(N)) writes instead of O(M*log(N) + M) writes where M is the match size and N is the order book size. This is more efficient, and allows us to get rid of the minimum size parameter that exists on every market due to its increased security.
The text was updated successfully, but these errors were encountered: