Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move functions related to indexers and charting to sdk #88

Open
7 tasks
jak-pan opened this issue Oct 31, 2024 · 2 comments
Open
7 tasks

Move functions related to indexers and charting to sdk #88

jak-pan opened this issue Oct 31, 2024 · 2 comments
Labels
area/sdk Related to trading router kind/feature New feature or request

Comments

@jak-pan
Copy link
Contributor

jak-pan commented Oct 31, 2024

Add additional optional endpoint for indexer

Fetching and chart price calculation on the frontend - get historical data from the indexer and compute price based on specific pool logic for single point in time

  • add XYK
  • add Stableswap
  • add Omnipool
  • add LBP

Add function to display interpolated data for specific time points to display charts properly

We will need to temporarily add the router event to the historical data to keep current charts for unpaired tokens

Add better route price handling aggregator

  • get most liquid route function (we will need to store most liquid routes for time period in the processor. This will need to change for example if the pool ceases to exist)
  • we will get most liquid routes for whatever is the amount of points on chart (i.e. 50)
  • get data points for all the pools in the route and compute price from the routed data at each point
@nohaapav nohaapav added kind/enhancement Enhancement of existing functionality area/sdk Related to trading router labels Nov 1, 2024
@nohaapav
Copy link
Member

nohaapav commented Nov 1, 2024

We already support optional route param for getSell, getBuy so if we know the most liquid route we can use it to calculate the trade.

We also support most liquid route calc, but used only for spot price atm.

@jak-pan
Copy link
Contributor Author

jak-pan commented Nov 1, 2024

We already support optional route param for getSell, getBuy so if we know the most liquid route we can use it.

We also support most liquid route calc but only for spot price calc ATM.

We need this for historical blocks so we need to move similar logic to indexer to store this at the point in time. Polling the node for this would be too expensive

@nohaapav nohaapav added kind/feature New feature or request and removed kind/enhancement Enhancement of existing functionality labels Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/sdk Related to trading router kind/feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants