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

[Draft code] average gas improvements #13

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

josojo
Copy link
Contributor

@josojo josojo commented Aug 31, 2022

Not intended to merge. Just researching...

I was looking into the gas-checker a little bit - since I had a genuine interest in seeing the real numbers - and found out that it is really not reliably working.

E.g. it returns:

num_trades, the average gas overhead per settlement
1.0    1.099626
2.0    0.985675
3.0    0.983962
5.0    0.981078
6.0    0.549295

Which is very unrelalistic.
But I could not really find the root cause, though there are several factors that might be important:

  • The gas estimations from the price estimators are really just estimations and sometimes they have an additional buffer
  • The price estimation only returns the quotes with the best prices, but not the quotes with the highest return for the user - outamount - gas fees.

Comment on lines +18 to +20
name="num-trades-per-batch",
network=Network.MAINNET,
parameters=[],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI - these fields are all Optional now with defaults essentially as you have specified here (empty parameters and mainnet and empty string for name). No need to change here, just thought you might like to know about these recently added conveniences.

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.

2 participants