1 ETH = 1000000000000000000 wei = 1000000000 gwei (shannon) = 1000000 szabo = 1000 finney
Ethereum founders named Ether denominations after prominent figures in the history of cryptocurrencies.
Hal Finney — the first Bitcoin user after Satoshi Nakamoto
Nick Szabo — developed the concept of smart contracts
Wei Dai — created the concept of b-money that may be considered Bitcoin’s predecessor
If you want to learn more about the origins of the names, check out this article.
As a rule, new Ethereum users get confused when they come across the ‘gas’ concept for the first time. In fact, it is much more simple in Bitcoin – one should just set the transaction fee and wait for the transaction to come through. If the transaction fee is low, then your waiting time is longer, if it’s higher – your waiting time lessons. Bitcoin is a cryptocurrency intended for the transfer of monetary values between users directly.
The main difference between Ethereum and Bitcoin is that Ethereum provides a decentralized Virtual Machine (EVM). It allows you to execute any program/smart contract (mainly written in Solidity) if there is enough time and memory (more details here). Unlike Bitcoin, Ethereum was not created as a cryptocurrency for transactions, but as a platform that can execute applications (with payments in the form of Ethers – ETH).
The official Ethereum wallet usually overloads the computer operating system. It happens because of the EVM that operates on your PC and because it executes various programs.
Contents
- What Can You Do in Ethereum? Introducing the Gas Concept
- Transactions in Ethereum
- Sending ETH from One Wallet to Another
- Can You Not Pay at All?
- How to Use It
- How to Fool the System and Lower the Gas Price in MyEtherWallet
- P.S. Make sure to distinguish the gas limit from the gas price, or else you might end up just like that guy…
- P.P.S
What Can You Do in Ethereum? Introducing the Gas Concept
For the sake of simplicity, we’ll narrow down the list of what you can do to 3 things:
- Send ETH to another user.
- Create a smart contract (program) and add it to the blockchain.
- Execute a smart contract (program).
Every transaction has its price. In Ethereum, you pay in gas. You pay a certain amount of gas (fuel) for every transaction. Here’s a car analogy that might help: you need a small amount of fuel to go to a nearby shop, and you need a lot more of it to go out of town.
- Sending ETH from one wallet to another costs 21,000 gas.
- The cost of creating a smart contract may vary, so let’s choose a random contract as an example:
Every contract has a creator address that you can find in the Contract Creator field, along with a creator transaction hash (inside the red rectangle above). If you look at this transaction, you’ll see that it cost 219,780 gas.
- The cost of smart contract execution may vary as well, because a contract (program) may execute an indefinite number of transactions in the process. If you look at the contract we chose as an example, you’ll see that every user paid 22,968 gas for its execution. Below there is information about every transaction:
You can find detailed information on how much gas is needed for every transaction in the Ethereum Yellow Paper (Page 20). For example, you need much more gas to record data on the blockchain than merely multiplying two numbers together.
Creating smart contracts is an exciting topic, especially for developers. Etherscan might be very useful in this regard – it shows you everything you want to know, even transaction code, so you can check what happens there at any time.
Transactions in Ethereum
Every transaction in Ethereum needs items of information:
- Recipient address
- The sent amount of ETH (maybe 0)
- The gas limit for the transaction
- Additional information
In MyEtherWallet:
In the official Ethereum wallet:
When you add the transaction to the block, the required code will be executed (if we are talking about a smart contract). The amount of gas used for the contract is then converted to ETH and charged to your account as miner reward.
In a way, the gas limit serves as a transaction fee limit. If you set your limit at 1,000,000 gas and the smart contract needs only 50,000 gas, then you will pay only 50,000. The purpose of the gas limit is to secure users from spending more than they can afford (a smart contract may cause an infinite loop, which would get a user in trouble).
Unfortunately, if the contract needs 1,000,005 gas to execute the transaction, then you would spend gas, but the program would not finish its work. As a rule, developers specify how much gas is needed to execute their smart contract.
- – HOW MUCH DOES GAS COST?
- – The user himself sets the gas price in ETH!
In MyEtherWallet there is a slider bar in the upper right corner, and the gas price can be set in the range of 1 to 60 Gwei = 0.000000001 to 0.00000006 ETH.
Sending ETH from One Wallet to Another
An ETH transfer costs 21,000 gas.
If you set the price at 1 gas = 20 Gwei, you will be charged the following fee:
21,000 × 0.00000002 = 0.00042 ETH ($0.25)
Why pay more? Just like Bitcoin, Ethereum has a transaction pool. Below you see the picture from MyEtherWallet that shows how the transaction is executed.
You choose the gas price based on how fast you want the transaction executed. There is a great website, ETH Gas Station, that helps you find the optimal gas price.
If you set the price at 1 gas = 0.1 Gwei, the website promises that transaction will take 22 blocks. At the price of 12 Gwei or more – 2 blocks. Remember that the current block finding time in Ethereum is 15 seconds, which means that even if you choose to pay the lowest fee (0.1 Gwei), your transaction will be executed within 5 minutes!
In fact, it is hard to understand why so many users would pay 50 Gwei for gas (check out the transaction pool). By the way, ETH Gas Station has a table in the lower right corner that shows various stats for the last 2,500 blocks. To date, the record holder paid $5,339.94 for a transfer, because he set the gas limit at 200,000 and the gas price, apparently by mistake, at 200,000 Gwei (0.0002 ETH). The transaction used 92,068 gas. Here it is on Etherscan.
In 2016, the record holder paid 761 ETH for 1 transaction (the price of Ether at the time was much lower though, so he paid a little more than $6,000).
Can You Not Pay at All?
That’s an excellent question. And the answer is, yes! Well, kind of.
The Ether transaction pool is not very big yet, but it is likely to grow in future. Look at the latest blocks:
Ethereum does not measure it’s maximum block value in bytes, like Bitcoin. Instead, they use gas. Currently, one block can hold ±6,700,000 gas in transactions. But in reality the blocks are often not filled to the fullest:
- The left column (inside the red rectangle) shows the number of transactions in the block.
- To the right, there is a red exclamation point next to the block that is only 1% full.
The transaction line is short. We did a small research and found out that currently transactions priced at 1 gas = 1 wei get completed successfully.
If the gas price equals 1 wei, then regardless of the amount of gas needed for your transaction (for the simple transaction you need 21,000 gas), the fee will be extremely low!
But if the gas price equals 0 wei, the transaction won’t go through.
How to Use It
To make a transaction, you should specify the following:
- Recipient address.
- The gas limit for ETH transfer – it is 21,000. If it’s a transfer to an ICO smart contract, for example, the developer always specifies this value, so you’d better not experiment with it.
- The gas unit price – you can choose whatever you want (to date, even at the rate of 1 wei everything works fine). The higher the cost, the faster the transaction.
It’s somewhat inconvenient to indicate the transaction fee in the official Ethereum wallet – you can move the slider back and forth, but the minimal gas price is always 1 Gwei. In MyEtherWallet it’s also 1 Gwei.
How to Fool the System and Lower the Gas Price in MyEtherWallet
Method 1:
You can go to the Send Offline section and set the gas price in wei, not in Gwei:
Method 2:
You can go to the Developer Tools in Google Chrome (Ctrl+Shift+I), click on the gas price slider and change the default value (1) to, let’s say, 0.000000001 (= 1 wei).
P.S. Make sure to distinguish the gas limit from the gas price, or else you might end up just like that guy…
Special thanks to Erik Van Daal, the lead developer of 2Masternodes.com for his help in writing the article.
P.P.S
And now, as promised, a bit of criticism.
Let’s look at the latest blocks in the network: https://etherscan.io/blocks
Let’s take 10 blocks, from #4391616 to #4391625 (they have quite a lot of transactions compared to others by the way).
The number of transactions: 681
Miner reward: 30.7 ETH ($9,400)
One transaction cost $14.
So is cryptocurrency a Ponzi scheme? Let us know what you think in our community chat.