Bitcoin Forum
November 09, 2024, 04:05:35 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Ethereum gas limit calculation  (Read 227 times)
ahmadalsaady (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
March 30, 2018, 11:25:25 AM
Last edit: March 30, 2018, 12:41:16 PM by ahmadalsaady
 #1

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  Huh

Thanks
rokas
Newbie
*
Offline Offline

Activity: 70
Merit: 0


View Profile WWW
March 30, 2018, 12:34:27 PM
 #2

Hello! You can log in in your account on myetherwallet.com and then you can see their suggestions about actual gas price.
ahmadalsaady (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
March 30, 2018, 12:36:53 PM
 #3

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?
khendjer
Member
**
Offline Offline

Activity: 157
Merit: 13


View Profile
March 31, 2018, 03:58:23 PM
Merited by mithrim (1)
 #4

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  Huh

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.

Heisenberg_Hunter
Legendary
*
Offline Offline

Activity: 1584
Merit: 1280


Heisenberg Design Services


View Profile WWW
April 01, 2018, 09:55:21 AM
 #5

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.
khendjer
Member
**
Offline Offline

Activity: 157
Merit: 13


View Profile
April 02, 2018, 08:21:12 PM
 #6

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.

tylerderd89
Newbie
*
Offline Offline

Activity: 23
Merit: 0


View Profile
April 02, 2018, 09:31:40 PM
 #7

what is the good price of gus for today?
toiratdeptrai13
Newbie
*
Offline Offline

Activity: 22
Merit: 1


View Profile
April 03, 2018, 02:24:21 AM
 #8

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  Huh

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
CryptoWreck
Newbie
*
Offline Offline

Activity: 19
Merit: 0


View Profile
April 03, 2018, 08:41:47 AM
 #9

Thanks for all this helpful information for a Newbie!
wandino
Newbie
*
Offline Offline

Activity: 112
Merit: 0


View Profile
April 03, 2018, 09:22:23 AM
 #10

Gasstattion is a good tool to calculate it. They higher the gwei is, the sooner it will get verified.
ahmadalsaady (OP)
Newbie
*
Offline Offline

Activity: 8
Merit: 0


View Profile
April 03, 2018, 09:52:07 AM
 #11

Thank you all guys very good informations
khendjer
Member
**
Offline Offline

Activity: 157
Merit: 13


View Profile
April 03, 2018, 07:39:31 PM
 #12

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. Grin

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!