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

Task: Enrich and productionize price feeds for mainnet token imbalances #60

Open
Tracked by #80
harisang opened this issue Sep 11, 2024 · 1 comment
Open
Tracked by #80
Assignees

Comments

@harisang
Copy link
Contributor

We want to have a very robust and rich price feed for the imbalances on mainnet. Thus, the goal is to ensure that we get at least a few different price feeds for every imbalance that occurs, reliably, and store them in our analytics db.

@fhenneke
Copy link
Contributor

I am currently trying to understand what steps would be required to address this.
Some suggestions:

  • Sytematic testing: Adding tests which can be run locally and on each pull request which test all major functionality of the code. At the moment only formatting is tested on pull requests. There are two three test files. Only one of them seems to be working. It is not testing prices. Running any code on price fetching locally seems to require code changes.
  • Error handling: Add enough error handling to recover from crashes and to log useful error message. All emited alerts should be actionable. At the moment, crashing the program can result in incomplete data in the database. There was an error spamming alerts without documentation on how to react.
  • Documentation: There should be more documentation in the code to understand what it does. The code is already quite convoluted. I tried to go through what it does but it is not really possible for me.
  • Formatting: Use strict formatting rules. At the moment we seem to be going for 8/10, which could mean complete files without reasonable formatting.
  • Database setup: There should be a programmatic way of setting up a database for testing. At the moment, one needs write access to a database and some tables are expected to exist. Those need to be added by hand. The database we use in our cluster is also messed up in terms of privileges.

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

2 participants