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

Calculate volume and fees for every token in series / static #53

Open
robcxyz opened this issue Jun 25, 2024 · 0 comments
Open

Calculate volume and fees for every token in series / static #53

robcxyz opened this issue Jun 25, 2024 · 0 comments

Comments

@robcxyz
Copy link
Contributor

robcxyz commented Jun 25, 2024

Right now we only calculate price through graph tracing in high liquidity pools for a given period for price / low / high. We should also be calculating volumes but this can't be done in the prices calculations as those prices are only calculated along a given path of pools, not all the Txs of that token across all the pools.

This is going to be prohibitively slow with our current setup since the smallest step is 5 min which means ~50 semi-expensive queries for all the tokens. Syncing 3 years = 315360 queries per token (365324*60/5) for 5 min interval so ~50 tokens is 15M queries, 5M for 15min, etc.

Optimizations will need to be done for this to work but it is the only way to do #54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant