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

chore: Cache persistent errors when computing native prices #3159

Open
MartinquaXD opened this issue Dec 11, 2024 · 0 comments · May be fixed by #3178
Open

chore: Cache persistent errors when computing native prices #3159

MartinquaXD opened this issue Dec 11, 2024 · 0 comments · May be fixed by #3178
Assignees
Labels
track:maintenance maintenance track

Comments

@MartinquaXD
Copy link
Contributor

Background

Native prices are an essential part of the auction. That's why the autopilot needs to have a valid native price for all tokens (sold and bought) in an auction. The NativePriceCache has a background task that continuously updates missing native prices.
It obviously caches valid native prices but also responses indicating that no solver has enough liquidity for the requested token. This is done to avoid fetching native prices over and over for tokens that no solver supports.
However, when a solver reports some different error (best example are rate limiting errors) we assume they are just intermittent and re-requesting the native price might work in the future.

The problem is that this logic does not consider the case where a solver always returns an error for a given token while also not other solver is able to produce a good result.
This happened recently where one solver always returned 404 errors because it got shut down on staging. Since no solver was able to produce a price and the logic assume these errors are intermittent we queried the native price for a few tokens over and over again which resulted in a lot more request than usual.

This graph shows native price requests before and after disconnected the offline solver.
Screenshot 2024-12-11 at 08 36 11

@MartinquaXD MartinquaXD added the track:maintenance maintenance track label Dec 11, 2024
@squadgazzz squadgazzz self-assigned this Dec 18, 2024
@squadgazzz squadgazzz linked a pull request Dec 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
track:maintenance maintenance track
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants