Minimum Gas | Table O Contents

Some methods executed over the Ethereum network cost more than others based on their op-code …

Note. The Flammarion Logo Badge in the page header above is an .svg image file set to the dimensions of 5% width, auto height, and zoom. Go ahead and test the zoom-out feature by hovering over the badge to engage the expansion of the image.

Op Codes

Hint. Place the intro paragraph ie.) the ‘hypothesis’ here …

The minimum amount of gas required by the Ethereum network to execute a smart contract

That will transfer funds …

Is currently set at twenty-one thousand (21,000) gas units plus the value of all other resident op-code functions used by your contract, if any.

The fee schedule per op-code expressed in units of gas is set annually by the directors of the Ethereum foundation and is also subject to change.

Note. All smart contracts executed over at the Ethereum network must be written in Solidity, the default Ethereum network development language.

EVM

The (.sol) files are then compiled into byte-code for the Ethereum Virtual Machine, or EVM to work upon.

So, to sum …

If you wish to send ether from one account to another over the Ethereum network, you will have to pay a current fee of at least twenty-one thousand (21,000) gas units.

Therefore, when figuring out how much ether to send from one account to the other, you must also account for the expected override snipped by the Ethereum network to process your transaction based on the complexity of your smart contract.

Gas Prices

If we can calculate the number of gas units our smart contract will consume when executing over the Ethereum network …

Then, given the current price of gas over at the Ethereum network we should be able to calculate the gas cost of our contract, as well.

How much Giga-wei, or gwei of gas are you willing to spend?

Try scoping out the current action of the Ethereum network by viewing the Ethereum Network Dashboard over at Ether Stats dot net.

In column two of the Ethereum Network Dashboard under the subtitle ‘Uncles’ you will find the current price of gas at the Ethereum network.

Currently, the dashboard shows a price of gas at the Ethereum network equal to twenty (20) gwei.

So, if your smart contract is simple, and only requires the sending of ether from one account to another …

Then you may currently expect to pay twenty (20) gwei per gas unit.

And, it takes twenty-one thousand (21,000) gas units just to execute a transfer of ether from one account to another.

Hmmmmm …

Twenty-one thousand (21,000) gas units times twenty (20) gwei per gas unit equals …

420,000 gwei, or Giga-wei.

Now, a wei is the smallest denomination that an official (ETH) coin can be broken into.

In fact, there are 1,000 zillion wei per (ETH) coin!

Convert

According to the Ethereum Converter, there are one-million (1,000,000,000) wei in a gwei, or Giga-wei.

From our previous calculation, we need four-hundred and twenty thousand (420,000) gwei, or Giga-wei just to transfer funds over the Ethereum network.

That’s four-hundred and twenty thousand million wei!

Or, 420 billion as we say here in America (there are a thousand million in one billion).


420,000,000,000

Now, if I knew the price of one wei given there are 1,000 zillion wei in one ether coin, or (ETH) …

Then, I could calculate the cost of running my “funds transfer” smart contract one time over the Ethereum network.

(Not counting the time it takes just to figure out the cost of doing so!)

Coin Base

If you login to your Coinbase Dashboard over at Coinbase dot com using two-factor authentication, you will find the current price of one ether coin, or ETH.

One ETH is currently trading for around $730 USD.

Now, divide $730 USD by 1,000 zillion wei and you fill find the current price of one wei.

And, remember … we need 420 billion wei to run our smart contract over at the Ethereum network.

Hint. One thousand zillion equals … a trillion (1,000,000,000,000) plus another six (6) zeros, or …


1,000,000,000,000,000,000

Blockchain 3.0

Using the trusty, super-large Web2 online calculator over at Zero Calc dot com

We see one wei currently equals seventy-three hundred zillionths of one dollar (USD), or …


0.00000000000000073 USD

Now, if we multiply the current value of one wei in USD by our requirement of four-hundred twenty billion wei (just to run our transfer contract over at the Ethereum network) …


420,000,000,000 wei

Then, we get a total cost per transfer of $0.0003066, which is still currently less than one-penny (USD).

Fill ‘er up!

Public Hash

Scan the the QR Code over at the home page of our Concept Library at Git Hub to extract the public hash of our Medcoin™ Crypto Currency Project.

Then, send us some ether!

Let us know if you get a different value to simply transfer ether through your smart contract over at the Ethereum network.

You may contact us through our Facebook page at Medcoin™.

Meta Mask

More to come …

Last Subtitle

More to come …


Note. The above synopsis was derived from an article written by Robert Lie [2].

  1. Solving the Ethereum Gas Puzzle by Robert Lie of Zaandam, the Netherlands (NL). Published by © 2017 Mobilefish.com.

Support

Please support the co-workers who aggregate the Source Links for our projects.

Patreon

Like what you see in this project? If so, then support the authors and machine-elves who aggregate the source links and pages for our projects via Patreon.