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

Add gas price multiplier to agents #931

Closed
tkporter opened this issue Aug 12, 2022 · 2 comments
Closed

Add gas price multiplier to agents #931

tkporter opened this issue Aug 12, 2022 · 2 comments
Labels

Comments

@tkporter
Copy link
Collaborator

I don't think this is worth doing in the short term because Gelato is more important, but creating this to make sure it doesn't get lost in the weeds. Context from Discord:

We have a timeout of 5 minutes for each transaction that's submitted. If 5 minutes hits, it's considered an error, and the submitter will move onto the next tick. The same nonce is used for future txs so we don't run into any nonce issues. What we may however run into is a situation like:

  • tx 0 is submitted with gas price 10 and nonce N, but there's a gas spike so it's not mined
  • 5 mins passes without a receipt, so a timeout occurs
  • new tick, so tx 1 is now submitted with nonce N and the latest gas price, which happens to be something < 11 (in other words, less than 1.1 * the original gas price, which is the required gas price to displace tx 0). An error occurs because of this
  • new tick, tx 2 is attempted, etc...

I think this is pretty unlikely to actually result in issues because it's really unlikely for the gas price of the chain to stay in the range (10, 11), preventing tx 0 from being mined and preventing tx 1 from displacing tx 0 in the mempool.

However if we always set the gas price to 1.1x what's returned from eth_getGasPrice, I think we can get around this issue. E.g. assuming eth_getGasPrice responds with the minimum price to get your tx included in a block and the response is 10.001, which is just above tx 0's gas price meaning that tx 0 can't get mined, and also a price too low to have tx 1 displace tx 0, we'd multiply that by 1.1 to get ~11.0011, which is > 10% of tx 0's gas price, resulting in displacing

@nambrot
Copy link
Contributor

nambrot commented Feb 29, 2024

I believe this no longer applies @tkporter

@nambrot nambrot closed this as completed Feb 29, 2024
@avious00 avious00 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 1, 2024
@tkporter
Copy link
Collaborator Author

tkporter commented Mar 4, 2024

I think this is probably still an issue fwiw 😛

But happy to close in favor of #2959

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

No branches or pull requests

3 participants