## Purpose --- Understanding how gas works is crucial for Ethereum users interested in participating in **ICOs**, using **smart contracts**, and even making simple **transfers** between wallets. In this post, I hope to explain what gas is and how it works. Skip to the end for a simple summary of things. To start off, we need to understand some basics about the Ethereum Virtual Machine. ## Ethereum Virtual Machine and Gas --- The Ethereum Virtual Machine (EVM) is a major part of the Ethereum ecosystem, but I'll be heavily glossing over this so we can focus on how it relates to **gas**. In short, **the EVM is an environment where arbitrary code of smart contracts and other operations can be executed.** Every node in the Ethereum network executes operations within the EVM to ensure redundantly correct execution and relies on consensus to agree on the answer. All transactions, from simple transfers to ICO smart contracts, require some amount of operations to perform. Each of these operations has an associated cost in **gas**. Thus, simple transactions like transfers will require less gas to perform than more intense smart contracts. For example, a simple operation like ```if(var > 1)``` may cost 1 gas, but a more complex operation to store a variable could cost 100 gas. **The cumulative sum of all the operations is the total gas cost for the transaction.** ## Gas Limit --- When on a site like MyEtherWallet, you're going to see a field called **Gas Limit**. This corresponds the the **MAXIMUM** amount of gas you are willing to spend on the transaction. Important to note: * Different types of transactions will require different amounts of gas to complete * Providing too little gas will result in a failed transaction, **the fees are kept by the miner** * Extra, unspent gas is refunded automatically #### What happens if I specify too little gas? Your transaction will start to be executed, but will eventually run out of gas and be stopped. When this happens, **you will not get back ether spend on the gas used, but since the transaction did not complete, the blockchain does not reflect a transfer, so the main funds essentially never left the wallet.** #### So I should always specify a large gas limit since I'll be refunded? No. The minimum gas limit for transaction is 21000 + the amount to execute any fallback functions if it's sent to a contract, but the actual blocks *also* have a gas limit that specifies the maximum amount of gas all transactions in the block can consume. This is comparable to Bitcoin's block size in bytes, but ether miners have the option to increase or decrease the gas limit of blocks so that they are propagated quickly. You cannot exceed this amount if you wish for your transaction to be processed. Also, miners only get paid for the actual gas consumed by a transaction, so putting a high value for the gas limit fills up the block gas limit, but isn't computationally-dense enough for miners to want. ## Gas Price --- **Gas price** is the amount of ether you are willing to spend on every unit of gas. Yes, you determine the price of gas AND maximum amount of gas you want to spend on performing a transaction on the Ethereum network. Although gas limit is just a simple quantity, gas price is measured in ether (specifically some amount of wei, usually gwei). The value of gas is driven by the market and the nodes that prioritize higher gas prices when mining transactions. The current gas price can be seen on [Etherscan](https://etherscan.io/chart/gasprice) or [EthGasStation](http://ethgasstation.info). As I mentioned, gas price is usually some amount of gwei. Wei is the smallest unit of ether, and gwei is simply 1000000000 wei. To put this in perspective, check out this code below: ``` var unitMap = { 'wei': '1', 'kwei': '1000', 'ada': '1000', 'femtoether': '1000', 'mwei': '1000000', 'babbage': '1000000', 'picoether': '1000000', 'gwei': '1000000000', 'shannon': '1000000000', 'nanoether': '1000000000', 'nano': '1000000000', 'szabo': '1000000000000', 'microether': '1000000000000', 'micro': '1000000000000', 'finney': '1000000000000000', 'milliether': '1000000000000000', 'milli': '1000000000000000', 'ether': '1000000000000000000', 'kether': '1000000000000000000000', 'grand': '1000000000000000000000', 'einstein': '1000000000000000000000', 'mether': '1000000000000000000000000', 'gether': '1000000000000000000000000000', 'tether': '1000000000000000000000000000000' }; ``` <sub>*from https://github.com/ethereum/web3.js/blob/0.15.0/lib/utils/utils.js#L40*</sub> ## Setting Gas Limit and Gas Price --- If you're using MetaMask, you will see something like this when trying to send Ether: <center></center> Here you can see that the gas limit has been set to 31500 and the gas price at 20 gwei. This means we are only willing to spend a maximum on 31500 gas at the price of 20 gwei / gas on the transaction. ```31500 x 20 gwei = .000630 ether.``` MyEtherWallet has the Gas Limit field, <strike>but no Gas Price for their transactions.</strike> <sub><strike>*I assume they calculate Gas Price depending on the market value</strike></sub> <center></center> ***Edit-** MEW has a slider at the bottom right of the site for adjusting gas price.* <center></center> ## Summary --- * Transactions on the Ethereum network require fees in the form of **gas**. The amount of gas depends on the amount of computation required to complete the transaction. * **Gas Limit** is the maximum amount of gas allotted to the transaction, 21000 being sufficient for simple transfers and much higher amounts for transfers to **smart contracts** like those in ICOs. * Insufficient gas in the Gas Limit will result in a failed transaction, the fee paid will be lost, but the ether transferred never leaves the wallet since the blockchain was never updated. * **Gas Price** is the price of each gas unit measured in a fractional amount of ether, typically gwei. Gas price varies, but 20-30 gwei is average as of writing this. * Current Gas Price can be checked online ( [Etherscan](https://etherscan.io/chart/gasprice) or [EthGasStation](http://ethgasstation.info) ), and the Gas Limit for things other than simple transfers can only be known by looking at the smart contract code or by looking at what the organization behind the ICO / smart contract says is appropriate for their smart contract. #### Handy Sites [EthStats](https://ethstats.net/) [Etherscan](https://etherscan.io/chart/gasprice) [EthGasStation](http://ethgasstation.info) [Ethereum and ERC20 token wallet, MyEtherWallet](https://www.myetherwallet.com/) [MetaMask Chrome Plugin](https://metamask.io/) <sub> **Consider leaving a like or even resteem if you found this helpful! If you're really crazy, my MEW address is 0x5B13430b6D2E327DFCDB93D7430FC6e9a2E63E74. Please feel free to leave corrections and comments below :)** </sub>
author | tomshwom |
---|---|
permlink | ethereum-gas-how-it-works |
category | ethereum |
json_metadata | {"tags":["ethereum","cryptocurrency","blockchain","tutorial","beginner"],"image":["https://steemitimages.com/DQmT5V9qtMk6pjqgusnwCGtkiGKMyNnV6WoENR5c4rKz2Wr/image.png","https://steemitimages.com/DQmQ5Tmk1XPyTYFQZq6Qp5AqXQ21H5aEtogQ8z2TdJkbsZM/image.png","https://steemitimages.com/DQmb3YJSJigZ4ki2gs4qn1tzG1WEpTptYh2uY3ViggiWFaG/image.png"],"links":["https://etherscan.io/chart/gasprice","http://ethgasstation.info","https://github.com/ethereum/web3.js/blob/0.15.0/lib/utils/utils.js#L40","https://ethstats.net/","https://www.myetherwallet.com/","https://metamask.io/"],"app":"steemit/0.1","format":"markdown"} |
created | 2017-05-26 01:43:21 |
last_update | 2017-05-28 09:04:36 |
depth | 0 |
children | 74 |
last_payout | 2017-06-02 01:43:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.153 HBD |
curator_payout_value | 0.043 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 7,405 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 3,802,365 |
net_rshares | 139,630,464,595 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
liondani | 0 | 0 | 100% | ||
eeks | 0 | 0 | 100% | ||
glib | 0 | 0 | 100% | ||
will-zewe | 0 | 1,686,008,533 | 100% | ||
rafikichi | 0 | 0 | 100% | ||
nandubatchu | 0 | 0 | 100% | ||
fyrstikken | 0 | 100,495,651,983 | 0.5% | ||
axiomprime | 0 | 0 | 100% | ||
tony1337 | 0 | 0 | 100% | ||
faded-gravity | 0 | 96,547,621 | 100% | ||
purelife | 0 | 0 | 100% | ||
onlinedoit | 0 | 0 | 100% | ||
kornykory | 0 | 0 | 100% | ||
mithrilman | 0 | 0 | 100% | ||
maleta | 0 | 0 | 100% | ||
ecuageek | 0 | 0 | 100% | ||
jawdy | 0 | 1,575,613,609 | 100% | ||
solidliquid | 0 | 0 | 100% | ||
ecoboss | 0 | 0 | 100% | ||
admiralzhao | 0 | 0 | 100% | ||
cryptoworld | 0 | 1,210,713,519 | 100% | ||
tomshwom | 0 | 1,712,361,033 | 100% | ||
kingofdew | 0 | 3,573,660,649 | 50% | ||
sagacity | 0 | 1,206,659,316 | 100% | ||
l337m45732 | 0 | 1,240,691,504 | 100% | ||
hovito | 0 | 19,883,026,618 | 100% | ||
keleka17 | 0 | 1,121,941,824 | 100% | ||
prasadj | 0 | 0 | 100% | ||
okku | 0 | 0 | 100% | ||
conwayhambone | 0 | 1,400,251,623 | 100% | ||
grider123 | 0 | 0 | 100% | ||
fullofsteem | 0 | 1,515,368,117 | 100% | ||
elowin | 0 | 2,911,968,646 | 100% | ||
danielcfranca | 0 | 0 | 100% | ||
goopgagaming | 0 | 0 | 100% | ||
ryanchavez | 0 | 0 | 100% | ||
viggovonvegan | 0 | 0 | 100% | ||
eduardoneci | 0 | 0 | 100% | ||
amilcook | 0 | 0 | 100% | ||
hausbau | 0 | 0 | 100% | ||
edzynda | 0 | 0 | 100% | ||
jscottdavis28 | 0 | 0 | 100% | ||
cryptozen | 0 | 0 | 100% | ||
gijs | 0 | 0 | 100% | ||
abolitionist | 0 | 0 | 100% | ||
dannytan | 0 | 0 | 100% | ||
splice | 0 | 0 | 100% | ||
rogersen | 0 | 0 | 100% | ||
kingjacob | 0 | 0 | 100% | ||
akhenkheires | 0 | 0 | 100% | ||
zigzagoonballoon | 0 | 0 | 100% | ||
rephill | 0 | 0 | 100% | ||
jbee | 0 | 0 | 100% | ||
todor | 0 | 0 | 100% | ||
mrbadwolf | 0 | 0 | 100% | ||
prageethliyanage | 0 | 0 | 100% | ||
erichinuri | 0 | 0 | 100% | ||
indyahrashaud | 0 | 0 | 100% | ||
bggy | 0 | 0 | 100% | ||
traveljunkie | 0 | 0 | 100% | ||
sky77 | 0 | 0 | 100% | ||
gioana | 0 | 0 | 100% | ||
marusciano | 0 | 0 | 100% | ||
swainz | 0 | 0 | 100% | ||
moonbase | 0 | 0 | 100% | ||
mso | 0 | 0 | 100% | ||
bradfordtennyson | 0 | 0 | 33% | ||
schmidj | 0 | 0 | 100% | ||
paulrberg | 0 | 0 | 100% | ||
maxiepad | 0 | 0 | 100% | ||
wagyuwolf | 0 | 0 | 100% | ||
mvillar | 0 | 0 | 100% | ||
secunoid | 0 | 0 | 100% | ||
ralif | 0 | 0 | 100% | ||
ronie | 0 | 0 | 100% | ||
cawarbux | 0 | 0 | 100% | ||
gsairspeakers | 0 | 0 | 100% | ||
orangeguutan | 0 | 0 | 100% | ||
marcreagan | 0 | 0 | 100% | ||
hammink | 0 | 0 | 100% | ||
almondbutter | 0 | 0 | 100% | ||
beardeddjent | 0 | 0 | 100% | ||
arnavvohra | 0 | 0 | 100% | ||
clumsy-dragon | 0 | 0 | 100% | ||
matthew.leidlein | 0 | 0 | 100% | ||
rksumanthraju | 0 | 0 | 100% | ||
jonathan3 | 0 | 0 | 100% | ||
radudaniel | 0 | 0 | 100% | ||
technikhil | 0 | 0 | 100% | ||
inspirenow | 0 | 0 | 100% | ||
yname | 0 | 0 | 100% | ||
elessarts | 0 | 0 | 100% | ||
cristianoroncuzz | 0 | 0 | 100% | ||
chblx | 0 | 0 | 100% | ||
csalatoni | 0 | 0 | 100% | ||
lovejoel | 0 | 0 | 100% | ||
ewebxml | 0 | 0 | 100% | ||
usmanspall | 0 | 0 | 100% | ||
hoomy | 0 | 0 | 100% | ||
mayankjoshi | 0 | 0 | 100% | ||
harryle | 0 | 0 | 100% | ||
minerx | 0 | 0 | 100% | ||
mannelito | 0 | 0 | 100% | ||
crusam | 0 | 0 | 100% | ||
freethoughts | 0 | 0 | 100% | ||
jenarvaezg | 0 | 0 | 100% | ||
varunpenna | 0 | 0 | 100% | ||
sidjames | 0 | 0 | 100% | ||
pawsys | 0 | 0 | 100% | ||
jcpython | 0 | 0 | 100% | ||
xidaqo | 0 | 0 | 100% | ||
jsl416 | 0 | 0 | 100% | ||
andrewyang | 0 | 0 | 100% | ||
stevenpomilia | 0 | 0 | 100% | ||
mhyytine | 0 | 0 | 100% | ||
jt123 | 0 | 0 | 100% | ||
jenjing | 0 | 0 | 100% | ||
allthesatoshis | 0 | 0 | 100% | ||
phonebox | 0 | 0 | 100% | ||
zeroedge | 0 | 0 | 100% | ||
spelchy | 0 | 0 | 100% | ||
rickfisher | 0 | 0 | 100% | ||
kryptozoo | 0 | 0 | 100% | ||
mohsen63 | 0 | 0 | 100% | ||
vencero | 0 | 0 | 100% | ||
dive-into-crypto | 0 | 0 | 100% | ||
manugoesrtw | 0 | 0 | 100% | ||
drifter007 | 0 | 0 | 100% | ||
bennyliaw | 0 | 0 | 100% | ||
davenavarro | 0 | 0 | 100% | ||
shruggr | 0 | 0 | 100% | ||
cryptogardeners | 0 | 0 | 100% | ||
luxaa | 0 | 0 | 100% | ||
dinkl3berg | 0 | 0 | 100% | ||
orsontrius | 0 | 0 | 100% | ||
dukuo | 0 | 0 | 100% | ||
emiyass | 0 | 0 | 100% | ||
c4rd4n0 | 0 | 0 | 100% | ||
bitfinancial | 0 | 0 | 100% | ||
ultrakingx2 | 0 | 0 | 100% | ||
tahera | 0 | 0 | 100% | ||
cryptogarbage | 0 | 0 | 100% | ||
hatemk | 0 | 0 | 100% | ||
deepee | 0 | 0 | 100% | ||
blockchain-steve | 0 | 0 | 100% | ||
madjazzz | 0 | 0 | 100% | ||
blockkade | 0 | 0 | 100% | ||
superviksha | 0 | 0 | 100% | ||
konen22 | 0 | 0 | 100% |
https://www.binaryforextrader.com
author | aindriu80 |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20171115t221307113z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1","links":["https://www.binaryforextrader.com"]} |
created | 2017-11-15 22:13:09 |
last_update | 2017-11-15 22:14:03 |
depth | 1 |
children | 0 |
last_payout | 2017-11-22 22:13:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 33 |
author_reputation | 4,241,768,371 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 20,510,855 |
net_rshares | -12,189,608,925 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | -12,189,608,925 | -100% |
This article is very helpful, voted to help writer continuing to post such articles.
author | beesic |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20171127t181249824z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-11-27 18:12:51 |
last_update | 2017-11-27 18:12:51 |
depth | 1 |
children | 0 |
last_payout | 2017-12-04 18:12:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.022 HBD |
curator_payout_value | 0.007 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 84 |
author_reputation | 677,217,252 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 21,697,801 |
net_rshares | 12,190,019,721 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 12,190,019,721 | 100% | ||
beesic | 0 | 0 | 100% | ||
sidjames | 0 | 0 | 100% |
Thank you. This was the first time ever I have a clear understanding of GAS and Gwei. So far I just used to go with the default values everywhere.
author | crazyduck |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20170919t184406415z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-09-19 18:44:06 |
last_update | 2017-09-19 18:44:06 |
depth | 1 |
children | 1 |
last_payout | 2017-09-26 18:44:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.018 HBD |
curator_payout_value | 0.005 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 146 |
author_reputation | 148,529,891 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,353,932 |
net_rshares | 9,505,913,054 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 9,505,913,054 | 100% |
If you don't need your transaction to go through super fast, you can put 0 gwei and it will be mined in 5-7 minutes completely **for free**. Check out http://ethgasstation.info/ and see the pools accepting 0 gwei as their minimum. (right now it's 13% of blocks being mined by pools that accept 0 gwei)
author | tomshwom |
---|---|
permlink | re-crazyduck-re-tomshwom-ethereum-gas-how-it-works-20170919t190143180z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"links":["http://ethgasstation.info/"],"app":"steemit/0.1"} |
created | 2017-09-19 19:01:42 |
last_update | 2017-09-19 19:01:42 |
depth | 2 |
children | 0 |
last_payout | 2017-09-26 19:01:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 302 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,355,313 |
net_rshares | 0 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 0 | 100% |
Thanks very informative and to the point....
author | davenavarro |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20180124t224339961z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-01-24 22:43:42 |
last_update | 2018-01-24 22:43:42 |
depth | 1 |
children | 0 |
last_payout | 2018-01-31 22:43:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 44 |
author_reputation | 43,419,243,058,982 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 32,036,362 |
net_rshares | 0 |
This post has helped me to understand gas and gwei. thanks.
author | dive-into-crypto |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20180128t160326791z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-01-28 16:03:27 |
last_update | 2018-01-28 16:03:27 |
depth | 1 |
children | 0 |
last_payout | 2018-02-04 16:03:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.036 HBD |
curator_payout_value | 0.009 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 59 |
author_reputation | 593,053,748 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 33,040,628 |
net_rshares | 5,753,619,723 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 5,753,619,723 | 100% |
clear explanation on gas limit and gwei!
author | dive-into-crypto |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20180727t145923503z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-07-27 14:59:24 |
last_update | 2018-07-27 14:59:24 |
depth | 1 |
children | 0 |
last_payout | 2018-08-03 14:59:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 40 |
author_reputation | 593,053,748 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 66,169,472 |
net_rshares | 220,816,007 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 220,816,007 | 100% |
Great read! I especially like that you showed all the units of ether. It really helped me understand it more with it displayed there like that. Thanks :D
author | drifter007 |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20180211t002831971z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-02-11 00:28:54 |
last_update | 2018-02-11 00:28:54 |
depth | 1 |
children | 0 |
last_payout | 2018-02-18 00:28:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.020 HBD |
curator_payout_value | 0.004 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 153 |
author_reputation | 61,097,907 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 36,536,062 |
net_rshares | 3,910,266,051 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 3,910,266,051 | 100% |
Is there any reliable way to determine how much gas your smart contract will consume based on the current gas price? That's the one piece that still confuses me.
author | edzynda |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20170705t155926136z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-07-05 15:59:24 |
last_update | 2017-07-05 15:59:24 |
depth | 1 |
children | 1 |
last_payout | 2017-07-12 15:59:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 161 |
author_reputation | 586,512,469,499 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 7,413,091 |
net_rshares | 0 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 0 | 100% |
It depends. Gas price is set for each instruction in the EVM, and you can see exactly which instructions will be run in a smart contract. In this sense, you can absolutely know how much gas a function in a contract will cost. The tricky part is that there can be loops/jumps that will change how many times a function runs, and that can't be known sometimes.
author | tomshwom |
---|---|
permlink | re-edzynda-re-tomshwom-ethereum-gas-how-it-works-20170919t133843201z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-09-19 13:38:42 |
last_update | 2017-09-19 13:38:42 |
depth | 2 |
children | 0 |
last_payout | 2017-09-26 13:38:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.022 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 361 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,327,055 |
net_rshares | 9,183,678,714 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 9,183,678,714 | 100% |
I enjoyed this. Keep up the good work -- followed.
author | elowin |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20170526t051532823z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-05-26 05:15:36 |
last_update | 2017-05-26 05:15:36 |
depth | 1 |
children | 0 |
last_payout | 2017-06-02 05:15:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 51 |
author_reputation | 1,280,916,750,985 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 3,807,171 |
net_rshares | 1,712,361,033 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 1,712,361,033 | 100% |
cool - came here from a @ivanli course
author | felix.herrmann |
---|---|
permlink | q73d20 |
category | ethereum |
json_metadata | {"users":["ivanli"],"app":"steemit/0.2"} |
created | 2020-03-12 17:39:39 |
last_update | 2020-03-12 17:39:39 |
depth | 1 |
children | 0 |
last_payout | 2020-03-19 17:39:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 38 |
author_reputation | 126,511,129,199,183 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 96,296,769 |
net_rshares | 0 |
This is actually one of the better articles I could find on Google about [Ethereum](bitopia.io) gas, lol.
author | fiserman |
---|---|
permlink | q5jzzn |
category | ethereum |
json_metadata | {"links":["bitopia.io"],"app":"steemit/0.1"} |
created | 2020-02-11 17:09:24 |
last_update | 2020-02-11 17:09:24 |
depth | 1 |
children | 0 |
last_payout | 2020-02-18 17:09:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 105 |
author_reputation | 33,332,677,735,741 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 95,338,462 |
net_rshares | 2,027,999,115 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
fiserman | 0 | 1,798,893,173 | 100% | ||
bitopian | 0 | 229,105,942 | 100% |
Hoi that is awesome explained! great job thanks man
author | hatemk |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20180402t000308514z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-04-02 00:03:06 |
last_update | 2018-04-02 00:03:06 |
depth | 1 |
children | 0 |
last_payout | 2018-04-09 00:03:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 51 |
author_reputation | 20,386,138,730 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 47,845,608 |
net_rshares | 220,816,007 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 220,816,007 | 100% |
Excellent explanation !! Compliments. Thanks for sharing.
author | hausbau |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20170629t000614822z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-06-29 00:06:15 |
last_update | 2017-06-29 00:06:15 |
depth | 1 |
children | 0 |
last_payout | 2017-07-06 00:06:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.050 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 57 |
author_reputation | 70,780,390,315 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 6,550,461 |
net_rshares | 6,090,738,524 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 6,090,738,524 | 100% | ||
rephill | 0 | 0 | 100% | ||
almondbutter | 0 | 0 | 100% |
Hello there. A complete newbie with only 1 week worth of reading here! Dont be harsh on me! So after finishing reading i have this one question. There is ether which is the main currency which fuels everything and tokens are based on. And you can send and receive ether through transactions. What is the job of gas exactly in this happening?! Thanks for the great article. Needs many rereads on my part. :))
author | hoomy |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20171111t215042141z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-11-11 21:50:48 |
last_update | 2017-11-11 21:51:21 |
depth | 1 |
children | 10 |
last_payout | 2017-11-18 21:50:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.019 HBD |
curator_payout_value | 0.005 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 409 |
author_reputation | 4,984,899,478 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 20,090,984 |
net_rshares | 11,944,810,155 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 11,944,810,155 | 100% |
Ok so i now know the answer (i think) and will put it here for it might be of use to someone noob like myself. Sending and receiving ether and tokens are not free as i thought. A price should be paid for miners to put your transaction in a block and add it to the chain. And that price is payed in ether and is called gas for that transaction.
author | hoomy |
---|---|
permlink | re-hoomy-re-tomshwom-ethereum-gas-how-it-works-20171112t071945224z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-11-12 07:19:51 |
last_update | 2017-11-12 07:19:51 |
depth | 2 |
children | 9 |
last_payout | 2017-11-19 07:19:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.439 HBD |
curator_payout_value | 0.145 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 343 |
author_reputation | 4,984,899,478 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 20,121,006 |
net_rshares | 278,714,913,762 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 11,761,981,428 | 100% | ||
gentlebot | 0 | 265,792,388,630 | 100% | ||
hoomy | 0 | 1,160,543,704 | 100% |
And now my question would be 1. Am i right on the fact that gas is awarded to miners or what miners mine has nothing to do with it? And 2. So when buying tokens there are two things to consider. First how much we want to invest and second how much we are willing to spend on that attempt to invest. Whats the purpose of this second thing? Any analogy to the common banking system would be helpful and very appreciated.
author | hoomy |
---|---|
permlink | re-hoomy-re-hoomy-re-tomshwom-ethereum-gas-how-it-works-20171112t072538381z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-11-12 07:25:42 |
last_update | 2017-11-12 07:26:36 |
depth | 3 |
children | 8 |
last_payout | 2017-11-19 07:25:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.020 HBD |
curator_payout_value | 0.005 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 418 |
author_reputation | 4,984,899,478 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 20,121,387 |
net_rshares | 12,655,542,622 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 11,518,209,792 | 100% | ||
hoomy | 0 | 1,137,332,830 | 100% |
Ok enough subposts! I have another question may you take the time to answer! One of the great things about a cryptocurrency based on blockchains is that you dont need to pay taxes and or any fees to banks and institution. Is gas in fact some sort of tax/incentive payed not to bankers but the whole network of miners who agree to keep record of everything(i.e. mine)? Is this what comprises the famous PoW system?(just connecting what i know :shy)
author | hoomy |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20171113t135142902z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-11-13 13:51:48 |
last_update | 2017-11-13 14:38:09 |
depth | 1 |
children | 2 |
last_payout | 2017-11-20 13:51:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 451 |
author_reputation | 4,984,899,478 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 20,253,631 |
net_rshares | 0 |
Whoa, you are very, very wrong to think you don't have to pay taxes on crypto. I won't speak to other countries, although I do know they have tax laws that effect crypto, but in the US you must file capital gains tax for any crypto holdings you buy/sell/trade. I think what you're really trying to get at is that crypto can eliminate the middle-man who takes a cut. While this *can* be done, there's many times when middle-men are still present in crypto too. One example is decentralized exchanges using the 0x protocol. The trustless trade of one token for another at a certain exchange rate can be done without a fee, but decentralized exchanges acting as transaction relayers are providing a service at a cost, so they should and do inject a fee into these transactions. > Is gas in fact some sort of tax/incentive payed not to bankers but the whole network of miners who agree to keep record of everything(i.e. mine)? Gas is the scaling factor that makes the fee proportional to the computational work done, not the fee itself. The fee is paid in Ether. This fee exists to prevent people from attacking the blockchain and to incentivize miners to maintain the network. If you didn't pay miners, then they wouldn't mine and you wouldn't have a blockchain. Proof of Work consensus is it's own thing. It can be applied to blockchain technology, and most blockchains do use it, but it is not limited to this one application. PoW has a lot more to it than just fees & computers doing "stuff".
author | tomshwom |
---|---|
permlink | re-hoomy-re-tomshwom-ethereum-gas-how-it-works-20171114t150829615z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-11-14 15:08:30 |
last_update | 2017-11-14 15:08:30 |
depth | 2 |
children | 1 |
last_payout | 2017-11-21 15:08:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.020 HBD |
curator_payout_value | 0.005 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,507 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 20,367,415 |
net_rshares | 13,332,744,473 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 12,189,608,925 | 100% | ||
hoomy | 0 | 1,143,135,548 | 100% |
Thanks a lot!
author | hoomy |
---|---|
permlink | re-tomshwom-re-hoomy-re-tomshwom-ethereum-gas-how-it-works-20171115t044848536z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-11-15 04:48:48 |
last_update | 2017-11-15 04:48:48 |
depth | 3 |
children | 0 |
last_payout | 2017-11-22 04:48:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 13 |
author_reputation | 4,984,899,478 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 20,429,032 |
net_rshares | 0 |
Thanks a bunch man! I have multiple MEW accounts and this helped a lot in loading my ETH wallets for transfer fees. :D
author | internationale |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20171230t043958744z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-12-30 04:40:03 |
last_update | 2017-12-30 04:40:03 |
depth | 1 |
children | 0 |
last_payout | 2018-01-06 04:40:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.096 HBD |
curator_payout_value | 0.027 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 118 |
author_reputation | 249,052,629 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 25,989,561 |
net_rshares | 9,438,070,593 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 9,438,070,593 | 100% | ||
kryptozoo | 0 | 0 | 100% |
ok.. Your article is super informative, single place to all queries.. I read your article & still lost some eth in failed transaction due to low gas.. https://etherscan.io/tx/0xab645b8a38a9c60beb3fd77e61c50aaeaffef11724aa7decf430dcb9b037cbef Why this transaction failed.. I put 150000 gas, 1.1 gwei & it still ran out of gas where minimum gas was 90000.. Please explain
author | ivrmakers |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20180218t180003662z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"links":["https://etherscan.io/tx/0xab645b8a38a9c60beb3fd77e61c50aaeaffef11724aa7decf430dcb9b037cbef"],"app":"steemit/0.1"} |
created | 2018-02-18 18:00:06 |
last_update | 2018-02-18 18:00:06 |
depth | 1 |
children | 7 |
last_payout | 2018-02-25 18:00:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 372 |
author_reputation | 122,177,855,397 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 38,575,693 |
net_rshares | 0 |
The EOS Crowdsale contract has an iterative function. That means part of the code can be called many many times, and the exact amount depends from person to person. Unfortunately, there is no good way to estimate how much gas a variable execution function will consume unless you execute it virtually off-chain to see. You lost ~$0.26, so not big loss. Try again with 500k maybe.
author | tomshwom |
---|---|
permlink | re-ivrmakers-re-tomshwom-ethereum-gas-how-it-works-20180219t160714763z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-02-19 16:07:15 |
last_update | 2018-02-19 16:07:15 |
depth | 2 |
children | 6 |
last_payout | 2018-02-26 16:07:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.052 HBD |
curator_payout_value | 0.013 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 383 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 38,825,514 |
net_rshares | 12,005,107,054 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 2,987,750,355 | 100% | ||
ivrmakers | 0 | 9,017,356,699 | 100% |
thanks for your input.. i lost more than 0.26.. & second.. how to execute it off the chain
author | ivrmakers |
---|---|
permlink | re-tomshwom-re-ivrmakers-re-tomshwom-ethereum-gas-how-it-works-20180219t182927258z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-02-19 18:29:30 |
last_update | 2018-02-19 18:29:30 |
depth | 3 |
children | 5 |
last_payout | 2018-02-26 18:29:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.238 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 90 |
author_reputation | 122,177,855,397 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 38,854,709 |
net_rshares | 42,635,881,493 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 0 | 0% | ||
sniffbiff | 0 | 15,655,008,235 | 26% | ||
keter | 0 | 3,253,807,877 | 52% | ||
pokersensei | 0 | 3,086,793,392 | 84% | ||
curitek | 0 | 5,680,299,185 | 80% | ||
muhammad.asad | 0 | 3,004,442,591 | 16% | ||
jmdk2000 | 0 | 2,631,043,917 | 100% | ||
pault70 | 0 | 2,635,815,624 | 100% | ||
cryptocat28 | 0 | 4,055,660,632 | 85% | ||
p-a-t | 0 | 2,633,010,040 | 49% |
incredibly informative @tomshwom, great share my friend!
author | jawdy |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20170526t022750069z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"users":["tomshwom"],"app":"steemit/0.1"} |
created | 2017-05-26 02:27:51 |
last_update | 2017-05-26 02:27:51 |
depth | 1 |
children | 1 |
last_payout | 2017-06-02 02:27:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 56 |
author_reputation | 1,269,284,041,989 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 3,803,375 |
net_rshares | 1,712,361,033 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 1,712,361,033 | 100% | ||
cristianoroncuzz | 0 | 0 | 100% |
thanks man! glad my first post was useful
author | tomshwom |
---|---|
permlink | re-jawdy-re-tomshwom-ethereum-gas-how-it-works-20170526t030915542z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-05-26 03:09:15 |
last_update | 2017-05-26 03:09:15 |
depth | 2 |
children | 0 |
last_payout | 2017-06-02 03:09:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 42 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 3,804,470 |
net_rshares | 1,712,361,033 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 1,712,361,033 | 100% | ||
cristianoroncuzz | 0 | 0 | 100% |
This is a great explanation of ETH transaction fees, I have always steered away from ETH because of this learning curve. Thank you so much for taking the time to make this more clear for the ones newer in the crypto space like myself.
author | jcpython |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20180114t172750373z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-01-14 17:27:48 |
last_update | 2018-01-14 17:27:48 |
depth | 1 |
children | 0 |
last_payout | 2018-01-21 17:27:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.053 HBD |
curator_payout_value | 0.014 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 234 |
author_reputation | 3,871,010,916 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,508,755 |
net_rshares | 7,481,766,974 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 7,481,766,974 | 100% | ||
lotusbaba | 0 | 0 | 100% |
thank you so much!
author | ladyrednails |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20180129t152159412z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-01-29 15:22:00 |
last_update | 2018-01-29 15:22:00 |
depth | 1 |
children | 0 |
last_payout | 2018-02-05 15:22:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.045 HBD |
curator_payout_value | 0.008 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 18 |
author_reputation | 2,643,299,291,456 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 33,313,767 |
net_rshares | 7,657,772,817 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 5,753,742,503 | 100% | ||
combofrenzy | 0 | 1,904,030,314 | 100% |
So I came here expecting to learn about gas price and gas limit but it still seems confusing. Why the separation of the two? Why not have just one fee? I can add much gas and pay little for it or add little gas and pay a fortune for it. What is the difference exactly?
author | minerx |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20171202t041612600z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-12-02 04:16:12 |
last_update | 2017-12-02 04:16:12 |
depth | 1 |
children | 1 |
last_payout | 2017-12-09 04:16:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.032 HBD |
curator_payout_value | 0.009 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 268 |
author_reputation | 1,973,114,902 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,149,520 |
net_rshares | 11,954,790,727 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 11,954,790,727 | 100% |
Gas itself exists to accurately represent computational work. Ether, and thus value, is not a good measurement of this work because the value is so volatile. Can you imagine if there was a flat fee in Ether that you paid for transactions, and it was set when Ether was $10? Why would you pay 50x more for the same work just because Ether is worth more? You need gas so that somebody doesn't write code to execute an infinite loop that would stall the blockchain. You need gas so that each individual opcode in the EVM can be accurately weighted proportionally to electrical costs (or other costs such as storage) of performing the operation. The actual fee is up to the free market to determine via gas price, but the computation is a set amount and needs a separate unit to be represented in.
author | tomshwom |
---|---|
permlink | re-minerx-re-tomshwom-ethereum-gas-how-it-works-20171202t181320028z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-12-02 18:13:18 |
last_update | 2017-12-02 18:13:18 |
depth | 2 |
children | 0 |
last_payout | 2017-12-09 18:13:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.038 HBD |
curator_payout_value | 0.010 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 798 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 22,203,532 |
net_rshares | 13,266,443,799 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 12,198,766,048 | 100% | ||
oxva | 0 | 1,067,677,751 | 100% | ||
sidjames | 0 | 0 | 100% | ||
rickfisher | 0 | 0 | 100% |
Hi @tomshwom, Can you elaborate a bit on how can we reliably determine the gas for ERC20 transfer method for all the tokens available in the market? Each token seems to be using different amounts of gas and the gas amount is also observed to vary with each transaction. Can you clarify what determines the gasUsed and why is this varying a lot?
author | nandubatchu |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20180713t122203425z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"users":["tomshwom"],"app":"steemit/0.1"} |
created | 2018-07-13 12:22:03 |
last_update | 2018-07-13 12:22:03 |
depth | 1 |
children | 1 |
last_payout | 2018-07-20 12:22:03 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 344 |
author_reputation | -13,958,820,956 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 64,527,615 |
net_rshares | 220,816,007 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 220,816,007 | 100% |
ERC20 is only a spec in terms of which functions are required to exist and what they do, not how they are written or what additional functions are present. Because of this, you can have many ERC20 compliant tokens that do completely different things, meaning they have different code and thus require different amounts of gas to execute in the EVM. You can't reliably *determine* gas without pre-executing the contract. Even then, if something depends on the state, you can't even be correct 100% of the time with pre-execution. However, you can reliably *estimate* the amount by simply checking similar transactions to the contract that were successful. This is how many interfaces estimate gas cost, and it's generally good enough.
author | tomshwom |
---|---|
permlink | re-nandubatchu-re-tomshwom-ethereum-gas-how-it-works-20180713t134236573z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-07-13 13:42:36 |
last_update | 2018-07-13 13:42:36 |
depth | 2 |
children | 0 |
last_payout | 2018-07-20 13:42:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 738 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 64,535,911 |
net_rshares | 217,503,767 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 217,503,767 | 100% |
Thanks for this explanation, very informative. Still i have a question. How does the gas price relate to the fluctuation of Ether value? We've seen Ether as a very volatile currency so far, but it wouldn't be fair if the gas price doesn't consider this right?
author | onionwushu |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20170919t045935571z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-09-19 04:58:30 |
last_update | 2017-09-19 04:58:30 |
depth | 1 |
children | 1 |
last_payout | 2017-09-26 04:58:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.018 HBD |
curator_payout_value | 0.006 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 259 |
author_reputation | 155,243,106 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,292,649 |
net_rshares | 9,935,558,842 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 9,935,558,842 | 100% |
Gas price doesn't have a real "going rate" like ETH does. Looking at http://ethgasstation.info/, There's 13% of blocks right now being mined by pools that accept 0 gwei for gas price, so it's totally possible to make transfers without paying any fees at all. The difference is that you may have to wait a bit longer for your transaction to be included in a block (because you only have a 13% chance that a pool who accepts your transaction will mine it). Also, gas fees are very small. The median gas fee is about $0.26, which is actually quite high right now for Ethereum (in part due to the difficulty bomb before Metropolis). If there was more competition over price, and if the prices were significant for people to actually profit, then gas fees might become more aligned with the ETH price. I'd rather have it be separate though.
author | tomshwom |
---|---|
permlink | re-onionwushu-re-tomshwom-ethereum-gas-how-it-works-20170919t133206274z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"links":["http://ethgasstation.info/"],"app":"steemit/0.1"} |
created | 2017-09-19 13:32:06 |
last_update | 2017-09-19 13:32:06 |
depth | 2 |
children | 0 |
last_payout | 2017-09-26 13:32:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.023 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 843 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,326,541 |
net_rshares | 9,720,735,948 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 9,720,735,948 | 100% |
Very nice article. Doesn't this seem a bit cumbersome of a process in order to execute a smart contract? I don't see my mother or family members being able to take the time to learn how to execute this type of a contract and that will essentially limit the adoption rate of blockchain tech.
author | powderskier |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20180113t151409932z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-01-13 15:14:12 |
last_update | 2018-01-13 15:14:12 |
depth | 1 |
children | 2 |
last_payout | 2018-01-20 15:14:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 290 |
author_reputation | 81,526,482,443 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,249,456 |
net_rshares | 0 |
Your mother & family probably aren't capable of securely owning their private key either, so they can and should allow trusted 3rd parties like exchanges manage their funds. Leave it to these entities to also take the complexity out on the user's end. If that's a problem, then I really don't think gas is particularly complicated. You have to put enough gas in your car to make a trip, and that's universally accepted as a simple fact. It's pretty much the same with Ethereum, except there's a competitive market for gas prices. Again, a user that doesn't understand the very basics of blockchain / smart contracts / simple public-key cryptography, and things like gas really should not be part of this ecosystem right now. Crypto is in alpha-stage, and it gets significantly more complicated that these fundamental building blocks. It's actually been abstracted extremely well so that all the people that are in crypto today can actually use it.
author | tomshwom |
---|---|
permlink | re-powderskier-re-tomshwom-ethereum-gas-how-it-works-20180115t144008262z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-01-15 14:40:09 |
last_update | 2018-01-15 14:40:09 |
depth | 2 |
children | 1 |
last_payout | 2018-01-22 14:40:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.043 HBD |
curator_payout_value | 0.014 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 956 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 29,717,639 |
net_rshares | 6,675,316,465 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 6,675,316,465 | 100% | ||
powderskier | 0 | 0 | 100% |
Thanks @tomshwom. I appreciate this response and you make many good points. "so they can and should allow trusted 3rd parties like exchanges manage their funds." Very true. The sooner that we, as blockchain developers, can simply the secure handling of private keys for the layperson, the more rapidly crypto will become mainstream. I think future economy is really going to be technology and information based so those who don't learn these simple skills will be left for the lions.
author | powderskier |
---|---|
permlink | re-tomshwom-re-powderskier-re-tomshwom-ethereum-gas-how-it-works-20180215t203840995z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"users":["tomshwom"],"app":"steemit/0.1"} |
created | 2018-02-15 20:38:39 |
last_update | 2018-02-15 20:38:39 |
depth | 3 |
children | 0 |
last_payout | 2018-02-22 20:38:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 484 |
author_reputation | 81,526,482,443 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 37,831,434 |
net_rshares | 0 |
If you can wait a while, let's say a day, for the transaction to go through. You said the gas limit should be minimum 21000, but what's the minimum gas price I should use?
author | pravr |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20171231t233036767z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-12-31 23:30:39 |
last_update | 2017-12-31 23:30:39 |
depth | 1 |
children | 2 |
last_payout | 2018-01-07 23:30:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 171 |
author_reputation | 472,325,283 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 26,287,663 |
net_rshares | 0 |
0 is the minimum since you literally can't go lower.. In a practical sense, the amount you want to use for gas price fluctuates since it depends on market value. Go to ethgasstation.info to see current competitive gas prices.
author | tomshwom |
---|---|
permlink | re-pravr-re-tomshwom-ethereum-gas-how-it-works-20180102t221346306z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-01-02 22:13:45 |
last_update | 2018-01-02 22:13:45 |
depth | 2 |
children | 1 |
last_payout | 2018-01-09 22:13:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.116 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 227 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 26,644,452 |
net_rshares | 10,268,230,932 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 9,107,738,122 | 100% | ||
pravr | 0 | 1,160,492,810 | 100% |
Thanks!
author | pravr |
---|---|
permlink | re-tomshwom-re-pravr-re-tomshwom-ethereum-gas-how-it-works-20180105t003732502z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-01-05 00:37:33 |
last_update | 2018-01-05 00:37:33 |
depth | 3 |
children | 0 |
last_payout | 2018-01-12 00:37:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.066 HBD |
curator_payout_value | 0.016 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 7 |
author_reputation | 472,325,283 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 27,151,823 |
net_rshares | 8,515,432,227 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 8,515,432,227 | 100% |
You made it look so simple !!!
author | rksumanthraju |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20171014t175648012z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-10-14 17:56:51 |
last_update | 2017-10-14 17:56:51 |
depth | 1 |
children | 0 |
last_payout | 2017-10-21 17:56:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.023 HBD |
curator_payout_value | 0.006 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 30 |
author_reputation | 2,618,068,341,408 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 17,686,510 |
net_rshares | 12,541,005,168 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 11,922,992,385 | 100% | ||
rksumanthraju | 0 | 618,012,783 | 100% |
Is there any api to find the current gas price, which i can see in ethgasstation, also i wonder how meta mask determine the current gas price automatically.
author | sahilsarpal |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20180906t084234421z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-09-06 08:42:36 |
last_update | 2018-09-06 08:42:36 |
depth | 1 |
children | 1 |
last_payout | 2018-09-13 08:42:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 156 |
author_reputation | 14,564,953 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 70,482,398 |
net_rshares | 220,816,007 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 220,816,007 | 100% |
Gas price is calculated on ethgasstation and metamask by looking at the average gas price of previous blocks. You can't query the blockchain for gas price, it's not something the blockchain manages or has control over. Here's a link to the ethgasstation-api github repo: https://github.com/ethgasstation/ethgasstation-api
author | tomshwom |
---|---|
permlink | re-sahilsarpal-re-tomshwom-ethereum-gas-how-it-works-20180906t140838435z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"links":["https://github.com/ethgasstation/ethgasstation-api"],"app":"steemit/0.1"} |
created | 2018-09-06 14:08:39 |
last_update | 2018-09-06 14:08:39 |
depth | 2 |
children | 0 |
last_payout | 2018-09-13 14:08:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 323 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 70,507,538 |
net_rshares | 217,503,767 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 217,503,767 | 100% |
This has been really helpful. I'm already in BTC, LTC and a few alts but recently purchased some Ether to play around with CryptoKitties and the Gas/Gwei thing was a little confusing from the outside. Not as worried about being overcharged now. Thanks! :)
author | sidjames |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20171218t143238864z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-12-18 14:32:39 |
last_update | 2017-12-18 14:32:39 |
depth | 1 |
children | 0 |
last_payout | 2017-12-25 14:32:39 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.071 HBD |
curator_payout_value | 0.003 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 255 |
author_reputation | 956,531,184 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 24,031,929 |
net_rshares | 12,423,903,245 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 11,280,805,230 | 100% | ||
sidjames | 0 | 1,143,098,015 | 100% |
A quick question arose from "So I should always specify a large gas limit since I'll be refunded?" phrase from your article. A function takes 40,000 Gas Units to execute. Which one of the following function calls will miner prefer to take? 1) Call with 100,000 Gas Units. 2) Call with 50,000 Gas Units. Provided that the miner is paid for just 40,000 gas unit operations, they will prefer 2nd function call as it takes less total block size limit compared to 1st call. Does the algorithm for tx selection from txpool work like this?
author | sowmayjain |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20180130t123704365z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-01-30 12:37:09 |
last_update | 2018-01-30 12:37:09 |
depth | 1 |
children | 1 |
last_payout | 2018-02-06 12:37:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.030 HBD |
curator_payout_value | 0.007 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 536 |
author_reputation | 88,553,693 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 33,561,613 |
net_rshares | 5,667,436,366 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 5,667,436,366 | 100% |
Preferring the call with 50k is better for the miner since it frees up 50k in the block for additional transactions hat will actually result in fees. However, I had a conversation with the person behind a lot of the ethgasstation.info site programming and we found that this is not how actual miners are working. Looking at historical transactions, miners are pretty dumb. They almost always prefer higher gas price and don't look at gas limit, regardless of whether it's high or low. Miners don't usually account for gas limit until it exceeds 1M or so, in which case they simply ignore it regardless of gas price. For a demographic that thrives on cost optimization, this was a strange result to find. I'd expect it to change in the future, but who knows.
author | tomshwom |
---|---|
permlink | re-sowmayjain-re-tomshwom-ethereum-gas-how-it-works-20180130t150817512z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-01-30 15:08:18 |
last_update | 2018-01-30 15:08:18 |
depth | 2 |
children | 0 |
last_payout | 2018-02-06 15:08:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.034 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 763 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 33,592,566 |
net_rshares | 5,552,361,516 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 5,552,361,516 | 100% |
Hey, very helpful, but what's the MINIMUM amount of gwei to put to let the transaction does not fail? i mean, if i set 0.1 gwei, the transaction may go into "limbo" and never execute? if yes, what is the minimum price?( don't care if it will be slow)
author | thecryptotrader |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20171104t210243067z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-11-04 21:02:42 |
last_update | 2017-11-04 21:02:42 |
depth | 1 |
children | 3 |
last_payout | 2017-11-11 21:02:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.890 HBD |
curator_payout_value | 0.296 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 250 |
author_reputation | 26,975,551,195,347 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 19,466,110 |
net_rshares | 556,308,460,145 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
thecryptotrader | 0 | 556,308,460,145 | 100% | ||
jonathan3 | 0 | 0 | 100% | ||
csalatoni | 0 | 0 | 100% | ||
jdndri | 0 | 0 | 100% | ||
jenarvaezg | 0 | 0 | 100% | ||
pravr | 0 | 0 | 100% | ||
brenontheroad | 0 | 0 | 100% | ||
kryptozoo | 0 | 0 | 100% | ||
dukuo | 0 | 0 | 100% |
There isn't one. You can do 0 gwei and miners can accept it if they want. It may never actually be accepted, but it can be.
author | tomshwom |
---|---|
permlink | re-thecryptotrader-re-tomshwom-ethereum-gas-how-it-works-20171105t225546386z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-11-05 22:55:45 |
last_update | 2017-11-05 22:55:45 |
depth | 2 |
children | 2 |
last_payout | 2017-11-12 22:55:45 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.036 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 125 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 19,556,365 |
net_rshares | 18,154,023,728 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 12,186,485,951 | 100% | ||
thecryptotrader | 0 | 5,967,537,777 | 1% | ||
ralif | 0 | 0 | 100% | ||
tvance929 | 0 | 0 | 100% | ||
kryptozoo | 0 | 0 | 100% |
Thanks, but do you think that with 0.1 or 0.5 gwei might be accepted or there are some chances to never be accepted? i must do thousands of transactions, so i'm trying to spend as low as possible..
author | thecryptotrader |
---|---|
permlink | re-tomshwom-re-thecryptotrader-re-tomshwom-ethereum-gas-how-it-works-20171105t232131486z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-11-05 23:21:33 |
last_update | 2017-11-05 23:21:33 |
depth | 3 |
children | 1 |
last_payout | 2017-11-12 23:21:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.743 HBD |
curator_payout_value | 0.247 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 198 |
author_reputation | 26,975,551,195,347 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 19,557,677 |
net_rshares | 472,563,100,553 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
thecryptotrader | 0 | 472,563,100,553 | 100% |
thank you. No one has explained it properly like you did in this post. Thanx again!!
author | tooktheredpill |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20170624t134028658z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-06-24 13:40:30 |
last_update | 2017-06-24 13:40:30 |
depth | 1 |
children | 6 |
last_payout | 2017-07-01 13:40:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.062 HBD |
curator_payout_value | 0.017 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 86 |
author_reputation | 2,106,281,092 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 5,910,296 |
net_rshares | 7,245,570,105 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 6,717,108,657 | 100% | ||
hausbau | 0 | 528,461,448 | 100% | ||
rephill | 0 | 0 | 100% | ||
jonathan3 | 0 | 0 | 100% |
If this is how ethereum works, then that's some bullshit right there. A failed contract took an $18.00 fee in ethereum from me. If there is any error error then kiss your fee goodbye. Sounds like bad business to me.
author | cliffordhodaka |
---|---|
permlink | re-tooktheredpill-re-tomshwom-ethereum-gas-how-it-works-20170830t231317853z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-08-30 23:13:18 |
last_update | 2017-08-30 23:13:18 |
depth | 2 |
children | 2 |
last_payout | 2017-09-06 23:13:18 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 217 |
author_reputation | 2,543,315,110 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,389,777 |
net_rshares | 0 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 0 | -100% | ||
introvertspeaks | 0 | 0 | 100% |
I doubt the contract was written incorrectly, so it's likely that you either executed it improperly or executed it properly but you didn't know what it would do and it turned out different than what you expected. In either case, **you** set the gas price and agreed to "lose" your money. It's your fault, not the Ethereum Networks, and almost certainly not the contract's.
author | tomshwom |
---|---|
permlink | re-cliffordhodaka-re-tooktheredpill-re-tomshwom-ethereum-gas-how-it-works-20170919t133659125z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-09-19 13:36:57 |
last_update | 2017-09-19 13:36:57 |
depth | 3 |
children | 1 |
last_payout | 2017-09-26 13:36:57 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.023 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 374 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,326,900 |
net_rshares | 9,344,795,884 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 9,344,795,884 | 100% | ||
secunoid | 0 | 0 | 100% | ||
cliffordhodaka | 0 | 0 | 100% | ||
sushiiallday | 0 | 0 | 100% |
author | tomshwom |
---|---|
permlink | re-tooktheredpill-re-tomshwom-ethereum-gas-how-it-works-20170627t140824344z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-06-27 14:08:24 |
last_update | 2017-06-27 14:08:24 |
depth | 2 |
children | 2 |
last_payout | 2017-07-04 14:08:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 20 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 6,335,430 |
net_rshares | 0 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 0 | 0% | ||
mrbadwolf | 0 | 0 | 100% |
I have 1 question. What would it be the highest gas posible? And how would it cost? THX
author | mrbadwolf |
---|---|
permlink | re-tomshwom-re-tooktheredpill-re-tomshwom-ethereum-gas-how-it-works-20170828t182801045z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-08-28 18:28:00 |
last_update | 2017-08-28 18:28:00 |
depth | 3 |
children | 1 |
last_payout | 2017-09-04 18:28:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.019 HBD |
curator_payout_value | 0.006 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 87 |
author_reputation | 488,576,467 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 13,150,952 |
net_rshares | 7,375,778,768 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 7,375,778,768 | 100% |
This was super helpful! Thanks for the post.
author | volkswagener |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20180302t054025909z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2018-03-02 05:40:12 |
last_update | 2018-03-02 05:40:12 |
depth | 1 |
children | 0 |
last_payout | 2018-03-09 05:40:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 44 |
author_reputation | 222,866,394 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 41,557,778 |
net_rshares | 0 |
Question: do only miners perform transactions on the network besides mining blocks or can a node also perform transactions (and reveive gas for it) without mining?
author | wekkel |
---|---|
permlink | re-tomshwom-ethereum-gas-how-it-works-20170916t114109900z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-09-16 11:41:12 |
last_update | 2017-09-16 11:41:12 |
depth | 1 |
children | 1 |
last_payout | 2017-09-23 11:41:12 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.024 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 163 |
author_reputation | 793,854,297,842 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,048,322 |
net_rshares | 9,559,618,778 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 9,559,618,778 | 100% |
You're missing what "performing transactions" actually means. The blocks *are* the transactions. Nothing is valid if it's not included in a block that is part of the canonical blockchain. Miners are the ones who assemble blocks from several transactions, and link them to the blockchain. Things like side-channels are performed off-chain, but are still settled and only valid on-chain. Since they are side-chain, there is no gas or transaction fees (unless that's part of the specific transaction), and mining isn't required until settlement, which is on-chain.
author | tomshwom |
---|---|
permlink | re-wekkel-re-tomshwom-ethereum-gas-how-it-works-20170917t050916397z |
category | ethereum |
json_metadata | {"tags":["ethereum"],"app":"steemit/0.1"} |
created | 2017-09-17 05:09:15 |
last_update | 2017-09-17 05:09:15 |
depth | 2 |
children | 0 |
last_payout | 2017-09-24 05:09:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.019 HBD |
curator_payout_value | 0.006 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 566 |
author_reputation | 1,713,446,395,686 |
root_title | "Ethereum "Gas" - How it Works" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 15,107,830 |
net_rshares | 10,150,381,736 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tomshwom | 0 | 10,150,381,736 | 100% |