Skip to content

Market Manager #11

@chappjc

Description

@chappjc

Each market (asset pair) on the DEX server will be run by a Market Manager. The market manager integrates a number of core components, employing a book manager, order matcher, swap executor, etc. to run each market. The DEX manager will control a number of such market managers.

A market manager has the following functions:

  1. Coordinate epochs (timing), and the creation of their queues.
  2. Validate incoming orders from the communications hub, relying on the asset backend (e.g. DCR backend) and account manager.
  3. Add valid orders to the active epoch queue.
  4. Initiate order matching at the end of an epoch via the matching engine.
  5. Update the order book with new standing orders, and remove matched orders, via the book manager.
  6. Initiate swaps for matched orders via the swap executor.
  7. Recording all of the above operations via the persistent storage backend(s).

This will arguably be ❤️ of the DEX.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions