-
Notifications
You must be signed in to change notification settings - Fork 2
Requirements
Bogdan Manole edited this page Apr 6, 2022
·
5 revisions
Should:
- get all pairs from
factory
(pair
andtoken
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
andpairs
events and update stored pairs information (liquidity and reserves) - create a
SYNCED
/UNSYNCED
pair
state when boots up in the sequently process of syncing thepairs
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 fromtokenA
totokenB
- 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 )
- Pair
- 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
- get pair info (with all