Skip to content

Requirements

Bogdan Manole edited this page Apr 6, 2022 · 5 revisions

Should:

  • get all pairs from factory (pair and token addresses)
  • restore all liquidities and token ratios for all pairs when reboots or connection is lost
  • store all handled information into a persisted store
  • retrieve tokens metadata
  • listen factory and pairs events and update stored pairs information (liquidity and reserves)
  • create a SYNCED/UNSYNCED pair state when boots up in the sequently process of syncing the pairs information
  • have a global SYNCED/UNSYNCED flag , to know when the process of syncing has been completed
  • be able to compute all routes with less then N nodes from tokenA to tokenB
  • have a domain model (javascript data-structures) regarding at least following entities:
    • Pair
      • tokens
      • liquidity
      • reserves
      • chain height at the last update (not sure)
    • Token
    • OfficialToken ( supported token list for DEX-ui )
  • expose api for:
    • get pair info (with all SYNCED/UNSYNCED flag)
    • get a route from A -> B
    • get SYNCED/UNSYNCED global flag
    • get token list
Clone this wiki locally