Skip to content

Ethereum Gas

arealive edited this page Sep 26, 2017 · 10 revisions

Gas is the internal pricing for running a transaction or contract in Ethereum. It's purpose is to decouple the unit of Ether (ETH) and its market value from the unit to measure computational use (gas).

Ethereum miners are free to ignore transactions whose gas price limit is too low...If there is not enough Ether in the account to perform the transaction or message then it is considered invalid. The idea is to stop denial of service attacks from infinite loops, encourage efficiency in the code – and to make an attacker pay for the resources they use, from bandwidth through to CPU calculations through to storage.

The more complex the commands you wish to execute, the more gas (and Ether) you have to pay.1

Ethereum contracts can run instruction sets that are much more capable than those available to a bitcoin script...Bitcoin scripts are purposefully not turing complete – they were designed to verify values (signatures, for example) in a small, standard set of transaction types.

Because of the volatile and rapidly-changing nature of Ether pricing, it would be difficult to place an execution cost on a smart contract using Ether. To subdue the uncertainty of Ether pricing, the Ethereum protocol allows a transaction initiator to specify their own gas price as a bid to have their application run on the Ethereum Virtual Machine (EVM).2

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

External links

https://ethereum.gitbooks.io/frontier-guide/content/costs.html


[1] https://www.cryptocompare.com/coins/guides/what-is-the-gas-in-ethereum/

[2] https://what-is-ethereum.org/2017/07/14/what-is-gas-in-ethereum/

[3] https://steemit.com/ethereum/@tomshwom/ethereum-gas-how-it-works

Clone this wiki locally