You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in Swap backend #447 we are only getting the prices for YRAL SNS tokens by querying the token prices from the token creator's canister
Add support for lookups for third party SNS tokens and cks by getting their prices from third party sources etc...
Flow
flowchart TD
D{"Is Token Owner? (Call deployed_cdao for each ID)"} -- Not Owner --> E["Error: Not Owner"]
E --> F["Abort Process"]
J{"Token Type"} -- DOLR or BTC --> K["Check KV Cache for Price"]
K -- Cached Price Found --> L["Return Cached Price"]
K -- No Cached Price --> M{"Token Type"}
M -- BTC --> N["Fetch Price from Coinbase & Binance, Calculate Average"]
M -- DOLR --> O["Fetch Price from Kong Swap"]
N --> P["Store Fetched Price in KV Cache"]
O --> P
P --> Q["Return Fetched Price"]
J -- "Other Token (e.g. ABC)" --> R["Obtain Token Creator via sns_init Params"]
R --> S@{ label: "Call Token Creator's Canister to Retrieve Price" }
S --> T@{ label: "Return Token Price from Token Creator's Canister" }
D --> J
S@{ shape: rect}
T@{ shape: rect}
Loading
The text was updated successfully, but these errors were encountered:
Flow
The text was updated successfully, but these errors were encountered: