econia-labs / econia

Hyper-parallelized on-chain order book for the Aptos blockchain

Home Page:https://econia.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider consolidated registry design

alnoki opened this issue · comments

To reduce borrows, consider a consoliated registry model. Here, the registry is created at the &econia address upon startup, and contains an ExtendRef to add more primary fungible asset stores for utility coin operations, among other things. Additional considerations:

  1. Registry contains a table of market info and a table of markets, the former for market info lookup
  2. Registry contains a table of market accounts
  3. Market account info table contains the object address of market asset vaults
  4. Each market has fungible stores for asset vaults
  5. Market accounts contain the object address of market asset vaults to parallelize withdrawals, deposits
  6. Multiple extend refs (in each market and market account info table) to parallelize vault withdrawals