Bitcoin Forum

Other => Beginners & Help => Topic started by: ahmadalsaady on March 30, 2018, 11:25:25 AM



Title: Ethereum gas limit calculation
Post by: ahmadalsaady on March 30, 2018, 11:25:25 AM
Hi Guys,

if gwei is capped to 60 gwei in a smart contract but without a gas limit,
how to calculate the best gas for the best chance to get in first  ???

Thanks


Title: Re: Ethereum gas price calculation
Post by: rokas on March 30, 2018, 12:34:27 PM
Hello! You can log in in your account on myetherwallet.com and then you can see their suggestions about actual gas price.


Title: Re: Ethereum gas price calculation
Post by: ahmadalsaady on March 30, 2018, 12:36:53 PM
Hello! You can log in in your account on myetherwallet.com and then you can see their suggestions about actual gas price.

thank you for the reply, so basically setting gas higher than suggested won't matter?


Title: Re: Ethereum gas limit calculation
Post by: khendjer on March 31, 2018, 03:58:23 PM
Hi Guys,

if gwei is capped to 60 gwei in a smart contract but without a gas limit,
how to calculate the best gas for the best chance to get in first  ???

Thanks
The gas limit has nothing to do with a transaction confirmation speed. Every smart contract requires a number of calculations to be done when you interact with it. Those calculations are measured in a gas amount. If you set the gas limit, the contract execution process will be stopped once that limit will be exceeded. It allows you to defend yourself against all your wallet balance being used up during execution of some of the bad configured smart contracts.
As it has been said above, wallets like MEW usually sets a gas limit automatically and you don't need to change or set that value.

The gas price is a transaction confirmation speed-related parameter you're looking for. The bigger the gas price amount you set the faster your transaction will go through. You can always check the current recommended gas price at https://ethgasstation.info/. Take the highest amount from there and your transaction will be confirmed among the first.


Title: Re: Ethereum gas price calculation
Post by: Heisenberg_Hunter on April 01, 2018, 09:55:21 AM
thank you for the reply, so basically setting gas higher than suggested won't matter?
If you are setting your gas higher than suggested that is if you are trying to do a normal transaction which uses gas of 21000 with placing a gas of 100000, then you need to pay a higher transaction fee than expected. Higher volume of gas are used only when you try to transfer your tokens, otherwise you could use a standard gas limit of 21000. Gas price/ gas matters to make a faster transaction, otherwise specifying higher gas just costs you a lot.

Never use lower gas like around 21000 when you are trying to transfer your tokens. This will make gas to be burned and your transaction will not be confirmed and you will end up with a loss in transaction fee.


Title: Re: Ethereum gas price calculation
Post by: khendjer on April 02, 2018, 08:21:12 PM
thank you for the reply, so basically setting gas higher than suggested won't matter?
If you are setting your gas higher than suggested that is if you are trying to do a normal transaction which uses gas of 21000 with placing a gas of 100000, then you need to pay a higher transaction fee than expected.
It seems you're a bit mistaken here.

If you're trying to send a usual ethereum transaction, it requires 21,000 of gas. If you set the gas price at 20 Gwei, your wallet balance will be debited by 21,000 x 20 Gwei = 0,00042 ETH and that amount will be taken as a reward by miners.
If you set 100,000 gas limit for the exact same transaction with the same gas price, 20 Gwei, your wallet balance will be debited by 100,000 x 20 Gwei = 0,002 ETH. BUT, all the 0,002 ETH amount won't go to the miners as a fee, they will still get 21,000 x 20 Gwei = 0,00042 ETH for the mining and the rest 0,002 - 0,00042 = 0.00158 ETH of the previously debited amount will be refunded back to your wallet balance. This way you always pay 21,000 of gas for a usual ethereum transaction no matter what gas limit you set.

Gas limit which is set above the required threshold don't affect the transaction fee in any way and don't make it higher.
Like you say, incorrect gas limit can make you pay useless fee if you set the gas limit below the necessary limit, but not if you set it higher.
Consider the gas limit like a spending limit for your usual wallet. It's like paying with a $100 banknote for the good which costs only $21. You will get your $79 of change back in any way, becasue the good costs only $21.

What does affect transaction fee and transaction confirmation time is only the gas price.


Title: Re: Ethereum gas price calculation
Post by: tylerderd89 on April 02, 2018, 09:31:40 PM
what is the good price of gus for today?


Title: Re: Ethereum gas limit calculation
Post by: toiratdeptrai13 on April 03, 2018, 02:24:21 AM
Hi Guys,

if gwei is capped to 60 gwei in a smart contract but without a gas limit,
how to calculate the best gas for the best chance to get in first  ???

Thanks
You can refer to the price of ETH gas at: https://ethgasstation.info/calculatorTxV.php
- Gas price you can setup max is 99gwei
- Gas used can be as recommended by the ico
- Often the speed is based only on as prices
- Best gas are gas price 99gwei and recommended gas used of icos


Title: Re: Ethereum gas limit calculation
Post by: CryptoWreck on April 03, 2018, 08:41:47 AM
Thanks for all this helpful information for a Newbie!


Title: Re: Ethereum gas limit calculation
Post by: wandino on April 03, 2018, 09:22:23 AM
Gasstattion is a good tool to calculate it. They higher the gwei is, the sooner it will get verified.


Title: Re: Ethereum gas limit calculation
Post by: ahmadalsaady on April 03, 2018, 09:52:07 AM
Thank you all guys very good informations


Title: Re: Ethereum gas price calculation
Post by: khendjer on April 03, 2018, 07:39:31 PM
what is the good price of gus for today?
Are you going to find out the actual gas price at the moment you need it by asking here the same question? For today? For tomorrow? For the day after tomorrow?
If you're a newbie and want to get into crypto fast, try at least to read previous posts before asking.
Your question has been already answered - https://ethgasstation.info/ is all you need.

P.S. In case you were asking not about gas price on the Ethereum platform but about price of somebody who's name is Gus, it's better to ask him directly what's his good price for today. I don't know what kind of services he provides and how much they usually cost. ;D