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

Remove gas price from 0x and 1Inch requests #16

Closed
wants to merge 1 commit into from

Conversation

MartinquaXD
Copy link
Contributor

@MartinquaXD MartinquaXD commented Apr 11, 2024

To not exceed any request limits for expensive DEX APIs there is an nginx egress proxy that caches requests to not waste RPS on identical requests.
This for example enables multiple API pods to only issue 1 actual request to the DEX API while receiving the response for all of them.
However, this currently only works if the requested URL is actually completely identical. So far the gas price got specified with the request which means whenever the gas price changes slightly caching will not be possible.
In order to switch to the dex solver being used as quoters in a colocated manner this has to be addressed.
Luckily 0x and 1Inch use reasonable default values for the gas price so we don't actually have to provide them and there is no nginx caching for balancer so we don't have to worry about that either.

Removes gasPrice from the requests and updates unit tests accordingly.

@fleupold
Copy link
Contributor

I'm surpised this is an issue. I was under the assumption the gas price only changes when the block number changes and DEX requests are already cached only for the current block?

@MartinquaXD
Copy link
Contributor Author

Yeah, I think you are right. I did a test run on prod and didn't see any crazy spikes in rate limits and such. 👌

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

Successfully merging this pull request may close these issues.

4 participants