Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Suggest gas prices from ethgasstation.info #2

Open
freeatnet opened this issue Jan 5, 2018 · 12 comments
Open

Suggest gas prices from ethgasstation.info #2

freeatnet opened this issue Jan 5, 2018 · 12 comments
Labels
enhancement New feature or request

Comments

@freeatnet
Copy link

The interface should suggest an optimal gas price based on information from https://ethgasstation.info/.

@freeatnet freeatnet added the enhancement New feature or request label Jan 5, 2018
@mariohm1311
Copy link

Actually, I'm pretty sure you could just make the default price change according to ethgasstation.info. That'd be a nice addition!

@freeatnet
Copy link
Author

freeatnet commented Jan 8, 2018

@mariohm1311 For sure, default should be adjusted automatically, but I wonder if we should give users quick access to ethgasstation's "SafeLow" and "Fast" prices, too.

@mariohm1311
Copy link

mariohm1311 commented Jan 9, 2018 via email

@wordsandstuff
Copy link

Please correct me if i am wrong, but the gas prices needs to be higher than the ethergas station price as the transactions are going to a contract witch require more gas.

@freeatnet
Copy link
Author

@wordsandstuff Do you have a source for that information?

To clarify: "gas" is a measure of computation required to perform a transaction,. It is true that contracts require more "gas" because they require more computational steps than a regular fund transfer; however, a transaction requires the same amount of "gas" at any time. The sender can only set the maximum amount of computation they allow a transaction to take, "gas limit". Contracts typically require gas limit of 250,000.

You buy units of computation from miners at a price. That price is referred to as "gas price". This price can fluctuate a bit depending on network-wide demand for computation. This is what we're seeking to adjust dynamically.

Now: that is the theory of it. ethgasstation.info has a small note saying that gas prices may be different for addresses with a large number of pending transactions. @wordsandstuff, if you have any info on that, that'd be most welcome.

@freeatnet
Copy link
Author

NB: MetaMask is experimenting with UI for letting the user set gas prices intuitively, too! MetaMask/metamask-extension#3037

@mariohm1311
Copy link

mariohm1311 commented Jan 18, 2018 via email

@freeatnet
Copy link
Author

and have the network return the unused amount
That already happens. The transaction fee taken from your account is the lesser of (gas limit * gas price) and (gas usage * gas price).

You also typically cannot send a transaction until the previous one is mined, so multiple transactions shouldn't make a difference.

@mariohm1311
Copy link

mariohm1311 commented Jan 19, 2018 via email

@mhyytine
Copy link

What about making the default gas price equal to ethgasstation price plus one? Or would that just be overkill?

@mariohm1311
Copy link

mariohm1311 commented Jan 19, 2018 via email

@banteg
Copy link

banteg commented Feb 5, 2018

a simpler api for gas price: https://gasprice.poa.network/

i'm the author, see https://github.com/banteg/gasprice

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants