Consolidate open order tracking via ID
alnoki opened this issue · comments
Presently, a user has their open order tracked at both the order book level and at the market account level.
This schema introduces synchronization overhead, including global storage cost increases.
Alternatively, a user's market account could be updated to simply contain a vector of open order IDs: when an order is filled or cancelled, only the vector has to be updated. This reduces global borrows.