In the previous article, we talked about what is Ethereum and how it helps in decentralizing the internet away from the prevalent client-server architecture that is in place these days. In the center of that whole process lies Ether, the fuel that powers up the whole system.

Cost of using Ethereum blockchain

Although Ethereum blockchain isn’t owned by any single person or organization, it isn’t free to use for everyone. The Ethereum network needs some form of a payment to purchase the computational resources needed to run an application. This payment is done via Ether, a small piece of code which, just like Bitcoin, is a digital bearer asset and tracks ownership and transactions done against it.

Ether as ‘digital oil’

Although Ether and Bitcoin both make use of the blockchain technology, their applications are very different. While Bitcoin exists solely as a replacement for currency, Ether is meant as fuel to run the whole Ethereum network. Each application (even a simple smart contract which monitors shares of a company) needs some computational resources to run on the Ethereum network. Similar to how a car needs fuel to run, a certain amount of Ether will be required to run that application on the Ethereum network. Due to this similarity with fuel, Ether is sometimes called as ‘digital oil’. Taking this analogy further, the amount of Ether required to run an application is measured in how much ‘gas’ it requires.

Can you mine Ether?

Ether, similar to Bitcoin, can be earned through mining. Miners process the contracts and other applications that are running on the network and make sure that the network remains secure. To reward the computational resources that they spend during this process, they are awarded in Ether. every 12 seconds, on average, a new block is added to the blockchain with the latest transactions processed by the network and the computer that generated this block will be awarded 5 Ether.

Unlike Bitcoin, there is no limit to how many Ether can be ultimately mined. There is, though, a maximum cap of 12 million Ether which can be generated in a single year.

Relationship between ‘Gas price’ and Ether

For a number of reasons, mostly related to volatile nature of cryptocurrency, variable performance of individual machines and complexity of programs, the cost of running a transaction (it might be a block of a simple contract or any other complex application) is not directly calculated in Ether. The total computational power that was spent in running the block on the computer of a miner is calculated in gas amount, which is then multiplied by the gas price and the resulting amount is paid in Ether.

So who decides what the gas price should be? The gas price depends on both the users (who want their transactions running on the network) and the miner (who are willing to run a block to run on their machine). Both the user and the miner set their gas price and wait for their transaction to get included in the network. If a user sets the gas price too low then it might take some time until a miner with low enough gas price enters the network and their transaction is completed. Similarly, those miners who ask for a very high gas price will have trouble finding a block to mine.

Umm… What?

It might seem a little complex right now, so let’s try to understand that via a simple example. Suppose that there is a user who wants to run a transaction which will cost 500 gas to run. So what he does is go on the Ethereum network, and post his transaction along with a gas price he is willing to pay. Consider that he posts a gas price of 0.1 ether per gas. Now along with the transaction, he will have to pay 50 Ether to get the transaction on the network. Any miner who is willing to accept transactions in that gas price range will accept the block and run it on their computer.

When the transaction is complete on the miner’s computer, the total gas consumed on his computer is calculated (which is proportional to how much resources were consumed during the transaction) and the total amount is calculated by multiplying gas with gas price. It is then matched with the amount paid by the user through the originally posted transaction. If the price is within the amount of Ether that user has paid, the transaction will be logged as complete. Otherwise, if the transaction exceeds the amount of Ether user has paid, it will be logged as a failed transaction. Either way, the miner gets paid for the resources that he spent during the transaction according to the gas price that was agreed upon.

Although it might seem unfair to the user to charge him regardless of whether his transaction gets completed or not, it is only fair that the miner gets his computational cost covered. There is no way for a miner to reverse the resources spent after a transaction has been processed.

Sponsored
Shaoor Munir

I am passionate about technology, hardware and the future of both of them together. Email: shaoor@techjuice.pk

Share
Published by
Shaoor Munir

Recent Posts

Weekend Brings Positive Change in Lahore’s Air Quality Index

LAHORE: Lahore's air pollution levels showed significant improvement over the weekend, with the overall Air…

2 hours ago

PTA Streamlines VPN Registration for Freelancers

ISLAMABAD: The Pakistan Telecommunication Authority (PTA) has streamlined the procedure of registering Virtual Private Networks…

2 hours ago

Report Predicts PSX Will Hit 127,000 by December 2025

The Pakistan Stock Market (PSX), fuelled by economic stability and budgetary consolidation, is expected to…

2 hours ago

Lahore Completes Preparations for Artificial Rain Project

The Punjab government is advancing plans to generate artificial rain in Lahore to further enhance…

4 hours ago

Indus Motor Company Suspends Toyota Car Production

Indus Motor Company (IMC), which makes Toyota cars in Pakistan, has said that production will…

4 hours ago

Azerbaijan Shows Interest in J-10Cs After Acquiring JF-17s from Pakistan

At the 2024 Zhuhai Air Show, the J-10C "Vigorous Dragon" fighter jet has emerged as…

4 hours ago