0% found this document useful (0 votes)
625 views

Blockchain Beginner To Advanced Guides

Blockchain Beginner to Advanced Guides is a comprehensive collection of educational materials that cover the fundamental concepts and practical applications of blockchain technology. Starting with an introduction to blockchain's decentralized nature and cryptographic principles, the guides progress to advanced topics such as smart contracts, DApps, and different blockchain platforms. With step-by-step instructions and real-world examples, readers learn how to set up a blockchain network, deploy

Uploaded by

Walid
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
625 views

Blockchain Beginner To Advanced Guides

Blockchain Beginner to Advanced Guides is a comprehensive collection of educational materials that cover the fundamental concepts and practical applications of blockchain technology. Starting with an introduction to blockchain's decentralized nature and cryptographic principles, the guides progress to advanced topics such as smart contracts, DApps, and different blockchain platforms. With step-by-step instructions and real-world examples, readers learn how to set up a blockchain network, deploy

Uploaded by

Walid
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1155

2/8/23, 9:32 PM A Simple Guide to Understanding Blockchain | by Renu Khandelwal | The Startup | Medium

Open in app Get unlimited access

Search Medium

Published in The Startup

You have 1 free member-only story left this month. Upgrade for unlimited access.

Renu Khandelwal Follow

Feb 23, 2021 · 9 min read · · Listen

Save

A Simple Guide to Understanding Blockchain


A simplistic explanation of what is Blockchain and how it works
You are in a grocery store and scan the QR code on your favorite coffee. You can view the
details of where the coffee beans grew, cleaned, triaged, processed, and then roasted. what-
if you can trace the supply and distribution to know the means of transport and how long
it took to arrive at the store and so forth

Is there a technology that can help record information at each step and make that
information available to everyone transparently?

Welcome to the world of Blockchain

287 2

https://medium.com/swlh/a-simple-guide-to-understanding-blockchain-8dd09356b153#:~:text=Blockchain is an immutable%2C distributed,assets usi… 1/12


2/8/23, 9:32 PM A Simple Guide to Understanding Blockchain | by Renu Khandelwal | The Startup | Medium

image by author

Blockchain is an immutable, distributed, decentralized; peer-to-peer ledger


replicated across multiple nodes connected in a network, making it possible to
record data about any event or transaction as it happens. It consists of blocks in a
chain used to record as digital assets using a secure algorithm.

Bitcoin as a concept was first proposed by Satoshi Nakamoto through a white paper in
2008

image by author

https://medium.com/swlh/a-simple-guide-to-understanding-blockchain-8dd09356b153#:~:text=Blockchain is an immutable%2C distributed,assets usi… 2/12


2/8/23, 9:32 PM A Simple Guide to Understanding Blockchain | by Renu Khandelwal | The Startup | Medium

Where can we apply Blockchain technology?


Food Safety: Walmart is working with IBM for enhanced tracking and traceability
of food products, resulting in better food safety.

Real Estate Title Issuance: title registry system uses blockchain to make title
issuance instantaneous.

Money Transfer from anywhere to anywhere on the globe: The global money
transfer is time-consuming, error-prone, costly, and subjected to money
laundering. The secure, immutable, decentralized, and transparency feature of
Blockchain helps solve money transfer issues without any intermediary.

Regulatory Compliance and Audit: Blockchain is very secure, immutable making


any alteration to transactions very difficult.

Supply chain: Singapore-based VeChain created a permissioned blockchain-based


supply chain to monitor products as they move along from manufacturer to store
shelf.

Blockchain can be applied to many other applications wherever we want to record


transactions securely between two parties without an intermediary.

How is a Blockchain ledger different from a database? Are the two not the same used for
recording, organizing, monitoring, and controlling information?

Database and Blockchain both record transactions, but the database is centralized and
has a single point of failure. In contrast, the Blockchain is decentralized and
distributed on multiple nodes across the network.

Every node in the blockchain network collectively takes part in the consensus
algorithm using Proof-of-Work.

Databases are owned by a central authority, a company, or a government institution,


which controls access by granting different roles to different users. Whereas
Blockchain is a peer-to-peer network where each node can connect with every other
node, and blocks in a chain are connected using a secure cryptographic protocol like
SHA-256.

https://medium.com/swlh/a-simple-guide-to-understanding-blockchain-8dd09356b153#:~:text=Blockchain is an immutable%2C distributed,assets usi… 3/12


2/8/23, 9:32 PM A Simple Guide to Understanding Blockchain | by Renu Khandelwal | The Startup | Medium

Before diving deep into the blockchain, let us familiarize ourselves with key terminologies.

Ledger

A ledger records transactions such as recording payments, supply chain details,


medical records, real-estate contracts, etc.

SHA-256
SHA-256 is a cryptographic algorithm that accepts input of any length, scrambles the
data deterministically, and returns a hash that is 256 bits or 64 characters long. SHA-
256 hashing algorithm ensures the input can never be derived from the output, making
it very secure.

Mining
It is the process of validating and recording new transactions on a blockchain
performed by Miners for which they have a special mining software.

Node
A Node in a blockchain can be any electronic device that is part of a peer-to-peer
network and maintain its own copy of the blockchain.

Merkle Tree
Merkle tree is also referred to as “hash binary tree,” a data structure for efficient and
secure storage of transactions in a blockchain.

Merkle tree summarizes all the transactions in a block by producing a digital


fingerprint of the entire set of transactions. Merkle tree is created by repeatedly
hashing a pair of transactions from the bottom until we have only one hash, referred
to as Root Hash or Merkle Root.

https://medium.com/swlh/a-simple-guide-to-understanding-blockchain-8dd09356b153#:~:text=Blockchain is an immutable%2C distributed,assets usi… 4/12


2/8/23, 9:32 PM A Simple Guide to Understanding Blockchain | by Renu Khandelwal | The Startup | Medium

image by author

Merkle trees are used in blockchain to store transaction as it enables users to use the
root hash to verify if a transaction was part of the block.

Merkle tree requires little memory, computationally fast, and only a small amount of
information needs to be transmitted over the blockchain network.

How is Blockchain made secure?

Immutability: Blocks in blockchain are write-once append-only. Data in every


block is encrypted using the SHA-256 algorithm that makes modification to data
very difficult. Any change in the data renders the newly modified block invalid.
This ability of blockchains prevents alteration of transactions.

Consensus: Nodes within a distributed blockchain network have to agree on the


network's true state to ensure the validity of transactions using Proof of Work or
Proof of Stake.

Transparency: Blockchain is decentralized and is distributed across multiple nodes


across the entire network of computers. If one user tries to forge a transaction in
the blockchain, all other nodes in the blockchain network will cross-reference each
other and easily pinpoint the node with the incorrect information.

What is a Block?

Blockchain is a shared digital ledger. A Block in a Blockchain record transaction or


transactions to organize, monitor, and control information for informed decision
making.

Every time a new transaction occurs on the blockchain, a record of that transaction is
added as a new block to the chain. The new block is added to every participant’s
nodes ledger only after applying a consensus algorithm like proof of work to validate
the transaction. A block in the chain is immutable. It can never be updated and only
be appended to the chain.

The Genesis block is the very first block added to the blockchain

https://medium.com/swlh/a-simple-guide-to-understanding-blockchain-8dd09356b153#:~:text=Blockchain is an immutable%2C distributed,assets usi… 5/12


2/8/23, 9:32 PM A Simple Guide to Understanding Blockchain | by Renu Khandelwal | The Startup | Medium

What information is stored in Block?

The Block consists of a

Block header containing metadata and

Transaction stored in the block using Merkle Tree.

image by author

A Block header in a Blockchain contains the following attributes.

1. Version number to track the software or protocol that will allow other computers
to read the block correctly.

2. Timestamp: when the transaction was recorded, or the block was created and is
expressed as seconds since 1970–01–01T00:00 UTC.

3. 256 bit Cryptographic hash of the previous block header that links one block with
another block in a Blockchain. This ensures the integrity of the previous block all
the way back to the first block referred to as a Genesis block.

4. Nonce stands for number only used once. The nonce is a randomly generated
number that miners generate to solve a complex mathematical problem to create
a block.

https://medium.com/swlh/a-simple-guide-to-understanding-blockchain-8dd09356b153#:~:text=Blockchain is an immutable%2C distributed,assets usi… 6/12


2/8/23, 9:32 PM A Simple Guide to Understanding Blockchain | by Renu Khandelwal | The Startup | Medium

5. The target represents the difficulty of generating the nonce, which validates a
transaction before it is added to a blockchain. It regulates the speed at which new
blocks are added to the blockchain and are adjusted roughly every 2016 block.
Higher difficulty in generating the nonce represents a lower target value.

6. Merkle root hash for all the transactions in a block.

Transaction or Transactions are stored in the Block using the Merkle tree hash.

The block hash is a separate hash derived from data in the block header using SHA-256.

Block hash uses nonce, and hence hash is tied to the nonce forever. The nonce is used
to come up with a secure hash that meets the criteria as per the target. Hash must
start with a huge number of zeroes based on the target.

A sample Block Source:https://www.blockchain.com/btc/block

How is a transaction recorded in a Blockchain?

https://medium.com/swlh/a-simple-guide-to-understanding-blockchain-8dd09356b153#:~:text=Blockchain is an immutable%2C distributed,assets usi… 7/12


2/8/23, 9:32 PM A Simple Guide to Understanding Blockchain | by Renu Khandelwal | The Startup | Medium

Blockchain miners install and run a special Blockchain mining software that enables
their computers to communicate securely with one another. Once a computer installs
the software, joins the network, and begins mining, it becomes what is called a ‘node.’

Blockchain can be used to record any transaction like real estate contracts when
person A sells a property to Person B at x amount or when food is produced at the
farm, travel through the entire supply chain, and finally consumed by the consumer.

Step 1: Sender or Originator of Transaction digitally signs the transaction

Digital signatures are a fundamental building block in blockchains; they are primarily
used to verify the authenticity of transactions. The sender of the transaction uses the
data and the private key to encrypt the message.

If Peter wants to transact with Patty, he must digitally sign the transaction using his
private key and the transaction data and send it to nodes on the network.

Step 2: Transaction is broadcasted to the network

After a transaction is transmitted to the network, it gets verified by all of the available
Blockchain nodes.

Step 3: Nodes authenticates the transaction

Knowledge of Peter’s public key will enable confirm the authenticity of the
transaction. Peter’s public key, transaction, and Peter’s digitally signed transaction will
authenticate the transaction.

https://medium.com/swlh/a-simple-guide-to-understanding-blockchain-8dd09356b153#:~:text=Blockchain is an immutable%2C distributed,assets usi… 8/12


2/8/23, 9:32 PM A Simple Guide to Understanding Blockchain | by Renu Khandelwal | The Startup | Medium

image by author

Step 4: valid transactions are stored in mempool

The mempool stores all valid transactions waiting to be confirmed by the network.
Miners pull transactions from the mempool for them to be bundled together into a
block.

Step 5: Miners validate using consensus to add the block

To add a new block to the blockchain, a computational puzzle must be solved to


encrypt the block’s data.

Miners pull authenticated transactions from the mempool and try to solve the complex
mathematical problem. Miners find the nonce such that the hash of the block is less
than or equal to the current target of the Blockchain network, also called POW(Proof
of Work)

Proof of Work requires miners to solve complex


mathematical problem to validate and confirm
transactions over the network using consensus
mechanisms to produce a new block to the chain.
Proof of work makes blockchain secure as any alteration on the blocks requires
remaining all subsequent blocks to be altered, and this is extremely difficult.

The first Miner that has solves the cryptographic challenge then broadcasts the newly
generated block using the Gossip protocol. Once a block of transactions has been
verified, then it is added to the blockchain network.

A reward is given to the first miner who solves each cryptographic problem.

POS(Proof of Stake)
In a distributed consensus-based on the Proof of Work(POW), miners need a lot of
energy to come up with the hash for the block that is less than or equal to the target

https://medium.com/swlh/a-simple-guide-to-understanding-blockchain-8dd09356b153#:~:text=Blockchain is an immutable%2C distributed,assets usi… 9/12


2/8/23, 9:32 PM A Simple Guide to Understanding Blockchain | by Renu Khandelwal | The Startup | Medium

for the blockchain network. In contrast, the Proof of Stake creator of the next block is
chosen deterministically based on the stake in the blockchain.

POS is a low-energy consuming alternative to POW


algorithm. POS has validators who own the stakes and
the responsibility of maintaining the public ledger
instead of Miners in POW.
Weakness of Blockchain
High Energy consumption to solve the cryptographic challenge in order to add a
block to the blockchain

Susceptible to 51%attack

51% attack is an attack on the blockchain orchestrated


when a group of miners on the blockchain network
control more than 50% of the network’s hash rate or
computing power to prevent new transactions from
gaining confirmations, or ability to invalidate
transactions that introduce double spend.
Types of Blockchain
Public blockchain:

Public blockchains are non-restrictive, transparent, permissionless, fully


distributed ledgers.

No one individual or entity controls the blockchain and the transactions that are
recorded in the blockchain.

Anyone can view the transactions on the public blockchain.

https://medium.com/swlh/a-simple-guide-to-understanding-blockchain-8dd09356b153#:~:text=Blockchain is an immutable%2C distributed,assets us… 10/12


2/8/23, 9:32 PM A Simple Guide to Understanding Blockchain | by Renu Khandelwal | The Startup | Medium

Transactions are added to the blockchain using a consensus algorithm.

Examples of a public blockchain: Bitcoin, Ethereum, or Litecoin.

Private blockchain

A private blockchain is centralized, restrictive, and users require permission to


join.

Operate in a closed network.

Controlled by Enterprises for recording their sensitive business data not to be


visible outside the organization.

Transactions are private and are only available to authorized users in the closed
network.

Examples of a private blockchain: hyper ledger

Hybrid blockchain

Hybrid blockchain is a combination of the private and public blockchain.

Combines the permissioned feature of the private blockchain with the security
and transparency feature of a public blockchain.

Access-driven control decides which users can view the data on the blockchain or
add data to the blockchain.

Suited for businesses providing them with the required flexibility to operate
securely and transparently

Conclusion:
Blockchain is a secure, immutable, peer-to-peer distributed ledger that is
decentralized. It contains a secure block that is linked in a chain and replicated across
multiple nodes connected in a blockchain network. The public, private and hybrid
blockchain can be used based on features of blockchain helpful

References:

https://medium.com/swlh/a-simple-guide-to-understanding-blockchain-8dd09356b153#:~:text=Blockchain is an immutable%2C distributed,assets us… 11/12


2/8/23, 9:32 PM A Simple Guide to Understanding Blockchain | by Renu Khandelwal | The Startup | Medium

https://www.investopedia.com/terms/b/blockchain.asp

How does a transaction get into the blockchain?


There are several key steps a transaction must go through before it is
added to the blockchain. Today, we're going to…
www.euromoney.com

What is A Merkle Tree? | Blockchain Council


A Merkle tree, also defined as a binary hash tree, is a data structure
used to efficiently summarize and validate large…
www.blockchain-council.org

Blockchain Cryptography Merkle Tree Sha 256 Blockchain Technology

Sign up for Top 5 Stories


By The Startup

Get smarter at building your thing. Join 176,621+ others who receive The Startup's top 5 stories, tools, ideas, books —
delivered straight into your inbox, once a week. Take a look.

Emails will be sent to [email protected]. Not you?

Get this newsletter

https://medium.com/swlh/a-simple-guide-to-understanding-blockchain-8dd09356b153#:~:text=Blockchain is an immutable%2C distributed,assets us… 12/12


2/8/23, 10:01 PM What is BlockChain? “In Simple English” | by Yann Mulonda | Medium

Open in app Get unlimited access

Search Medium

Yann Mulonda Follow

Jun 23, 2018 · 8 min read · Listen

What is BlockChain? “In Simple English”


Blockchain vs Internet

Before we go into any details of what the blockchain is, let’s set our mind with this
logic:

“blockchain is today what the internet was in the 1970s


and 1980s.”

Let’s be blunt about this, the internet is amazing, and it’s changing the world,
fundamentally touching almost all aspects of life. The internet plays a role in how we
work, learn, communicate, play, and so much more. It has significantly impacted
industries like newspapers and brick-and-mortar retail, reinvented others like how we
manage our money, and created new industries such as social media and online dating
-- 1
or shopping.
https://yannmjl.medium.com/what-is-blockchain-in-simple-english-25e684c1cea3 1/11
2/8/23, 10:01 PM What is BlockChain? “In Simple English” | by Yann Mulonda | Medium

You get it, the internet has been a big deal and continues to be. Of course, it’s easy to
focus on all the positives of the internet, such as low-cost communications anywhere
in the world, low barriers to setting up and running a global online business, and new
ways to access healthcare information and services. We’d be kidding ourselves if we
didn’t recognize that the vast network of networks didn’t have some stubborn problems
associated with it.

Beyond some of the obvious, social media trolling, software viruses, online fraud, fake
news, and criminal hacking, the internet often struggles with the fundamental
challenges of trust. We face ongoing questions such as is the person you are doing
business with online really who they say they are? Is a service real? And are only
authorized people granted access to private systems? Of course, we could all think of
hundreds of other examples of trust on the internet.

Healthy ecosystems rely on trust. Now, this being said, we’ve done wonders with
existing technology. In addition to usernames and passwords, we now use two-factor
authentication, which requires more effort to validate an identity for an individual. We
have firewalls and intrusion detection systems, biometric such as using your
fingerprint for access, and CAPTCHAs, those online boxes that require you to type in
letters and numbers from a photograph to prove you’re not a computer.

With these mechanisms for security and trust, we’ve come a long way, and yet we still
get hacked. Our systems and databases are compromised, made unavailable, money
and identities are stolen, and our confidence to innovate even further using the
internet is stifled and, at worst, impeded. If we want ironclad online voting, workable
https://yannmjl.medium.com/what-is-blockchain-in-simple-english-25e684c1cea3 2/11
2/8/23, 10:01 PM What is BlockChain? “In Simple English” | by Yann Mulonda | Medium

digital currencies, confidence in machines talking to machines, self-driving cars that


securely negotiate with each other, improved and seamless methods to authenticate
identity, and more, we’re going to need a more secure and trustworthy internet.
Blockchain might just be that next big thing, “the future of internet.”

what is blockchain?

Blockchain technology is like the internet in that it has a built-in robustness. By storing
blocks of information that are identical across its network.

A blockchain is made up of two primary components: a decentralized network


facilitating and verifying transactions, and the immutable ledger that network
maintains. Everyone in the network can see this shared transaction ledger, but there is
no single point of failure from which records or digital assets can be hacked or
corrupted.

Blockchains has the potential to “build a new generation of transactional applications


that establish trust, accountability, and transparency at their core while streamlining
business processes and legal constraints.”

https://yannmjl.medium.com/what-is-blockchain-in-simple-english-25e684c1cea3 3/11
2/8/23, 10:01 PM What is BlockChain? “In Simple English” | by Yann Mulonda | Medium

Blockchain, the backend database technology that makes Bitcoin work, is one of the
most exciting technologies emerging right now. Although commonly associated with
Bitcoin, blockchain technology has many other applications that go way beyond digital
currencies. Bitcoin is only one of several hundred applications that use blockchain
technology today.

In other words:

“Blockchain is to Bitcoin, what the internet is to email”

Beyond cryptocurrency, it’s redefining how we store, update, and move data across
networks. It’s enabling a completely new way to write and deploy applications. It has
the potential to improve online security and trust. It may even enable the creation of a
new type of organization that is without hierarchy and centralized decision making.

https://yannmjl.medium.com/what-is-blockchain-in-simple-english-25e684c1cea3 4/11
2/8/23, 10:01 PM What is BlockChain? “In Simple English” | by Yann Mulonda | Medium

The blockchain is a work in progress. Being open sourced, it is continually being


updated. In addition, how the blockchain is being applied continues to evolve in
surprising and compelling ways. Here are just a few of the innovations that the
blockchain is enabling. Up until now, we’ve been talking about discrete data being
stored in blocks in this distributed database or distributed ledger as we prefer to call it.
But what happens if instead of simple data, a block contains some instructions that
under certain circumstances are executed? In this way when a certain blockchain
transaction takes place, some set of actions are triggered.

https://yannmjl.medium.com/what-is-blockchain-in-simple-english-25e684c1cea3 5/11
2/8/23, 10:01 PM What is BlockChain? “In Simple English” | by Yann Mulonda | Medium

This is one of the most exciting areas of the blockchain and we call it Smart contracts.
While a Smart contract actually is software code executed on the blockchain, the
terminology used of the word contract indicates that the code enforces some form of
governance or rule. We should think of this as the general concept since many argue
that the use of the term Smart contract is also misleading.

The term “smart contract” simply describes computer code that can facilitate the
exchange of money, content, property, shares, or anything of value.

When running on the blockchain a smart contract becomes like a self-operating


computer program that automatically executes when specific conditions are met.
Because smart contracts run on the blockchain, they run exactly as programmed
without any possibility of censorship, downtime, fraud or third-party interference.

Cryptography / cryptocurrency

https://yannmjl.medium.com/what-is-blockchain-in-simple-english-25e684c1cea3 6/11
2/8/23, 10:01 PM What is BlockChain? “In Simple English” | by Yann Mulonda | Medium

Cryptography involves creating written or generated codes that allow information to


be kept secret. Cryptocurrency is a digital currency in which encryption techniques
are used to regulate the generation of units of currency and verify the transfer of
funds, operating independently of a central bank. “decentralized cryptocurrencies
such as bitcoin now provide an outlet for personal wealth that is beyond restriction
and confiscation”. The following describes how cryptography is used in
cryptocurrency.

At its simplest, Ethereum is an open software platform based on blockchain


technology that enables developers to build and deploy decentralized applications.
With no central point of failure and secured using cryptography, applications are well
protected against hacking attacks and fraudulent activities.

https://yannmjl.medium.com/what-is-blockchain-in-simple-english-25e684c1cea3 7/11
2/8/23, 10:01 PM What is BlockChain? “In Simple English” | by Yann Mulonda | Medium

Like Bitcoin, Ethereum is a distributed public blockchain network and no one controls
or owns Ethereum — it is an open-source project built by many people around the
world.

However, Bitcoin and Ethereum differ substantially in purpose and capability. While
the Bitcoin blockchain is used to track ownership of digital currency (bitcoins), the
Ethereum blockchain focuses on running the programming code of any decentralized
application.

Miners in the Ethereum blockchain work to earn Ether, a type of crypto token that
fuels the network, also used by application developers to pay for transaction fees and
services on the Ethereum network.

While all blockchains have the ability to process code, most are severely limited.
Ethereum is different. Rather than giving a set of limited operations, Ethereum allows
developers to create whatever operations they want. This means developers can build
thousands of different applications that go way beyond anything we have seen before.

https://yannmjl.medium.com/what-is-blockchain-in-simple-english-25e684c1cea3 8/11
2/8/23, 10:01 PM What is BlockChain? “In Simple English” | by Yann Mulonda | Medium

Hyperledger of the Linux Foundation is one of the projects you will inevitably stumble
upon when you visit blockchain conferences and follow blockchain news. With it, the
Linux Foundation aims to create an environment in which communities of software
developer and companies meet and coordinate to build blockchain frameworks.

Hyperledger is an open source collaborative effort created to advance cross-industry


blockchain technologies. It is a global collaboration, hosted by The Linux Foundation,
including leaders in finance, banking, IoT, supply chain, manufacturing, and
technology.

The most fundamental difference between Ethereum and Hyperledger is the way they
are designed and their target audience. Hyperledger is not a company, a
cryptocurrency or a blockchain but rather something like a hub for open industrial
blockchain development

The Hyperledger Fabric (one amongst the many Hyper ledger projects) is a blockchain
infrastructure that Delivers an architecture that accomplishes the configurable
agreement, smart contracts, and association services. It covers the peer nodes that
implement the chain code of blockchain development, ledger data, endorses record
with applications.

https://yannmjl.medium.com/what-is-blockchain-in-simple-english-25e684c1cea3 9/11
2/8/23, 10:01 PM What is BlockChain? “In Simple English” | by Yann Mulonda | Medium

There is so much hype and confusion in the blockchain, distributed ledger and
cryptocurrency world and one name that keeps increasingly coming up in that space is
Ripple.

While Bitcoin is a digital currency intended as a means of payment for goods and
services, Ripple is a payment settling, currency exchange and remittance system
intended for banks and payment networks. The idea is to provide a system for direct
transfer of assets (e.g. money, gold, etc.) that settles in almost real-time and is a
cheaper, more transparent and secure alternative to transfer systems used by banks
today, such as the SWIFT payment system.

Bitcoin is based on blockchain technology, while Ripple doesn’t use blockchain but
uses a distributed consensus ledger using a network of validating servers and crypto
tokens called XRP (sometimes referred to as Ripples).

To sum-up, Blockchain technology stands to revolutionize the way we interact with


each other, track and store data. Its decentralization of information reduces the ability
for data tampering, create trust in the data and eliminate intermediaries.

Just like the rise of the internet, blockchain will bring with it all kinds of changes,
challenges and complex questions around Security, governance, international laws,
trade, and economics. But whether it lives up to its promises remains to be seen.

This article is a result of researches and online courses by Jonathan Reichental, articles by
Bernard Marr, and Blockgeeks.

Also check out, potential obstacles to blockchain adoption.

https://yannmjl.medium.com/what-is-blockchain-in-simple-english-25e684c1cea3 10/11
2/8/23, 10:01 PM What is BlockChain? “In Simple English” | by Yann Mulonda | Medium

If you enjoyed this story, please give it a few claps for


support. Cheers!!!

📝 Read this story later in Journal.

👩‍💻 Wake up every Sunday morning to the week’s most noteworthy stories in Tech
waiting in your inbox. Read the Noteworthy in Tech newsletter.

Blockchain Internet Future Technology Computer Science

https://yannmjl.medium.com/what-is-blockchain-in-simple-english-25e684c1cea3 11/11
2/9/23, 2:39 AM What is Blockchain technology? (Part 1- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Published in Blockchain 101 by Techskill Brew

Techskill Brew Follow

Dec 24, 2021 · 10 min read · Listen

Save

What is Blockchain technology? (Part 1-


Blockchain Series)

This is the first part of the 100 part series on Blockchain.

We as individuals and businesses interact with a lot of other businesses and service
providers online and offline on a daily basis. We buy clothes online, import medicines
https://medium.com/techskill-brew/what-is-blockchain-technology-part-1-blockchain-basics-e44847198c94 1/13
2/9/23, 2:39 AM What is Blockchain technology? (Part 1- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

from different parts of the world, and use remote financial and banking services. In
such a scenario, where everything is available at your fingertips except the trust for the
other party, how do you validate the authenticity of the clothes that you got online, or
how do you know that the medicines you imported are genuine and not some cheap
counterfeit or how do you know that your financial and personal data is safe and is not
getting misused by some hacker sitting in some part of the world. There has always
been a dire need for a system that can assure us that whatever we are buying is
authentic, whatever data we are sharing is safe and secure. There has always been a
need for a system that is reliable and robust so that trust is no longer a barrier for
businesses and individuals to get things done.

The solution to all of these pain points lies in Blockchain Technology. You might have
heard about various cryptocurrencies like Bitcoin, Ether, Ripple, etc., and Blockchain
is the technology that powers them all.

https://medium.com/techskill-brew/what-is-blockchain-technology-part-1-blockchain-basics-e44847198c94 2/13
2/9/23, 2:39 AM What is Blockchain technology? (Part 1- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Cryptocurrencies are powered by Blockchain technology

Blockchain has gained a lot of popularity recently. It has been claimed to be a game-
changer and has been even referred to as the internet of value by many industry
experts. The invention of Blockchain technology can be compared to the invention of
the wheel, motor, and internet that changed the world. It has been predicted that
Blockchain technology will rule the next decade.

What is Blockchain?
Blockchain is a tamper-proof distributed digital ledger. This digital ledger is safe,
secure, transparent, and decentralized, which simply means that it is not controlled by

https://medium.com/techskill-brew/what-is-blockchain-technology-part-1-blockchain-basics-e44847198c94 3/13
2/9/23, 2:39 AM What is Blockchain technology? (Part 1- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

a single authority. It is like a ledger that a bank uses to keep track of all customer
transactions. However, in a bank, the ledger is controlled by the bank, and only the
bank can see the transactions. Whereas in blockchain, there is no central authority,
and the ledger runs on multiple computers and doesn’t require any single person to
authenticate or settle transactions.

Blockchain is a distributed digital ledger

Let’s try to understand how Blockchain works through a real-life analogy. For this
analogy, we are going to take the example of Google Sheets on Google Drive. While
Google Sheets is not technically a Blockchain, it’s a pretty accurate analogy to how
Blockchain works.

· When someone creates a spreadsheet in Google Drive, they can share it with multiple
people. In our analogy, this spreadsheet can be compared to a Blockchain.

· The spreadsheet is generally shared over a large network of computers when shared
with multiple people. The computers having a copy of the spreadsheet are referred to
as nodes in the Blockchain world.

· Every node on the network has access to the same spreadsheet. Whenever someone
edits or modifies the spreadsheet, it gets updated automatically on every computer on
the network. Thus, the spreadsheet is updated in real-time, and a single version of the
spreadsheet is always visible to everyone on the network.

https://medium.com/techskill-brew/what-is-blockchain-technology-part-1-blockchain-basics-e44847198c94 4/13
2/9/23, 2:39 AM What is Blockchain technology? (Part 1- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

A spreadsheet is shared with multiple computers on the network

On the contrary, if you put data on an Excel sheet on your computer, it is just one file
that has to be shared with the other people on the network by emailing them. If one
makes some modifications in the Excel sheet, the modified file has to be saved and
emailed to other recipients. Sometimes, many versions of a single Excel sheet are
created, and it is quite possible to lose track of the most recent versions of the
document and wind up updating old versions of the Excel sheet. Also, when the
records or files are present on one central computer, they can easily be hacked and
manipulated.

On Blockchain, like Google Sheets, there will be multiple copies of the digital
document, and each node/user on the network will have a copy and access to the same
exact document. Therefore, it is not possible to tamper with them. Before any change
can be made in the documents, the majority of the users have to agree to it. It puts the
control in the hands of all the users instead of one central database that can be
changed anytime by anyone with proper access.

https://medium.com/techskill-brew/what-is-blockchain-technology-part-1-blockchain-basics-e44847198c94 5/13
2/9/23, 2:39 AM What is Blockchain technology? (Part 1- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Additionally, Blockchain technology is secured through cryptography, thus making it


nearly impossible for hackers to hack it and tamper with the data inside it.

Properties of Blockchain
There are certain features and properties of Blockchain that makes it suitable for such
a wide array of industries:

1. Decentralized
Decentralization is one of the most critical components of Blockchain. It has even
been viewed as a revolutionary technology that will decentralize the web.
Decentralization refers to the transfer of control from a centralized entity (individual,
organization, or group) to a distributed network.

(a) Centralized and (b) Decentralized network

Decentralization gives you the power to store your valuable assets like your data,
money, documents in a network that can then be easily accessed from anywhere in the

https://medium.com/techskill-brew/what-is-blockchain-technology-part-1-blockchain-basics-e44847198c94 6/13
2/9/23, 2:39 AM What is Blockchain technology? (Part 1- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

world over the internet. Through this decentralized technology, a user has direct
control over his asset via his private key.

A user can also easily transfer his asset to anyone at any point of time from anywhere
in the world. This feature of decentralization eliminates the need to rely on any third
party or middlemen for these transactions. Thus, cutting down the high transaction
fees charged by these third-party service providers. For instance, when you transfer a
sum of money to your friend, you have to rely on a bank to perform this task. But with
Blockchain, you can do these transactions without the involvement of any third party.

The main rationale behind this concept is to place your trust in the network rather
than in a single centralized body like a bank or a government.

The benefits of a decentralized system are as follows:

· A decentralized system shifts the power back to the users as they are the ones
controlling all of their data and transactions.

· A decentralized system is complicated to hack and is not prone to failure. As there is


no central point in such a system, it can better survive a malicious cyberattack and
accidental failures.

· As the data doesn’t reside with a third party, this eliminates the possibility of data
tampering and misuse of the data. Further removing these third parties from the
equation lowers the transaction costs significantly.

· In a decentralized system, the processing time for transactions is reduced to minutes.


Additionally, these transactions can be processed at any point of time at any day of the
year irrespective of any festival, holiday, etc.

· The changes made in a public Blockchain are visible to all the parties on the network,
thus making them transparent.

2. Distributed Ledger
Distributed Ledger is the second critical feature that makes a Blockchain so powerful
and effective. The word distributed ledger is composed of two terms — Distributed and
Ledger. Ledger, as the name suggests, is the record of all transactions, and distributed

https://medium.com/techskill-brew/what-is-blockchain-technology-part-1-blockchain-basics-e44847198c94 7/13
2/9/23, 2:39 AM What is Blockchain technology? (Part 1- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

means that the ledger is shared with every person on the same network. The
distributed ledger contains the record of each and every transaction that took place
over the network.

And every node of the network has access to a copy of this updated ledger. Any updates
or changes in the ledger are reflected in almost real-time in all the copies of the ledger
across the network.

Distributed ledger

Some of the key advantages of such a distributed system for the stakeholders involved
are as follows:

· A distributed system makes it easier to track the movement of goods as the same
ledger is shared across all the users on the network. This is one of the main reasons
why many big companies have started integrating Blockchain Technology into their
supply chain.

· All the transactions are recorded on one single ledger, making it easier to manage,
view, refer to, and verify the transactions. In simple terms, it reduces the complexity

https://medium.com/techskill-brew/what-is-blockchain-technology-part-1-blockchain-basics-e44847198c94 8/13
2/9/23, 2:39 AM What is Blockchain technology? (Part 1- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

involved in managing multiple ledgers.

3. Immutability
Immutability is another critical component of Blockchain. Immutability means
something that can’t be changed or altered. Once the data has been recorded inside a
Blockchain, it becomes nearly impossible to change it, thus making it tamper-proof
and immutable. To better understand the concept of immutability, let us take the
example of an email. Once you share a document in an email with a group of your
friends, you can not take it back. The only way to do this is to ask all of your friends to
delete that email which is quite difficult. This is exactly how immutability works in the
Blockchain network. This is very important when you want to trust something or when
you want to make something more trustable. For example, suppose you have built a
database on your computer, and if you want to change data because everything is in
your control, you can change the data and change the data in any way you want to. But
with blockchain, that is not possible.

4. Consensus
As the name indicates, Blockchain is a chain of blocks that store transactions or data.
Each block can be thought of as a page in the ledger.

Chronologically linked blocks in Blockchain

A new block of transactions is created after a certain fixed duration. The block is then
sent to each node which verifies the block. And once the verification is done, the block
gets added to the Blockchain. This verification and validation of blocks by these
participating nodes is called consensus.

Without consent from the majority of nodes, any transaction block can not be added to
the ledger. And once the transaction block gets added to the ledger, no user on the

https://medium.com/techskill-brew/what-is-blockchain-technology-part-1-blockchain-basics-e44847198c94 9/13
2/9/23, 2:39 AM What is Blockchain technology? (Part 1- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

network won’t be able to edit or delete it.

Block is added to the Blockchain only after getting verified by each node

5. Solution for Double Spending Problem


Before understanding how Blockchain solves the problem of double-spending, let us
first understand what double-spending actually means. Double spending is simply the
risk that a user may spend the same currency units twice. Double spending is a
potential loophole specifically applicable to digital currencies. Suppose you go to a
cafe and order coffee worth $5. You pay in cash. The service provider at the cafe
confirms that you have paid, and you receive your coffee in exchange for the money.
Now, is it possible to spend the same $5 somewhere else to make another purchase?
The answer is NO. The double-spending problem never arises in physical currency. But
unlike physical currencies, a digital currency consists of digital information which can
be reproduced or duplicated easily. In the case of digital currency, a currency holder
can make a copy of the digital token. He will now have 2 copies of the same token. He
can send one token to a merchant while keeping the original token with himself. Thus,
spending the digital currency twice by its owner.

https://medium.com/techskill-brew/what-is-blockchain-technology-part-1-blockchain-basics-e44847198c94 10/13
2/9/23, 2:39 AM What is Blockchain technology? (Part 1- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Double-spending was one of the very serious concerns with Bitcoin initially because
there was no central authority to verify that a token is spent only once.

Double-spending of digital currency/token

Let’s take another real-life scenario to understand the double-spending of digital


currency better — Suppose you went on a trip with your friend and clicked his photo on
your mobile. He asked you to share his picture with him through WhatsApp. You
shared his picture on his demand, but now there are two copies of the same picture — 
one is with him, and one is with you. This is a classic example of understanding the
issue of double-spending. In traditional online transactions, banks are the centralized
authorities that ensure no double-spending.

Blockchain, being decentralized, found a solution for double-spending through the


consensus mechanism. The consensus mechanism requires users to vote on valid
transactions, and only then these transactions get appended to the latest block.

Let us understand it through an example — there are three persons Phil, Lyra, and
Matt. Lyra has 1 Bitcoin with her. Lyra sends that Bitcoin to Phil. Simultaneously, Lyra
does another transaction and sends the same Bitcoin to Matt as well. The second
transaction will be rejected by the participating nodes on Blockchain. Every
transaction before getting committed to the Blockchain is verified against the ledger
records by the nodes. So in the first case, when Lyra sends money to Phil, the
transaction will be validated against the ledger, which will show that Lyra has one

https://medium.com/techskill-brew/what-is-blockchain-technology-part-1-blockchain-basics-e44847198c94 11/13
2/9/23, 2:39 AM What is Blockchain technology? (Part 1- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Bitcoin with her, which means that she can transfer her one Bitcoin to Phil. Thus,
making it a valid transaction. But in the second transaction, which Lyra does to Matt
when the transaction is validated against the ledger, it gets rejected as there is no
Bitcoin left with Lyra, so she can’t make any transaction to Matt.

How Blockchain handles the double-spending problem

Thus, mitigating the problem of double-spending.

If you liked this article and want to know more about Blockchain, NFTs, Metaverse, and
their applications, click the below link.

50+ Real World Applications of Blockchain: A beginner’s complete


guide to Blockchain Fundamentals…
50+ Real World Applications of Blockchain: A beginner’s complete
guide to Blockchain Fundamentals, Consensus…
www.amazon.com

Happy learning!

Blockchain Blockchain Technology Blockchain Startup Blockchain Development

Blockchain Game

https://medium.com/techskill-brew/what-is-blockchain-technology-part-1-blockchain-basics-e44847198c94 12/13
2/9/23, 2:39 AM What is Blockchain technology? (Part 1- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Get an email whenever Techskill Brew publishes.


Open
Emails in
willapp
be sent to [email protected]. Not you? Get unlimited access

SubscribeSearch Medium

https://medium.com/techskill-brew/what-is-blockchain-technology-part-1-blockchain-basics-e44847198c94 13/13
2/9/23, 2:55 AM Blockchain Immutability — Why Does it Matter? | by Kevin Doubleday | Fluree PBC | Medium

Published in Fluree PBC

Kevin Doubleday Follow

Nov 28, 2018 · 8 min read · Listen

Save

Blockchain Immutability — Why Does it Matter?


There seems to be a lack of — ahem — *consensus* around blockchain’s definition.

While the philosophical spectrum ranges from satoshi minimalists to mass enterprise
adopters, it is important to first understand the technical componentry of blockchain
in order to deploy it as a useful application. Here is a “feature-first” definition that may
be useful in understanding these technical underpinnings:

https://medium.com/fluree/immutability-and-the-enterprise-an-immense-value-proposition-98cd3bf900b1 1/10
2/9/23, 2:55 AM Blockchain Immutability — Why Does it Matter? | by Kevin Doubleday | Fluree PBC | Medium

Today, we’ll dive into immutability, a core defining feature of blockchain.

Blockchain Immutability - Why does it matter?

https://medium.com/fluree/immutability-and-the-enterprise-an-immense-value-proposition-98cd3bf900b1 2/10
2/9/23, 2:55 AM Blockchain Immutability — Why Does it Matter? | by Kevin Doubleday | Fluree PBC | Medium

Across the hundreds of articles and conversations around Blockchain, you’ll find the
term “immutable” almost always present. Immutability — the ability for a blockchain
ledger to remain a permanent, indelible, and unalterable history of transactions — is a
definitive feature that blockchain evangelists highlight as a key benefit. Immutability
has the potential to transform the auditing process into a quick, efficient, and cost-
effective procedure, and bring more trust and integrity to the data businesses use and
share every day.

We spend Trillions of dollars on cybersecurity solutions meant to keep outside prying


eyes from accessing our sensitive data. But rarely do we fight the internal
cybersecurity battle: ensuring that our data has not been manipulated, replaced, or
falsified by a company or its employees. In many cases, we have come to simply trust
that the data is correct by methods like private keys and user permissions. But in
reality, we cannot prove — methodically or mathematically — that information in a
standard application database is unequivocally tamper-free. Auditing becomes our
next (and expensive) line of defense.

Blockchain implementation can bring an unprecedented level of trust to the data


enterprises use on a daily basis — immutability provides integrity (both in its
technical and primary definition). With blockchain, we can prove to our stakeholders
that the information we present and use has not been tampered with, while
simultaneously transforming the audit process into an efficient, sensible, and cost-
effective procedure.

How Immutability is Achieved

A Brief Introduction to Cryptography and hashing


Before we dive into blockchain immutability, we’ll need to understand cryptographic
hashing. Here are the basics:

A hash function takes existing data (an input like “Blockchain is Disruptive” in the
example below…) and outputs a “Checksum” — a string of numbers and letters that
serve as a digital signature.

The Checksum is guaranteed to point to your exact data input — if just one byte is
different between two files, the outputs after hashing will be two completely

https://medium.com/fluree/immutability-and-the-enterprise-an-immense-value-proposition-98cd3bf900b1 3/10
2/9/23, 2:55 AM Blockchain Immutability — Why Does it Matter? | by Kevin Doubleday | Fluree PBC | Medium

strings. One can liken this to an avalanche effect — a small change in your input
can drastically change your output.

Probably the most famous hashing algorithm, SHA-2 (and its variants: Sha-256
being the most popular in the blockchain world) was created by the NSA.

The key utility in the hashing process is that you can’t reverse-engineer a hash. In
other words, you won’t be able to work backward from an output string to
determine the input data.

Credit: www.flur.ee

Want to test out some basic hashing? Here is a free Sha-256 hash calculator:
http://www.xorbin.com/tools/sha256-hash-calculator

Cryptography + Blockchain Hashing Process = Immutability


Read this next sentence slowly:

Each transaction that is verified by the blockchain network is timestamped and


embedded into a “block” of information, cryptographically secured by a hashing
process that links to and incorporates the hash of the previous block, and joins the
chain as the next chronological update.

https://medium.com/fluree/immutability-and-the-enterprise-an-immense-value-proposition-98cd3bf900b1 4/10
2/9/23, 2:55 AM Blockchain Immutability — Why Does it Matter? | by Kevin Doubleday | Fluree PBC | Medium

The hashing process of a new block always includes meta-data from the previous
block’s hash output. This link in the hashing process makes the chain “unbreakable” —
it’s impossible to manipulate or delete data after it has been validated and placed in the
blockchain, because if attempted, the subsequent blocks in the chain would reject the
attempted modification (as their hashes wouldn’t be valid). In other words, if data is
tampered with, the blockchain will break, and the reason could be readily identified.
This characteristic is not found in traditional databases, where information can be
modified or deleted with ease.

The blockchain is essentially a ledger of facts at a specific point in time. For Bitcoin,
those facts involve information about Bitcoin transfers between addresses. The below
image shows how the checksum of transaction data is added as part of the header,
which, in turn, is hashed into and becomes that entire block’s checksum.

Source: http://docs.flur.ee

Benefits, Explained
Why does immutability matter? For the enterprise, immutability as a result of
blockchain implementation presents a serious overhead saver as well as simplified
auditing efforts & fraud prevention. We’ll break these concepts down:

https://medium.com/fluree/immutability-and-the-enterprise-an-immense-value-proposition-98cd3bf900b1 5/10
2/9/23, 2:55 AM Blockchain Immutability — Why Does it Matter? | by Kevin Doubleday | Fluree PBC | Medium

Complete Data Integrity — Ledgers that deploy blockchain technology can guarantee
the full history and data trail of an application: once a transaction joins the blockchain,
it stays there as a representation of the ledger up to that point in time. The integrity of
the chain can be validated at any time by simply re-calculating the block hashes — if a
discrepancy exists between block data and its corresponding hash, that means the
transactions are not valid. This allows organizations and its industry regulators to
quickly detect data tinkering.

Simplified Auditing — Being able to produce the complete, indisputable history of a


transactional ledger allows for an easy and efficient auditing process. Proving that data
has not been tampered with is a major benefit for companies that need to comply with
industry regulations. Some common use cases include supply chain management,
finance (for example, Sarbanes-Oxley disclosures), and identity management.

Increase in efficiencies — Maintaining a full historical record is not only a boon to


auditing, but also provides new opportunities in query, analytics, and overall business
processes. FlureeDB, for instance, takes advantage of the concept of time travel for
business applications — where queries can be specified as of any block — or point in
time — and reproduce that time’s version of the database, immediately.

This capability allows for a host of time and cost savings — including tracking the
provenance of major bugs, auditing specific application data, backup and restoring
database state changes to retrieve information. Immutability can make the most
modern-day data problems that plague enterprise applications irrelevant.

Proof of Fault — Disputes over fault in business are all-too-common. The construction
industry accounts for $1 Trillion dollars in losses as a result of unresolved disputes.
While blockchain won’t wholly dissolve this massive category of legal proceedings, it
could be leveraged to prevent a majority of disputes related to data provenance and
integrity (essentially proving who did what and at what time).

Blockchain finality allows us — and a jury — to fully trust every piece of information.

FlureeDB secures every transaction — proving who initiated it, when it was completed,
and that it is free of tampering.

https://medium.com/fluree/immutability-and-the-enterprise-an-immense-value-proposition-98cd3bf900b1 6/10
2/9/23, 2:55 AM Blockchain Immutability — Why Does it Matter? | by Kevin Doubleday | Fluree PBC | Medium

It even tracks the changes a SaaS vendor makes to your transaction before it reaches
the data storage tier, meaning you can trust your SaaS data without fully trusting your
SaaS vendor:

https://medium.com/fluree/immutability-and-the-enterprise-an-immense-value-proposition-98cd3bf900b1 7/10
2/9/23, 2:55 AM Blockchain Immutability — Why Does it Matter? | by Kevin Doubleday | Fluree PBC | Medium

The Asterisks to Immutability

Immutability ≠ Perfect, Truthful Data


Stop telling your manager that blockchain will make information correct. It is a
mechanism for detecting untruths, not a magical lie-detector.

Blockchain doesn’t inherently, automatically, or magically make data truthful — its


implementation merely cryptographically secures it so that it will never be altered or
deleted without consequence. Measures such as sharing your hash outputs directly
with stakeholders (customers, auditors, etc.) or setting up a decentralized network of
validation nodes are a good complement to the historical immutability the blockchain
hashing process provides, to ensure an often-needed validation component.

In addition: the stronger the enforcement rules, the more reliable the data on the
blockchain (Exhibit A: Bitcoin’s proof of work).

It is possible but incredibly difficult to recreate a blockchain with new data

https://medium.com/fluree/immutability-and-the-enterprise-an-immense-value-proposition-98cd3bf900b1 8/10
2/9/23, 2:55 AM Blockchain Immutability — Why Does it Matter? | by Kevin Doubleday | Fluree PBC | Medium

This requires a few things — collusion between parties and a complete recalculation of
hashes. For a public blockchain like Bitcoin, both are expensive and both require an
incredible amount of computing effort to re-mine the blocks until their hashes could
be passed off as valid.

The smaller your circle of independent nodes


becomes, the easier this can be achieved.
FAQs on Immutability

What are the disadvantages of immutability? How can they be avoided?


Having an unalterable history of transactions seems like the answer to many modern
business problems — and it is, in many ways. But what happens when sensitive data —
like employee’s home addresses — is accidentally published to a blockchain?
Hopefully, this wouldn’t be an issue, as standard design decisions in building
blockchain environments necessitate a separation between sensitive and personally
identifying information.

If running a private, federated blockchain, your company would have to convince the
other parties to agree to a “fork” in the blockchain — where a blockchain splits into two
paths and the new designated database continues on. All or most parties involved in
this blockchain will have to agree on the terms including which block to fork at and
any additional rules of the new database. If this blockchain is truly public, it is next to
impossible to have this information removed (a hard fork is also required here, but you
are much more unlikely to convince the other parties in the network to comply).

In terms of Databases and Infrastructure, isn’t holding the entire transaction history very
costly with regards to space?
Not really. Holding every database state might have been costly in the 90s, but current
storage costs (1GB in AWS = $.023) are incredibly cheap. And the benefits (data
integrity, ability to issue queries against any point in time) far outweigh the slight cost
difference.

https://medium.com/fluree/immutability-and-the-enterprise-an-immense-value-proposition-98cd3bf900b1 9/10
2/9/23, 2:55 AM Blockchain Immutability — Why Does it Matter? | by Kevin Doubleday | Fluree PBC | Medium

Fluree transforms data ownership, access, and security. Fluree offers an ACID-
compliant blockchain distributed ledger that records every state change in history as
an immutable changelog entry. It allows for powerful query capability with FlureeDB,
a graph query engine. By bringing blockchain to the data tier, Fluree is a practical and
powerful infrastructure on which to build, distribute, and scale custom blockchains.

Website: www.flur.ee
Docs: http://docs.flur.ee
Twitter: https://twitter.com/FlureePBC
Linkedin: https://www.linkedin.com/company/fluree-pbc/
Email: [email protected]

Blockchain Immutability Decentralization Enterprise Technology Technology

Open in app Get unlimited access

Search Medium

https://medium.com/fluree/immutability-and-the-enterprise-an-immense-value-proposition-98cd3bf900b1 10/10
2/9/23, 2:43 AM What is a Block in the Blockchain? (Part 2- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Published in Blockchain 101 by Techskill Brew

Techskill Brew Follow

Dec 26, 2021 · 7 min read

Save

What is a Block in the Blockchain? (Part 2-


Blockchain Series)

This is the second part of the 100 part series on Blockchain. You can read the first part here to
understand what is Blockchain and its components.

As the name indicates, Blockchain metaphorically consists of blocks linked together


chronologically to comprise a chain known as the Blockchain. Every transaction or
https://medium.com/techskill-brew/what-is-a-block-in-the-blockchain-part-2-blockchain-basics-53ad20c766cc 1/10
2/9/23, 2:43 AM What is a Block in the Blockchain? (Part 2- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

data is stored in the block. Let’s take a real-life scenario to understand it in a better
way. Suppose I make a transaction of some amount in Steve’s account. There has to be
a place where this transaction information will be stored. This place is called a block in
the blockchain. A block records some or all of the most recent transactions that have
not yet entered any prior blocks. Each time a block is ‘completed,’ it becomes part of
the past and gives way to the next block in the Blockchain. A completed block is a
permanent record of transactions, which, once written, cannot be altered or removed.

Block time
The average time it takes for the Blockchain network to generate a new block of
transactions and add it to the Blockchain is called the block time. Some Blockchains
create a new block as frequently as every five seconds, and some may even take a few
minutes. For instance, the block time for Ethereum Blockchain is between 14 and 15
seconds, while the block time for bitcoin Blockchain is around 10 minutes. In
cryptocurrency, a shorter block time means faster transactions.

Elements of a block
The first block in the Blockchain is known as the genesis block, as it is the block from
where the chain originates.

Genesis block in the Blockchain

Each block has five elements.

1. Data and transactions: The first element is data and transactions. Let’s come to our
example. The amount associated with that transaction and all the other related
information like sender information, receiver information, etc., will be stored in the
block. The data contained in each block depends on the type of Blockchain. For

https://medium.com/techskill-brew/what-is-a-block-in-the-blockchain-part-2-blockchain-basics-53ad20c766cc 2/10
2/9/23, 2:43 AM What is a Block in the Blockchain? (Part 2- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

example, the food supply Blockchain will have information on all the processes
involved in that specific food supply chain.

2. Hash: Each block also includes a Hash- a unique identifier for the block and all of its
contents. To better understand, you can assume a hash to be equivalent to a
fingerprint. It is always unique, and no two blocks can have the same hash, just like in
the case of fingerprints. As soon as a block is created, its hash gets generated
simultaneously. Tampering with a block changes its hash. Simply put, if fingerprints or
hash of the block change, it indicates that the block has been tampered with and is no
longer the same block. So hash can be a very powerful tool to detect any changes made
in the block.

Tampering with block changes its hash

3. Hash of the previous block: Another important element that every block contains is
the hash of the previous block. This piece of information is what links one block to
another and makes the whole network safe and secure.

In the figure, block 4 contains the hash of block 3, block 3 contains the hash of block 2,
and so on. As discussed earlier, any change in the data of a block leads to a change in
its hash. In the given figure, when we change the data in block 2, the hash of block 2
gets changed as well, which makes the whole blockchain unstable. This happens
because each block contains hash of the previous block. When block 2 is tampered
with, the old hash becomes invalid, and a new hash is generated for the block. This
affects all the subsequent blocks in the chain and thus making all of them invalid. This
unique property of the blockchain makes it transparent and secure, as in any case of
data tampering whole network gets to know which block got compromised in the
blockchain.
https://medium.com/techskill-brew/what-is-a-block-in-the-blockchain-part-2-blockchain-basics-53ad20c766cc 3/10
2/9/23, 2:43 AM What is a Block in the Blockchain? (Part 2- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Hash of the previous block links the block to another block in the Blockchain

4. Timestamp: The fourth essential element that every block contains is the
timestamp. Timestamp simply means “a proof that some data existed at a particular
date and time.” In other words, the timestamp can be referred to as “Proof of
existence.” Any digital data can be timestamped. The hash of the block containing data
and transactions is timestamped and is then published on the network. By doing so, it
is ensured that the transactions have existed at this point in time. Implementing a
timestamp on the block also makes the block impossible to be repeated in the future
since, in addition to the time, the date of creation of the block is also stored. Therefore,
there is no possibility that any block in the future can be assigned a repeated hash that
was given to any of the previous blocks a week, two months, or a year ago.

Moreover, Blockchain-based timestamping is an entirely secure way of tracking the


creation and modification time of a document. It is secure enough that even the owner
of a document does not have the power to change any data once a document has been
recorded on the Blockchain.

Timestamp, along with other information of blocks in the Blockchain

https://medium.com/techskill-brew/what-is-a-block-in-the-blockchain-part-2-blockchain-basics-53ad20c766cc 4/10
2/9/23, 2:43 AM What is a Block in the Blockchain? (Part 2- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

5. Nonce: The fifth element of a block is nonce. The nonce is an abbreviation for
“number only used once.” The Nonce is an integer number that, along with the block
number, data, and previous hash, serves as an input for the hashing algorithm to
calculate the valid hash for the block. A valid hash for the block is a hash that meets a
certain difficulty i.e. contains a number of predefined zeros at the beginning of the
hash. Let’s take the example of Anders Brownworth Hash Program to understand how
nonce value is used to generate a valid hash
(https://andersbrownworth.com/blockchain/block).

In this case, the valid cryptographic hash contains 4 leading zeros.

Valid cryptographic hash contains 4 leading O’s

If any change is made in the data, the hashing algorithm generates a completely
different hash for the block. If the newly generating hash does not have four leading
zeroes, then it will not be a valid block.

https://medium.com/techskill-brew/what-is-a-block-in-the-blockchain-part-2-blockchain-basics-53ad20c766cc 5/10
2/9/23, 2:43 AM What is a Block in the Blockchain? (Part 2- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Invalid hash if it does not contain 4 leading O’s

The block is made valid by the field called a nonce, which is not predetermined. Every
time a new nonce is selected for the same block, the resulting hash will be a different
value.

https://medium.com/techskill-brew/what-is-a-block-in-the-blockchain-part-2-blockchain-basics-53ad20c766cc 6/10
2/9/23, 2:43 AM What is a Block in the Blockchain? (Part 2- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

New nonce value results in a different hash of the same block

A nonce is basically a random number; it is important to find a nonce value as it helps


to generate a valid hash containing 4 leading O’s to make the specific block valid. One
way to obtain a nonce value is by changing the nonce manually. Thus, it may take
several iterations until the desired hash with four leading O’s is generated. The other
way is to click the mine button as shown in the figure, it will give a unique nonce that
corresponds to a hash with leading four O’s to make a valid block. Once the block
becomes valid, it becomes a part of the Blockchain, and new blocks are added to this
block.

https://medium.com/techskill-brew/what-is-a-block-in-the-blockchain-part-2-blockchain-basics-53ad20c766cc 7/10
2/9/23, 2:43 AM What is a Block in the Blockchain? (Part 2- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Mining gives a unique nonce that corresponds to a valid hash to make a valid block

Since the nonce value can only be used once, it plays an important role to keep the
Blockchain immutable. Suppose the data is changed on Block 2, because of which the
hash changes as data is used to calculate the hash. Also, Block 2 becomes invalid
because its hash no longer has four leading 0’s. Block 3’s hash changes because Block
2’s hash was used to calculate Block 3’s hash. Also, Block 3 becomes invalid because its
hash no longer has four leading 0’s. The same is the case with other blocks in the
blockchain.

https://medium.com/techskill-brew/what-is-a-block-in-the-blockchain-part-2-blockchain-basics-53ad20c766cc 8/10
2/9/23, 2:43 AM What is a Block in the Blockchain? (Part 2- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Change in the data of Block 2 makes other blocks invalid in the Blockchain

The only way to mutate Block 2 is to mine the block again to find a valid hash with four
leading 0’s and then mine all the blocks after to find their valid hash because all the
blocks are linked together with the hash of the previous block. Since new blocks are
always being added, it’s nearly impossible to mutate the blockchain.
Open in app Get unlimited access
If you liked this article and want to know more about Blockchain, NFTs, Metaverse, and
Searchclick
their applications, Medium
the below link.

50+ Real World Applications of Blockchain: A beginner’s complete


guide to Blockchain Fundamentals…
50+ Real World Applications of Blockchain: A beginner’s complete
guide to Blockchain Fundamentals, Consensus…
www.amazon.com

Happy learning!

https://medium.com/techskill-brew/what-is-a-block-in-the-blockchain-part-2-blockchain-basics-53ad20c766cc 9/10
2/9/23, 2:43 AM What is a Block in the Blockchain? (Part 2- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Blockchain Blockchain Technology Blockchain Development Blockchain Startup

Blockchain Game

Get an email whenever Techskill Brew publishes.


Emails will be sent to [email protected]. Not you?

Subscribe

https://medium.com/techskill-brew/what-is-a-block-in-the-blockchain-part-2-blockchain-basics-53ad20c766cc 10/10
2/9/23, 2:57 AM Why Is Blockchain Important?. Over the past few years, you have heard… | by Emmanuel Nwaka | Coinmonks | Medium

Published in Coinmonks

Emmanuel Nwaka Follow

Apr 22, 2022 · 5 min read · Listen

Save

Why Is Blockchain Important?

Over the past few years, you have heard of the word ‘Blockchain,’ and you’ve always
thought it was synonymous with Bitcoin. This is not exactly true. As the world tends
towards decentralization, Blockchain is the power house of this technology. If you are
trying to learn what blockchain is, why it works, and what it powers, you have to stick
to this article until the end.

https://medium.com/coinmonks/why-is-blockchain-important-ab54d511d2ef 1/5
2/9/23, 2:57 AM Why Is Blockchain Important?. Over the past few years, you have heard… | by Emmanuel Nwaka | Coinmonks | Medium

Blockchain.
According to Simplilearn, Blockchain technology is a structure that stores
transactional records — the block — of the public in several databases — the chain — in
a network that is connected through peer-to-peer nodes. This type of storage is
commonly referred to as a ‘digital ledger.’

In the technology by which the blockchain works, every transaction in this ledger is
authorized by the owner’s digital signature. This type of signature authenticates the
transaction, safeguards it from manipulation, and ensures its accuracy. Hence, the
information the digital ledger contains is very, very secure.

In layman’s terms, the digital ledger is like a spreadsheet on Microsoft Excel that is
shared among numerous computers in a network. That means the transactional
records are stored based on actual purchases. The mind-blowing phenomenon of
blockchain technology is that anybody can see the data, but they can’t corrupt it.

This technology is the concept behind the world of cryptocurrency. Blockchain


technology makes cryptocurrencies like Bitcoin, Ethereum, Tether, and more work,
just like the internet makes Facebook, Instagram, Twitter, and more possible.
According to Oxford Languages, cryptocurrency is a digital currency in which
transactions are verified and records maintained by a decentralized system using
cryptography rather than by a centralized authority.

The blockchain is an immutable distributed digital ledger with many use cases beyond
cryptocurrencies. It is immutable because every transaction on the blockchain cannot
be changed. It is a digital ledger because all the transactions made are digitally stored
in multiple places across various computer networks.

Who Invented the Blockchain?


The term blockchain is still a myth to many. In 1982, the first blockchain-like protocol
was proposed by cryptographer David Chaum. After nine years, in 1991, Stuart Haber
and W. Scott Stornetta wrote about their work on Consortiums.

Although these people were not the originators of blockchain, Satoshi Nakamoto
invented and implemented the first blockchain network after deploying the world’s
first digital currency, Bitcoin. Many people presume that Satoshi Nakamoto was the
https://medium.com/coinmonks/why-is-blockchain-important-ab54d511d2ef 2/5
2/9/23, 2:57 AM Why Is Blockchain Important?. Over the past few years, you have heard… | by Emmanuel Nwaka | Coinmonks | Medium

pseudonym of these multinationals, namely Samsung, Toshiba, Nakamichi, and


Motorola. Although these are mere speculations, there is no substantial evidence to
validate these truths.

Basic Features of Blockchain Technology.


According to Euromoney Learning 2020, there is more than one feature of this
technology called the blockchain. The basic features of blockchain technology include:
it is programmable, it is immutable, it is secure, it is unanimous, it is time-stamped,
and it is on a distributed ledger.

It is programmable because anyone can see the results of any computation. Ethereum
is one of the cryptocurrencies that powers programmable blockchains, and these
blockchains can be used to create smart contracts which enable peer-to-peer
transactions. Programmability is one of the most important aspects of a blockchain.
Blockchain technology is immutable because all the validated records are irreversible
and cannot be changed.

Blockchain technology is secure because all the individual records are individually
encrypted, and the identities of the Blockchain members can be anonymous or
pseudonymous. Blockchain is unanimous because all the individual members have to
agree on a transaction before it is authenticated. It is time-stamped as all transaction
records have a timestamp that is recorded on the block. It is on a distributed ledger as
all individual members have a copy of the ledger for complete transparency.

Remember that the goal of blockchain is to allow digital information to be recorded


and individually distributed but not edited. This shows that a blockchain is a
foundation for immutable ledgers or records of transactions that cannot be altered,
deleted, or destroyed. That is why blockchains are also called Distributed Ledger
Technology (DLT).

Blockchain & Bitcoin.


According to Investopedia, Blockchain forms the bedrock for all cryptocurrencies,
most especially Bitcoin. The Central Bank of Nigeria controls the Nigerian Naira. This
principle of a central authority makes a user’s data and currency technically at the
whim of their government. If the bank is hacked, the classified information of the

https://medium.com/coinmonks/why-is-blockchain-important-ab54d511d2ef 3/5
2/9/23, 2:57 AM Why Is Blockchain Important?. Over the past few years, you have heard… | by Emmanuel Nwaka | Coinmonks | Medium

client is at risk. If the client’s government collapses, the value of their currency may be
at risk. This was the fallout of the financial crisis of 2008. Due to predatory lending and
excessive risk-taking, financial institutions all over the world suffered a massive crisis.
These were the issues that brightened the emergence of Bitcoin.

Because of its distributed ledger technology that spreads its operations across multiple
networks, blockchain allows Bitcoin and other cryptocurrencies to operate without the
need for a central authority. This reduces the risk of theft and eliminates huge
transaction fees. It can also give countries with unstable currencies or financial
infrastructures a currency with a wide range of applications. This makes it easier for
individuals and institutions to do business domestically and internationally.

Merit and Demerits of Blockchain.


The major advantage of blockchains is their security level because blockchains can
protect and secure sensitive data online. The speed and convenience of transactions on
the blockchain are seamless. It only takes a few minutes to send money via crypto,
whereas other conventional methods can take several days to complete. Due to the
technology’s decentralized nature, many users look at it as an advantage.

The method of safety in a Blockchain is the use of public and private keys, which poses
an issue. If a user loses their private key, they may not be able to access the network.
The scalability restrictions are a hassle due to the limited number of transactions per
node. This means that multiple transactions can take several hours to complete. It is
also difficult to change or add information after it is recorded, another disadvantage of
blockchain.

Conclusion.
As we conclude, a blockchain is a database that stores encrypted data as blocks and
chains them together to form a chronological single-source of truth for the data. The
inherent security of Blockchain makes it a prime technology for almost every single
sector. While I am fascinated with this technology, I found it necessary to share my
thoughts.

If you loved this article, give it a clap and comment if you found it helpful.

https://medium.com/coinmonks/why-is-blockchain-important-ab54d511d2ef 4/5
2/9/23, 2:57 AM Why Is Blockchain Important?. Over the past few years, you have heard… | by Emmanuel Nwaka | Coinmonks | Medium

Let’s have coffee together: @Emmanuel Nwaka.

Follow me on:

LinkedIn: @Emmanuel Nwaka

Twitter: @EmmanuelNwaka_

Instagram: @Emma_Nwaka

Join Coinmonks Telegram Channel and Youtube


Channel learn about crypto trading and investing
Also, Read
OpenBookmap
in app Review | 5 Best Crypto Exchanges in the USA Get unlimited access

The Best Crypto Hardware wallet | Bitbns Review


Search Medium

10 Best Crypto Exchange in Singapore | Buy AXS

Red Dog Casino Review | Swyftx Review | CoinGate Review

Best Crypto to Invest in India | WazirX P2P | Hi Dollar Review

Blockchain Blockchain Technology Bitcoin Decentralization

179

https://medium.com/coinmonks/why-is-blockchain-important-ab54d511d2ef 5/5
2/9/23, 2:35 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Published in Blockchain 101 by Techskill Brew

Techskill Brew Follow

Dec 31, 2021 · 7 min read · Listen

Save

Hash Functions in Blockchain (Part 3-


Blockchain Series)

Welcome to the third part of the 100 part series on Blockchain.

Part 1: What is Blockchain technology?

Part 2: Components of a Block in the Blockchain


https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 1/8
2/9/23, 2:35 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Hash functions are one of the most extensively-used cryptographic algorithms that
generate a fixed-length output for any input data irrespective of its size and length. The
input data can be a word, a sentence, a longer text, or an entire file. The fixed-length
output generated for the input data is called a hash. Many types of cryptographic hash
functions/ algorithms are available like MD5, BLAKE2, SHA-1, SHA-256, etc. Secure
Hashing Algorithm 256, commonly referred to as SHA-256, is one of the most famous
cryptographic hash functions used extensively in Blockchain technology. It was
developed by the National Security Agency (NSA) in 2001.

Hash or fixed-length output for any input data

When we pass a certain message through the hash algorithm, it generates a hash
against this input. Regardless of the size of the letters or numbers you input, the hash
algorithm always generates a fixed-length output. The fixed-length output can vary like
32-bit, 64-bit, 128-bit, or 256-bit depending on the hash algorithm being used. For
instance, SHA-256 generates a hash value of 256 bits, equivalent to the size of 64
characters.

Using a fixed-length output increases security since anyone trying to decrypt the hash
won’t be able to tell how long or short the input is simply by looking at the length of the
output. The only method to determine the original string from its hash is by using
https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 2/8
2/9/23, 2:35 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

“brute-force.” Brute-force basically means that one has to take random inputs, hash
them and compare them with the target hash. For instance, if the SHA-256 hash
algorithm is used, a brute-force attack would need to make 2^256 attempts to generate
the initial data.

Now, let’s discuss the important properties of a cryptographic hash function used in
the Blockchain:

A small change in the input value alters the Hash value significantly
One of the unique properties of a cryptographic hash function is that even a small
change in the input value brings about a drastic change in its output value. This is
referred to as the Avalanche Effect. For instance, when the first input, ‘Blockchain is
the future’ is passed through the hash function, a specific output or hash is generated.
But when a small change is made to the input, like, an extra exclamation mark is
added- ‘Blockchain is the future!’ you can see that the new hash is generated, which is
entirely different from the previous hash. This property of cryptographic hash
functions makes them resistant to hacking as no correlation can be derived about the
input data by just looking at the hash alone.

Different hash is generated when a small change is made in input data

Computationally Efficient

https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 3/8
2/9/23, 2:35 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

One of the other crucial properties of a cryptographic hash function used in the
Blockchain is its quick computation. The hash function requires computers on the
Blockchain network to perform certain complex mathematical tasks to generate a hash
from the input data. So when we say that the hash function should be computationally
efficient, it simply means that the computers should be able to finish the required
mathematical task in a short time.

Deterministic
A cryptographic hash function used in the Blockchain must be deterministic. In simple
words, a hash function is said to be deterministic if it generates the same hash
whenever the same input is passed through it. No matter how many times we pass an
input ‘ Blockchain is the future’ through the hash function, it should always generate
the same exact output or hash every single time.

If different outputs are generated by a hash function for the same input, the hash
function will become useless, and it would be impossible to verify a specific input.

Pre-Image Resistance
The input for a cryptographic hash function can be any kind of data. This data can be a
number, a word, a sentence, a passcode, a song, a book, or a complete movie. But the
hash generated for any kind of input data by the hashing algorithm will be an
alphanumeric code and that too of a fixed length.

It is very crucial for a cryptographic hash function to be Pre-image resistant. Pre-image


resistance means that the output generated by a cryptographic hash function must not
reveal any information about the input data. For example, when an input X is passed
through the hash function, the hash generated is represented as H(X). Pre-image
resistance simply means that even if you know H(X), it must be infeasible for you to
determine the corresponding input X.

https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 4/8
2/9/23, 2:35 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Pre-image resistant hash function

Collision Resistant
Collision resistance is another important property of a cryptographic hash function.
Being collision-resistant simply means that it should be highly improbable to generate
the same output or hash for two different inputs.

Collision resistant hash function


https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 5/8
2/9/23, 2:35 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

As discussed earlier, the input for a hash function can be of any type, size, and length.
Therefore, there are infinite possibilities for the data input that can be fed into a hash
function. But the corresponding hash or output generated will have a fixed length. This
means that there will be a finite number of outputs that can be generated using the
hash algorithm. If inputs can be infinite and outputs are finite in number, it is quite
possible that more than one input can produce the same output.

So the goal of being collision-resistant is to make the probability of finding any two
such inputs which share the same output negligible. So if a hashing function is
collision-resistant, this possibility won’t pose any security risk to the data.

One-way functions
Hash functions are generally referred to as one-way functions because they are not
reversible. While a hash function is a cryptographic function, it’s not encryption.
Encryption works by encrypting the relevant data with an encryption algorithm and an
encryption key. This results in a ciphertext that can only be viewed in its original form
if decrypted with the correct key. A hash function, in contrast to encryption, works as a
one-way function; in simple words, if you have a hash, you can not decrypt it to find
the corresponding input. So in a real-life scenario, even if a hacker gets access to a
hash output, it is completely useless as he can’t decrypt it to get the input.

https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 6/8
2/9/23, 2:35 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

One-way Hash Functions

Therefore, cryptography used in Blockchain requires one-way hash functions, making


it safe, secure, and reliable. Though hash functions can be used to track and validate
the input data, they can’t be used to decrypt and reach the input data.

To help you understand it in a better way, let us take an example — Suppose Mr. A
holds the land entitlement of a piece of land. That information is stored with the
relevant Government Authority in their database. Now, this land record data is given a
unique hash using a hash function. As the record is a centralized record, it can be
tampered with, and changes can be made in the records by some corrupt officials
because of their personal gains. Assume that some corrupt official tampers the data
and changes the land area Mr. A owns. In this case, when the altered land record data
will be passed through the hash function, the hash generated would be different from

https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 7/8
2/9/23, 2:35 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

the previous one. Thus, indicating that the land data has been tampered with. So this is
how a hash can be used to track and validate the data.

On the other hand, it is not possible to decrypt this hash and find out that it represents
land record data for the land owned by Mr. A. Therefore, we can say that a hash can be
used to track and validate the information but can’t decrypt and find the original data.

If you liked this article and want to know more about Blockchain, NFTs, Metaverse, and
their applications, click the below link.

50+ Real World Applications of Blockchain: A beginner’s complete


guide to Blockchain Fundamentals…
50+ Real World Applications of Blockchain: A beginner’s complete
guide to Blockchain Fundamentals, Consensus…
www.amazon.com
Open in app Get unlimited access

Search Medium
Happy learning!

Blockchain Blockchain Technology Blockchain Development Blockchain Startup

Blockchain Game

Get an email whenever Techskill Brew publishes.


Emails will be sent to [email protected]. Not you?

Subscribe

https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 8/8
2/9/23, 3:21 AM What Are Hash Functions, and How Do They Work? | by Matt Stokes | Geek Culture | Medium

Published in Geek Culture

Matt Stokes Follow

Nov 14, 2021 · 5 min read · Listen

Save

DEMYSTIFYING THE BLOCKCHAIN

What Are Hash Functions, and How Do They


Work?
The Sticky Stuff That Holds the Blockchain Together
Welcome to my series, “Demystifying the Blockchain.” Where in each article, I break down
and explain a fundamental blockchain-related concept/subject in under 5 minutes (probably
not actually). This article’s discussion is centred around Hashes… No, although I do like me a
substantial breakfast hash every now and again, you probably don’t want to be caught eating
this kind of hash (now that I think about it, I am not even sure how you would manage such
a task).
https://medium.com/geekculture/what-are-hash-functions-and-how-do-they-work-3177553e429e 1/7
2/9/23, 3:21 AM What Are Hash Functions, and How Do They Work? | by Matt Stokes | Geek Culture | Medium

Hashes, The Middle Child in the Blockchain Family


It is hard to get very far into an explanation of the Blockchain without mentioning
Hashes Functions — they are quite literally the most integral part of the Blockchain.
However, they are unfortunately also one of the most overlooked and under-explained
— leaving Blockchain enthusiasts lost for words when their grandma or the girl/guy
they are trying to impress ignores the super cool Solidity project they are working on
and instead asks, “So how do blockchains work?”

You could theoretically continue with your day, forget you ever saw this article, and
risk future embarrassment of a most profound order when you get out-geeked by the
guy sitting behind you (and listening intently to you and your friend’s conversation). Or
you could make the right decision, take 5-minutes now, and never be out-geeked again.
😏

Hash Functions: Basic Definition


A hash function put basically, is a mathematical function that takes an input of any
length/size and produces an encrypted output of a fixed length. For instance, I could
input my 3,000 word English Essay that was theoretically due last week (sorry unnamed
teacher), and the hash function would produce a string of numbers exactly the same
size as if I were to input the 7,000-word email I theoretically wrote to explain why my
3,000-word essay was not handed in on time. For example, in the case of a SHA-1 hash
function (there are hundreds of examples of Hash Functions in the world, SHA-1 being
one of them), the hash values of both my inputs would be 40 hexadecimal digits in
length and 160 bits in size (different hash functions have different output sizes and
lengths).

https://medium.com/geekculture/what-are-hash-functions-and-how-do-they-work-3177553e429e 2/7
2/9/23, 3:21 AM What Are Hash Functions, and How Do They Work? | by Matt Stokes | Geek Culture | Medium

What are Bits, Bytes and Hexadecimal Numbers?


Bits are the universally accepted standard unit of information for computer
systems

Bytes are simply collections of 8 bits

Hexadecimal digits, is a way of writing numbers that includes more possibilities


than the regular base-10 system. Instead of only being able to place a single-digit
number from 0–9 in the base-10 system, you can place single digits from 0–15; this
is because, in hexadecimal, we include the letters A through to F in the framework
(A = 11, F=15, etc).

Hash Functions vs Cryptographic Hash Functions


In their most basic form, hash functions are just simple mathematical functions used
to (most of the time) securely encode data and thus are a very prevalent encryption tool
used in a wide area of industries — with applications ranging from credit card
transactions all the way to software updates. So what makes blockchain/cryptography-
specific hash functions special? Well, in a sense, every cryptographic hash function is a
hash function, but not every hash function is a cryptographic hash function; in order
to understand why you will need a primitive understanding of how a blockchain works.

https://medium.com/geekculture/what-are-hash-functions-and-how-do-they-work-3177553e429e 3/7
2/9/23, 3:21 AM What Are Hash Functions, and How Do They Work? | by Matt Stokes | Geek Culture | Medium

How the Blockchain Works — In 32 Seconds (Yes, I Counted)


A blockchain is just a chain of digital cubes containing subsequent data. Each block is
linked to the block behind it — going all the way to the first block in the chain (the
Genesis Block). Each block in the chain contains vital, transaction-specific information
like the value/amount of data that is involved in the transaction, the timestamp, and
the address. Each block is connected with an invisible chain created by cryptographic
hash functions, which output hash values based on the transaction-specific data in the
current block, plus the data from the preceding block. So essentially, blockchain-
specific hash functions require multiple pieces of data in order to operate. However, it
is possible and perhaps important to go a bit deeper in understanding than this. In
general, we can define cryptographic hash functions under the following ruleset.

Cryptographic Function Rules:


The Avalanche Effect: A minuscule change in the input should result in a change of at
least half the bits in the output. Meaning, when you make a tiny change to your input,
the output should be entirely different/unrecognizable.

One-way Functions: A proper cryptographic hash must be within a percentage of


impossible to reverse engineer and discover the transaction data from.

Deterministic: The same input must always result in the same output. It would be
unfortunate if you inputted the words “pay Michael $10” into your hash function and
used the key to later receive the message “pay Sally $10,000.”

https://medium.com/geekculture/what-are-hash-functions-and-how-do-they-work-3177553e429e 4/7
2/9/23, 3:21 AM What Are Hash Functions, and How Do They Work? | by Matt Stokes | Geek Culture | Medium

Collision Resistant: It should be basically impossible to find two inputs that hash to the
same output, i.e. the scenario F(g) = F(c) should never occur.

Non-Predictable: The same input should always create the same output, and said
output should be impossible to predict in advance, meaning the output must be
entirely random.

Time to Rehash 😏
Let’s recap. Hash functions in their most basic form are just functions that take an
input and provide a random and unpredictable output of a fixed length. The hash
functions used in blockchain-specific applications are known as Cryptographic Hash
Functions, and although they are categorized under the umbrella of hash functions,
they have a specific set of guidelines that they must satiate in order to fulfill the
purpose required of them. These guidelines ensure that the hashes created by said
functions result in the blockchain’s famed immutability.

https://medium.com/geekculture/what-are-hash-functions-and-how-do-they-work-3177553e429e 5/7
2/9/23, 3:21 AM What Are Hash Functions, and How Do They Work? | by Matt Stokes | Geek Culture | Medium

Further Resources:

https://www.tutorialspoint.com/cryptography/cryptography_hash_functions.htm — Tutorials
Point

https://www.thesslstore.com/blog/what-is-a-hash-function-in-cryptography-a-beginners-
guide/ — The SSL Store

https://blockgeeks.com/guides/cryptographic-hash-functions/ — Block Geeks

Blockchain Blockchain Technology Web 3 Cryptocurrency Technology

Open in app 403 Get unlimited access

Search Medium
Sign up for Geek Culture Hits
By Geek Culture

Subscribe to receive top 10 most read stories of Geek Culture — delivered straight into your inbox, once a week. Take a
look.

Emails will be sent to [email protected]. Not you?

Get this newsletter

https://medium.com/geekculture/what-are-hash-functions-and-how-do-they-work-3177553e429e 6/7
2/9/23, 3:21 AM What Are Hash Functions, and How Do They Work? | by Matt Stokes | Geek Culture | Medium

https://medium.com/geekculture/what-are-hash-functions-and-how-do-they-work-3177553e429e 7/7
2/9/23, 3:08 AM What is P2P?. If using the Internet daily, it’s… | by Kript Team | kriptio | Medium

Published in kriptio

Kript Team Follow

Jul 31, 2018 · 3 min read · Listen

Save

What is P2P?

If using the Internet daily, it’s unlikely that you haven’t heard of a peer-to-peer
network. So what exactly is p2p and how does it differ from a traditional centralized
network? Let’s dig deeper.

P2P (peer-to-peer) is a decentralized network where files can be shared directly


between computers connected to each other via the Internet without any central
servers. Each computer on the p2p network becomes a file server itself and is called a
peer. All peers are equally privileged participants of the p2p network. They are both
suppliers and consumers of resources.

https://medium.com/kriptapp/what-is-p2p-6069b355e076#:~:text=P2P vs Centralized Network&text=In the centralized network the,files are accessible f… 1/6
2/9/23, 3:08 AM What is P2P?. If using the Internet daily, it’s… | by Kript Team | kriptio | Medium

To join the p2p network computers should have the Internet connection and a special
p2p software. If your computer is connected to the p2p network, you can look for files
on other computers in the network in the particular folders designated for sharing.

The P2P concept was popularized by file sharing systems at the end of the 20th
century. The most famous example of the p2p network is Torrent. File sharing in
Torrent network is organized with special programs called torrent clients (BitTorrent,
uTorrent, etc.) that automatize exchange process between the peers.

P2P vs Centralized Network

The main difference between a centralized network and a p2p network concerns a
data backup, recovery, and availability of files.

In the centralized network the availability of files is controlled by the system


administrators.

https://medium.com/kriptapp/what-is-p2p-6069b355e076#:~:text=P2P vs Centralized Network&text=In the centralized network the,files are accessible f… 2/6
2/9/23, 3:08 AM What is P2P?. If using the Internet daily, it’s… | by Kript Team | kriptio | Medium

While in the p2p network only the community of users is responsible for deciding
what files are accessible for sharing. Once the file is removed from the central server,
there is no way to download it anymore. Meanwhile, to make the file unavailable for
download in the p2p it needs to be deleted from all the computers in the network.

The main disadvantage of the centralized network is that users have no right to decide
which files to remain and which ones to remove. As for the drawback of the p2p, it
brings a vast number of disliked files since if the file is stored in only one computer, it
will be available in the network anyway.

Types of P2P Networks

There are structured and unstructured p2p networks. The structured networks
organize overlay, ensuring efficient search for files. As examples, you can look for
Torrent, Kad network, and Storm botnet.

https://medium.com/kriptapp/what-is-p2p-6069b355e076#:~:text=P2P vs Centralized Network&text=In the centralized network the,files are accessible f… 3/6
2/9/23, 3:08 AM What is P2P?. If using the Internet daily, it’s… | by Kript Team | kriptio | Medium

Meantime, the unstructured networks are created by nodes that randomly form
connections to each other. Search for Gnutella, Gossip, and Kazaa to get a more clear
idea of the systems

https://medium.com/kriptapp/what-is-p2p-6069b355e076#:~:text=P2P vs Centralized Network&text=In the centralized network the,files are accessible f… 4/6
2/9/23, 3:08 AM What is P2P?. If using the Internet daily, it’s… | by Kript Team | kriptio | Medium

Open in app Get unlimited access

Search Medium

There is also one more type of the network called hybrid models. A hybrid model is a
combination of the p2p and the client-server networks. The hybrid models usually
have a central server to help peers find each other in the chain.

Today, the p2p networks are the most widespread methods to share files for Internet
users all around the world. And there are many different p2p networks that provide
people with a convenient way of decentralized interaction.

Content kript.io
Share with your friends if you enjoyed this post
Download Kript on AppStore and GooglePlay
Follow us on Telegram, Facebook, Twitter

https://medium.com/kriptapp/what-is-p2p-6069b355e076#:~:text=P2P vs Centralized Network&text=In the centralized network the,files are accessible f… 5/6
2/9/23, 3:08 AM What is P2P?. If using the Internet daily, it’s… | by Kript Team | kriptio | Medium

P 2 P Payments Cryptocurrency Guides And Tutorials

https://medium.com/kriptapp/what-is-p2p-6069b355e076#:~:text=P2P vs Centralized Network&text=In the centralized network the,files are accessible f… 6/6
2/9/23, 3:03 AM PEER-TO-PEER NETWORK EXPLAINED. Peer-to-peer, or P2P in its abbreviated… | by XcelToken Plus | XcelLab Magazine | Med…

Published in XcelLab Magazine

XcelToken Plus Follow

Dec 17, 2019 · 4 min read · Listen

Save

PEER-TO-PEER NETWORK EXPLAINED


Peer-to-peer, or P2P in its abbreviated form, refers to computer networks using a
distributed architecture. In P2P networks, all the computers and devices that are part
of them are referred to as peers, and they share and exchange workloads. Each peer in
a peer-to-peer network is equal to the other peers. There are no privileged peers, and
there is no primary administrator device in the centre of the network.

In a way, peer-to-peer networks are the most egalitarian networks in the computer
world. Each peer is equal to the others, and each peer has the same rights and duties as
the others. Peers are both clients and servers at the same time.

In fact, every resource and each asset that’s available in a peer-to-peer network is
shared among peers, without any central server being involved. The shared resources
in a P2P network can be things such as processor usage, disk storage capacity, or
network bandwidth.

https://medium.com/xcellab-magazine/peer-to-peer-network-explained-c5038f6e8366#:~:text=Peer-to-peer%2C or P2P in its abbreviated form,they sh… 1/4


2/9/23, 3:03 AM PEER-TO-PEER NETWORK EXPLAINED. Peer-to-peer, or P2P in its abbreviated… | by XcelToken Plus | XcelLab Magazine | Med…

History of P2P (peer-to-peer) networks

The precursor of peer-to-peer networks appears to be USENET, which was developed


in 1979. It was a system that allowed users to read and post messages/news. It was a
network system similar to the online forums today, but with the difference that
USENET did not rely on a central server or administrator. USENET copied the same
message/news to all the servers found in the network. Similarly, peer-to-peer networks
distribute and use all the resources available to them.

The next big thing in the history of P2P was the year 1999 when Napster came to life.
Napster was file-sharing software that was used by people to distribute and download
music. The music shared on Napster was usually copyrighted and thus illegal to
distribute. However, that did not stop people from getting it. Although Napster was the
one that got P2P into the mainstream, Napster ultimately failed and was shut down by
authorities because of all the content that was shared illegally on it. Nowadays, P2P
remains one of the most popular technologies for sharing files over the internet, both
lawfully and unlawfully.

What is P2P used for?

The primary goal of peer-to-peer networks is to share resources and help computers
and devices work collaboratively, provide specific services, or execute specific tasks.
As mentioned earlier, P2P is used to share all kinds of computing resources such as

https://medium.com/xcellab-magazine/peer-to-peer-network-explained-c5038f6e8366#:~:text=Peer-to-peer%2C or P2P in its abbreviated form,they sh… 2/4


2/9/23, 3:03 AM PEER-TO-PEER NETWORK EXPLAINED. Peer-to-peer, or P2P in its abbreviated… | by XcelToken Plus | XcelLab Magazine | Med…

processing power, network bandwidth, or disk storage space. However, the most
common use case for peer-to-peer networks is the sharing of files on the internet.
Peer-to-peer networks are ideal for file sharing because they allow the computers
connected to them to receive files and send files simultaneously.

Example: you open your web browser and visit a website where you download a file. In
this case, the website works as a server, and your computer acts as a client receiving
the file. You can compare it to a one-way road: the file that you download is a car that
goes from point A (the website) to point B (your computer).

When you download the same file from a peer-to-peer network, using a BitTorrent
platform as a starting point, the download is performed differently. The file is
downloaded to your computer in bits and parts that come from many other computers
that also connected to the same P2P network and already have that file or at least parts
of it. At the same time, the file is also sent (uploaded) from your computer to other
devices that are asking for it. This situation is similar to a two-way road: the file is like
multiple small cars coming to your PC, while also leaving to others when it is
requested.

Source: Google.com

Why are peer-to-peer networks useful?

P2P networks have some characteristics that make them useful:


https://medium.com/xcellab-magazine/peer-to-peer-network-explained-c5038f6e8366#:~:text=Peer-to-peer%2C or P2P in its abbreviated form,they sh… 3/4
2/9/23, 3:03 AM PEER-TO-PEER NETWORK EXPLAINED. Peer-to-peer, or P2P in its abbreviated… | by XcelToken Plus | XcelLab Magazine | Med…

It’s hard to take them down. Even if one of the peers is shut down, the others are still
operating and communicating. For a P2P (peer-to-peer) network to stop working, you
have to close down all its peers.

Peer-to-peer networks are incredibly scalable. Adding new peers is easy as you don’t
need to do any central configuration on a central server.

When it comes to file-sharing, the larger a peer-to-peer network is, the faster it is.
Having the same file stored on many of the peers in a P2P network means that when
someone needs to download it, the file is downloaded from multiple locations
simultaneously.

Blockchain Peer To Peer Cryptocurrency Napster Blockchain Technology

Open in app Get unlimited access

Search Medium

https://medium.com/xcellab-magazine/peer-to-peer-network-explained-c5038f6e8366#:~:text=Peer-to-peer%2C or P2P in its abbreviated form,they sh… 4/4


2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

TRON Core Devs Follow

Mar 20, 2020 · 14 min read · Listen

Save

A Detailed Description of P2P Network Modules


1. Background
Blockchain nowadays can be sorted into three categories according to its access
mechanism: public chain, consortium blockchain, and private chain. Oftentimes,
blockchains are compared to ledgers, and their access mechanism can be understood
as the transparency of the ledgers. Among these, public chain has the most
transparency, meaning it’s more advanced in terms of decentralization and more in
line with TRON’s mission: Re-decentralize the web. Therefore, TRON has chosen public
chain as its platform, for public chain means that any organizations or individuals are
able to initiate or look up transactions as well as participate in the consensus
mechanism. It is a blockchain of transparency.

Decentralization is one of the essential attributes of a public blockchain. In order to get


rid of centralized control, a P2P network without a central server becomes the
favorable solution here. In a P2P network, all nodes have the same status — together,
they govern and maintain a public blockchain.

P2P network module is an underlying part of TRON’s architecture. This article will
provide a detailed illustration on how P2P is implemented in TRON’s network
including the rules of node discovery and of connection establishment.

2. Introduction
The public chain is governed by all nodes in a P2P network. Each node needs to seek
out the other peers in the network and choose trusted nodes to build a local routing
https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 1/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

table by discovering unknown nodes in the network. Once the table is established,
nodes will be able to use their own filtering rules as a defense mechanism and select
the reliable nodes to build connections.

3. Kademlia algorithm
To construct a blockchain system using P2P network, there are a couple of questions to
consider:

• How to build a topographic architecture for the network?

• How to look up specific nodes in a network?

• How to handle the dynamic changes of the nodes?

• How can we evaluate the credibility of the nodes?

Based on the above considerations, TRON chose Kademlia algorithm, which specifies
the logical structure of the routing table and conducts information exchange through
node discovery. The article will elucidate how TRON implement Kademlia, and the
above-mentioned questions will be answered as the article goes on.

3.1 Introduction
Kademlia is one of the many versions of DHT (Distributed Hash Table). Compared with
previous versions, Kademlia has many advantages such as:

• It reduces the number of messages required for nodes to communicate

• Reduce latency caused by parallel nodes and asynchronous queries

In summation, it makes communication more efficient.

The Kademlia network is characterized by three constants: alpha, 𝐵, and 𝑘. alpha


represents parallel numbers, which is usually 3; 𝐵 indicates the length of node ID in
binary bits; 𝑘​represents the capacity of the bucket. A bucket is a unique structure of
Kademlia, which will be described in the following paragraphs.

3.2 Nodes

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 2/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

A distributed P2P network consists of many nodes. In a Kademlia network, each node
has a unique ID generated by random encryption algorithm, replacing IP as the node’s
identifier. In addition, the distance between two nodes can be calculated by
performing XOR operation on two nodes, and that is how other nodes are located.

In the implementation, ​B = 512​, the length of the node ID is 512 bits (64 bytes).

Each node possesses the following properties:

Here some questions may rise: Why would there be nodes that do not really exist?
What is the meaning of this field?

A Kademlia network can be indicated with a binary tree. The height of the tree equals
the length of the node ID, and each leaf represents a Kademlia node. Thus, when B =
512​, the tree can host a maximum of ​2⁵¹¹ Kademlia nodes. In reality, the number of
nodes will not be tremendous. In order to look for other nodes, the algorithm will
generate an ID that complies with all rules (the said ID will be known as target). This
ID may not have a real node under it, but whether real or not, it serves as an important
aid in terms of expanding the routing table.

Details on expanding the routing table will be further explained below.

3.3 Distance
Kademlia calculates the distance between two nodes using the XOR operation.
“Distance” here refers to the logical distance computed using a mathematical method
rather than the physical distance (e.g. two nodes in China and the US are close in
distance in a Kademlia network if assigned similar IDs).
https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 3/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

Now, there are two node IDs, A and B. For ease of illustration, let’s assume the length
of them is 4 binary bits (0001 and 0010). The steps to compute the distance between the
two are as follows:

Perform ​A ⊕ B, and get the result: ​dis (dis = 0011​)

Subtract the number of consecutive 0s following the most significant bit from 4
(e.g. two consecutive 0s will make 4 -2 = 2 ​)

We can draw the following conclusion from the above calculation: the more bits match
at the beginning of the two IDs, the smaller is the distance between them (a node is
closest in distance to itself because the according output from XOR operation equals 0).

Computing the logical distance is meaningful. To give a real-world example: assume in


an office, A wants to have colleague M’s contact information and asks colleague B for
it, who he thinks is most likely to know M. Unfortunately, B doesn’t have M’s contact
info either, so he refers colleague C to A, who he thinks is most probable to know M. In
the end, A obtains the information he wants from colleague C.

We can draw an analogy between logical distance and interpersonal distance from the
above illustration. One thing to note is that A also obtains B and C’s information
alongside M’s, making three friends, B, C, and M.

In actual node discovery, the letters aforementioned each represent a node. M may be
non-existent, but it doesn’t matter as B and C must be real nodes. Upon completing a
node discovery, A obtains B and C’s information, and through which it expands its
routing table.

Kademlia adopts the XOR operation to calculate distance based on the following three
considerations:

the distance between a node and itself is zero

it is symmetric: the “distances” calculated from A to B and from B to A are the same

it follows the triangle inequality: given A, B and C are vertices (points) of a triangle,
then the distance from A to B is shorter than (or equal to) the sum of the distance
from A to C plus the distance from C to B. dist(A, C) ≤ dist(A, B) + dist(B, C)
https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 4/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

The above three features qualify the XOR operation as an easy and convenient method
to calculate the distance between nodes.

In the implementation, distance is computed as: 256 - number of consecutive 0s


following the most significant bit in two IDs’ output from XOR operation.

3.4 Routing Table


In the previous section, we exemplified the rule of node inquiry using an example of
interpersonal relationships. In the example, A ends up building his own network of
relationships, which, for a node, is its own routing table.

Essentially, building a routing table is creating a map of the overall network. According
to the aforementioned example, neighbor discovery is a process where nodes
constantly converge towards the target. Given a random target node X, the node N will
gradually move towards X by constantly obtaining information from nodes that are
closer to X. In this process, N’s routing table keeps on expanding even if X does not
exist.

The specific implementation of the Kademlia routing table can be adjusted based on
the actual situation. In our implementation, each node maintains a fixed-sized routing
table that consists of n lists. According to the Kademlia paper, these lists are named “k-
buckets”, with k referring to the maximum entries that can be stored in each list (e.g.
k=16).

In the implementation, for list m(​0 < m < 256), the distance between the local node
and all nodes stored in this list equals m; for nodes stored in list 0, the distance
between them and the local node is ​, and we have -256 ≤ dis ≤ 0

Based on the discussion above, bucket 0 seems more likely to be full as it needs to store
nodes covering a wider range, but the actual case is different. The reason for this will
be explained below.

In the implementation, information of nodes is stored in k bucket in the form of


NodeEntry.

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 5/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

For ease of illustration, we assume each node ID has three bits and there is a
maximum of 2³​ nodes, as shown in the figure below:

local node with ID=110 as an example. There are four nodes with 0 matched bit at the
beginning (001, which should be next to 010, is not shown in the figure), two with 1
matched bit and one with 2 matched bits.

This shows that with a randomly-generated ID, there is a much bigger chance that the
distance between the local node to any node on the network is greater rather than
smaller. If we denote the number of matched bits at the beginning as x, then the
probability is 2⁻ˣ⁻¹.

It can be inferred from the above binary tree that the greater the bucket’s number is,
the bigger the chance of a node falling into it and hence it’s more likely to be filled.
Considering the actual situation, each node maintains 256 buckets, among them,
buckets No. 1 to No. 255 store nodes with a distance of 1 to 255 respectively; bucket No.
0 stores nodes whose distance is no greater than zero other than itself.

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 6/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

Methods for addressing full buckets will be explained in “Node State” below.

The parameters of Kademlia can be customized based on actual needs. Current


parameters of Kademlia are as follows:

The neighbor discovery process is as follows:

• Randomly generate a target ID (this ID may not be assigned to a real node)

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 7/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

• Search its own routing table and obtain information from the node that is close to the
target. It will refresh its routing table if a node closer to the target is identified.

• Regenerate a target ID and repeat the above steps after entering the maximum
number of rounds.

Each node stores information from a fraction of nodes on the whole network. While
approaching the target, the local node obtains more information from other nodes
through constant neighbor discovery, thus expanding its routing table. To ensure the
availability of its neighboring network and the stable operation of the whole network
in a broader sense, each node chooses to store information from nodes with a longer
uptime in its routing table.

In the implementation, trusted seed nodes will be first included in the routing table
when they start as the guide to node discovery.

3.5 Protocol Messages


Protocol messages are used for node communication. If we see communication as
dialogues, then protocol messages can be compared to Q&A pairs in implementation.

There are four types of messages in node discovery:

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 8/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

For more information, please see Update Routing Table.

3.6 Node state


Protocol messages and node states are used to address the issue where node state
changes dynamically. In node discovery, a node entails the following states:

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 9/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 10/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

For more information, please see “Update Routing Table”.

3.7 Update Routing Table


Two ways to update the routing table: add a new node or replace the existing node with
a new one¹. Such a replacement can help maintain node activity in the routing table.
Each node communicates with its counterparts through protocol messages and
modifies node state based on the feedback it receives.

How is the routing table updated:

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 11/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

Read the preset seed node and ping it. If the seed node is alive (the node replies
with a pong message), add it to the routing table and set the state as active.

Solicit neighbors from nodes in the routing table.

Send a ping message to the newly-discovered node. If the node returns a pong
message, it is alive. Then set its status as active. Otherwise, set it as dead.

Try to add nodes that are alive into the routing table based on their distance (into
the corresponding k-bucket).

1. If the k-bucket is not full, add the node directly and set it as active.

2. If the bucket is full, find the node with the smallest modified value (modified
refers to the last time the node pinged successfully. The smaller the modified
value, the less likely the node is active) and challenge it. Then change the state of
the challenged node from active to evictcandidate.

Send ping messages to evictcandidate nodes.

1. If the evictcandidate node returns a pong message, it is alive. Then reset its state as
active and change the modified value to the current time; make no changes to
nodes that are alive.

2. If the evictcandidate node does not return a pong message, it is offline. Then set its
state as nonactive and remove it from the routing table; add nodes that are alive
into the routing table and change their state to active.

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 12/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

According to the above steps, new nodes will join only when there are offline nodes in
the routing table.

That is the whole procedure for node discovery.

4. Build Connection
Since each node only has a limited number of slots for connection, a scoring system is
introduced to rate and rank nodes in the routing table in order to help connect high-
quality nodes. Whether a node is categorized as “High-quality” is determined based on
many metrics including connection stability and value of the information stored by
other nodes.

4.1 Node Score


Node score is intended to help locate relatively stable nodes and build connections
with them. A higher score suggests greater stability. Here are the score metrics:

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 13/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

Penalty will be first considered when scoring a node. A node can be penalized for the
following reasons:

It has not been 60 seconds since the last time the node was disconnected.

P2P version, port or other information of the nodes do not match.

Block information of the nodes do not match (such as genesis block or solidity
blocks)

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 14/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

Here handshake is not the 3-way TCP handshake. It refers to the process during which
the node verifies whether the node it has built connection with is on the same chain.

4.2 Node Filtering


Node filtering examines how reliable the node to be connected is, such as whether the
connection is stable and whether it is a malicious node.

When selecting nodes for connection, nodes pre-declared in configuration files will be
first considered.

These are two types of trusted nodes. It should be noted that scoring is only one of the
filtering rules. While trusted notes can skip scoring and be first considered to build
connection with, they still need to meet other filtering criteria to qualify for
connection.

The node filtering process is as follows:

Determine if the node to be connected is itself

Determine if the local connection limit is reached (can be specified in


configuration files)

Determine if the connection is already established.

Determine if connections from the same IP have reached the limit, including
connections sent to the same IP. The purpose is to fend off attacks.

Choose the highest-graded node according to the scoring rule.

When passively accepting connections from other nodes, there is no need to


determine if the connection comes from the node itself. If an identical request is

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 15/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

received, the newly-built connection will be discarded to retain the original


connection.

4.2.2 Filtering rules and eclipse attack


Eclipse attack is an attack targeted at P2P networks. Since a node can only keep a
limited number of TCP connections, if the attacker hijacks all available connections,
the victim will lose access to true information as it only receives information (usually
malicious) from the attacker rather than normal nodes.

A blockchain node no longer functions upon receiving a large amount of false


information. An excess of victim nodes will compromise the entire blockchain
network.

After taking such risk into consideration, we have taken some counter-measures in
implementation:

Among the fixed peak number of connections, some of them must be initiated by
the node itself (instead of passively accepting all connections).

A node can build a maximum of two connections with the same IP.

Starting multiple nodes on one device will be deemed an attack. That’s why there is a
limit to the number of connections with the same IP. Meanwhile, as a node is started, it
will first connect the preset trusted nodes (proactively build connections with active
nodes and give priority to connection requests from passive nodes). Node filtering
makes it harder for attackers to get their way.

4.3 Handshake
Handshake happens after TCP connection with other nodes is built and before sync
starts. The purpose is to determine if the nodes share the same block information.
There is no use interacting with a node storing different block information.

Both parties in the handshake will send HelloMessage to each other, which includes
the following information:

Basic node information

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 16/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

Current time

Genesis block ID

Solidity node ID

Block header ID

The connection will be cut off when the two parties verify their HelloMessage in the
following cases:

Different P2P versions

Different genesis block

Local solidity nodes have a larger block height than the other party and the solidity
nodes of the other party are not recorded on the local blockchain.

A successful handshake marks the completion of nodes connection.

5 Concluding Remarks
This article introduces TRON’s P2P network. Co-governance of a distributed P2P
network lays the foundation for decentralization, an important feature of blockchain.
A thorough understanding of the P2P network, the cornerstone of blockchain, takes us
to the world of blockchain faster.

6 References
https://pdos.csail.mit.edu/~petar/papers/maymounkov-kademlia-lncs.pdf

7 For more information


Github: https://github.com/tronprotocol

Telegram: https://t.me/troncoredevscommunity

[1] The extent to which a node is new or old is determined by its modified value. When
a ping is sent to an existing node in the routing table and a pong is returned
successfully, the modified value of the node will be changed to the time when pong is

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 17/18
2/9/23, 3:27 AM A Detailed Description of P2P Network Modules | by TRON Core Devs | Medium

received (in the form of a timestamp). The larger the modified value, the newer the
node.

Tron Kademlia P2P Blockchain


Open in app Get unlimited access

Search Medium

https://coredevs.medium.com/a-detailed-description-of-p2p-network-modules-ff8f03ebda20 18/18
2/9/23, 3:38 AM What is Blockchain Mining and who is a Blockchain Miner? - Intellipaat

Courses

Free Courses Interview Questions Tutorials Community

Home / Tutorial / What is Blockchain Mining?

What is Blockchain Mining?


By Roshan Raj 3 K Views 21  min read Updated on January 3, 2023

In this part of the Blockchain tutorial, we shall focus on Blockchain mining. We will understand its complete definition,
importance, and where it is used, inception story, types of bitcoin mining, how you can mine bitcoins, and various processes that
are centered around mining bitcoins. Read on!

Become a Certified Professional

Blockchain Tutorial
For Beginners

Blockchain

What is Blockchain?

Blockchain Currency -
Cryptocurrency

How does Blockchain


work?

Ethereum and Smart


Contracts

Blockchain Wallet

Blockchain Explorer

What is Blockchain
Database - Difference
between Blockchain and
Relational database

Understanding
Blockchain Forks

What is Bitcoin
Blockchain?

What is Blockchain
Mining?

https://intellipaat.com/blog/tutorial/blockchain-tutorial/what-is-bitcoin-mining/ 1/7
2/9/23, 3:38 AM What is Blockchain Mining and who is a Blockchain Miner? - Intellipaat

What is Bitcoin?

Hyperledger

What is Ripple
Download Salary
Blockchain? Trends
Email Address Phone Number Submit
Learn how professionals like you got upto 100% hike!
What is EOS Blockchain?

Use Cases of
Blockchains

Hyperledger Blockchain

Blockchain Applications

Ethereum Cheat Sheet

Blockchain Cheat Sheet

Solidity Cheat Sheet

What exactly is Blockchain mining?


A peer-to-peer computer process, Blockchain mining is used to secure and verify bitcoin transactions. Mining involves
Blockchain miners who add bitcoin transaction data to Bitcoin’s global public ledger of past transactions. In the ledgers,
blocks are secured by Blockchain miners and are connected to each other forming a chain.
When we talk in-depth, as opposed to traditional financial services systems, Bitcoins have no central clearinghouse. Bitcoin
transactions are generally verified in decentralized clearing systems wherein people contribute computing resources to
verify the same. This process of verifying transactions is called mining. It is probably referred to as mining as it is analogous
to mining of commodities like gold—mining gold requires a lot of effort and resources, but then there is a limited supply of
gold; hence, the amount of gold that is mined every year remains roughly the same. In the same manner, a lot of
computing power is consumed in the process of mining bitcoins. The number of bitcoins that are generated from mining
dwindles over time. In the words of Satoshi Nakamoto, there is only a limited supply of bitcoins. Only 21 million bitcoins will
ever be created.

At its core, the term ‘Blockchain mining’ is used to describe the process of adding transaction records to the bitcoin blockch
ain. This process of adding blocks to the Blockchain is how transactions are processed and how money moves around
securely on Bitcoins. This process of Blockchain mining is performed by a community of people around the world called
‘Blockchain miners.’
Anyone can apply to become a Blockchain miner. These Blockchain miners install and run a special Blockchain mining
software that enables their computers to communicate securely with one another. Once a computer installs the software,
joins the network, and begins mining bitcoins, it becomes what is called a ‘node.’ Together, all these nodes communicate

https://intellipaat.com/blog/tutorial/blockchain-tutorial/what-is-bitcoin-mining/ 2/7
2/9/23, 3:38 AM What is Blockchain Mining and who is a Blockchain Miner? - Intellipaat

with one another and process transactions to add new blocks to the blockchain which is commonly known as the bitcoin
network. This bitcoin network runs throughout the day. It processes equivalent to millions of dollars in bitcoin transactions
and has never been hacked or experienced downtime since its launch in 2009.

Get a better understanding of Blockchain mining by enrolling in Blockchain Courses in Bangalore.

Types of Mining
The process of mining can get really complex and a regular desktop or PC cannot cut it. Hence, it requires a unique set of
hardware and software that works well for the user. It helps to have a custom set specific to mining certain blocks.

The mining process undertaking can be divided into three categories:

1. Individual Mining
When mining is done by an individual, user registration as a miner is necessary. As soon as a transaction takes place, a
mathematical problem is given to all the single users in the blockchain network to solve. The first one to solve it gets
rewarded.

Once the solution is found, all the other miners in the blockchain network will validate the decrypted value and then add it
to the blockchain. Thus, verifying the transaction.

2. Pool Mining
In pool mining, a group of users works together to approve the transaction. Sometimes, the complexity of the data
encrypted in the blocks makes it difficult for a user to decrypt the encoded data alone. So, a group of miners works as a
team to solve it. After the validation of the result, the reward is then split between all users.

3. Cloud Mining
Cloud mining eliminates the need for computer hardware and software. It’s a hassle-free method to extract blocks. With
cloud mining, handling all the machinery, order timings, or selling profits is no longer a constant worry.

While it is hassle-free, it has its own set of disadvantages. The operational functionality is limited with the limitations on
bitcoin hashing. The operational expenses increase as the reward profits are low. Software upgrades are restricted and so
is the verification process.

Get 100% Hike!


Master Most in Demand Skills Now !

Email Address Phone Number

Submit

Curious to know the Blockchain Interview Questions and Answers for 2023?

https://intellipaat.com/blog/tutorial/blockchain-tutorial/what-is-bitcoin-mining/ 3/7
2/9/23, 3:38 AM What is Blockchain Mining and who is a Blockchain Miner? - Intellipaat

How can you mine bitcoins?

You can buy and trade for bitcoins, or you can mine them. For mining bitcoins, users are rewarded in bitcoins. This
mechanism forms the pivot around which the bitcoin economy revolves. While the cost and difficulty of mining bitcoins
individually continue to increase, several cloud-based mining services have gradually emerged. These services allow
individual users to lease the processing power of mining equipment and mine bitcoins remotely. However, you can mine
bitcoins in person too.
Read more: Check out our blog on Blockchain developer salary!

Mining Bitcoins in Cloud


Obtain a bitcoin wallet: Bitcoins are stored in digital wallets in an encrypted manner. This will keep your bitcoins safe.
Secure the wallet: Since there is no ownership of bitcoins, anyone who gains access to your blockchain wallet can use it
without any restriction. So, enable two-factor authentication and store the wallet on a computer that does not have
access to the Internet or store it on an external device.
Choose a cloud mining service provider: Cloud mining service providers allow users to rent processing or hashing
power to mine bitcoins remotely. Popular cloud mining service providers are Genesis Mining and HashFlare.
Choose a cloud mining package: To choose a package, you will need to decide on how much you are willing to pay and
keep your eyes open to the hashing power the package will offer. Cloud mining companies will mostly envisage the
Return on Investment (ROI) based on the current market value of Bitcoins.
Pick a mining pool: This is the best shot you can get to earn bitcoins easily. There are many mining pools which charge
a mere 2 percent of your total earnings. Over here, you will have to create workers which are basically subaccounts that
can be used to track your contributions to the pool.
Put your earnings in your own secure wallet: Whenever you witness an ROI, simply withdraw your earnings and put
them in your own secure wallet.

Mining Bitcoins on your own


Purchase custom mining hardware: You need to purchase an Application-specific Integrated Circuit (ASIC) miner to
mine bitcoins. While purchasing an ASIC Blockchain miner, you should consider its efficacy in hashing power and take
note of its pricing policies.
Purchase a power supply: Blockchain miners consume a lot of power. So, get a dependable power supply that is
compatible with the ASIC miner that you purchase.
Obtain a bitcoin wallet: Bitcoins are stored in digital wallets in an encrypted manner. This will keep your bitcoins safe.
Secure the wallet: Since there is no ownership on bitcoins, anyone who gains access to your wallet can use it without
any restriction. So, enable two-factor authentication and store the wallet on a computer that does not have access to
the Internet or store it in an external device.

https://intellipaat.com/blog/tutorial/blockchain-tutorial/what-is-bitcoin-mining/ 4/7
2/9/23, 3:38 AM What is Blockchain Mining and who is a Blockchain Miner? - Intellipaat

Pick a mining pool: This is the best shot you can get to earn bitcoins easily. There are many mining pools that charge a
mere 2 percent of your total earnings. Over here, you will have to create workers which are basically subaccounts that
can be used to track your contributions to the pool.
Connect the power supply to the ASIC Blockchain miner.
Connect the ASIC Blockchain miner to your router.
Boot up your ASIC miner.
Enter your router’s IP address in a web browser.
Find ‘connected devices in the router miner page.
Find your ASIC miner and click on it to display the device information.
Copy and paste the IP address of your ASIC miner into your web browser.
Log in to the ASIC miner with the default username and password that are ‘Root’ and ‘Root.’
Select ‘Miner Configuration’ to set up the miner according to your preferences.
Enter the URL, username, and password for your mining pool on the Miner Configuration page of the ASIC Miner.
Click ‘Save and Apply’ to save your credentials for future use.
Start mining and in periodic intervals check your profitability.
Put your earnings in your own secure wallet: Whenever you witness an ROI, simply withdraw your earnings and put
them in your own secure wallet.

Career Transition

Also Read: Best Ethereum Wallets of 2023 to manage your ETH

Uses of Blockchain Mining

1. Validating Transactions
Bitcoin transactions take place in huge figures every day. Cryptocurrencies function without a central administrator and the
insecurity can be substantial with the transactions that transpire. So, what is the authentication method with such
cryptocurrencies? With each transaction, new blocks are added to the blockchain in the network and the validation lies in
the mining results from the blockchain miners.

2. Confirming Transactions
Miners work the blockchain mining process to confirm whether the transaction is authentic or not. All confirmed
transactions are then included in the blockchain.

3. Securing Network
To secure the transaction network, bitcoin miners work together. With more users mining the blockchain, blockchain
network security increases. Network security ensures that there are no fraudulent activities happening with
cryptocurrencies.

Sounds interesting? You can check the offers for an online Blockchain training course or get back to other topics in this Bloc
kchain online tutorial.

Now that we have shared with you how to mine bitcoins, why don’t you give it a shot?

Happy Mining, Fellas!

https://intellipaat.com/blog/tutorial/blockchain-tutorial/what-is-bitcoin-mining/ 5/7
2/9/23, 3:38 AM What is Blockchain Mining and who is a Blockchain Miner? - Intellipaat

Previous Next

Course Schedule

Name Date Details

11 Feb 2023
AWS Certification View Details
(Sat-Sun) Weekend Batch

18 Feb 2023
AWS Certification View Details
(Sat-Sun) Weekend Batch

25 Feb 2023
AWS Certification View Details
(Sat-Sun) Weekend Batch

2 thoughts on “What is Blockchain Mining?”

Good article. Helped me in understanding how blockchain works JUNE 26, 2021 AT 6:08 PM

Reply

Mitli says:

Very nice app JULY 28, 2021 AT 2:47 PM

Reply

Usman says:

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment

Name * Email *

Post Comment

https://intellipaat.com/blog/tutorial/blockchain-tutorial/what-is-bitcoin-mining/ 6/7
2/9/23, 3:38 AM What is Blockchain Mining and who is a Blockchain Miner? - Intellipaat

Browse Categories

Master Program Big Data Data Science Business Intelligence Salesforce Cloud Computing

Mobile Development Digital Marketing Database Programming Testing Project Management

Website Development

Find Blockchain Training in Other Regions

Bangalore Charlotte Chennai Chicago New Delhi Gurgaon Houston Hyderabad Kolkata London

Melbourne Mumbai New York Noida Pune San Jose Sydney Toronto Dubai Jersey City Los Angeles San

Francisco Kerala Singapore

MEDIA CONTACT US TUTORIALS COMMUNITY INTERVIEW QUESTIONS

© Copyright 2011 - 2023 Intellipaat Software Solutions Pvt. Ltd.

https://intellipaat.com/blog/tutorial/blockchain-tutorial/what-is-bitcoin-mining/ 7/7
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

Published in The Startup

Kirill Eremenko Follow

May 4, 2018 · 11 min read · Listen

Save

How does Bitcoin / Blockchain Mining work?


From logistics to healthcare, from social media to real estate, from the energy sector to
the global economy — Blockchain is predicted to transform almost every single
industry in the next ten years. Often described as even more revolutionary than
Artificial Intelligence, this technology is entering our lives at mind-blowing rates.

While inspiring overall, this extreme pace also comes with a negative side: it means
that education simply cannot keep up. The absence of quality training programs
around blockchain means that many people will either miss out on opportunities in
this new and exciting field, or even worse — will make premature career choices based
on an erroneous understanding of what is possible and what isn’t.

There are lots of concepts that allow Blockchain-powered projects and ideas to exist. It
would take a whole online course to cover all of these topics (see end of this post for more
details). That’s why today we are going to laser-in on just one concept. For this article
I’ve picked perhaps the most used and, at the same time, most misunderstood topic:
Mining.

We’ve all heard about Bitcoin mining and miners. We’ve probably even used these
terms. But what exactly do these miners do? What is mining all about? Those are the
question we will be answering today and we will do this in three parts:

Part 1: What’s a cryptographic hash?


https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 1/14
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

Part 2: The cryptographic puzzle

Part 3: Block configuration

Note: We’re going to look at the example of Bitcoin. Other cryptocurrencies such as Ethereum
may use different ideas (e.g. a different type of hash function) and therefore the specifics will
vary, however the underlying concepts remain the same.

Part 1: What’s a cryptographic hash?


You may have already heard that a blockchain is a series of successive block
cryptographically linked together:

But what does this mean and how is this connected to mining? Let’s have a closer look.

An individual block in a blockchain contains the following elements: block number,


data stored in the block, hash of the previous block and hash of the current block.

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 2/14
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

A hash (or cryptographic hash) is a long number which acts as a digital fingerprint of
any collection of data. In Bitcoin the SHA256 hashing function is used which generates
a 64-digit hexadecimal number. For example, the cryptographic hash of the words in
this paragraph is:

C019286295F2CDEC9958BEE25B9603B5F94C76B2CCC69A59CE54872ED26DC479

Note: in the images here hashes are shortened for illustration purposes.

Hashing algorithms have many interesting properties, however today we are most
interested in three: 1) the SHA256 function is deterministic — you will always get the
same hash output if you recalculate the function with the same input; 2) the SHA256
function is impossible to reverse-engineer. Meaning that you can never know in
advance what hash value you will get until you actually calculate it; and 3) if you feed
the SHA256 function two even slightly varying inputs (for example, you change a dot
for a comma), you will get wildly different outputs.

From our example above, we would input the current block’s number, the data stored
in the block and the hash of the previous block into the SHA256 function to get the
value of the current block’s hash:

SHA256(Block Number, Data, Previous Block’s Hash) -> Hash

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 3/14
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

Now we can see how the blocks are linked — not only does each block reference the
previous block’s cryptographic hash — but, in fact, that hash directly affects the value
of the current block’s hash. Therefore, if anyone were to tamper with any given block’s
data, such action would render not only that specific block’s hash invalid — but also all
of the following blocks’ hashes invalid.

Such connection between blocks means that the Blockchain as a whole is much more
tamper-proof than standard database structures and other record-keeping methods.
And since a Blockchain is in essence a ledger of records, this tamper-proof property is
known as the “Immutable Ledger” property.

Okay, great. That’s how blockchains work. But what has this got to do with mining? The
straightforward answer is that mining is all about calculating the hash value for the
newest block which is being added to the chain. However, it’s not all that simple.

The thing is that the SHA256 function only takes a fraction of a second to calculate.
And yet, you may have heard of the numerous mining pools such as BTC.com and
AntPool, and even industrial scale mines — all competing to generate the next Bitcoin
block. So the question is — why do we need all that computing power?

Part 2: The Cryptographic Puzzle


This is where start adding layers of complexity. Buckle up!

Blocks in the blockchain have another field which we have not spoke about yet. This
field is called “The Nonce” which stands for number used only once:
https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 4/14
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

The Nonce is an integer number and along with the Block Number, Data and Previous
hash the Nonce serves as an input for the SHA256 function to calculate the current
block’s hash:

SHA256(Block Number, Nonce, Data, Previous Block’s Hash) -> Hash

Unlike other components of a block, the Nonce is designed to be totally under our
control. This means that now we have a mechanism to vary the current block’s hash
while keeping the data inside it intact. Indeed, thanks to the nature of the hash
function (property #3 in our discussion above), every time we select a new Nonce for the
same block the resulting hash will be a different value.

Alright, that’s great. But what has any of this got to do with mining? This is where we
come to the fun stuff.

There is a total of 16⁶⁴ possible SHA256 cryptographic hash values (each hexadecimal
digit has 16 possible values and there are 64 of them in a hash). However, not all of
them are valid hashes. Why is that? Well, every two weeks the Bitcoin network will
define a minimal target for the hash. Anything above this target will be rejected,
anything below — accepted.

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 5/14
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

The diagram above illustrates the pool (not to be confused with ‘mining pool’) of all
possible SHA256 hashes — starting at the bottom with smallest and increasing towards
the largest at the top. Somewhere along the vertical we have the target. Note that this
diagram is for illustrative purposes only as it is not proportionate — we’ll see why in a
bit.

At the time of writing the target is:

0000000000000000005d97dc0000000000000000000000000000000000000000

What is really important in the target is the number of leading zeroes. Just like in the
decimal system, leading zeros in a fixed-size number will determine its magnitude.
Every leading zero reduces the number’s magnitude by a factor of 16 (ten in the
decimal system, but here we’re working with hexadecimals).

There are 18 leading zeros in the current target, meaning that the number of total valid
hashes is 16⁴⁶ (only 64-18=46 non-zero digits remain). Therefore, the probability that a
randomly picked hash is valid can be calculated as:

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 6/14
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

16⁴⁶ / 16⁶⁴ = 16^(-18) = 0.00000000000000000002%

In Bitcoin mining terms, this is the probability that any given Nonce value will
generate a valid hash for the current block. We can now see why the diagram is out of
proportion: the pool of valid hashes in reality is extremely small in comparison to the
complete SHA256 pool.

And that’s what the cryptographic puzzle is all about: miners compete to find a Nonce
(also called a Golden Nonce) which will generate a valid hash for the upcoming block.
Whoever finds it first is allowed to add the block to the chain and get’s their reward of
12.5 Bitcoins. At the time of writing one Bitcoin is worth around $10,000 USD making
mining a rather worthwhile activity.

How to read this diagram: the red ‘X’ marks relate to SHA256 hashes while the labels beside
them illustrate which Nonce generated which hash value.

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 7/14
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

The target is defined based on the network’s hashrate (aggregate computational power
of all Bitcoin miners). The more miners join the network — the lower the target will be,
and therefore the harder it will be to find a suitable hash. The goal of this difficulty
algorithm is to ensure that only one new block to is added every 10 minutes. This is part
of the Bitcoin monetary policy to control the total number of coins in circulation.

In a nutshell, that’s what the millions and millions of mining machines are doing day
and night — they are simply iterating different values of the Nonce in hopes of being
the first to find a valid hash for the next block. Once a valid hash if found, the block is
added to the chain and the race starts over again, this time for the next block.

Part 3: Block configuration


Just when you thought we were done… There’s more.

The Nonce is an integer value with 32 bits of memory allocated to it. Meaning that it
has a limited range of around 4 Billion values. This poses two problems:

First, even an average mining device can calculate up to 100 million hashes per
second, and therefore will go through the Nonce range in 40 seconds. And that’s an
average miner. Mining pools and industrial scale mines are able to go through the
Nonce range in fractions of a second.

Secondly, the chance of finding a valid hash is so small that even with 4 billion tries the
probability of success is still extremely low:

4 * 10⁹ * 0.0000000002% = 0.0000000001%

So what’s the solution?

For starters, the block contains… you guessed it — another field which we haven’t
spoken about yet. This field is a timestamp representing the current Unix time
(number of seconds elapsed since 1st January 1970):

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 8/14
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

The Timestamp is also included in the SHA256 calculation for the hash of the current
block that’s being mined:

SHA256(Block Number, Timestamp, Nonce, Data, Prev. Block’s Hash) -> Hash

And since the timestamp is constantly refreshing (until the block is successfully
mined), this effectively resets the Nonce range every second. Why? Well, as we
discussed at the very start — even if the inputs of the SHA256 function are varied
slightly, this causes the hash to change.

Therefore, if we try all 4 Billion Nonce values for a fixed combination of other inputs
(block number, timestamp, data, previous block’s hash) but have no luck finding a
valid hash, all we have to do is wait until the the timestamp increases. A change in the
timestamp will mean that the combination is now different and if we try all 4 Billion
Nonce values again, every time we will get a brand new hash value.

The timestamp solves the problem for the average miner since it will reset before they
get to the end of the Nonce range (reminder: average miner takes 40 seconds to do 4 Billion
passes). However, for a mining pool or industrial scale miner even one second is too long
— as we discussed, they would get through the Nonce range in fractions of a second. So
how do they solve the problem? This is where block transaction configuration comes
in.

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 9/14
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

Participants of the Bitcoin network transact with each other all the time. However, a
new block is only added once every ten minutes. So where do the transactions go
before they are added to a block? New entries are added to a staging area called the
mempool. It is then the miners’ job to pick up a batch of these transactions from the
mempool and add them to the new block they are mining.

Block size is limited and not all transactions from the mempool will fit into the new
block. This means that miners get to pick which transactions will go into the next
block. What this also means is that miners can change the configuration of
transactions at will (before the block has been successfully mined).

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 10/14
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

And this is how miners get additional control over the hash. Well… Control isn’t the
right word since the hash cannot be reverse engineered or predicted. Variability is a
better term here: changing the configuration of transactions creates additional
variability in the hash function inputs.

Similar to the timestamp situation, whenever we try out all 4 Billion possible values in
the Nonce range and have no luck, all we have to do is slightly alter the combination of
transactions which we have selected from the mempool.

The main difference here is that we don’t have to wait. By altering the selected
transactions, we can reset our Nonce range at will — therefore we can do this as many
times per second as we want. Of course, all this is done algorithmically. This way even
mining pools and industrial scale miners can test new hash values continuously without
any idle time.

Let’s sum up
We’ve covered a lot of ground. Let’s recap the Bitcoin / Blockchain mining process to
ensure we haven’t missed anything:

1. A hash is a digital fingerprint of any collection of data. Blocks in a blockchain are


cryptographically linked because each one includes the preceding block’s hash in the
https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 11/14
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

calculation of its own hash. Tampering with data in any one block will render its and
all following blocks’ hashes invalid.

2. The cryptographic puzzle requires miners to find a hash smaller than the set target
for it to be valid. Miners search for a valid hash by iterating through a designated
parameter within the block called the Nonce. Whoever is first to find a valid hash gets
to add the block and collect the reward.

3. The Nonce range contains 4 Billion possible values which is insufficient to find a
valid hash with a high degree of certainty. Resetting of the Nonce range is achieved by
including the current timestamp and through varying the configuration of transactions
included in the the block.

Join us
In March this year we successfully funded a Kickstarter project to create the most
comprehensive online course on blockchain the World has ever seen.

Today this course is Live on Udemy.com where over 3,000 students have already signed
up to master the concepts of Blockchain, Bitcoin, Smart Contracts and more. If you’d

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 12/14
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

like to become a Blockchain pioneer, then join us on this incredible adventure and take
your career to the next level:

https://www.udemy.com/build-your-blockchain-az/?couponCode=MEDIUM90

The link above already includes a special coupon for our Medium readers. Use it to get
90% OFF.

See you inside!

Kirill Eremenko

This story is published in The Startup, Medium’s largest entrepreneurship publication followed
by 320,924+ people.

Subscribe to receive our top stories here.

Blockchain

2.2K 2

Sign up for Top 5 Stories


By The Startup

Get smarter at building your thing. Join 176,621+ others who receive The Startup's top 5 stories, tools, ideas, books —
delivered straight into your inbox, once a week. Take a look.

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 13/14
2/9/23, 3:41 AM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

Emails will be sent to [email protected]. Not you?

Get this newsletter


Open in app Get unlimited access

Search Medium

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 14/14
2/9/23, 3:31 AM What is Bitcoin mining, and how does it work? | @blockchain

Published in @blockchain

Blockchain.com Follow

Dec 16, 2022 · 8 min read · Listen

Save

Bitcoin Mining, Explained


What is Bitcoin mining, and how does it work?

Many people new to crypto wonder:

How do new bitcoins (BTC) come into existence?

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 1/11
2/9/23, 3:31 AM What is Bitcoin mining, and how does it work? | @blockchain

How do bitcoins move from place to place?

What makes Bitcoin secure?

What if we told you the answer to all three questions was the same: Bitcoin mining.

Mining is an essential, but often misunderstood concept in cryptocurrency.

This article covers:

What Bitcoin mining is and how it works

The environmental impacts of mining

What the future may hold for Bitcoin mining

If you’re new to Bitcoin, you’ll want to read our article “Bitcoin, Explained” first to get a
better understanding of the original cryptocurrency.

What is bitcoin mining?

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 2/11
2/9/23, 3:31 AM What is Bitcoin mining, and how does it work? | @blockchain

The bitcoin network is a blockchain, a linked series of data “blocks” with each block
containing a set of bitcoin transactions. All over the world, thousands of Bitcoin
miners race to be the first to complete a complex cryptographic “puzzle” using
specialized computer equipment.

The math problems the miners solve during each puzzle period (or “block”) enable the
release of new bitcoins and the confirmation of transactions on the network.

Every time a miner successfully verifies a block of bitcoin transactions, they’re


rewarded with a certain amount of bitcoin, an incentive for miners to do their work
and keep the bitcoin network secure.

Once a transaction is validated by a Bitcoin miner, the block is added to the


blockchain, and the update is processed across the network. This process takes place
about every ten minutes.

In short, mining is how:

new bitcoin comes into existence

transactions happen on Bitcoin’s proof of work blockchain

the network stays secure

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 3/11
2/9/23, 3:31 AM What is Bitcoin mining, and how does it work? | @blockchain

Here’s how the process works in more detail:

1. When a new transaction is made on the Bitcoin network, it is broadcast to all nodes
in the network.

2. These nodes then race to validate the transaction by solving a complex


computational puzzle. The first node to solve the puzzle adds the transaction to the
blockchain and broadcasts the solution to the rest of the network.

3. Other nodes in the network check the solution to verify that it is correct. If it is,
they add the transaction to their own copy of the blockchain and move on to the
next puzzle.

4. As a reward for their efforts, the miner who solved the puzzle is awarded a certain
number of bitcoins. This helps to incentivize miners to contribute their
computational power to the network.

5. The difficulty of the puzzles is adjusted over time to ensure that it takes an average
of about 10 minutes to add a new block of transactions to the blockchain. This
helps keep the rate at which new bitcoins are created steady and makes it more
difficult for attackers to manipulate the network.

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 4/11
2/9/23, 3:31 AM What is Bitcoin mining, and how does it work? | @blockchain

What is a bitcoin miner?


Miners are computers, and they are almost always an ASIC miner.

ASIC stands for Application-Specific Integrated Circuit, and while there are a variety of
ASICs created for different purposes, these are made just to mine bitcoin.

While standard consumer devices like CPUs and GPUs were used in the past to mine
bitcoin, those systems don’t offer the computational power needed to solve the hashing
puzzle at the current level of mining difficulty.

Miners on the Bitcoin blockchain earn bitcoin in two ways:

Block rewards. When a miner is the first to solve the validation riddle, they earn
BTC and add the next block of data to the chain.

Transaction fees. In return for validating a transaction, miners earn a percentage


of the network fee.

Page not available


This content is not available in your
country.

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 5/11
2/9/23, 3:31 AM What is Bitcoin mining, and how does it work? | @blockchain

Listen to the full podcast with Jaime Leverton, CEO of Hut 8 Mining

Bitcoin mining creates new bitcoins


There will only ever be 21 million bitcoins in existence.

The final bitcoin is expected to be mined in 2140, and this scarcity is where the
comparison to gold comes from. Once the last bitcoin is mined, that’s all there will
ever be, making bitcoin a deflationary asset.

The very first Bitcoin miners received 50 BTC as a block reward. However, the next
halving will be in 2024, further reducing the block reward to 3.125 BTC.

As you can imagine, Bitcoin mining has become big business. There are mining
“farms,” also known as hashing facilities, all over the world, and a quick online image
search will show the scale of these operations.

Gone are the days of a single Bitcoin user mining on their PC; computational power is
king, and more is better when it comes to processing transactions, winning the block
reward, and securing the blockchain.

Mining pools offer an alternative for regular users to participate in mining, without
needing to purchase warehouses full of ASIC mining rigs. In a mining pool, individual
miners lend their computing power to a mining farm through a shared server.

In exchange for their computing power, miners in the pool receive a proportional
share of the block reward when their pool solves the hash.

Bitcoin mining secures the blockchain


The Bitcoin blockchain is an open-source, decentralized ledger; essentially, a record
book of all the transactions that have occurred on the blockchain. When a new block is
added to the chain, all of the nodes receive the new copy of the blockchain.

These transactions are validated using a Proof of Work consensus mechanism,


meaning all of the nodes on the blockchain have competed to solve a puzzle, then
agreed that the transaction details are correct.

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 6/11
2/9/23, 3:31 AM What is Bitcoin mining, and how does it work? | @blockchain

This is how the Bitcoin blockchain is secured. If a hacker tries to manipulate the
blockchain, the data they try to enter into the ledger won’t match up with the data that
other nodes have, flagging it as a fraud.

Even if a hacker had enough computing power to go back far enough in the blockchain
to rewrite a transaction, it would be so costly and time consuming that it likely
wouldn’t be profitable.

This type of attack is called a 51% attack, and it would cost billions of dollars to
attempt. Even if successful, an attack of this type would essentially destroy the
blockchain by eroding the trust in the ledger, and the price of bitcoin would likely fall
to zero, making the entire thing pointless.

This is the superpower of the Proof of Work consensus mechanism–it takes a lot of
time, money and energy to validate transactions, and this work is self-protecting since
it’s almost impossible to undo.

The security of the blockchain increases as more miners join the network, since more
transactions can be processed and there are more nodes available to share greater
consensus.

The more transactions that are processed and validated, the larger the amount of data
that a criminal would have to “rewind” to hack the network.

Bitcoin mining and energy use


There’s been a lot of controversy over the energy usage of cryptocurrency in general,
and a lot of that has been directed at mining in particular.

Concerns about e-waste from mining equipment and of excess electricity


consumption, and the fossil fuels that create that electricity, have generated intense
debate around this topic.

At the time of this writing (November 2022), Bitcoin operations expend just over 100
Terawatt hours (TWh) of energy each year. As a point of reference, that’s about the
same amount of energy that is required to power all of the refrigerators in the United
States.

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 7/11
2/9/23, 3:31 AM What is Bitcoin mining, and how does it work? | @blockchain

For a global comparison, air conditioning alone uses 2,199 TWh per year.

The need for greater computing power, and the hefty price tag that comes with the
equipment and electricity needed to run these operations, has resulted in innovative
expansions into crypto mining.

For example, many mining operations have moved to countries with an abundance of
electricity, such as Canada and Iceland, that would otherwise go unused.

The oil and gas industry has become involved in mining, since they often have power
that would be wasted, and the cryptocurrency mining industry gets more than half of
its power from sustainable energy sources.

In this way, miners could potentially make the power grid more efficient by harnessing
non-traditional energy sources.

Many critics ask why Bitcoin doesn’t just move to a more energy efficient consensus
mechanism like Proof of Stake. This is a complex question, but in short, Proof of Work
has some distinct advantages over Proof of Stake with regard to the purpose of bitcoin.

BTC is a store of value and part of what maintains this value is the difficulty in creating
new bitcoins and the inability of malicious actors to hack or even game the system in
an effort to monopolize control of the currency.

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 8/11
2/9/23, 3:31 AM What is Bitcoin mining, and how does it work? | @blockchain

The Proof of Work consensus mechanism provides unique benefits in this regard,
making it optimal for a cryptocurrency like bitcoin that could be a long-term store of
value.

The future of Bitcoin mining

What happens when all 21 million bitcoins have been mined?

As you’ve read, miners are responsible for a lot more than just creating new bitcoins.
They’ll still validate transactions, and collectively secure the entire Bitcoin network.

Miners won’t receive block rewards anymore, but they will still receive transaction
fees. The validation of the network will continue to be an extremely important
function.

If there weren’t miners to validate new copies of the ledger, the blockchain would likely
fall under attack, rendering bitcoin as a store of value useless.

Even after all bitcoins are created, mining is still necessary to maintain the value of the
bitcoin cryptocurrency and process ongoing transactions on the network.

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 9/11
2/9/23, 3:31 AM What is Bitcoin mining, and how does it work? | @blockchain

Mining is essential to the Proof of Work consensus mechanism, and miners have
proven that they are committed to finding new ways to power their operations, and
subsequently, Bitcoin.

There’s another way to get bitcoin though, and it doesn’t involve setting up a mining
rig.

Buying BTC may be a more straightforward way of adding it to your holdings, and if
you choose to use a dollar cost averaging method, you can buy bitcoin incrementally,
over a long period of time, instead of trying to time the market.

If you’ve never bought BTC before, you’d need what’s called an “on-ramp” — a way of
exchanging fiat currency for crypto. Then, you can transfer your crypto to a non-
custodial wallet, so you have complete control over your funds.

Blockchain.com is the only place you can find both of these wallet types in one place,
and you can create your free account in just a few minutes.

Get Started

Important Note:

This information is provided for informational purposes only and is not intended to substitute
for obtaining accounting, tax or financial advice from a professional advisor.

The purchase of crypto entails risk. The value of crypto can fluctuate and capital involved in a
crypto transaction is subject to market volatility and loss.

Digital currencies are not bank deposits, are not legal tender, and are not backed by the
government. Blockchain.com’s products and services are not subject to any governmental or
government-backed deposit protection schemes.

Legislative and regulatory changes or actions in any jurisdiction in which Blockchain.com’s


customers are located may adversely affect the use, transfer, exchange, and value of digital
currencies.
https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 10/11
2/9/23, 3:31 AM What is Bitcoin mining, and how does it work? | @blockchain

Bitcoin Cryptocurrency Blockchain Proof Of Work Btc

Open in app Get unlimited access

Search Medium

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 11/11
2/9/23, 3:47 AM The Byzantine Generals Problem. In a decentralized peer-to-peer system… | by Robert A. Küfner | nakamo.to | Medium

Published in nakamo.to

Robert A. Küfner Follow

Aug 15, 2018 · 4 min read · Listen

Save

The Byzantine Generals Problem

In a decentralized peer-to-peer system like a public blockchain, there needs to be


consensus. The individual parts of the system need to agree on the history of the
blockchain up until the present moment as well as on how to move forward since there
is no central authority to assume responsibility over it.

https://medium.com/nakamo-to/the-byzantine-generals-problem-1ae994eaba7e#:~:text=The Byzantine Generals Problem is,would fail to function prop… 1/5


2/9/23, 3:47 AM The Byzantine Generals Problem. In a decentralized peer-to-peer system… | by Robert A. Küfner | nakamo.to | Medium

That’s easier said than done. There is always a risk of misinformation or


miscommunication between users, whether accidental or deliberate. The Byzantine
Generals Problem is a way of explaining the problem of misalignment between users
of a decentralized system and its solution, without which decentralized Distributed
Ledger Technology, and several other types of computer networks would fail to
function properly.

Take a public blockchain for example. To make it work, enough participants in the
blockchain must agree on the history of validation and permanent registration of
transactions on the blockchain ledger up until that point. If we could rely on everybody
to be honest, there would be little or no problem — but we can’t. The temptation to
register fraudulent transactions or illicitly reverse genuine transactions, while hanging
onto their ill-gotten gains is simply too much for some users to resist.

This form no longer exists 😬


But I'm sure it was beautiful...

Go home 

Public blockchain protocols must deal with this issue autonomously. No single
participant can step in and unilaterally declare transactions to be valid or invalid. That
would make nonsense of the principle of decentralization. But to understand how a

https://medium.com/nakamo-to/the-byzantine-generals-problem-1ae994eaba7e#:~:text=The Byzantine Generals Problem is,would fail to function prop… 2/5


2/9/23, 3:47 AM The Byzantine Generals Problem. In a decentralized peer-to-peer system… | by Robert A. Küfner | nakamo.to | Medium

blockchain protocol can handle such a challenge, we first need to know more about
the problem.

Let’s allow the Byzantine Generals step forward and tell us all about it. The Byzantine
Generals Problem was given its name by Leslie Lamport, one of the three authors of a
pivotal paper on the subject in 1982. He reasoned that ‘the best way to attract attention
to a problem is to present it in terms of a story’, meaning the Byzantine Generals didn’t
actually have a problem with achieving decentralized consensus — it’s just an effective
way of helping people understand the problem.

Imagine a military operation in the East Roman Empire (aka Byzantium), more than
1,000 years ago. Several Byzantine generals and their armies are positioned around a
rebel city. Each general and army is in a separate camp. Communication between the
generals is only possible by messengers who must cross the open terrain from one
camp to another.

For the generals and their armies to successfully attack the city or retreat safely from
it, they must all act together. Failure to coordinate their actions by even one of the
generals will mean that all the armies will be individually massacred by the forces of
the rebel city. To act together and take over the rebel city, they must agree on when to
attack and at what time — but here’s the catch:

They could send messengers on horseback, but what if one is captured or killed
before delivering the message?

They’d need to reply to one another to confirm they’ve received and agree with the
message, but this would entail sending another messenger on horseback who may
also be captured or killed.

What if a messenger is intercepted by the enemy and the message is changed in


order to confuse the generals?

How do any of the generals know that the messages they received are genuine?

What if one or more of the generals are traitors and intentionally send the wrong
message to other generals?

https://medium.com/nakamo-to/the-byzantine-generals-problem-1ae994eaba7e#:~:text=The Byzantine Generals Problem is,would fail to function prop… 3/5


2/9/23, 3:47 AM The Byzantine Generals Problem. In a decentralized peer-to-peer system… | by Robert A. Küfner | nakamo.to | Medium

It’s a tough problem to crack, but one that Satoshi Nakamoto managed to solve through
the Bitcoin blockchain.

Distributed systems with mechanisms to overcome this problem are said to have
Byzantine Fault Tolerance or BFT. Bitcoin has BFT built into its protocol. Its proof of
work consensus mechanism is designed to produce new blocks every 10 minutes,
using the total available computing power in the Bitcoin network and rewarding the
first node to mine the next valid block.

What is Proof-of-Work (PoW)?


Considered by some of the crowning achievements of Bitcoin founder
Satoshi Nakamoto…
medium.com

All the other Bitcoin nodes in the network can easily and individually check that a new
block of transactions proposed by one of the nodes has been correctly mined. In this
way they can then reach agreement on whether to add the new block to the existing
blockchain.

https://medium.com/nakamo-to/the-byzantine-generals-problem-1ae994eaba7e#:~:text=The Byzantine Generals Problem is,would fail to function prop… 4/5


2/9/23, 3:47 AM The Byzantine Generals Problem. In a decentralized peer-to-peer system… | by Robert A. Küfner | nakamo.to | Medium

And so, unlike the Byzantine generals who — rumour has it, are still stationed around
the rebel city to this day — users of public blockchain systems can safely and securely
run their operations.

Enjoyed this post? You’ll find plenty more like it on:

Advanced Blockchain AG | Blog


The second Hashspot meetup took place yesterday at Advanced
Blockchain AG's offices in Berlin. The event was organised…
blog.advancedblockchain.com
Open in app Get unlimited access

Search Medium

Consensus Proof Of Work Decentralization Blockchain Education

Blockchain Application

https://medium.com/nakamo-to/the-byzantine-generals-problem-1ae994eaba7e#:~:text=The Byzantine Generals Problem is,would fail to function prop… 5/5


2/9/23, 3:50 AM The Byzantine General’s Problem Solution Using The Blockchain | by Vincent Tabora | DataDrivenInvestor

Published in DataDrivenInvestor

Vincent Tabora Follow

Aug 3, 2020 · 8 min read · Listen

Save

The Blockchain Provides A Solution To the Byzantine General’s Problem

The Byzantine General’s Problem Solution Using


The Blockchain
One of the principal theories used in developing a blockchain is the Byzantine
General’s Problem. In Computer Science theory the problem is the basis for Byzantine
Fault Tolerance (BFT), and algorithms can be applied using its concept. BFT is not
what Satoshi Nakamoto actually used in his implementation of Bitcoin, but the concept
around the Proof-of-Work (PoW) consensus mechanism is based around it. Newer
generation blockchains (Second or Third Generation) implement a form of BFT like the
consensus used in Stellar’s Practical BFT (pBFT), NEO’s Delegated BFT (dBFT) and
Cosmos Tendermint Core BFT.
https://medium.datadriveninvestor.com/the-byzantine-generals-problem-solution-using-the-blockchain-31eb5318f37f 1/7
2/9/23, 3:50 AM The Byzantine General’s Problem Solution Using The Blockchain | by Vincent Tabora | DataDrivenInvestor

The Background Of The Problem


You are one of many generals that have besieged an enemy city. The generals each
command their own army, and they are spread out around the city. There is no central
command, so every army is pretty much on their own. You are given a situation where
information is not perfect i.e. unreliable. In the Byzantine General’s Problem,
coordination or lack thereof determines the outcome of a situation, in this case an
agreement to attack or hold ground against the enemy. When do you attack or should
you hold your ground? This requires formulating a strategy to determine the success or
failure of a decentralized distributed system.

This cannot really be coordinated since the issue here is that there is no direct link to
communication among the participants (e.g. generals). These links are also not trusted
since we don’t have any guarantee the message will reach its destination. Let us say
that there are 5 generals ready to attack the city. They are not directly near one
another, so there is a distance gap between the armies. Coordination is needed in
order to carry out the plan to attack. They must communicate using messengers.

When Science Fiction Enters Reality | Data Driven Investor


Science fiction has ruled the world with its crazy technology stories,
filled with ideas such as mindreading and humans…
www.datadriveninvestor.com

Each general issues commands that must be obeyed, but they have to take orders from
their king. Supposed the king issued an order to attack the city. In order for the
message to get across, the king sends 2 messengers to each general (total of 10
messengers). The second messenger is actually a back up to the first messenger. Now
herein lies the problem.

What if the messengers were spies and instead of delivering the message to attack, they change
it to retreat?

What if all of the messengers or some of the messengers were ambushed and some or all of the
generals did not get the message to attack?

https://medium.datadriveninvestor.com/the-byzantine-generals-problem-solution-using-the-blockchain-31eb5318f37f 2/7
2/9/23, 3:50 AM The Byzantine General’s Problem Solution Using The Blockchain | by Vincent Tabora | DataDrivenInvestor

What if one or more of the generals was a traitor and decides to not attack or maybe even
attack his fellow generals to help the enemy?

These are scenarios we can play in our head. This makes it important to have a system
in place to address these issues. In the case where no message is received to attack,
should the general attack anyway? Logic would say no, don’t attack, but if you don’t
attack you could be missing an opportunity to do so.

If you don’t attack, but the others attack the city, you will be put under subordination
for not obeying the king’s orders. The general can be punished severely, so that is why
critical thinking becomes important in situations like these.

Fault Tolerance
The solution to the problem is to have a protocol in place that use fault tolerant
measures. Adopting a protocol among the generals is the best way to make decisions
when faced with uncertainty. Therefore, it becomes probabilistic rather than
deterministic since there is no guarantee on what will happen. That is exactly the case
when you have less direct communication among peers, and each is independent from
the other. Each general is in a different location, so there is physical distance among
them.

A system should be put in place logically speaking, so that there is more clarity on
what to do. Here are some actions that the generals can agree to:

1. When no general has received an official message from the king to attack, that
means to hold ground and DO NOT ATTACK. After a certain period has elapsed and
no message has been received, the generals can retreat back to camp. There can
still be exceptions to this rule.

2. In order to verify the order from the king to attack, the general can verify the
message from the messenger by asking for a secret phrase (which only the generals
and the king know, aside from the messengers) and an official seal from the king
on the written message itself to prove it was the king who issued the order.
However, the message must be received from at least one of the two messengers
sent by the king.

https://medium.datadriveninvestor.com/the-byzantine-generals-problem-solution-using-the-blockchain-31eb5318f37f 3/7
2/9/23, 3:50 AM The Byzantine General’s Problem Solution Using The Blockchain | by Vincent Tabora | DataDrivenInvestor

3. To coordinate the attack, a horseman will ride from each general with a raised
banner that indicates to attack to all the other generals. That means one banner
form each army. The problem here is what if there is an army that did not receive a
message to attack and therefore did not raise a banner? The generals could agree
that if at minimum 3 of the 5 generals raised their banner, then the order to attack
is legitimate. Then they proceed with the attack on the city.

If the messengers were ambushed, at least the generals will know what to do if they
don’t receive a message. That makes things more probable, in the likelihood of an
uncertain condition.

We can come to an understanding that:

Loyal generals will obey the orders of their king and carry out the plan.

The more messengers you have, the greater the likelihood of the message getting to
the generals.

If there are more loyal generals who carry out the orders, the better the outcome.

If the majority of the generals receive the message, the better is the outcome
regardless of an attack or retreat.

Consensus
What makes Bitcoin innovative is not just providing a decentralized platform for
making payments. It solved the problem of how to make payments using a trustless and
permissionless system. What Satoshi developed was a way to implement the solution to
the Byzantine General’s Problem in a digital electronic network using cryptographic
security and public key encryption. Cryptographic security involves a process of
encoding called hashing to prevent tampering of data. Public key encryption verifies
the identity of a user on the network.

With cryptographic security, a transaction is secured in a block that connects to other


blocks by its hash value. All hashes can be traced back to an initial block that is the root
of all hashes. This became known as the blockchain, and it uses a Merkle Tree to verify
hashes that originate from a primordial block. Every block that originates from the
first block, also called the genesis block, is valid on the network. Blocks are validated by
https://medium.datadriveninvestor.com/the-byzantine-generals-problem-solution-using-the-blockchain-31eb5318f37f 4/7
2/9/23, 3:50 AM The Byzantine General’s Problem Solution Using The Blockchain | by Vincent Tabora | DataDrivenInvestor

computer nodes called miners, who also compete with other miners to solve
cryptographic puzzles to produce blocks as part of a consensus mechanism called PoW
(Proof-of-Work). The miner that is able to solve the puzzle receives a reward for their
contribution as an incentive.

Users who are a part of this network must have a key pair consisting of a private key
and public key to verify their identity. The private key is used for digital signatures
which authorize a transaction from the rightful owner in order to release funds to
make payments. Only the private key’s holder has this privilege and no other user.
Private keys are unique and is also where the public key is derived from. The public
key is used to create a public address which is how the user is identified on the
network. It is viewable to all and it is associated with a digital wallet of the user.The
private key must be kept secret, but the public address is what a user tells other users
to use when sending money. This system is like the secret phrase and official seal.

The Nakamoto Consensus (i.e. Proof-of-Work) was a mechanism intended for fault
tolerance in a trustless and permissionless environment. We take a probabilistic
approach to the decision of nodes that validate the truth based on majority consensus,
where n node validators out of x total nodes must be greater than or equal to 51%.

n/x >= 0.51 * 100

The network then comes to an agreement and produce blocks to record the version of
truth that n nodes verified.

Distributed Systems
Distributed systems which need to perform mission critical tasks use BFT. The
blockchain is also a distributed system. In Satoshi’s version of the blockchain, the
Byzantine General’s Problem is resolved by the miners who are like the generals. Each
node must try to validate transactions, which are like the messages being sent to the
generals. The enemy can be thought of as bad actors (e.g. hackers) who want to steal
the messages or attack the network.

Messages use cryptographic security so that hackers (i.e. The Man-In-The-Middle)


cannot easily attack the blockchain. The messages or transactions, are packaged into
blocks and then hashed for further security to prevent tampering. Satoshi makes

https://medium.datadriveninvestor.com/the-byzantine-generals-problem-solution-using-the-blockchain-31eb5318f37f 5/7
2/9/23, 3:50 AM The Byzantine General’s Problem Solution Using The Blockchain | by Vincent Tabora | DataDrivenInvestor

things more probabilistic by having the miners compete with each other to try to
validate the blocks. This makes it more decentralized since no miner can monopolize
validation to earn all the rewards. Instead miners must compete with one another
using their computing resources called hash rate to solve a puzzle. The greater the hash
rate a miner has, the more likely they can solve the puzzle.

Since there are many miners, the network is secured through their consensus
mechanism. Validated blocks become immutable and protected by hashing so that
attempts to overturn transactions can be prevented. Consensus is achieved when the
miner who has solved the puzzle broadcasts it to the network which all the other
miners must validate or deny if the value is incorrect. The correct value must be equal
to or less than what is called a difficulty target.

The blockchain is also decentralized, which means there should be no central point of
failure in the system. The blocks are stored in a distributed database that is copied to
other computers on the network. This redundancy helps provide fault tolerance as
well, so that no failed computer can bring the entire system down. This is like having
multiple messengers in case one messenger gets ambushed by the enemy. The
message will not be lost because other messengers will have a copy of it.

Synopsis
The use of a blockchain can provide a general solution to the Byzantine General’s
Problem. It is all about providing a way to communicate securely with trust in a very
uncertain environment. In the real world, transactions occur mainly among people
who do not know or trust each other. Each person is like a general, waiting to hear
orders to attack or hold their ground. There are no middle men who arbitrate the
attack on your behalf, you are very much on your own to decide.

A blockchain provides a layer that can be trusted without having to trust each and
every person. This is through a consensus from a network of nodes that validate the
truth before it is recorded. If the general is not sure about the contents of the message,
it can be verified by the other generals based on what they know is the truth. Once it is
recorded by one node, a copy is sent to other nodes that are a part of the network so
the information becomes redundant. That is the purpose of the PoW consensus
algorithm.

https://medium.datadriveninvestor.com/the-byzantine-generals-problem-solution-using-the-blockchain-31eb5318f37f 6/7
2/9/23, 3:50 AM The Byzantine General’s Problem Solution Using The Blockchain | by Vincent Tabora | DataDrivenInvestor

Information is not always perfect and bad actors will try to game the system. In a
blockchain there are fault tolerant measures and security in place since the system
itself was meant to be used by the public. Cryptography became necessary in this case
so that altering the messages will not be allowed. The system provides key pairs for
digitally signing a message to verify identity as proof it is from who it claims to be.
Once messages are validated they are recorded for transparency, which provides a
historical proof for accountability.

Gain Access to Expert View — Subscribe to DDI Intel

Blockchain Game Theory Computer Science Bitcoin Consensus

Open in app Get unlimited access

Search Medium

https://medium.datadriveninvestor.com/the-byzantine-generals-problem-solution-using-the-blockchain-31eb5318f37f 7/7
2/11/23, 10:53 PM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

Published in UTRUST

Miguel Palhas Follow

Sep 12, 2019 · 8 min read · Listen

Save

Proof of Work

Proof of Work is yet another buzzword that gets thrown around a lot in the
cryptosphere. This is because it is an important component of some of the most
important blockchains like Bitcoin. In this post we aim to shed some light into what
exactly this means, and why it is such an important term.

Consensus

https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In a Proof of Work,the network up and running. 1/9


2/11/23, 10:53 PM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

In short, Proof of Work (PoW) is one of the mechanisms through which a blockchain
can achieve consensus. That is to say, ensuring that all nodes of the system can agree
on the state of the public ledger. Value, information, and wealth can only be
transferred when actors in an exchange agree upon what is being exchanged and how.
This is usually dealt with by banks, companies and even governments, but blockchains
can do this peer-to-peer, so long as they achieve consensus.

This is important, as you may guess, because it’s what creates consistency in the
blockchain data, prevents users from double-spending their funds, or attacking each
other.

In a Proof of Work (PoW) system, consensus is agreed upon via the work done by
network miners. These are the miners you keep hearing about. They collect your
transaction fees in exchange for keeping the network up and running.

In a broad sense, it can be said that miners process network transactions, and take up
their fees as payment for their effort (e.g.: electricity spent on computing power), and
as an incentive to keep working.

If we take a more technical perspective though, they’re not exactly “processing


transactions”. All transactions are already fully prepared to be included in the
blockchain when they reach miners. Miners only need to check their validity.

The real processing that happens is more of an endless competition between all
miners, the winner of which gets to create the next block in the chain.

This competition is done via a cryptographic algorithm. For every block, a


cryptographic puzzle needs to be solved, and some processing power must be put into
finding a valid solution. When a miner finds a solution, it is able to create a valid block,
and broadcast it to everyone else.

The broadcasting of a single block, and some of its caveats, is a topic I already covered
in more detail on my previous post about [achieving Finality].

Here, we’ll focus a bit more on how this cryptographic puzzle works, and why it is
needed in the first place.

https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In a Proof of Work,the network up and running. 2/9


2/11/23, 10:53 PM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

Cryptographic hashes
A hash works very similarly to a written signature.

Your signature proves that a document was read and validated by you, without your
own presence being required. Only you can produce your own signature, but everyone
else can easily check it’s yours. This can be summed up in two simple properties:

1. hard to fake;

2. easy to validate.

These properties are what makes signatures, and hashes, interesting for quickly
validating something.

Yes, I know. Written signatures are not really that secure. But cryptographic signatures,
on the other hand, can be. They serve the same function as the written ones, which is
why the analogy works so well, but they’re generated through mathematical functions
that are designed to provide better guarantees.

A sensible cryptographic hash should be:

1. Hard to produce, Making it impossible to create a valid signature without first


having access to the original data;

2. Trivial to verify. So that anyone can quickly validate data.

Let’s see a quick example of what a cryptographic hash would look like. In many
software download pages, you’ll often see a hash checksum. For example, here’s the
download page for Ubuntu:

https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In a Proof of Work,the network up and running. 3/9


2/11/23, 10:53 PM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

After downloading the file, I should be able to independently calculate a SHA256 hash
of that file, and compare it against the hash displayed on the page. If they match, I
have proof that the download file is not corrupted or tampered with. And that’s exactly
what I did:

$ shasum -a 256 ubuntu-18.04.3-desktop-amd64.iso


add4614b6fe3bb8e7dddcaab0ea97c476fbd4ffe288f2a4912cb06f1a47dcfa0

Great, the hash works perfectly! You can notice that the resulting hash (add461…)
matches exactly the hash from the screenshot.

https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In a Proof of Work,the network up and running. 4/9


2/11/23, 10:53 PM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

This is a one-way operation. While I can calculate a SHA256 hash for any file or piece
of data, the reverse is not possible. It’s obviously impossible to recreate the entire
Ubuntu file from just this small string of random characters.

The process I just did manually is similar to what’s used in a blockchain to ensure the
integrity of all transactions. Each transaction hash is derived from the data of the
transaction itself, and serves as a unique identifier.

Each block has a hash, too. And that hash needs to follow certain rules. Let’s take a
look at the latest Bitcoin block hashes, for example:

Notice how all of them start with a bunch of zeros? How did this happen, if hashes are
supposedly random?

Well, that’s where the cryptographic mining contest begins.

And how do they “Prove the Work”?


https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In a Proof of Work,the network up and running. 5/9
2/11/23, 10:53 PM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

Each miner is constantly trying to mine the next block in the chain. And they’re on a
constant race with each other.

As they aggregate transactions sent in by users, they aggregate them in a new block,
and then try to create a hash for the entire block.

This hash can’t be just any hash tough. The blockchain imposes some rules on it.
Bitcoin, for example, requires the hash to start with a certain number of leading zeros.
The actual amount of zeros required is called the network’s difficulty, and it’s a number
that is adjusted every few blocks.

If the current difficulty is 2, then 00abc… would be a valid hash, but 0abc… would not.

Couple this with the fact that hashes are, for all intents and purposes, randomly
generated and unguessable, and miners have only one way to produce different
hashes: brute force. They keep trying over and over to generate new hashes, until they
find one that fulfils the requirement.

Since the same block always generates the same hash, they need to change it slightly
for every new attempt. This is often done by adding a random number within the
block’s data. The only purpose of this number is for miners to change it in order to be
able to make different blocks, and therefore, different hashes.

The better your hardware, the more hashes you can produce. That’s called your Hash
Rate. If you increase your hash rate (by improving your hardware) you get a better
chance of finding valid hashes before everyone else. But since this process is
essentially random, having slower hardware still gives you a small chance at
preventing more powerful miners from getting 100% of the blocks.

This difficulty is adjusted automatically every few blocks, in response to changes in the
total hash rate of the network. If a lot of miners significantly increase their hash rate,
or if a lot of miners join the game, the average time to mine a block will decrease. In
response to this, the difficulty may increase, to keep the average block time around 10
minutes.

If you’ve ever wondered why it takes 10 minutes to mine a Bitcoin block, there’s your
answer. The blockchain itself is enforcing that rule, by adjusting the mining difficulty.
https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In a Proof of Work,the network up and running. 6/9
2/11/23, 10:53 PM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

Maybe you’re wondering why this is done at all! Good question! Let’s talk about that:

A Supply and Demand game


Miners are a necessary part of the system because they’re what keeps the blockchain
alive. It is therefore important to keep a steady number of them.

It is also important for the number of miners to be sufficiently large, or else the
decentralization of the system could be compromised. This compromises security as
well. These are some of the basic tenets of a decentralized blockchain.

On the other side of the system, we have the users, sending transactions through their
wallets.

Users want the blockchain to support as many transactions per second as possible, to
reduce their waiting times. They also want lower fees, or even no fees at all!

Miners, on the other hand, want the reverse. The more fees are paid, the more they
get. And the less transactions there are, the easier it is for them to compute hashes for
new blocks.

Even if miners were willing to mine for free, you still wouldn’t be able to do as the
users wish. More transactions per minute mean that we’d have to support larger block
sizes (or increase the rate of blocks), or decrease the 10 minutes it takes for a block to
be produced.

This would make the mining process more difficult, possibly to a point where only
those with more powerful hardware would be able to do anything at all.

If only the most powerful can compete in the game, then the whole system will
degrade to a much less decentralized one. And decentralization is what guarantees the
security of your transactions.

Preserving the size of blocks, as well as the time between them, is a balance that has to
be done to keep the network usable while still preserving the ability of small miners to
be able to contribute to the network.

And what about all the energy waste?


https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In a Proof of Work,the network up and running. 7/9
2/11/23, 10:53 PM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

Yes, this is a tough one. We’ve all seen the scary news about how Bitcoin consumes
more energy than Switzerland, or the entire cryptocurrency ecosystem, for that
matter, is wasting tons of energy.

Not only that, the incentive given to miners (read: the ability to convert electricity into
money) is driving the industry to produce more powerful mining hardware, and
driving the miners to purchase more and more of that hardware.

So, not only are we creating an incentive to spend energy, but the competitive nature of
this is pushing everyone to spend increasingly more!

This is all true, and of course, a concern. But unlike some may claim, it’s not an
inherent problem of cryptocurrencies, and not even inherent to Proof-of-Work. This
means that there are ways to create Proof-of-Work systems that don’t drive energy
usage up like we’re seeing today.

If you’re into computer science research, then there are a few research papers worth
looking into (such as the Cuckoo Cycle algorithm, or Proofs of Useful Work)

If not though, rest assured that this is an acknowledged problem, and is being actively
worked on by many communities. While it is true that cryptocurrencies do consume
excessive amounts of energy right now, this is a problem that can be solved, and
should see some improvements over the next couple of years.

Utrust Academy Blockchain Crypto Digital Currency

About Help Terms Privacy

https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In a Proof of Work,the network up and running. 8/9


2/11/23, 10:53 PM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

Get the Medium app


Open in app Sign up Sign In

Search Medium

https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In a Proof of Work,the network up and running. 9/9


2/11/23, 10:57 PM What is Proof-of-Work (PoW)?. Considered to be one of the crowning… | by Max Thake | Medium

Max Thake Follow

Jun 2, 2018 · 3 min read · Listen

Save

What is Proof-of-Work (PoW)?

Considered to be one of the crowning achievements of Bitcoin creator Satoshi


Nakamoto, the idea for PoW was published in 1993 by Cynthia Dwork and Moni Naor. It
has gone on to the foundations for several block-based networks and the consensus
mechanism of choice for the majority of cryptocurrencies currently in circulation.

https://maxthake.medium.com/what-is-proof-of-work-pow-2574ddebf916 1/4
2/11/23, 10:57 PM What is Proof-of-Work (PoW)?. Considered to be one of the crowning… | by Max Thake | Medium

In short, the purpose of this consensus mechanism and others like it, is to reach
consensus. Consensus = agreement.

How does Poof-of-Work ... work?


PoW is relatively simple. To finish a page of the blockchain ledger, a block so to speak,
nodes (users) must figure out complex mathematical equations before they can
validate transactions. This process is called mining, and those who take part in it are
known as miners.

These mathematical problems are hard to compute but easy to verify. Once miners
solve them, they are rewarded with the corresponding digital currency, referred to as a
block reward.

If the minors are mining on the Bitcoin blockchain, they're rewarded in Bitcoin, if
they're mining on the Monero.

The transactions in the block are then validated and the block is added to the chain.
Real computational work goes behind this, hence the term, Proof-of-Work. As time
goes by the mathematical equations become harder and harder.

This increase in difficulty, known as block difficulty, is intentional. The idea is to


ensure that each mined coin requires a substantial amount of electricity.

Bittersweet Symphony
PoW is expensive. The Bitcoin network, according to a recent study published in Joule,
claimed that the network currently uses about 24 TWh of energy per year - about as
much as Ireland does.

As the Bitcoin network grows, it will require even greater computing power. The neatly
designed Bitcoin Energy Consumption Index provides the latest facts and figures. And
https://maxthake.medium.com/what-is-proof-of-work-pow-2574ddebf916 2/4
2/11/23, 10:57 PM What is Proof-of-Work (PoW)?. Considered to be one of the crowning… | by Max Thake | Medium

you can see the charts are only going up. The energy usage is doubling every six
months.

It is estimated that by the end of 2018 it will consume 0.3% of the world's electricity for
the simple purpose of verifying transactions, albeit in a decentralized manner. Since
these rising energy costs are paid in fiat currency, it builds a downward pressure that
results in most miners selling the coins as soon as they are mined.

While PoW is expensive for miners, it does make a structure that is relatively safe from
attacks. That's because the only way for an entity to disrupt the system and take over
the network is by controlling 51% of the hashing power. This is not a problem, but it is
not a problem.

Ultimately, a Proof of Work system ensures that a blockchain is valid. For Bitcoin, it
also means that the coins are not mined too quickly and miners have incentives to
maintain the network. On the flipside, this is also an infinitely scalable protocol.

Another big drawback is the formation of mining pools (groups of miners who pool
their resources together) who could potentially control the network and collectively
shepard the network, adding a very real danger to a decentralized solution.

The pros-of-the-stake (PoS) system, such as Proof-of-Stake (PoS), is being developed,


system.

https://maxthake.medium.com/what-is-proof-of-work-pow-2574ddebf916 3/4
2/11/23, 10:57 PM What is Proof-of-Work (PoW)?. Considered to be one of the crowning… | by Max Thake | Medium

Proof Of Work Blockchain Technology Blockchain Application Consensus

Blockchain Education

Get an email whenever Max Thake publishes.

Your email
Open in app Sign up Sign In

Subscribe
Search Medium

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://maxthake.medium.com/what-is-proof-of-work-pow-2574ddebf916 4/4
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

Published in Coinmonks

Aakash S Follow

Feb 22, 2022 · 9 min read · Listen

Save

Blockchain Blog 15: Blockchain Consensus


Protocols

https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 1/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 2/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

Blockchain is the core technology of many cryptocurrencies. Blockchain as a


distributed ledger technology has received extensive research attention. In addition to
cryptography and P2P (peer-to-peer) technology, consensus protocols are also a
fundamental part of blockchain technology. A good consensus protocol can guarantee
the fault tolerance and security of the blockchain systems.

Blockchain first appeared in Nakamoto’s Bitcoin white paper that describes a new
decentralized cryptocurrency. Bitcoin takes blockchain technology to the extreme and
attracts people’s wide attention. Afterward, many cryptocurrencies and projects based
on the blockchain spring up. Blockchain thus has become a hot topic. Interestingly, the
technology adopted by the blockchain is not new. Blockchain simply combines
cryptography, distributed system technology, peer-to-peer networking technology, and
other well-known technologies. Besides, blockchain also provides a secure framework
for cryptocurrencies, in which anyone cannot tamper with the content of transactions
and all the nodes participate in transactions anonymously. For this reason, blockchain
technology can be widely used in various fields, e.g., financial field, medical systems,
supply chain, and Internet of Things (IoT).

Flow of PoW.

However, in the process of applying the blockchain technology, there will be many
challenges and issues, among which how to design an appropriate consensus protocol
is a big issue. The consensus of blockchain is that all nodes maintain the same
distributed ledger. In traditional software architecture, the consensus is hardly a
problem due to the existence of the center server, hence the other nodes only need to
be aligned with the server. However, in a distributed network such as blockchain, each
node is both a host and a server, and it needs to exchange information with other
https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 3/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

nodes to reach a consensus. Sometimes some nodes will be down or offline, and there
will also be some malicious nodes, which will seriously affect or destroy the process of
consensus. Therefore, an excellent consensus protocol can tolerate the occurrence of
these phenomena and minimize the harm so as not to affect the final consensus result.
In addition, the consensus protocol adopted by the system also needs to be suitable for
the blockchain type used by the system. There are three basic types of blockchain:
public blockchain, consortium blockchain and private blockchain. Each type of
blockchain has different application scenarios. The adopted consensus protocol thus
needs to fit the demands of specific application scenario. In this paper, we introduce
some main consensus protocols of blockchain and analyze their performance and
application scenarios.

Flow of PoS.

Consensus Protocols
In distributed systems, there is no perfect consensus protocol. The consensus protocol
needs to make a trade-off among consistency, availability and partition fault tolerance.
Besides, the consensus protocol also needs to address Byzantine Generals Problem
that there will be some malicious nodes deliberately undermining the consensus
process. In this section, we make a detailed description of some popular blockchain
consensus protocols that can effectively address the Byzantine Generals Problem.

https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 4/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

PoW (Proof of Work):

https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 5/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

PoW is adopted by Bitcoin, Ethereum, etc. PoW selects one node to create a new block
in each round of consensus by computational power competition. In the competition,
the participating nodes need to solve a cryptographic puzzle. The node that first
addresses the puzzle can have a right to create a new block. It is very difficult to solve a
PoW puzzle. Nodes need to keep adjusting the value of nonce to get the correct answer,
which requires much computational power. It is feasible for a malicious attacker to
overthrow one block in a chain, but as the valid blocks in the chain increase, the
workload is also accumulated, therefore overthrowing a long chain requires a huge
amount of computational power. PoW belongs to the probabilistic-finality consensus
protocols since it guarantees eventual consistency.

https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 6/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

Decentralized blockchain networks rely on systems called consensus mechanisms to


process transactions and authenticate information. Cryptocurrencies such as Bitcoin
and Ethereum utilize a consensus mechanism called Proof of Work (PoW), commonly
known as mining. Proof of Work systems utilizes large amounts of processing power
that is generated from mining to process transactions and prevent double spending.
Some of the issues and major complaints of PoW systems are in regards to these
https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 7/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

extreme power requirements, which may not always come from renewable and
environmentally friendly sources.

Downsides of Crypto Mining

Expensive initial investment: The high costs of computer hardware and other physical
costs (facilities, management, etc.) act as a deterrent and barrier for entry into the
crypto mining space. Many critique mining practices as a way to reserve power and
control over processing transactions for a handful of people.

High energy costs: Some argue that mining processes (such as Bitcoin mining) have
too extreme of energy costs. Some energy consumption trackers show that mining
consumes about 77.78 terawatt-hours per year. This figure is comparable to the total
energy consumption of entire countries such as the Netherlands

Carbon Footprint: Much criticism is relayed on crypto mining towards it’s reliance on
electricity generated by fossil fuels. Many large crypto mining facilities are known to
use coal and other ”unclean” sources of fuel. Studies in 2019 have estimated that
Bitcoin mining generated between 22–23 million metric tons of carbon dioxide
emissions per year.

PoS (Proof of Stake):

While PoW based blockchains have been running successfully for years, many experts
find mining-based systems to be inefficient when it comes to network scalability and
energy efficiency. New approaches to decentralized consensus mechanisms have led
to the creation of Proof of Stake (PoS) or simply staking. PoS has a similar purpose to
PoW systems where a network participant is selected to add the newest block of
transactions to the blockchain and receive a reward. Instead of “mining” to solve
puzzles for rewards, participants can choose to lock in (or ”stake”) their coins into the
network (their stake in the network) and periodically receive rewards for helping
secure the network and process transactions.

https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 8/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

In PoS, selecting each round of nodes, that who creates a new block depends on the
held stake rather than the computational power. Although nodes still need to solve a
SHA256 puzzle:

PoS systems differ from PoW in that instead of using computing hardware to process
transactions, participants use their own tokens as a “stake” in the network to have a
chance to add a new block to the blockchain. Essentially cryptocurrencies are locked
away to receive rewards. Participants are incentivized to stake their coins with reward
offers from the network for successfully validating transactions. At regular intervals,
the protocol will nominate a participant to validate the next block in the blockchain.
Each PoS system handles the details regarding reward intervals differently. The chance
of being nominated is relative to the number of coins staked, where the more coins a
user stakes the higher the chance of them being selected and rewarded is. This acts as
an incentive for users to stake large amounts of coins.

https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 9/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

Hence, PoS is an energy-saving consensus protocol, which leverages a way of the


internal currency incentive instead of consuming lots of computational power to reach
a consensus. Note that Ethereum plans to transition from PoW to PoS.

Proof of Work vs Proof of Stake

https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 10/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

A heated topic in the crypto space is the environmental consequences of blockchains


that use the Proof of Work (PoW) consensus mechanism required for block production
and validation.

Besides the high consumption of electricity, which exceeds that of Poland for Bitcoin
and that of Austria for Ethereum on a yearly basis, these two blockchains also produce
staggering amounts of electronic waste, with Bitcoin generating 25,060 tonnes yearly,
comparable to the small IT equipment waste of the Netherlands. This is caused by the
mining farms which very often replace the burned-out equipment. Data from
Digiconomist.

Conversely, with its Proof of Stake (PoS) consensus mechanism, Cardano’s network
doesn’t rely on processing power for block validation. What is required is a stable
internet connection and enough staked ADA to produce blocks. There are also some
SPOs who run their stake pools on a Raspberry Pi, consuming about 5 Watts of energy.

This is the reason why Cardano is often referred to as an eco-friendly blockchain


ecosystem.

https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 11/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 12/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

Benefits of Staking — Rewards


Staking coins in a PoS typically pays out rewards in the form of newly created coins of
the same type. For example, staking Cardano (ADA) will reward newly created ADA
tokens. The size of the block reward depends on a number of factors including:
The size of the pool: The larger the pool, the more likely it will be chosen to fill the slot
of the epoch. The larger the pool, the more chances of being rewarded.
The staking pool terms: Different pools will have different incentives and reward
structures. Some will reward higher percentage offers than others.

Staking and Risk


It is important to understand the requirements and agreements necessary for each
project you wish to stake with as they may differ from one another.
Some projects have a lock-in or vesting period where the staked crypto cannot be
moved for a period of time. This can be an issue as users will not be able to trade the
staked tokens even if the price of the tokens change.

Only time will tell whether Cardano or some other blockchain will rule the crypto
space, though what is more realistic is that we will have an internet of blockchains,
and the developers behind Cardano are well aware of this. This is evidenced by their
effort in creating an NFT bridge with Ethereum and an ERC-20 Converter.
Interoperability and cooperation between blockchains are essential. In the end, the
common goal is to create an economic system that can be accessed by anyone
anywhere, allowing the unbanked to start building a financial reputation free from
intermediaries, which has disappointed us repeatedly throughout history.

Read Next Part: Blockchain Blog 16: Crypto Exchanges

Entire Series: 28 Blogs on Blockchain and Cryptocurrency

https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 13/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

Join Coinmonks Telegram Channel and Youtube


Channel learn about crypto trading and investing
Also, Read
WazirX vs CoinDCX vs Bitbns | BlockFi vs CoinLoan vs Nexo

OpenLocalBitcoins
in app Review | Cryptocurrency Savings Accounts Sign up Sign In

What is Margin Trading | Dollar-Cost Averaging


Search Medium

Uphold Card Review | Trust Wallet vs MetaMask

Decentralized Exchanges | Bitbns FIP | Bingbon Review

10 Best Places to Buy Crypto with Credit Card

Best Crypto Trading bots in Canada | Bybit vs Binance

5 Best Crypto Exchanges in UAE | SimpleSwap Review

7 Best Ways to buy Dogecoin | ZebPay Review

Best Futures Trading Signals | Liquid Exchange Review

Crypto Exchanges In South Africa | BitMEX Crypto Signals

MoonXBT Copy Trading | Crypto Wallets in UAE

Remitano Review | Guide to 1inch Protocol

iTop VPN Review | Mandala Exchange Review

40 Best Telegram Channels | Hi Dollar Review

Fold App Review | StealthEX Review | Stormgain Review

Buy PancakeSwap (CAKE) | Coinswitch Kuber Review

WazirX NFT Review | Bitsgap vs Pionex | Tangem Review

https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 14/15
2/11/23, 11:00 PM Blockchain Blog 15: Blockchain Consensus Protocols | by Aakash S | Coinmonks | Medium

How to Create a DApp on Ethereum using Solidity?

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/blockchain-blog-15-blockchain-consensus-protocols-ac07d35bce4c 15/15
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Published in Coinmonks

Sangmoon Oh Follow

Aug 4, 2021 · 20 min read · Listen

Save

Basic Consensus Algorithms, Explained


Table of Content
Byzantine Fault
3m + 1 Processor Algorithm
Proof of Work
Finality Problem
Casper FFG

Byzantine Fault
Consensus is a process for all the nodes in a distributed system to agree on a single
state or to make same decision. Consensus algorithm is a set of protocols or rules for
the process.

Consensus is complex because it is basically many body problem, and even far more
complex when various constraints are included. One of the most difficult constraints is
Byzantine fault.

Byzantine fault says that there could be abnormal or malicious nodes which don’t
follow rules or even violate intentionally to prevent consensus. Those nodes might do
so because they are broken or occupied by a hacker. Although the problem can seem to
be very old problem from the title of ‘Byzantine’ which is the name of an ancient Greek

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 1/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

city or Roman province, it was not until 80’s that people had started to study Byzantine
fault.

The early paper¹ published in 1982, Byzantine fault was described like the following
picture.

Byzantine Problem

Several divisions of Byzantine army setup camps surrounding enemy. Each general of
division has to make decision to attack or retreat. They want to reach same decision to
avoid troublesome case where some divisions attack but others retreat. To align the
decision, Byzantine general can send messengers carrying his intention to the other
generals. But the problem is that there can be traitors among generals. These traitors
will disturb the message exchange to prevent all the normal generals reaching a same
conclusion. For example, if the general ⑥ is traitor, he may send attack intention to
general ① but retreat intention to general ② and general ⑤ to prevent consensus.

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 2/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Traitor general tries to disturb the consensus.

If there is no traitor, a simple majority rule can always lead the generals to consensus.
In other words, each general collects all the other generals’ intentions and concludes
following the intention more than half of the generals including himself made. If all
the generals are split exactly in half, the default action can be applied.
But with a possibility of traitor(s), the problem become complex. If there is only one
traitor among 6 generals, can this majority rule also make the other 5 generals reach
consensus all the time? Or, is there any other rule that guarantee consensus? How
about 2 traitors among 6 generals?

Under the circumstances like above, if a consensus algorithm can make all loyal(non-
traitor) generals to arrive at the same decision, this algorithm is said to be Byzantine
fault tolerant. And feature or requirement for an algorithm to be Byzantine fault
tolerant is Byzantine fault tolerance or BFT in short.

Let’s move on to more detailed explanation with a simplest case for more clear
understanding.

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 3/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Simplest Case : 2 Loyal Generals and 1 Traitor

Suppose there are 3 generals in all and only one of them is traitor. Of course nobody
knows who is traitor. Consensus algorithm is a simple majority rule.

The traitor always send opposite intentions to the other 2 generals to hinder the
consensus. As you can see case (1) and case (2) in the above picture, if the 2 loyal
generals have a same intention, they will build a same conclusion regardless of the
traitor’s disturbance. But like case (3), if the 2 loyal generals have different intentions,
one of them will attack and the other retreat at the end. The consensus will be broken
in case (3), so the majority rule is not Byzantine fault tolerant for these 2 loyal generals
and 1 traitor. Then, what is the Byzantine fault tolerant consensus algorithm for this
situation?

Theoretically, it is proved that there is no Byzantine fault tolerant algorithm for 3


generals with 1 traitor, if message signing is not utilized¹.

There are various constraints other than Byzantine fault, in the consensus. The most
usual constraints are whether message delivery is guaranteed or not, whether message
is signed or not, and whether network is fully connected or not.
A network is said to be synchronous(sync.) if the delivery is guaranteed within a
certain delay limit, or asynchronous(async.) if a message can be lost due to
communication failure or overload. Surely it is far more difficult to make
asynchronous networks Byzantine fault tolerant than synchronous networks.
If message signing² is applied, a malicious node can not alter messages when relaying
messages from other nodes, although its own message can be still manipulated. So,
https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 4/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

with message signing, it is possible to design Byzantine fault tolerant algorithm more
easily. But, building reliable message signing system also requires considerable cost
and effort.

[1] L. Lamport, R. Shostak, and M. Pease, “The Byzantine Generals Problem”, 1982
[2] Digital signature

3m + 1 Processor Algorithm
The first achievement on general algorithm guaranteeing Byzantine fault tolerance is
“3m + 1 processor algorithm” appeared in 1980.

The paper¹ proves first that for a synchronous network with m faulty nodes, there is no
Byzantine fault tolerant consensus algorithm, if the network has equal or less than 3m
nodes in all. In other words, it is prerequisite to have equal or more than 3m + 1 nodes.

For example, if there is 1 faulty node among 3 nodes, no Byzantine fault tolerant
algorithm can exist. When 1 faulty node is expected, the network should has at least 4
(3m + 1, m = 1) nodes like the 2nd from the left in above picture. If the node is more
fragile and 2 faulty nodes can exist at the same time, the network should has at least 7
(3m + 1, m = 2) nodes for Byzantine fault tolerance like the last in above picture.

Then, what is the Byzantine fault tolerant algorithm, when 3m + 1 constraint is


guaranteed. Before we go into detail, we look into a simple notation for message
delivery.

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 5/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Message Delivery for 4 Nodes Network

The above picture shows message delivery for a simple 4-nodes network. There can be
at most 5 different paths to deliver a message from node ① to node ④ including
relays. But duplicate relays where a message would visit intermediate nodes more than
2 times are excluded.
5 paths include 1 path for direct delivery, 2 paths for indirect deliveries with 1 relay,
and 2 paths with 2 relays.
These cases are denoted like the followings

v:1:4 : direct delivery from


v:1:2:4 : relayed by node 2
v:1:3:4 : relayed by node 3
v:1:2:3:4 : relayed by node 2 and 3 in turn
v:1:3:2:4 : relayed by node 3 and 2 in turn

For example, v:1:3:2:4 means the message is sent by node ① to node ③, relayed by
node ③ to node ②, relayed again by node ②, and finally arrived at node ④.

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 6/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

3m + 1 Processor Algorithm

The above statements are the consensus algorithm called 3m + 1 processor algorithm.
The algorithm enforces enough relays for Byzantine fault tolerance.
More exactly, for a network which may at most m faulty nodes and so contains at least
3m + 1 nodes, should relay each message m times. And each node has to decide other
node’s intention on behalf of majority rule considering m-times relayed ones.

If the network has 4 nodes (m = 1) to cover at most 1 faulty node, each node has to
make decision after gathering direct messages(OM(1)) from the other 3 nodes and 1-
time relayed messages(OM(0)). For m = 1, 2 times relay is also possible, but 1 time relay
is enough according to the algorithm.
For m = 2, where the network has 7 nodes to overcome 2 faulty nodes, each node
should gather direct messages(OM(2)), 1-time relayed messages(OM(1)) and 2 times
relayed messages(OM(0)). With 7 nodes, 5 times relay is possible at most, but 2 times
relay is enough.
So, when generalized with m faulty nodes, each normal node among at least 3m + 1
nodes has to collect messages directly delivered(OM(m)), 1 time relayed(OM(m-1)), 2
times relayed(OM(m-2)), and so on up to those m times relayed(OM(0)).

fault total recursions

1 4 OM(1), OM(0)

2 7 OM(2), OM(1), OM(0)

3 10 OM(3), OM(2), OM(1), OM(0)

... ... ...

3m + OM(m), OM(m - 1), OM(m - 2), OM(m - 3), ... , OM(2), OM(1), OM(0)        
m
1     

3m+1-recursions.mediawiki hosted with ❤ by GitHub view raw

Recursions of 3m + 1 Processor Algorithm

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 7/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

You may notice that when relaying message, the message wouldn’t be sent again to
nodes already passed before. For example, in the 7-nodes network, the message of
node ① which and arrives at node ③ after relayed by node ② will not be sent to node
② or node ① again. This message will be sent to other nodes from ④ to ⑦.

Simplest Case
To understand how relays can contribute Byzantine fault tolerance a bit more, let’s
discuss the simplest case (where m = 1 ) in more detail.

The below picture shows how each of node ①, ③, and ④ collects the message
originated by node ② according to the 3m + 1 processor algorithm

OM(1) and OM(0)

If node ② is traitor, there are 6 different cases where node ② sends its intentions to
other nodes to disturb the consensus. You can see those cases from v:2:1, v:2:3, and
v:2:4 columns in the following table. In these 6 cases, node ② sends different
intentions to other nodes. Cases where node ② sends same intentions are excluded
because those cases will not disturb consensus.

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 8/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

If node ①, ③, and ④ receive only direct messages from node ②, they will conclude
different intentions (Attack or Retreat) for each case. You can see it in the light orange
background columns of above table.
But surprisingly, if one time relayed messages are collected, things change.
See the light green columns in the above table. For case 1). Although node ② sends
‘Attack’ to node ① and ③, but ‘Retreat’ to node ④, each node can gather all these
‘Attack’, ‘Attack’ and ‘Retreat’. In other words, all of node ①, ③, and ④ collect same
values from node ② (2A + R, 2 ‘Attack’s and 1 ‘Retreat’), so they will have same
conclusion on node ②.
For other cases — case 2) case 6), things are same. Even though the gathered values can
vary from case to case — 2A + R or A + 2R. the values are same for all nodes in a single
case.
Among 6 cases only one case occurs. So, node ①, ③, and ④ will have same
conclusion on node ② in any case.

To review above more generally, by virtue of relay, each normal node (①, ③, or ④)
can collect all the messages sent to other nodes (③ and ④for ①, ④ and ① for ③, ①
and ③ for ④) from the sender (②). In other words, each node will see the same set of
messages, and so have same conclusion.

# When node 2 is traitor


v:2:3:1 = v:2:3
v:2:4:1 = v:2:4
v:2:::1 = v:2:1 + v:2:3:1 + v:2:4:1 = v:2:1 + v:2:3 + v:2:4
v:2:1:3 = v:2:1
v:2:4:3 = v:2:4
v:2:::3 = v:2:3 + v:2:1:3 + v:2:4:3 = v:2:3 + v:2:1 + v:2:4

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 9/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

v:2:1:4 = v:2:1
v:2:3:4 = v:2:3
v:2:::4 = v:2:4 + v:2:1:4 + v:2:3:4 = v:2:4 + v:2:1 + v:2:3
v:2:::1 = v:2:::3 = v:2:::4

The same principal based on relay applies even when there are more nodes. After
enough relays, each node can collect all the messages sent to other nodes from a node
and so make same decision.

3m + 1 processor algorithm may look perfectly useful with its simple recursive rules.
But actually the algorithm has a fatal weakness in scalability due to its complexity. As
can be seen in table below, the number of message increases radically as relays are
repeated. The complexity against m (the number of faulty nodes) is O(nᵐ). So the
algorithm is only useful with small networks. With large networks, we need other
algorithms.

fault total recursions messages

1 4 OM(1), OM(0) 4·3 + 4·3·2

2 7 OM(2), OM(1), OM(0) 7·6 + 7·6·5 + 7·6·5·4

OM(3), OM(2), OM(1),


3 10 10·9 + 10·9·8 + 10·9·8·7 + 10·9·8·7·6
OM(0)

... ... ... ...

3m + OM(m), OM(m - 1), ⋯ , (3m+1)·3m + (3m+1)·3m·(3m-1) + ⋯ +


m
1 OM(1), OM(0) (3m+1)·3m·(3m-1)⋯2m

3m+1-complexity.mediawiki hosted with ❤ by GitHub view raw

[1] M. Pease, R. Shostak, and L. Lamport, “Reaching Agreement in the Presence

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 10/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Proof of Work
In 3m + 1 processor algorithm or pBFT explained above, nodes collaborate to
overcome the Byzantine fault. To collaborate over the disturbance of broken or hacked
nodes, algorithms have a constraint on the number of node and require enough
communications, which restricts the scalability.
3m + 1 processor algorithm has complexity of O(nᵐ) and pBFT has complexity of O(n²).

Proof of Work¹ (PoW) algorithm takes totally different approach. In PoW network,
every node competes rather than collaborate. The node which succeeds to solve a
mathematical puzzle that is extremely difficult to solve but very easy to verify will
make a decision for the whole network at that time. Right after a puzzle is solved and
the solution is propagated throughout the network, the competition for the next puzzle
starts.
There are a few types of such puzzles including hash computation and prime
factorization² of huge integer. There are no special formulas or techniques to solve
these kind of puzzle more quickly. Only simple repeated trial and error³ is valid
strategy.
So, the chance for a node to solve the puzzle is completely probabilistic. The
probability is solely dependent on the computing power of the node. If the computing
power is decentralized enough among nodes, it is actually impossible for particular
node or nodes to reign the PoW network.

Public blockchain network such as Bitcoin and Ethereum, as the network is open for
anyone to join as a peer with his or her own node, computing power concentration is
largely suppressed.

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 11/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Process of PoW

For Bitcoin and Ethereum, the puzzle is finding a nonce that satisfies very specific
condition on the hash of block header combined with the nonce.
As a simple (not real) example for understanding, the condition says the hash should
start with 4 leading zeros. The following sentence express the condition or puzzle
more concisely and clearly — SHA-256 is one of popular hash functions and data
means block header

Find nonce for SHA-256(data + nonce) to Start with '0000'

Hash function⁴ is a function that convert arbitrary-size data into fixed-size data of
totally different and unpredictable values.
Hash function has some important and unique features. The first and foremost one is
the the function is irreversible. More formally, there is no inverse function for a hash
function.

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 12/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

For example, it is simple and straightforward the SHA-256⁵ hash value of “Hello, world!”
is “0x315f5bdb76d0…”, but it is impossible to calculate the inverse SHA-256 for the hash
value of “0x315f5bdb76d0…” is “Hello, world!” using any formula or special technique.

SHA-256("Hello, world!") = "0x315f5bdb76d0…" # easy


SHA-256⁻¹("0x315f5bdb76d0…") = "Hello, world!" # no formula

The second feature is that the hash function changes the output(hash value) a lot even
for a very small change of input. In other words, hash function diffuses input very
dynamically.
You can see this in the below table. In the table, the input values are different a little
from “Hello, world!” to “Hello, world!0”, “Hello, world!1”, “Hello, world!2”, and so on. But
the hash values of those are totally different. You can never guess or calculate the hash
of “Hello, world!1” from the hash of “Hello, world!0”, “Hello, world!2”, or other similar
input.

Finding Nonce Example

If you need to find a nonce which would produce hash value starting with 4 leading
zeros (“0x0000”) when appended after “Hello, world!” — like the “Hello, world!4250” at
the last row of the above table, there’s no special way or method more effective than
simple sequential trials from “Hello, world!0” to “Hello, world!4250”.

The concrete PoW algorithm being used by Ethereum is Ethash⁶. Ethash uses Keccak-
256 as a hash function. The puzzle of Ethash is to find a nonce which makes the
Keccak-256 hash of the block header and that nonce less than the specified value.

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 13/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Mining Function of Ethash

The above mine is Python function described in Ethash specification⁶. In Bitcoin or


Ethereum, finding the nonce that meets the condition and solving the puzzle is called
mining.
The node which succeeded finding the nonce will be given reward. So solving the
puzzle is like mining gold.

In the while clause of the above function, the trials are repeated changing nonce by
one until the hash value ( hashimoto_full ) become equal or less than a certain target .

The target is a value given by dividing 2²⁵⁶ by the specified difficulty . The hash
value of SHA-256 is 64-digit hexadecimal and the largest value is 2²⁵⁶. The target is
smaller than 2²⁵⁶, so when expressed in 64-digit hexadecimal, the value has leading
0 (zero)s. For example, target value 2²²⁷ has 7 leading 0s and target value 2²⁰⁵ has 12
leading 0 s.

2227 = 0x0000000800000000000000000000000000000000000000000000000000000
2205 = 0x0000000000002000000000000000000000000000000000000000000000000
 
 
2256
dif f iculty = ​

target
 
1 target
= 256 = mining probability
2
​ ​

dif f iculty

Powered By Embed Fun

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 14/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Target and Difficulty

The product of target and difficulty is constant 2²⁵⁶. Raising difficulty will
lowering target so that more leading 0s necessary.
The number of all hash values of SHA-256 is 2²⁵⁶ and at a given difficulty the number of
hash values of successful mining is target . So, target /2²⁵⁶ is the possibility of
successful mining in a single trial. This is same with the inverse of
difficulty (1/ difficulty ).

The table below shows the real difficulty s and target s of a few blocks in Ethereum
mainnet. If difficulty is managed to be constant, the block creation interval will be
affected by the number of node or the total computing power they are consuming. To
prevent fluctuation of block creation interval and keep block creation timing uniform
and predictable, Ethereum continuously reconcile the difficulty for the new block
based on recent block times.

Difficulty and Target Samples from Ethereum Mainnet

In Bitcoin or Ethereum, every transaction is digitally signed so that faulty or traitor


node can not manipulate transactions. Block is quite easy to verify although extremely
hard to mine so that malicious node can not spread invalid blocks. Like this way, using
both PoW and digital signing, Bitcoin and Ethereum can achieve Byzantine fault
tolerance.

Because PoW is working based on competition not corporation, the complexity is


irrelevant to the number of nodes. The complexity largely depends on the difficulty of
the puzzle. So, for large network containing hundreds or thousands of nodes, PoW
seems to be much favorable than corporation based consensus algorithms such as
pBFT. But PoW also has fatal problems. The best well-known one is enormous energy

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 15/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

waste due to heavy competition and another important one is finality problem
explained in detail below.

Finality Problem
To recap, the successful puzzle solving is called mining in PoW network. Mining means
a new block is created and the miner is rewarded. Large number of nodes compete
intensively to get the reward.
Looking into details of mining rule, the hash calculation includes the hash value of last
block in addition to the transactions to add and nonce. It is for maintaining the
blockchain linear or 1-dimensional. This makes it more difficult to compromise the
integrity of blockchain and prevents the conflicting states in blockchain.
In most of the cases, minings occur with intervals enough to keep the blockchain
linear. But almost simultaneous minings can occur no matter how much the
difficulty is increased, because mining is probabilistic by nature.
Although the verification is much simple, it takes time to propagate a mined block to
all nodes across the world. So simultaneous minings make the whole network a little
non-uniform.

Like the following example. if two distant nodes P and Q succeed to mine a block —
block B(m) and block B(n) in each — almost at the same time, within time not enough
to propagate B(m) and B(n) across the whole network, nodes around P will have B(m)
as a last block and nodes around Q will have B(m) as a last block. Nodes at similar
distance from both P and Q can not distinguish which block actually mined first.

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 16/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Two different nodes may succeed mining almost simultaneously.

Both B(m) and B(n) are based on the same previous block. In other word, they contain
the same hash of previous block header. So, the previous block is called parent block.

Nodes continuously try to mine next blocks to acquire rewards. Some nodes which
received B(m) first would challenge next block based on B(m), but other nodes which
received B(n) right before would challenge next block based on B(n). Although
successful minings occur with enough time intervals due to the difficulty in most
cases, it is possible with very low probability that the right next mining also occurs
almost simultaneously. In these case, mined blocks can have different parent blocks.
For example one of the 2nd simultaneous blocks is base on B(m) and the other is base
on B(n) like the following example image.

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 17/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Next time, another 2 different miners may succeed mining almost simultaneously again.

You can see that the entire chain is not liner any more, although there was no violation
against PoW rules before. This is called fork, and each linear (connected linearly) part
from the fork point is called branch. In the above example, there are 2 branches. One
branch is B(m) followed by B(m2) and the other is B(n) followed by B(n2).

With high competition for mining and non-uniformity in the network, the previous
abnormal (but not illegal) situation can continue further. In other words, 2 branches
grow more like B(m)-B(m2)-B(m3)-B(m4) and B(n)-B(n2)-B(n3)-B(n4). Or even
another branch may appear.
But, eventually only one branch will survive because mining is really difficult and all
of these are probabilistic. There is also another mechanism called longest chain rule
which enforces to select the longest branch under a fork situation. The longest rule
would accelerate only one branch to survive once one of the simultaneous branches
starts to grow quickly.

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 18/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Eventually, only one branch will survive after a fork.

Although the chain remains linear in the long term, there could be a serious trouble
called finality problem in the meanwhile. Finality problem is a situation where
successfully mined transactions or blocks become invalid or canceled later due to a
fork explained above. It is not caused by a violation of PoW. It is an intrinsic aspect of
PoW.
The picture below describes a typical process of finality problem. It shows growth of a
blockchain as time goes by. At ②, block B(n) containing tx(b) was mined successfully.
But almost simultaneously another block B(m) which is not child of B(n) also was
mined making a fork(③). Although two branches had kept growing together, after all a
branch stemmed from B(m) survived invalidating the block B(n) and the transaction
tx(b), like ⑥. This implies that a transaction completely committed once can be roll-
backed later. It is a significant drawback from the data persistence system’s point of
view.

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 19/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

To workaround the finality problem, we should wait and watch for a while a block
including our transaction to grow further even after mining. Usually, 6 more blocks is
thought to be necessary for Bitcoin and 12 blocks for Ethereum. Of course, these
numbers doesn’t guarantee prefect finality.
Currently block time of Ethereum is about 13 seconds. But finality problem makes the
actual time to confirm a transaction 2.6 minutes instead of 13 seconds.

Finality problem can be exploited by a huge miner to compromise integrity and trust
of a Blockchain. If he or she has more than 50% of entire mining capabilities, he or she
could invalidate very important or expensive transactions to earn a profit or to achieve
evil purpose. This is called “51% attack”.
Even though it may considered almost impossible to occupy more than 50% mining
power among hundreds of independent and active miners, there are actual thread of
51% attack⁷. Ethereum Class(ETC) was attacked⁸ at Jan. 2019 and Bitcoin Gold(BTG) at
Jan. 2020⁹.

To solve finality problem, Ethereum has developed a new consensus algorithm called
Casper FFG and it is among key features of Ethereum 2.0.

[1] Proof of Work


[2] Prime Factorization
[3] Trial and error
[4] Hash function
[5] SHA-256
[6] Ethash Specification

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 20/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

[7] What Is a 51% Attack?


[8] ETC 51 % attack — what happened and how it was stopped (14 Jan ‘19)
[9] Bitcoin Gold Blockchain Hit by 51% Attack Leading to $70K Double Spend (Jan 27,
‘20)

Casper FFG
Casper FFG is a type of PoS(Proof-of-Stake) consensus algorithm and has a few unique
features that is expected to solve or improve dramatically the finality problem. It was
first proposed by Vitalik Buterin and Virgil Griffith in 2017¹.

First, Casper FFG is a partial consensus algorithm which undertakes only finality
agreement. Casper FFG doesn’t include any rule to make or confirm blocks. It defines
a protocol to more quickly determine a real final block among several branches under

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 21/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

fork situation. It can be applied over other consensus algorithm such as PoW. So,
Casper FFG is classified as an overlay algorithm.

Second, Casper FFG itself is a type of PoS(Proof-of-Stake) algorithm which would


expect selected nodes to run. Unlike PoW network where any node can take part in
mining, in PoS network, only some special nodes who has some stake can join the
consensus to determine something like block. In Casper FFG, these nodes are called
validators.

Third, Casper FFG defines both incentive rules and penalty rules. Other PoS
algorithms including pBFT usually don’t have penalty rules. So even if some malicious
nodes try to disturb consensus, there’s no efficient way to prevent them. “Nothing at
stake”² is one of the most well-known problems for PoS algorithms. But, in case of
Casper FFG, validators to exploit nothing at stake will be punished and lose all their
stakes.

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 22/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Casper FFG Processes — 1) Voting, 2) Justified, 3) Finalized

Like pBFT or usual PoS algorithms, Casper FFG runs rounds in a fixed time schedule.
In each round, all validators should vote in each round following 2 strict rules. If a
validator violates a rule even once, it will lose its stake and be evicted from validators.
So, these rules are called slash conditions.

If a block receives votes from more than 2/3 validators in a round, the block is said to
be justified. Justified blocks still can be forked, so are not finalized. But if two
sequential blocks are justified, the parent block of the two becomes ultimately
finalized.
To add some details, because slash conditions prohibit a spanning vote, after two
adjacent blocks win votes, at most 1/3 validators can vote any block below the parent
block following the rules in later rounds. So, unless another 1/3 validators violate the
slash conditions losing all their stakes, the parent block would be an ancestor of all the
later justified votes.

Due to a penalty rules (slash conditions), Casper FFG is expected to promote more tight
cooperation and lead to far more fast and effective finalization than longest chain rule.

Casper FFG is a governing algorithm of Beacon chain which is the topmost feature of
Ethereum 2.0³ phase 0⁴.

For more concrete understanding, my presentation⁵ at SlideShare may be helpful if


read with the latest paper.

[1] Vitalik Buterin and Virgil Griffith, “Casper the Friendly Finality Gadget”, 2017
[2] Nothing At Stake Problem — A Forkin’ Mess!
[3] Ethereum 2.0 Info
[4] Validated: Staking on eth2 #0
[5] Casper FFG Explained
[6] Vitalik Buterin and Virgil Griffith, “Casper the Friendly Finality Gadget, Ver. 4”, 2019

Join Coinmonks Telegram Channel and learn about


crypto trading and investing
https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 23/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Also Read

Best crypto exchange | Top 10 cryptocurrency exchanges in 2021


Crypto trading on the cryptocurrency exchanges requires knowledge
about the market, which can help you gain profit…
blog.coincodecap.com

9 Best Crypto Lending Platforms in 2021


When it comes to cryptocurrency lending, tons of factors equate to a
good earning profile. Also, the borrowing part of…
blog.coincodecap.com

Crypto Trading Bot — Best FREE Crypto Trading Bots


Best crypto trading bots for Binance, Coinbase, Kucoin, and other
crypto exchanges in 2021. Quadency, Bitsgap…
medium.com

Best 6 Crypto Trading Signals Telegram Channels


It is tedious to find the right crypto trading signals provider. So, in this
article, we will be talking about the best…
medium.com

BlockFi Review 2021: Pros, Cons and Interest Rates


Today, we came up with a comprehensive BlockFi review, a crypto
lending platform founded in 2017 and has its…
blog.coincodecap.com

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 24/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Crypto Tax Software — Top 5 Best Bitcoin Tax Calculators [2021]


Whether you’re new to crypto or if you have been in the space for a
while, you’ll need to pay taxes.
medium.com

Pionex Review 2021 | Free Crypto Trading Bots and Exchange


Pionex is the rising start that provides tools for trading automation. 9
crypto trading bots are provided on Pionex…
medium.com

Best Crypto Hardware Wallets to Store Bitcoin [2021]


HODLing your digital asset is easy but finding the right way to store it is
a tedious task. Online wallets have a risk…
blog.coincodecap.com

Consensus Algorithm Blockchain Byzantine Fault Tolerance Pow

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 25/26
2/11/23, 11:02 PM Basic Consensus Algorithms, Explained | by Sangmoon Oh | Coinmonks | Medium

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app


Open in app Sign up Sign In

Search Medium

https://medium.com/coinmonks/basic-consensus-algorithms-explained-69a7a67ac13e 26/26
2/11/23, 11:05 PM Blockchain Consensus Algorithms. Proof Of Work (POW) Proof Of Stake… | by Mat David | Coinmonks | Medium

Published in Coinmonks

Mat David Follow

Oct 11, 2021 · 9 min read · Listen

Save

Blockchain Consensus Algorithms


Proof Of Work (POW)
Proof Of Stake (POS)
Delegated Proof of Stake(DPOS)
Longest Chain Rule
Byzantine Fault Tolerance (BFT)
POW Attacks
Proof Of Importance (POI)
Proof Of Burn (POB)
Proof Of Work, Proof Of Stake and Delegated proof of work are the ones used primarily
in the Blockchain, besides a few others. A consensus algorithm is a protocol upon
which the miners in the Blockchain agree before submitting the verified blocks to the
Blockchain. In a decentralized setup like Blockchain, the consensus algorithm allows
all the parties in the network to agree upon a specific block before submitting the valid
block to the Blockchain. This article will explore the different consensus algorithm.

The consensus algorithm provides the standards for the nodes in the network to join
the Blockchain in a trustless manner. Trustless means a node doesn’t have to validate
its identity before joining a public blockchain.

Consensus algorithms check the integrity of new blocks and past blocks.

https://medium.com/coinmonks/blockchain-consensus-algorithms-6c2459737a61 1/10
2/11/23, 11:05 PM Blockchain Consensus Algorithms. Proof Of Work (POW) Proof Of Stake… | by Mat David | Coinmonks | Medium

It is a set of rules written using computer code and follows specific governance
standards. Let’s proceed to understand a few consensus algorithms.

Subscribe to Coinmonks Youtube Channel to get daily crypto news.

Proof of Work (POW)


Proof of work is the consensus algorithm used in major blockchains. Bitcoin
blockchain uses the POW algorithm. In POW, the miners calculate a complex
mathematical puzzle, called the NONCE. The calculated nonce should be less than the
previous nonce value present in the blockchain. POW requires significant
computational resources. The computational resource for POW in the Bitcoin
blockchain network is equivalent to the power requirement by Switzerland.

When calculating the successful block, the miners agree on the longest chain rule. Any
entity holding 51 % of hashing power in the POW consensus can maintain the longest
chain and control or undermine the blockchain. They can introduce false transactions,
eliminate or exploit the blockchain by double-spending and steal assets of other
miners. GHash.io owned 54% of the BTC blockchain at one point.

The Longest Chain rule

https://medium.com/coinmonks/blockchain-consensus-algorithms-6c2459737a61 2/10
2/11/23, 11:05 PM Blockchain Consensus Algorithms. Proof Of Work (POW) Proof Of Stake… | by Mat David | Coinmonks | Medium

“ The majority decision is represented by the longest chain, which has the greatest proof-of-
work effort invested in it. — Satoshi Nakamoto”

All the nodes trust the longest chain in a blockchain without trusting each other
directly.

Building any block requires energy. The miners work on blocks that form the
longest chain and have the most effort. The chain with the longest block needs the
most power to create. The algorithm discards the shorter chains, and the longest
chain is adopted.

Based on the difficulty, blocks will take more effort to reach the nonce value which
is smaller than the target. Because difficulty changes, the greater the difficulty the
more the effort/resources.

Chainwork is the metric to calculate the longest chain. It is the total number of
hashes that are required to produce the current chain. To get the complete hash,
you need to sum the hashes needed for each block.

When there are the same blocks, the nodes disagree on which nodes to reach a
consensus. The nodes pick the newer block built on top of the last block, forming
the longest chain.

It is difficult for a single miner to replace the chain with the longest chain principle
because the resource required is way too high to replace. This rule protects the
blocks already mined. It is a cooperative effort to mine a block.

The rewards motivate the miners to calculate and mine the longest block. The
longest chain that is 100 blocks deep gets awarded in the Bitcoin blockchain.

https://medium.com/coinmonks/blockchain-consensus-algorithms-6c2459737a61 3/10
2/11/23, 11:05 PM Blockchain Consensus Algorithms. Proof Of Work (POW) Proof Of Stake… | by Mat David | Coinmonks | Medium

Bitcoin and Ethereum are the different blockchains using the POW consensus
algorithms.

Various POW attack

Double spending
In double-spending, a miner can use the same coins to make multiple transactions.
Double spending leads to spending more than expected. It is vital to approve all the
transactions in blockchain that could potentially stop such double-spending attacks.

Selfish mining
In selfish mining, the miner withholds mined blocks and selectively releases them into
the blockchain. A miner with a 33 percent stake can earn 50 percent of mining power
by progressively submitting the blocks.

Proof Of Stake (POS)


POS uses a different approach compared to POW. The miner commits the currency (
stake) he has to the blockchain network to get an opportunity to mine. A chosen
random miner with a stake validates the block transaction. If a miner cannot commit
to the stake, the miner can join a stake pool to participate in the mining. In POS, the
miners are also called forgers. A Miner gets paid a transaction fee for successfully
validating a block in the POS system.

POS system introduced the Ethereum 2.0 standards-based POS algorithm (Casper ) to
solve the Byzantine General problem(BGP). In this, a two-thirds majority is required
among the nodes to reach a consensus.

https://medium.com/coinmonks/blockchain-consensus-algorithms-6c2459737a61 4/10
2/11/23, 11:05 PM Blockchain Consensus Algorithms. Proof Of Work (POW) Proof Of Stake… | by Mat David | Coinmonks | Medium

In POS, security is easier to achieve because a 51% stake is a vast amount for a single
entity to lose if the malicious activity miner is caught in the blockchain. Double
spending is still possible where one who has 51% of the stake can do malicious
spending. The same technique of approving and validating transactions before
committing to the blockchain will help mitigate this attack.

ADA/ Cardano currently uses Proof of Stake (POS). Ethereum plans to move to POS
soon.

Delegated Proof of Stake (DPOS)


In the delegated DPOS, a witness is chosen to secure the network. The voters are
people who hold tokens and the voters who hold the most tokens, decide the actor who
can secure the network or mine a block.

The chosen person/witness miner should do a quality job and should not do any
malicious activity. The voters have the right to withdraw the vote if the actor’s
performance is not on par, or he is identified as a bad actor. The delegated proof of
stake approach saves a lot of computational power and reaches a consensus in a
democratic way.

Proof of Authority (POA)


POA is used in Ripple and Hyperledger blockchains. POA is based on a consensus
algorithm that offers high tolerance for faults and performance. The node has to pass
the authentication to prove itself worthy or has the authority to create a block.

It does not require high power computational hardware, it has predictable block time,
paid high transaction fees, and has tolerance to malicious nodes.

POA verifies the identity of the node before accepting it. This consensus algorithm is
used in the private blockchain setup. Since the identity of the block is verified, the
nodes are allowed to submit a block and it is considered valid. In the POA consensus
algorithm, the block creation is dynamic and the verification time is faster.

Byzantine Fault Tolerance (BFT)


In a situation where certain nodes fail to respond due to a technical or hardware
failure or respond with a malformed message, BFT can be used to mitigate such

https://medium.com/coinmonks/blockchain-consensus-algorithms-6c2459737a61 5/10
2/11/23, 11:05 PM Blockchain Consensus Algorithms. Proof Of Work (POW) Proof Of Stake… | by Mat David | Coinmonks | Medium

situations. Using BFT, the healthy nodes or the nodes which provide the correct
response can reach a consensus to overcome such node failures and make a decision
to proceed or stop the node.

The parallel to the Byzantine General problem (BGP) is seen when the Generals
separated by distance have to decide to either proceed to attack or retreat from an
attack. In this situation, the generals have to agree on a majority. If one of the generals
plays the double role of voting to attack and also voting to retreat and does not join the
team of attacking generals, then the result could be catastrophic. The BGP also gets
aggravated by the chances of the message getting lost by the messengers who have to
travel distant places to deliver. The BFT consensus algorithm is designed to address
BGP scenarios of the crypto currencies world.

https://medium.com/coinmonks/blockchain-consensus-algorithms-6c2459737a61 6/10
2/11/23, 11:05 PM Blockchain Consensus Algorithms. Proof Of Work (POW) Proof Of Stake… | by Mat David | Coinmonks | Medium

Proof of Importance (POI)


The POI consensus similar to POS uses certain criteria to evaluate the validity of a
node. In this case, the other metrics used to evaluate the nodes are the number of
vested currencies, net transfers and activity of the cluster. Although it is similar to POS,
the metrics used other than the amt of stake to validate a node help overcome the
loophole in the POS consensus algorithm.

Proof Of Burn (POB)


In the proof of burn consensus, the tokens are sent to a non-usable address. This is the
address that does not have a private key to decrypt and use the tokens. The miner can
virtually mine equivalent to the burned coins. The goal is to reduce the circulation of
currencies and sometimes to produce a counter-native currency like the XCP. Using
POB, you can send transactions that will burn your own coins.

Periodic burning of the coins disallows the unfair advantage of over-investing initially,
rather that promotes periodic burning of coins and keeps the system active. For
instance, Slimcoin, a virtual currency network that uses POB, allows a miner to burn
coins that gives them the right to compete for the next block and also gives them the
chance to receive blocks during a longer one year time period.
https://medium.com/coinmonks/blockchain-consensus-algorithms-6c2459737a61 7/10
2/11/23, 11:05 PM Blockchain Consensus Algorithms. Proof Of Work (POW) Proof Of Stake… | by Mat David | Coinmonks | Medium

Proof of Elapsed time (POET)


POET is an enhancement on POW, where it uses a randomized timer system for the
network participants. With POET, they are broken into two phases, one is a verification
and joining the network and the other is a randomized selection process, based on
elapsed time.

POET was developed by Intel Corporation. This algorithm uses a lottery system where
the miners are selected in a timed manner and all the miners get equal chances to
mine. Each participating node of the POET system goes to a passive mode for an
allocated random wait time.

The miner’s node with the shortest wait time awakes and starts the mining. This is
similar to POW but not all nodes are the time competing to provide the proof of validity
for a block. The nodes that are dormant because of their downtime can save resources
and execute some other non-primary tasks.

This article covered a few predominantly used consensus algorithms in the Blockchain
technology. Read more articles on IAM & Security @https://iamblockc.medium.com/

Join Coinmonks Telegram Channel and Youtube


Channel learn about crypto trading and investing
Also, Read
How to buy Bitcoin Anonymously | Bitcoin Cash Wallets

Binance vs FTX | Best (SOL) Solana Wallets

How to Swap Crypto on Uniswap?

WazirX vs CoinDCX vs Bitbns | BlockFi vs CoinLoan vs Nexo

LocalBitcoins Review | Cryptocurrency Savings Accounts

Coinbase Review| Deribit Review |FTX Review

NGRAVE ZERO review | Phemex Review | PrimeXBT Review

Best Blockchain Analysis Tools | Earn Bitcoin


https://medium.com/coinmonks/blockchain-consensus-algorithms-6c2459737a61 8/10
2/11/23, 11:05 PM Blockchain Consensus Algorithms. Proof Of Work (POW) Proof Of Stake… | by Mat David | Coinmonks | Medium

Crypto arbitrage Guide | How to Short Bitcoin

Best Crypto Exchanges in Germany | Arbitrum: A Layer 2 Solution

Binance Trading Bots | OKEx Review | Atani Review

Best Crypto Trading Signals Telegram | MoonXBT Review

Godex.io Review | Invity Review | BitForex Review

MoonXBT vs Bybit vs Binance | Hardware Wallets

Huobi Trading Bot | How to buy ADA | Geco.One Review

Binance vs Bitstamp | Bitpanda vs Coinbase vs Coinsbit

How to buy Ripple (XRP) | Best Crypto Exchanges in Africa

Best Crypto Exchanges in Africa | Hoo Exchange Review

eToro vs Robinhood | MoonXBT vs Bybit vs Bityard

What are the Trading Signals? | Bitstamp vs Coinbase

ProfitFarmers Review | How to use Cornix Trading Bot

How to Buy Domain Name on Unstoppable Domains?

Crypto Tax in India | altFINS Review | Prokey Review

Blockfi vs Coinbase | BitKan Review | Bexplus Review

Crypto Exchanges In South Africa | BitMEX Crypto Signals

MoonXBT Copy Trading | Crypto Wallets in UAE

Remitano Review | Guide to 1inch Protocol

Fold App Review | StealthEX Review | Stormgain Review

Buy PancakeSwap (CAKE) | Coinswitch Kuber Review

https://medium.com/coinmonks/blockchain-consensus-algorithms-6c2459737a61 9/10
2/11/23, 11:05 PM Blockchain Consensus Algorithms. Proof Of Work (POW) Proof Of Stake… | by Mat David | Coinmonks | Medium

Pow Pos Bft Poi Pow Attacks

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter


Open in app Sign up Sign In

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.
Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/blockchain-consensus-algorithms-6c2459737a61 10/10
2/11/23, 11:06 PM Advantages and Disadvantages of the Longest Chain Rule | by Conflux Network | Medium

Conflux Network Follow

Aug 30, 2019 · 6 min read · Listen

Save

Advantages and Disadvantages of the Longest


Chain Rule
By Conflux Development Department

In this article, the discussion will be focusing on the Longest Chain Rule adopted by
Bitcoin, namely the “Satoshi Nakamoto consensus algorithm” .
Conflux adopts the Heaviest Chain Rule, which is different from the Longest Chain Rule.
Previously, we often talked about why Conflux did not choose the Longest Chain Rule,
but barely mentioned any advantages of such. Therefore, a more comprehensive
discussion that covers both strengths and weakness is shared here.

Firstly, let’s take a look at the advantages.

Starting from the Bitcoin, followed by the Litecoin — which only altered a couple of
parameters of Bitcoin, the later proposed Bitcoin-NG[1], and the OHIE[2] using the DAG
structure, the core concept of many public chain consensus algorithms is the Longest
Chain Rule.

Favored by so many public chain projects, what is the biggest advantage of the Longest
Chain Rule?

OHIE’s paper[2] mentioned a key point: for a blockchain system, one crucial point is an
“end-to-end” security proof, that is, a security proof only work for a few specific attacks
is far from enough, as there is no way to avoid smarter people to design smarter attack
strategies in the future.
https://confluxnetwork.medium.com/advantages-and-disadvantages-of-the-longest-chain-rule-bc27225a2728 1/5
2/11/23, 11:06 PM Advantages and Disadvantages of the Longest Chain Rule | by Conflux Network | Medium

As for the end-to-end security proof, the Longest Chain Rule advances much more than
others. As the core rule of Bitcoin, the first of cryptocurrencies, the most extensive and
in-depth study has been carried out for the Longest Chain Rule.

In fact, even though it was the most studied, the full proof of its safety was not
completed until September 2016 by Rafael Pass, a cryptography professor at Cornell
University[3]. (Satoshi Nakamoto’s proof in the Bitcoin white paper only considered the
specific attack. Other earlier works only proved the security of the Longest Chain Rule
under certain conditions.) Rafael’s proof can be directly extended to any reasonably
designed public chain systems based on the Longest Chain Rule.

In contrast, other consensus algorithms, including the Heaviest Chain Rule, did not have
complete security proof until 2019, and some consensus algorithms did not even have a
security proof under defined conditions. We will leave the questions related with the
Heaviest Chain Rule and how Conflux will cope with them in the following issues, here I
will expand no further.
So why doesn’t Conflux employ the Longest Chain Rule?

The main reason is that the Longest Chain Rule is very sensitive to “orphan blocks”.

“Orphan block” refers to blocks that are formally legal but are not eventually included
by the main chain (the longest chain). In the ideal case, the honest node will increase the
length of the longest chain by one each time a block is generated. However, if two
honest nodes mine two blocks almost at the same time and do not yet refer to each
other as the parent block, then the two blocks will form a competitive relationship. At
best, only one of the competing blocks will be included in the longest chain, and the rest
will become “orphan blocks” that do not contribute to the longest chain.

Once there are too many orphan blocks in the system, the growth rate of the longest
chain will be affected, which will increase the chances of being attacked. For example, in
the case where 50% of the honest blocks become orphans, the average growth rate of
the longest chain is only half of the block-generating speed of the honest nodes. At this
time, the attacker only needs 34% of the total computing power (more than half of the
computing power of the honest node) to initiate a double-spend attack on any previous
transactions.

https://confluxnetwork.medium.com/advantages-and-disadvantages-of-the-longest-chain-rule-bc27225a2728 2/5
2/11/23, 11:06 PM Advantages and Disadvantages of the Longest Chain Rule | by Conflux Network | Medium

The frequency of the occurrence of orphan blocks is related to a ratio: Average block-
generating time/ Block broadcasting time in a peer-to-peer network. We will refer this
ratio as the security factor for the time being. The higher the ratio is, the less frequently
the orphan blocks will appear, and the safer the main chain will be. According to the
analysis in the article [3], when the ratio is larger than 7, the theoretical threshold of the
computational power required for the double-spend attack is about 45%; when the ratio
is greater than 60, the theoretical threshold is about 49.5%. At present, the ratio of
Bitcoin is around 60.

Therefore, we have the following four formulas:

1. Security Factor = Average Block-generating Time/ Block Broadcast Time


2. Network Bandwidth Factor = Block Size/ Block Broadcast Time
3. Payload per Transaction = Block Size / Number of Transactions per block
4. TPS = Number of Transactions per block/ Average Block-generating Time

That is, Security Factor * Payload per Transaction * TPS = Network Bandwidth factor

Each item, besides TPS itself, in the above equations, corresponds to an entry point to
improve the TPS under the Longest Chain Rule:

1. Lower the Security Factor: simply change the parameters of Bitcoin and sacrifice part
of the security in exchange for higher efficiency. For example, shorten the block
generation time or increase the block size (equivalent to increase the block broadcast
time).

2. Lower the Payload per Transaction: apply the Compact Block Technology to convert
the complete transmission of each transaction (appx. several hundred KB) into the
short transaction ID (4~6B).

3. Increase the Network Bandwidth Factor: increase the threshold for joining the
consensus nodes and sacrifice a degree of decentralization in exchange for higher
efficiency. In extreme cases, keep only a small number of supernodes (such as 21) that
are directly connected to the network.

The approaches above are very direct and effective, but the performance improvement
that they can bring is limited, and the sacrifices caused by the overuse of them is also
https://confluxnetwork.medium.com/advantages-and-disadvantages-of-the-longest-chain-rule-bc27225a2728 3/5
2/11/23, 11:06 PM Advantages and Disadvantages of the Longest Chain Rule | by Conflux Network | Medium

significant. For example, increasing the size of a block to hundreds of MBs or reducing
the number of consensus nodes to 20 is probably not worth the effort.

In fact, Bitcoin-NG and OHIE adopt some special designs to bypass the above
limitations. On the other hand, if the Tree Graph and the Longest Chain Rule are
combined, a high TPS consensus mechanism can be designed easily. In this regard, we
will address in another article to discuss it thoroughly.

All in all, on the road to improve the TPS, although the Longest Chain Rule is subject to
the above analysis, the ceiling can be bypassed by a reasonable design.

The biggest weakness of the Longest Chain Rule is the Block Confirmation Time.

If the Security Factor is set to 10, the average waiting time to confirm 6 blocks is 60 *
Block Broadcast Time; if a transaction needs to be confirmed within two minutes, the
Block Broadcast Time needs to be controlled within 2 seconds.
In fact, in each hop of the block broadcasting, every node needs to perform a series of
operations such as signature verification and transaction execution before forwarding
toward the next hop. When the number of nodes is large, it is very difficult to broadcast
even a small/medium size block to all (or most) nodes in the whole network within 2
seconds. For the current network environment, a confirmation time of 3 to 5 minutes is
basically the limit of the Longest Chain Rule.
The prototype of Conflux (also known as the current public version, the new version of
the article and technical specifications has not been publicly released) has a
confirmation time of 4 to 7 minutes, which does not seem to do a better job. In fact, as
we conduct more in-depth research on the Heaviest Chain Rule and further explore its
unique potential, we have made amazing breakthroughs in the confirmation time of the
PoW chain, and have achieved a confirmation speed way above that in the Longest
Chain Rule.
What is the most attractive feature of the Heaviest Chain Rule? We will discuss further in
the next issue.

[1] Eyal I, Gencer A E, Sirer E G, et al. “Bitcoin-NG: A Scalable Blockchain Protocol.”


USENIX 2016.

[2] Haifeng Yu, et al. “OHIE: Blockchain Scaling Made Simple.” arXiv:1811.12628 (2018).

https://confluxnetwork.medium.com/advantages-and-disadvantages-of-the-longest-chain-rule-bc27225a2728 4/5
2/11/23, 11:06 PM Advantages and Disadvantages of the Longest Chain Rule | by Conflux Network | Medium

[3] Rafael Pass, Lior Seeman, and Abhi Shelat. “Analysis of the Blockchain Protocol in
Asynchronous Networks.” EUROCRYPT 2017.

[4] Yonatan Sompolinsky and Aviv Zohar. “Secure High-Rate Transaction Processing in
Bitcoin.” International Conference on Financial Cryptography and Data Security, FC
2015.

Bitcoin Public Chain Pow Conflux Blockchain

Open in app Sign up Sign In

Search Medium
About Help Terms Privacy

Get the Medium app

https://confluxnetwork.medium.com/advantages-and-disadvantages-of-the-longest-chain-rule-bc27225a2728 5/5
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

Published in Coinmonks

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

Martin Thoma Follow

Jan 12, 2021 · 12 min read · · Listen

Save

The Blockchain
An Introduction to Blockchain, Bitcoin ₿, and related concepts

An example of a blockchain. Image by Martin Thoma.

Bitcoin crossed $40,000 USD for the first time recently, so it’s again in the news. Bitcoin
is just the most-known cryptocurrency. It is one application using a blockchain. In
this article, I will walk you through some core concepts of blockchain and

https://medium.com/coinmonks/the-blockchain-473aac352e5 1/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

cryptocurrencies. This article is written for beginners and a bit fluffy in some areas.
There will be follow-up articles to address that. Let’s start!

The Idea of a Ledger

German Ledger from 1828 (Source: RaphaelQS)

Suppose we lived in a simpler world without credits and with only one bank.
Everybody just owns a non-negative amount of money. The bank keeps track of
transactions. Let’s say we have three students living in the same shared apartment:
Anna, Bob, and Charlie. They all put $100 USD in their bank account:

Date | Sender | Receiver | Amount


-------------------------------------------------
2021-01-01 06:00 | (Deposit) | Anna | $100
2021-01-01 06:01 | (Deposit) | Bob | $100
2021-01-01 06:08 | (Deposit) | Charlie | $100

Now they make a few transactions. Before the bank's system accepts any transaction, it
checks if the account balance would still be non-negative. To get the account balance,
they can sum up all previous transactions. To make it a bit easier to follow, I will
shorten the “Date” to just a number counting up and add the balance after the
https://medium.com/coinmonks/the-blockchain-473aac352e5 2/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

transaction is executed for Anna, Bob, and Charlie to the table. The ABC columns are
just for you to keep track of; they are not necessary:

Date | Sender | Receiver | Amount | A | B | C


------------------------------------| ------------------
1 | (Deposit)| Anna | $100 | $100 | $0 | $0
2 | (Deposit)| Bob | $100 | $100 | $100 | $0
3 | (Deposit)| Charlie | $100 | $100 | $100 | $100
4 | Bob | Charlie | $20 | $100 | $80 | $120
5 | Bob | Anna | $30 | $130 | $50 | $120
6 | Anna | Bob | $130 | $0 | $180 | $120

Hence the ledger is just a database of all transactions.

(I’m simplifying a lot here. If you’re interested in Accounting Stuff, James Hearle
summarized those ideas and more, including double-entry accounting in the linked
channel.)

How to get rid of the Bank

https://medium.com/coinmonks/the-blockchain-473aac352e5 3/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

Photo by the blowup on Unsplash

Anna, Bob, and Charlie are unhappy with their bank. They don’t like that it takes
typically two working days until the booked transaction actually takes place. They are
unhappy with paying fees. They wonder what would happen if their bank suddenly
closed or maybe even manipulated the numbers.

As Anna, Bob, and Charlie live in the same apartment and they spent their money on
stuff for the apartment (soap, toilet paper, dishwasher tabs, …), they put a list on the
fridge. They simply make it public who made which transaction. They don’t have
complete trust in each other, though.

For example, Bob might write in the ledger that he got $20 from Charlie — although
Charlie never approved that. To make sure only the account owners can send money
from their accounts, every new transaction needs the signature of the sender. To make
sure that everybody only sends money they have, the remaining participants check
the balance of the sender. If an invalid balance is seen, the transaction is rejected.

They also want to make sure that nobody can erase any transaction. The solution is
simple: Every transaction gets an incrementing transaction number.

Let’s make it digital!

https://medium.com/coinmonks/the-blockchain-473aac352e5 4/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

Photo by Joshua Sortino on Unsplash

Anna, Bob, and Charlie want to be certain they will never lose their ledger. Instead of
having a single central ledger, they decide to distribute it. They all want to have a copy
of it.

Being young students, all of them happen to have a website. So they come up with this
protocol which they all want to follow:

1. If anybody wants to make a new transaction, they add the transaction to the copy
of the ledger they have on their website.

2. Everybody regularly checks if there are newer transactions in any of the other
ledgers.

3. If there is just one ledger with at least one new transaction, they just copy the
newer transactions.

Then they notice two problems. The first one is the signature. Luckily, one of them
heard of Public-Key Cryptography and digital signatures. They quickly realized that for
https://medium.com/coinmonks/the-blockchain-473aac352e5 5/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

any transaction, they can easily make a digital version of a signature that cannot be
forged. The digital signature does not only prove who made the transaction but also
makes sure that the content of the transaction is not modified. As the content of the
transaction contains the transaction number it is also not possible to delete a single
transaction. As the longest list of transactions is shared, one cannot simply crop a
whole lot of transactions off at the end.

Anna sees new transactions from Bob and Charlie. They all have the same green blocks, but bob discarded the
blue blocks in which he sent money to charlie. He created the red and the yellow ones to fool Anna. Image by
Martin Thoma

What happens if Anna sees a new transaction from Bob and a new transaction from
Charlie? Let’s say Anna has already confirmed that both, Bob and Charlie, have the
same indices up to #42. Bob and Charlie had a lot of transactions after that and the
correct latest transaction #60. But Bob doesn’t like that he had to send quite a bit of
money to Charlie in transactions #43 to #60, so he simply writes 10 transactions after
#42. Charlie still receives some money, but less than he should. Anna sees that Charlie
has already transaction number #70 and ignores what Charlie has.

To prevent this, they make it more difficult to create a transaction. They have heard of
Hashcash to prevent spammers from sending too many emails. The idea is to make the
Email sender (the potential spammer) execute a computationally heavy function. The
result of that function is easy to verify, but there is no way to speed the execution of the
function up in the first place. The result is then called Proof of Work. The specific kind
of proof of work that is typically used is called a nonce: Number only used once.
Finding such a nonce is intentionally computationally intensive. This is what mining

https://medium.com/coinmonks/the-blockchain-473aac352e5 6/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

is. Alice, Bob, and Charlie agree to add the proof of work to each transaction. Thus re-
calculating a lot of transactions is just not worth it anymore.

Anna sees the same number of new transactions from Bob and Charlie, but transaction #43 is different. Bob
tries to tamper with the amount he sent Charlie. Image by Martin Thoma

However, there is one big flaw: If they just store the transaction number, one could
replace transactions in the middle. If Bob is unhappy that he has sent $100 to Charlie in
transaction #43, he could just craft another transaction #43. So instead of storing the
transaction number, they agree to store an identifier that is unique to the content of
the previous transaction. A so-called hash value.

Let’s summarize:

Digital signatures prevent transaction forgery.

Storing the previous transactions' hash value prevents dropping existing


transactions by the sender. It also prevents duplication attacks.

Storing a proof of work per transaction prevents re-computation of many


transactions at the end of the ledger.

Having the chain of transactions, the ledger, distributed among all participants
makes the current state transparent. It’s a pre-requisite of preventing the re-
computation.

https://medium.com/coinmonks/the-blockchain-473aac352e5 7/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

You might already have guessed it: A transaction in this example is pretty close to a
block in the blockchain. In our example, a transaction contains:

The hash value of the previous block

Amount of transaction

Sender

Receiver

Those four elements are signed.

There is one special case: The first block. It does not have a previous block and thus
there cannot be a hash value of a previous block. The first block is called the genesis
block.

Example vs Bitcoin
One part I haven’t addressed at all is how the users of Bitcoin interact. We didn’t talk
about the network at all. Just to be clear: It’s NOT the case that everybody adds their
own website and everybody else has to know and check. That was just a simplification.
There is a Peer-To-Peer protocol in place.

An important element of Bitcoin is the consensus algorithm which decides what the
latest block is. The network members check new data before it’s added with a
consensus mechanism. The consensus algorithm has two elements. One consensus
mechanism is proof of work. The proof of work mechanism uses the computing
capacity of the members to validate work. In the example, I made it constant. It’s more
complicated.
The other element of the consensus algorithm is that in the case of a draw, if multiple
parties have created a new block at exactly the same time, one waits until one of the
chains gets longer. The longer chain wins.

Bitcoin also does not store the account balance. It’s more complicated. It stores a
sequence of transactions. A transaction consists of inputs and outputs. The sum of
inputs must be greater than or equal to the sum of outputs. This way, the double-
spending problem is solved. The inputs must be associated with the signature of the

https://medium.com/coinmonks/the-blockchain-473aac352e5 8/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

transaction — only the owner is allowed to send money. This structure is the reason
why you typically have two outputs: The receiver of the money and your own address
for the change. You can imagine every input as a coin. Coins can only be split by
having multiple outputs in a transaction, not by taking a part of a coin as input. You
can also join coins by having just one output.

It took me quite a while and the help of Rene Pickhardt to understand that Bitcoin is
actually NOT account-based, but everything that really matters is the transactions. It’s
not verified that the account is a non-negative balance, but that a transaction spends
only available money. That is a crucial difference! Rene is an awesome educator; check
out his introductory video about electronic cash.

Bitcoin vs Blockchain

Photo by Thought Catalog on Unsplash

https://medium.com/coinmonks/the-blockchain-473aac352e5 9/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

Bitcoin is an application that uses the blockchain. As an analogy, think of email. Email
is an application that uses the internet.

Blockchain Technology combines 4 crucial concepts

Cryptography to ensure messages cannot be faked

A Consensus Algorithm

A data structure for storage

Distribution via Peer-to-Peer protocols

For Bitcoin, those choices are:

Cryptography: Bitcoin uses ECDSA for signatures, double SHA-256 for hashing

Consensus Algorithm: Proof of Work (Proof of Stake would be an alternative)

Storage: Merkle Tree

Distribution: A TCP-based peer-to-peer protocol (source 1, source 2)

Blockchain vs DLT
Blockchain is a distributed ledger technology (DLT). Two other examples of DLT are
Tangle and Hashgraph.

When is Blockchain useful?


As with every hype, people want to apply it everywhere. But where does it actually
make sense?

You can see the blockchain as a very special database. It only supports insertions, but
no deletions or edits. It’s managed by the network. Depending on the protocol, this
can mean that the data in the blockchain is immutable. The data is distributed.
https://medium.com/coinmonks/the-blockchain-473aac352e5 10/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

There are some properties where blockchain will never be able to compete with well-
known database systems:

Insertion Speed: Visa is able to handle 65k transactions/second (source), Bitcoin


can only handle 7 transactions/second (source). That means, without the Bitcoin
Lightning Network (BLN) extensions. With the BLN, the system can process over
10k transactions/second (source).

Latency: Probably less than 5 seconds for Visa, but about 1 hour for Bitcoin
(source).

Queries: We have lots of database types. Especially relational databases allow very
complex queries. You will not have that with the blockchain.

Those alone already show that you want traditional database systems for a lot of
problems. So let’s see where the Blockchain shines:

Cryptocurrencies are probably the best-known examples of Blockchain technology


as Bitcoin made the whole topic famous. The idea here is that you have a digital
asset that cannot be forged. It’s impossible to create fake bitcoins. The government
cannot decide to print new Bitcoins. The process is transparent and open to
everybody: Every person and every organization. Privacy here is an interesting
topic; if you’re interested I would write an own article about that. It also has
challenges. For example, it’s impossible to get Bitcoin back if you lose your wallet.
They are gone. For everybody. Forever. Or if somebody steals your computer and
transfers them. If you get hacked. There is no court that can undo it.

Supply Chain Management: Many brands nowadays want to make their supply
chain more transparent. They want to prove to the customers where their product
came from; “traceability” is the buzzword. They also want to make sure that
counterfeits can be identified. So they upload data and about the origin of their
products at every step. Those steps have timestamps and are very fine-granular.
One problem the blockchain doesn’t solve is that all of the uploaded data could be
faked. If you want to know more, get in touch with my friend Peter Merkert. He
built retraced, a company that supports the clothing industry in supply chain
management. A big thank you also to him for proof-reading this article 🤗

https://medium.com/coinmonks/the-blockchain-473aac352e5 11/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

Real Estate: I know that in Germany we have pretty good maps of the country, of
ownership of every single piece of land. The process of buying and selling land
includes a trusted party — a notary. The notary gets 1.5% of the amount you pay for
the land. A square meter of land costs about 4000 EUR in Munich. A small house
has about 300m² — so you would pay 1.2 million EUR for the land and thus 18k for
the notary. This is a pretty good incentive to get rid of the notary, isn’t it?
The other case is that you might not have such a process in all countries.

Capital Markets: Blockchain-based digital securities provide cost advantages


because they can be issued and exchanged without middlemen (source). The
numbers in this source are pretty crazy: Cashlink and Finoa estimate that cost
savings from 35% to 65% for tokenization compared to traditional securitization
are possible.

Energy can be traded using blockchain. Read When Energy Trading meets
Blockchain in Electrical Power System: The State of the Art to learn more.

A good sign that you might have a valid use case if there is no trusted middleman or if
you want to get rid of the middleman. Just look at the supply chain case. If there is an
organization that people trust, then you don’t need to store the data in the blockchain.
That organization just stores it in a traditional database they control.

What’s next
Hashing: What it is, what cryptographic hashing is, what SHA / MD5 is

Merkle Trees: What they are, how they work, and how they are used in Bitcoin

Public-Key Cryptography and RSA: Public- and private keys, Digital Signatures,
Trapdoor functions. What it is and why it’s so important

Proof of Work: How it works, how difficult it is, and what Bitcoin / Ether / Stellar
use.

Smart contracts: What they are and how they work; e.g. with Etherium as an
example
https://medium.com/coinmonks/the-blockchain-473aac352e5 12/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

Initial Coin Offering (ICO)

Bitcoins consensus algorithm

Bitcoin and the network: How do people connect?

Bitcoin Wallets

Peer-To-Peer Stuff: How Gossip Protocols work

Let me know what you’re interested in!

See also

Literature
Satoshi Nakamoto: “Bitcoin: A Peer-to-Peer Electronic Cash System”, 2008.

Gavin Wood: “Ethereum: A secure decentralised generalised transaction ledger”,


2014

Patrick Schueffel: “Alternative Distributed Ledger Technologies Blockchain vs.


Tangle vs. Hashgraph — A High-Level Overview and Comparison”, 2017.

Videos
Bosch created an awesome introductory video:

https://medium.com/coinmonks/the-blockchain-473aac352e5 13/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

Chain Reaction: Distributed Ledger Technologies (DLT) explained

And also 3Blue1Brown:

But how does bitcoin actually work?

https://medium.com/coinmonks/the-blockchain-473aac352e5 14/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

Join Coinmonks Telegram group and learn about


crypto trading and investing
Also, Read
Learn Ethereum and Web3 development

The Best Crypto Trading Bot

3Commas Review

Pionex Review

AAX Exchange Review | Referral Code, Trading Fee, Pros and Cons

Deribit Review | Options, Fees, APIs and Testnet

FTX Crypto Exchange Review

NGRAVE ZERO review

Bybit Exchange Review

3Commas vs Cryptohopper

The Best Bitcoin Hardware wallet

Crypto Copy Trading Platforms

ledger nano s vs x

Vauld Review

The Best Crypto Tax Software

Best Crypto Trading Platforms

Best Crypto Lending Platforms

Ledger Nano S vs Trezor one vs Trezor T vs Ledger Nano X

https://medium.com/coinmonks/the-blockchain-473aac352e5 15/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

BlockFi vs Celsius vs Hodlnaut

Bitsgap review — A Crypto Trading Bot That Makes Easy Money

Quadency Review- A Crypto Trading Bot Made For Professionals

CoinTracking Review

YouHodler Review

Ellipal Titan Review

SecuX Stone Review

BlockFi Review | Earn up to 8.6% interests on your Crypto

Coinrule review

Best Blockchain Analysis Tools

Crypto arbitrage guide: How to make money as a beginner

Best Crypto Charting Tool

What are the best books to learn about Bitcoin?

Get Best Software Deals Directly In Your Inbox

https://medium.com/coinmonks/the-blockchain-473aac352e5 16/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

Blockchain Cryptocurrency Bitcoin Distributed Ledgers Concept

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

We couldn't process your request. Try again, or contact our


support team.

https://medium.com/coinmonks/the-blockchain-473aac352e5 17/18
2/11/23, 11:10 PM The Blockchain. An Introduction to Blockchain, Bitcoin… | by Martin Thoma | Coinmonks | Medium

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.com/coinmonks/the-blockchain-473aac352e5 18/18
2/11/23, 11:12 PM The Bitcoin Blockchain Explained. Learn how Bitcoin works and how the… | by David Mooter | The Startup | Medium

Published in The Startup

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

David Mooter Follow

Jun 6, 2020 · 10 min read · · Listen

Save

The Bitcoin Blockchain Explained

Photo by Dmitry Demidko on Unsplash

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af 1/13
2/11/23, 11:12 PM The Bitcoin Blockchain Explained. Learn how Bitcoin works and how the… | by David Mooter | The Startup | Medium

Bitcoin is the world’s first and most popular digital currency. It is decentralized and
controlled by no one. How does it work, and why can you trust it? After all, if
computers can copy any file, why can’t I just make copies of my bitcoins? And if it is
not controlled by any one central party, what prevents me from making forging
transactions for bitcoins I don’t own? This article will explain in layman’s terms how
Bitcoin works and provide information on how the technology backing Bitcoin can be
used for business use cases beyond simply a digital currency.

Bitcoin works by solving three record-keeping challenges without the need for a
central record keeper like a bank:

1. Proving ownership of bitcoins.

2. Preventing tampering with records of past transaction.

3. Providing an authoritative ledger of transactions that is trustworthy.

Challenge #1: Proving Ownership


The first challenge for Bitcoin is proving ownership. When the owner of a bitcoin
publishes a transaction to the network, how do we know that it actually came from that
bitcoin’s owner and not an imposter? The answer to this lies in computer encryption.

Public/Private Key Encryption


Bitcoin is based on a form of encryption called public/private key encryption. In this
encryption, you generate two keys. Data encrypted with one key can be decrypted by
the other and vice versa. One of these keys you make public and the other you keep a
private secret.

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af 2/13
2/11/23, 11:12 PM The Bitcoin Blockchain Explained. Learn how Bitcoin works and how the… | by David Mooter | The Startup | Medium

A message encrypted by one key of the pair is decrypted by the other.

This opens the door for sending secret messages. Let’s use the characters from
Guardians of the Galaxy for a fun example. Suppose that Star-Lord, the hero, wants to
send a secret message “Hello Groot” to his tree-shaped friend Groot and ensure the
movie’s arch-villain Thanos can’t read it. Groot has created a pair of public/private
keys. Star-Lord takes Groot’s public key and uses it to encrypt the message. The
message while in transit looks like gibberish, but when Groot receives it, his private
key is able to decrypt it.

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af 3/13
2/11/23, 11:12 PM The Bitcoin Blockchain Explained. Learn how Bitcoin works and how the… | by David Mooter | The Startup | Medium

Star-Lord encrypts a message using Groot’s public key. Groot decrypts it with his private key.

Digital Signing
Using these keys in reverse can also be used to verify the authenticity of who created
the data, and that is how Bitcoin employs it. Now suppose Groot wants to send Star-
Lord the message “I am Groot.” There is no reason to encrypt it because we all know
that’s the only thing Groot says, but Groot wants to prove to Star-Lord that the message
indeed came from Groot, not some 3rd party imposter. Groot would encrypt the
message with his own private key. When Star-Lord receives the message and decrypts
it with Groot’s public key, he sees “I am Groot.” This message is not a secret, but the
fact that Groot’s public key decrypted it is proof that it was generated using Groot’s
private key. Thus it proves the authenticity of the message.

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af 4/13
2/11/23, 11:12 PM The Bitcoin Blockchain Explained. Learn how Bitcoin works and how the… | by David Mooter | The Startup | Medium

Since Groot’s public key decrypts the message, Star-Lord knows it truly originated from Groot.

Signing Bitcoin Transactions


Bitcoin wallets are in fact public/private key pairs. When someone gives you his wallet
ID, that ID is actually his public key. When you send coins to another wallet, the
Bitcoin software uses your public key to authenticate that the transaction came from
you, not an imposter.

If Groot wanted to send a bitcoin in his wallet to Star-Lord, he would generate a


message declaring he’s transferring the bitcoin to Star-Lord’s wallet and use his private
key to sign the message. So long as everyone agrees that the bitcoin being transferred
indeed belonged to Groot’s public key wallet, the fact his public key can decipher this
transaction proves Groot created this transaction. If Thanos instead forged a message
claiming Groot sent him the bitcoin, everyone would know it was a fake since Groot’s
public key would not be able to decipher any transactions written by Thanos.

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af 5/13
2/11/23, 11:12 PM The Bitcoin Blockchain Explained. Learn how Bitcoin works and how the… | by David Mooter | The Startup | Medium

All bitcoin transactions are signed by the bitcoin’s owner, authenticating the transaction.

Bitcoin is essentially just a ledger of entries saying who transferred how many bitcoins
to whom, all digitally signed by their owners. This much is like a financial ledger on
paper with handwritten signatures authorizing each entry. When you send someone
bitcoins, your signed transaction is appended to this ledger.

Challenge #2: Tampering with the Ledger


The next challenge is how to prevent tampering with the ledger. For example, if I send
bitcoins to a friend, then a month later regret it, what’s to prevent me from going back
and deleting the transaction from the ledger or changing the amount I had sent? This
is dealt with using something called hashing.

Hashing
A hash is an algorithm for validating the integrity of data. Any message can generate a
hash value, but small changes in the message result in radical changes in the hash
value. For example, here are two messages and their hash values:

My name is David Mooter FE100DDA6D28B2280B34FC228ADAB42E

My name is Davis Mooter 1761420899A8F0B731A2EE56A6F71567

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af 6/13
2/11/23, 11:12 PM The Bitcoin Blockchain Explained. Learn how Bitcoin works and how the… | by David Mooter | The Startup | Medium

Suppose you are looking at an archive of a message I wrote My name is David Mooter . If
you know in advance that this message I wrote in the past had a hash value of
FE100DDA6D28B2280B34FC228ADAB42E , you can then validate the message wasn’t tampered
with by confirming it does indeed generate that hash. If someone tampered with this
record changing it to My name is Davis Mooter , then you would get the hash value
1761420899A8F0B731A2EE56A6F71567 and know someone had tampered with it.

The “Blockchain”
Bitcoin uses hashes to validate its ledger has not been tampered with. Periodically a
collection of transactions are published together as one new record, called a block.
Each block stores the hash of the block of transactions that preceded it. For example,
take the transactions shown in this ledger of three blocks, each of which recorded
three transactions labelled tx 1 through tx 9.

Each block of transactions has a hash to validate the integrity of the previous.

If I went back to delete transaction 3 from the first block, everyone would know that’s
invalid because the hash in block 2 would prove block 1 was tampered with.

Block 2’s hash detects any tampering with block 1’s transactions.

Fine, then I will also edit block 2 to have a hash that validates my forged block 1. This
doesn’t work, either, because the hash value in block 2 that I just modified was an input
to generate block 3’s validation hash, so now block 3’s hash reveals that block 2 has
been tampered with.

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af 7/13
2/11/23, 11:12 PM The Bitcoin Blockchain Explained. Learn how Bitcoin works and how the… | by David Mooter | The Startup | Medium

You can’t change block 2’s hash to validate the fraudulent transaction since block 3’s hash will catch that.

In sum, modifying one piece of the ledger is impossible: tampering with one
transaction would require modifying the hash value of every block of transactions that
followed it, which means generating a whole new ledger. This is why it is called
blockchain: it is as though all the blocks are tightly chained together and cannot be
unlinked from each other.

Challenge #3: Which Ledger is the Correct One


Even though one particular blockchain ledger is tamper-proof, what’s to prevent me
from creating alternative competing ledgers? How do we know which ledger is the
trusted one?

For example, suppose our blockchain has two blocks. Then I publish three new
transactions appended to the ledger, but at the same time, I additionally publish three
alternate transactions also appended to the ledger. Now we have two competing
blockchains.

Two blockchains where the last block of each disagree on the latest transactions. Which one is correct?

Proof of Work
This is solved through a concept called proof of work. Computers convert the hash
values I described in the previous section into a sequence of zeros and ones like this:

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af 8/13
2/11/23, 11:12 PM The Bitcoin Blockchain Explained. Learn how Bitcoin works and how the… | by David Mooter | The Startup | Medium

0010111011110100000001000001101010010010001011101111100001001010

Suppose we imposed a constraint that a block cannot be added to the ledger unless the
hash validating the previous block starts with a zero, then we would have a 1/2 chance
of getting a hash that works.

0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Similarly, if we imposed a constraint that it must start with two zeros, then there would
be a 1/4 chance. (We’d accept 00 but reject 01 , 10 , and 11 .)

00XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

This grows exponentially. For example, if the constraint is that it must start with 32
zeros, then there would be approximately a 1 in 4 billion chance.

00000000000000000000000000000000XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Bitcoin imposes such a constraint. Yet the hash of the previous block will always be
constant. How do you get a hash that meets this constraint with a fixed input? By
adding a random arbitrary value to every block. This is known as a “nonce” value.

Each block’s “nonce” just holds an arbitrary random value.

This nonce is combined with the previous block when computing the hash. Before
adding a block to the ledger, computers around the world churn through random
values searching for a nonce value that, when combined with the previous block,
results in a hash that starts with a certain number of zeros. Finding that nonce value is
the “proof of work.” (Incidentally, when a computer finds a hash that can be published,
it includes a wallet, and that wallet is awarded free bitcoins. That is how new bitcoins
are generated.)

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af 9/13
2/11/23, 11:12 PM The Bitcoin Blockchain Explained. Learn how Bitcoin works and how the… | by David Mooter | The Startup | Medium

This is so computationally intense that we can predict on average how long it will take.
In Bitcoin’s case, it is one block every 10 minutes on average. Computers get more
powerful as time progresses, so Bitcoin increases the difficulty to keep pace with
advancing computer speeds by requiring more zeros every time a certain number of
blocks is published.

The previous block and current block’s nonce combined produce the validation hash.

Longest Ledger is the Oldest


Since proof of work makes it impossible to publish new blocks faster than a certain
rate, we know that any ledger that is longer than another is also older. It would be
impossible for me to produce a blockchain ledger that is longer than the official one
unless I had more computing power at my personal disposal than the whole rest of all
bitcoin users combined.

In sum, when there are competing ledgers on the Internet, all Bitcoin users recognize
the one with the most blocks as the oldest and therefore authentic ledger.

Beyond Bitcoin
So there you have an explanation of Bitcoin in three easy steps:

Digital signatures validate the ownership of bitcoins.

Hashes validate the integrity of transactions listed on the ledger.

Proof of work prevents the creation of rogue ledgers.

Hopefully, you can see that Bitcoin is simply a decentralized ledger that all users can
trust. That ledger doesn’t have to just store currency. Other blockchains can and have
been developed to allow multiple parties to share information without a central
middleman broker. Some examples include:

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af 10/13
2/11/23, 11:12 PM The Bitcoin Blockchain Explained. Learn how Bitcoin works and how the… | by David Mooter | The Startup | Medium

Counterfeit prevention. A product can have a bar code stamped on it by the


manufacturer, who also records it on a blockchain. Every time the physical good
changes hands, the owner also records this transfer on the blockchain. So long as
you can trace your product back to a creation record from a known trusted
manufacturer, you can be confident you got the real product, not a forgery. This is
especially helpful for counterfeit pharmaceuticals, which is a growing black
market that endangers lives.

Logistics. Similar to counterfeit prevention, companies with complex supply


chains of numerous competing suppliers can create a curated blockchain for
tracking supplies. By curated, I mean some central company like Ford or Walmart
controls who is allowed on the blockchain, limiting it to companies involved in
their supply chain. This can be especially helpful for supply chains that have
several layers of small parts suppliers feeding medium-sized parts suppliers
feeding large-sized parts suppliers feeding the final manufacturer. A disruption at
the small parts supplier could disrupt the final manufacturer, but with instant
visibility to the whole supply chain, the manufacturer and suppliers can detect
disruption at the earliest time possible and react to it sooner.

Mutual cooperation. An auto insurance claim often involves two or more


insurance companies that need to cooperate and share data. RiskStream is a
blockchain designed to allow insurance companies to share trusted information
with each other so that when there is a claim, the insurers do not need to go
through manual data exchanges. This could both improve the customer experience
by resolving claims sooner and also reduce claims processing costs by automating
this manual data exchange process.

Blockchain for Business Value


There has been much hype about blockchains in the past several years. Much of that
hype has been overblown. A challenge with blockchain is the fact your business cannot
control it. Many companies are looking for ways to rapidly transform themselves and
create new innovations their competitors can’t match. A blockchain protocol, in
contrast, cannot be changed unless all participants agree to the change. This stifles it
as a tool for digital transformation.

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af 11/13
2/11/23, 11:12 PM The Bitcoin Blockchain Explained. Learn how Bitcoin works and how the… | by David Mooter | The Startup | Medium

Another challenge is who bears the investment cost. Why should my company develop
a blockchain that allows everyone in my industry to cooperate better? I would bear all
the costs while the benefits would be diffused among all my competitors. This
limitation makes curated blockchains more promising, since then the company that
bears the cost of creating it can control it to ensure they reap the maximum benefits
from that investment.

Finally, data protection and right to be forgotten laws create a challenge to


blockchains. The data in them is immutable. How do you delete data from a blockchain
if legal regulation requires it? There are solutions to that, but that is beyond the scope
of this article.

Yet despite these challenges, blockchain can provide business value. What all of these
use cases, from Bitcoin to RiskStream, have in common is that they build a trusted
information exchange between parties who may not know each other and may even
compete with each other. The key to successfully leveraging blockchain for your
business is finding use cases that fit that pattern. Then design a blockchain solution
that ensures your organization reaps the value you need, that the parties you need to
participate in it are willing, and that you have proper plans in place for making
blockchain data compliant with current or future data privacy laws.

Blockchain Bitcoin Distributed Ledgers Cryptocurrency Technology

Sign up for Top 5 Stories


By The Startup

Get smarter at building your thing. Join 176,621+ others who receive The Startup's top 5 stories, tools, ideas, books —
delivered straight into your inbox, once a week. Take a look.

Your email

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af 12/13
2/11/23, 11:12 PM The Bitcoin Blockchain Explained. Learn how Bitcoin works and how the… | by David Mooter | The Startup | Medium

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app


Open in app Sign up Sign In

Search Medium

https://medium.com/swlh/the-bitcoin-blockchain-explained-b4529c78e6af 13/13
2/11/23, 11:15 PM Bitcoin's Monetary Policy - GeeksforGeeks

Data Structures and Algorithms Interview Preparation Data Science Topic-wise Practice C C+

Bitcoin’s Monetary Policy


Last Updated : 30 Sep, 2022

Read Discuss

Bitcoin‘s Monetar y Policy consists of 2 main par ts:

1. The Halving
2. Block Frequency

The Monetar y Policy is completely controlled by Sof tware. It ’s all preprogrammed.

1. The Halving :

The number of Bitcoins released into the system ever y 10 minutes is halved af ter ever y 4

years. Actually, the halving takes place af ter ever y 210000 Blocks which takes

approximately 4 years to generate (as on an average one block is generated ever y 10

minutes).

When bitcoin star ted (2009), the block reward was 50 Bitcoin ever y 10 minutes.

In November 2012, Bitcoin’s 1st Halving took place and block reward(i.e reward for

successfully mining one block into the Blockchain) reduced to half i.e., 25 Bitcoin

from 50 Bitcoin.

In July 2016 Bitcoin’s 2nd halving took place(reward reduces to 12.5 Bitcoin) and the

next halving which is Bitcoin’s 3rd will take place in May 2020. This is when the

current block reward of 12.5 Bitcoin ever y 10 minutes will be cut into half to 6.25

Bitcoin.

This also means over time mining will become more difficult. A s network difficulty

increases over time & the reward rate drop, so the actual cost of mining each Bitcoin

increases, which will then cause the trading price of each Bitcoin to increase as well.

Start Your Coding Journey Now! Login Register


https://www.geeksforgeeks.org/bitcoins-monetary-policy/ 1/5
2/11/23, 11:15 PM Bitcoin's Monetary Policy - GeeksforGeeks

Also, the limited supply will cause Bitcoin prices to increase, as their scarcity also

increases propor tionally.

A s total Bitcoin’s supply is set to be limited by Satoshi Nakamoto (who created

Bitcoin). Only 21 million Bitcoins can be generated. Right now there is almost 18

million Bitcoin (85% of total supply) in circulation.

The supply limit of 21 million Bitcoins will be reached by 2140.

2. Block Frequency:

Block Frequency is defined as, how of ten the blocks come in & break the reward which is

now 12.5 Bitcoin per block for Bitcoin.

The Average Block-Time or Block Frequency is different for different cr yptocurrencies.

For example, Average Block-Time for Bitcoin is 10 minutes. For Ethereum, it is 15

seconds. For Ripple, it is 3.5 seconds.

Like 1

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/bitcoins-monetary-policy/ 2/5
2/11/23, 11:15 PM Bitcoin's Monetary Policy - GeeksforGeeks

Previous Next

Related Articles

1. How Blockchain Technology is Revolutionizing Industries?

2. Payment Channel Networks (PCL)

3. Ethereum (ETH) vs Ethereum Classic (ETC) in Blockchain

4. Using configtx.yaml to Build a Channel Configuration in Hyperledger

5. Ethereum Enterprise Alliance (EEA) in Blockchain

6. How to Add Another Miner to Existing Private Ethereum Blockchain?

7. Supercomputing Organized By Network Mining (SONM) in Blockchain

8. Reentrancy Attack in Smart Contracts

9. Hyperledger Fabric SDK for Java

10. How to Detect a Fork With Bitcoin-Cli?

Ar ticle Contributed By :

imavijit
@imavijit

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/bitcoins-monetary-policy/ 3/5
2/11/23, 11:15 PM Bitcoin's Monetary Policy - GeeksforGeeks

Vote for difficulty

Easy Normal Medium Hard Expert

Article Tags : Blockchain

Improve Article Report Issue

A-143, 9th Floor, Sovereign Corporate Tower,


Sector-136, Noida, Uttar Pradesh - 201305

[email protected]

Company Learn
About Us DSA
Careers Algorithms
In Media Data Structures
Contact Us SDE Cheat Sheet
Privacy Policy Machine learning
Copyright Policy CS Subjects
Advertise with us Video Tutorials
Courses

News Languages
Top News
Python
Start Your Coding
Technology Journey Now!
Java
https://www.geeksforgeeks.org/bitcoins-monetary-policy/ 4/5
2/11/23, 11:15 PM Bitcoin's Monetary Policy - GeeksforGeeks

Work & Career CPP


Business Golang
Finance C#
Lifestyle SQL
Knowledge Kotlin

Web Development Contribute


Web Tutorials Write an Article
Django Tutorial Improve an Article
HTML Pick Topics to Write
JavaScript Write Interview Experience
Bootstrap Internships
ReactJS Video Internship
NodeJS

@geeksforgeeks , Some rights reserved

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/bitcoins-monetary-policy/ 5/5
2/11/23, 11:17 PM What is Bitcoin?. Bitcoin is the first decentralized… | by Kyle Cheung | The Startup | Medium

Published in The Startup

Kyle Cheung Follow

Nov 26, 2017 · 7 min read · Listen

Save

What is Bitcoin?
Bitcoin is the first decentralized electronic cash payment network that enables value to
be transferred peer-to-peer. Unlike traditional payment networks, Bitcoin bypasses the
need for a centralized body of control, such as a government or a central bank.
https://medium.com/swlh/what-is-bitcoin-ffab5e2e6a1c 1/6
2/11/23, 11:17 PM What is Bitcoin?. Bitcoin is the first decentralized… | by Kyle Cheung | The Startup | Medium

Instead, activities and balances are stored on a public, shared ledger called the
blockchain, which is verified by thousands of computers (called nodes) maintaining
the network across the globe. Transactions are made with no middlemen so anyone
with access to the Internet can transfer money to anybody anywhere in the world.

I’ll be using the terms: Bitcoin (capital B) to reference Bitcoin’s protocol/network and bitcoin
(lowercase b) to reference Bitcoin’s currency

“Bitcoin is a peer-to-peer version of electronic cash that allows payments to be sent


directly from one party to another without going through a financial institution. The
network timestamps transactions by hashing them into an ongoing chain of hash-
based proof-of-work, forming a record that cannot be changed without redoing the
proof-of-work.”

– Satoshi Nakamoto

Who created Bitcoin and why?


The fallout from the Financial Crisis of 2008 includes a bitter realization that the public
is a pawn in a game led by the most wealthy and powerful institutions of the world. It
proved that banks could not be trusted to regulate our economy, and that federal
monetary policies are often predictable and favor the rich and powerful.

The first Bitcoin specification was published by Satoshi Nakamoto in 2009. Little is
known about Satoshi and he mysteriously disappeared from the project in late 2010.
However, a popular belief is that Satoshi Nakamoto is a pseudonym and Bitcoin was
created in a collaborative effort by a group of people spread over different continents.
What is evident is that Satoshi wanted us to never forget about bank bailouts and the
failings of our financial institutions as he inscribed “The Times 03/Jan/2009 Chancellor
on brink of second bailout of banks” to Bitcoin’s Genesis (first) block. Bitcoin carries
on today as an open source project. Its community of developers has grown
exponentially since its inception. A non-profit known as the Bitcoin Foundation
oversees Bitcoin’s development.

“Bitcoin is completely decentralized, with no central server or trusted parties, because


everything is based on crypto proof instead of trust. The root problem with conventional
currency is all the trust that’s required to make it work. The central bank must be trusted not
https://medium.com/swlh/what-is-bitcoin-ffab5e2e6a1c 2/6
2/11/23, 11:17 PM What is Bitcoin?. Bitcoin is the first decentralized… | by Kyle Cheung | The Startup | Medium

to debase the currency, but the history of fiat currencies is full of breaches of that trust. Banks
must be trusted to hold our money and transfer it electronically, but they lend it out in waves
of credit bubbles with barely a fraction in reserve. We have to trust them with our privacy,
trust them not to let identity thieves drain our accounts… With e-currency based on
cryptographic proof, without the need to trust a third party middleman, money can be secure
and transactions effortless.”

– Satoshi Nakamoto

How does it work?


Please note my goal is not to do a technical deep-dive but rather to provide a general overview
of how Bitcoin works.

Bitcoin has been described as a decentralized currency because the participants


govern bitcoin generation and transactions instead of a central authority. Let’s say Bob
wishes to sell his bicycle in exchange for Alice’s bitcoins. How would this work?

To send or receive Bitcoins, users must first have a Bitcoin “wallet” which allows them
to facilitate transactions. Bob would first provide Alice with his Bitcoin address
(similar in concept to an e-mail address) so she knows where to send her bitcoins.
Alice creates a payment with her wallet to Bob’s address, and signs her payment with a
digital signature that is the mathematical equivalent of a traditional signature that
binds Alice’s identity to the details of her transaction.

Once Alice hits send, her transaction is broadcasted to the nodes maintaining the
network. Pending transactions are grouped together into “blocks”. From there, special
nodes called miners verify that Alice has the bitcoins to spend and that her signature is
valid. Miners play the crucial role of verifying and adding blocks to the official records.
Miners spend computing resources to compete with other miners to solve a complex
mathematical puzzle to arrive at a solution called Proof-of-Work. Each block contains a
group of transactions that points to a previous set of transactions all the way to the first
set of Bitcoins called the genesis block, effectively forming a chain. The first miner
with the correct solution broadcasts their block to rest of the network. Once the
solution is verified, the block is appended to previously verified blocks, officially
updating the blockchain’s records. As a reward, the winner is compensated with newly

https://medium.com/swlh/what-is-bitcoin-ffab5e2e6a1c 3/6
2/11/23, 11:17 PM What is Bitcoin?. Bitcoin is the first decentralized… | by Kyle Cheung | The Startup | Medium

created Bitcoins and transaction fees associated with that block. At this point, Bob will
see Alice’s payment in his wallet and he can send the bicycle to Alice.

Why use Bitcoins?

“Instant transactions, no waiting for checks to clear, no chargebacks (merchants will like
this), no account freezes (look out Paypal), no international wire transfer fee, no fees of any
kind, no minimum balance, no maximum balance, worldwide access, always open, no
waiting for business hours to make transactions, no waiting for an account to be approved
before transacting, open an account in a few seconds, as easy as email, no bank account
needed, extremely poor people can use it, extremely wealthy people can use it, no printing
press, no hyper-inflation, no debt limit votes, no bank bailouts, completely voluntary. This
sounds like the best payment system in the world!”

– Trace Mayer J.D., a Leading Monetary Expert on Bitcoin and Gold

No middle man means lower transaction cost. Traditional wire transfers and foreign
transactions are costly and slow. On average among national banks, it costs $25 for
outgoing domestic wire transfers and $44 for outgoing international wire transfers; in
comparison, most e-Wallets and cryptocurrency exchanges charge a nominal 0.25% to
1% fee to send bitcoins that reach your recipient in hours. Fees associated with
bitcoins are negligible compared to fees of established banking institutions, credit
unions, or companies like PayPal and Venmo.

Payment Freedom
The absence of a centralized governing body means no one can tell you what you can
or cannot do with your digital cash at any time — there are no bank holidays, no
borders, no restrictions. Traditionally, sending cash internationally takes at least 3 days
of processing time plus paperwork and fees. When you send bitcoins to someone, you
transfer directly to his or her address within a day with no additional hurdles. There is
also no way for a third party to suspend or confiscate your bitcoins. Bitcoin offers a
global payment system that is fast, secure and cheap. You have complete control of
your money with Bitcoin.

Lower Risk for Merchants

https://medium.com/swlh/what-is-bitcoin-ffab5e2e6a1c 4/6
2/11/23, 11:17 PM What is Bitcoin?. Bitcoin is the first decentralized… | by Kyle Cheung | The Startup | Medium

Once a transaction has been verified and recorded on the blockchain, it cannot be
reversed. Bitcoin transactions are immutable once on the blockchain. Merchants can
have peace of mind knowing they can send out goods with no risk of “charge-backs”
where customers receive goods then reverse payment; this mechanism inhibits fraud
which lowers merchants’ risk to conduct business online. Since Bitcoin can be used by
anyone with Internet, merchants can expand to new markets by accepting bitcoins
where currency or credit cards are unavailable. Furthermore, Bitcoin’s fast settlement
time can streamline a merchant’s business operations.

Transparent Transactions
With the blockchain, the complete bitcoin transaction history is readily available for
anyone to view. The fully auditable nature as well as Bitcoin’s cryptographically secure
protocol make Bitcoin difficult to be manipulated by any individual or organization.

Banking for the Unbanked


It is estimated that there are 2 billion unbanked people worldwide who are limited to
transacting in cash, which is feasible only in local transactions or in relatively small
amounts. Bitcoin enables the unbanked to participate in the global market where
bitcoins are accepted. Bitcoin offers a stable banking system that’s robust and
accessible to everyone.

Bitcoin is not Inflationary


A problem with fiat currencies is that Central banks can print more money when they
feel there is a need. Whether the reason is to jump start the economy or to help pay off
national debt, an artificial increase of money supply creates inflation by driving down
the overall value of a currency. Bitcoin is not subjected to inflation as Bitcoin is capped
at a maximum of 21 million coins.

Originally published at crypt0bits.com (that’s Crypto with a zero) on October 19, 2017.

https://medium.com/swlh/what-is-bitcoin-ffab5e2e6a1c 5/6
2/11/23, 11:17 PM What is Bitcoin?. Bitcoin is the first decentralized… | by Kyle Cheung | The Startup | Medium

This story is published in The Startup, where 263,100+ people come together to read Medium’s
leading stories on entrepreneurship.

Subscribe to receive our top stories here.

Bitcoin Cryptocurrency Btc Crypto

Open in app Sign up Sign In


Sign up for Top 5 Stories
By The Startup Search Medium
Get smarter at building your thing. Join 176,621+ others who receive The Startup's top 5 stories, tools, ideas, books —
delivered straight into your inbox, once a week. Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/swlh/what-is-bitcoin-ffab5e2e6a1c 6/6
2/11/23, 11:19 PM What will happen to Bitcoin after all 21 million are mined? | by Decrypt | Medium

Decrypt Follow

Jul 29, 2020 · 4 min read · Listen

Save

What will happen to Bitcoin after all 21 million are


mined?

There are 21 million Bitcoin. That’s it. Once they’re all mined, which should occur in
around 2140, no new Bitcoin will enter circulation.

The Bitcoin blockchain was designed around the principle of controlled supply, which
means only a fixed number of newly minted Bitcoin can be mined each year until a
total of 21 million coins have been minted.
https://medium.com/@decryptmedia/what-will-happen-to-bitcoin-after-all-21-million-are-mined-7a5e320d56f7 1/5
2/11/23, 11:19 PM What will happen to Bitcoin after all 21 million are mined? | by Decrypt | Medium

Once all 21 million BTC have been mined, the network will largely operate the same as
it does now, but with one crucial difference for miners.

Read also on Decrypt: Why is Bitcoin’s supply limit set to 21 million?

When will the last Bitcoin be mined?


Approximately every ten minutes, Bitcoin miners ‘discover’ a new block, solving a
cryptographic puzzle that allows the successful miner to add the newly discovered
block to the blockchain. This block is filled with transactions that were previously
waiting in the Bitcoin memory pool, usually chosen based on the size of the
transaction fee they provide to miners.

In return for discovering a block, the miner receives a fixed Bitcoin block reward.
When Bitcoin first launched, the reward was set at 50 BTC-but it halves periodically,
after 210,000 new blocks have been discovered. That happens roughly every four years,
reducing the reward to 25 BTC, 12.5 BTC, 6.25 BTC, and so on. Three halvings have
been completed so far; the most recent Bitcoin halving occurred on May 11, cutting the
block reward to 6.25 BTC.

https://medium.com/@decryptmedia/what-will-happen-to-bitcoin-after-all-21-million-are-mined-7a5e320d56f7 2/5
2/11/23, 11:19 PM What will happen to Bitcoin after all 21 million are mined? | by Decrypt | Medium

Bitcoin miners are rewarded with BTC for verifying blocks of transactions

Bitcoin miners will be able to continue earning block rewards until a total of 21 million
BTC has been minted, after which no new Bitcoin will enter circulation. Currently,
around 18.4 million BTC has been produced, equivalent to minting 87.6% of the
maximum supply in just over a decade. But it will take another 120 years before the last
Bitcoin ever is minted, due to the gradual reduction that occurs every four years as a
result of the halving process.

What will miners do when all the Bitcoin has been minted?
Once all 21 million Bitcoin have been minted, Bitcoin miners will still be able to
participate in the block discovery process, but they won’t be incentivized in the form of
a Bitcoin block reward. That’s not to say they won’t be rewarded at all, though.

As well as block rewards, Bitcoin miners also receive all the fees spent on the
transactions included in each newly discovered block. Currently, transaction fees make
up a small proportion of a miner’s revenues, since miners currently mint around 900
BTC (~$8.5 million) a day, but earn between 30 to 50 BTC ($285,000 to $475,000) in
transaction fees each day. That means transaction fees currently make up as little as
3.3% of a miner’s revenue-but in 2140, that’ll shoot up to 100%.

https://medium.com/@decryptmedia/what-will-happen-to-bitcoin-after-all-21-million-are-mined-7a5e320d56f7 3/5
2/11/23, 11:19 PM What will happen to Bitcoin after all 21 million are mined? | by Decrypt | Medium

“Changes to the Bitcoin ecosystem could drive


significant changes in miner adoption even after the
block rewards stop” — Simon Kim
Losing the block reward won’t disincentivize miners, according to Simon Kim, CEO of
VC fund . “Changes to the Bitcoin ecosystem and its place as a key currency in the
virtual world could drive significant changes in miner adoption even after the block
rewards stop,” Kim told .

Transaction fees peaked during 2017


It’s true that switching to a pure transaction fee-based rewards would almost certainly
decimate the mining network now, since few Bitcoin miners would be able to
profitably mine Bitcoin if they received just 3.3% of their typical rewards. However, if
the network were to explode in usage, then competition for block space could increase
dramatically, which would likely lead to increased transaction fee rewards for miners-
similar to what was seen during Bitcoin’s 2017 bull run.

At its peak in December 2017, the total transaction fees paid per day spiked to 1,495
BTC at a time when Bitcoin was valued at $14,000. As a result, miners earned a total of
$21 million in transaction fees that day-more than miners currently earn from the
block reward, indicating that something similar could occur in the future.

Another possibility on the cards is that the reward mechanism for Bitcoin could
change some time before the final block is mined. Luka Boškin, CMO of crypto trading
platform NewsCrypto , argued that as the number of BTC produced through mining
decreases, Bitcoin will undergo “significant changes” to its protocol. “That could
eventually include a switch to a more environmentally friendly consensus mechanism
like Proof of Stake or another successor to Proof of Work ,” he told .

https://medium.com/@decryptmedia/what-will-happen-to-bitcoin-after-all-21-million-are-mined-7a5e320d56f7 4/5
2/11/23, 11:19 PM What will happen to Bitcoin after all 21 million are mined? | by Decrypt | Medium

Originally written by Daniel Phillips and published at Decrypt: What will happen to Bitcoin
after all 21 million are mined?

Bitcoin Bitcoin Mining Crypto Cryptocurrency Cryptocurrency Mining

Open in app Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/@decryptmedia/what-will-happen-to-bitcoin-after-all-21-million-are-mined-7a5e320d56f7 5/5
2/11/23, 11:21 PM What is Mining & How Cryptocurrency Works? | by BangBit Technologies | Medium

BangBit Technologies Follow

May 14, 2018 · 9 min read · Listen

Save

What is Mining & How Cryptocurrency Works?

Ever thought how cryptocurrency works or how Bitcoins are actually made? In last few
years, cryptocurrencies like Bitcoin are growing fast in popularity. The number of
people trading them is increasing at a lightning speed. As now Bitcoin has run the
mainstream & became a sensation, more and more people are coming into the game.
However, the production of cryptocurrencies is not known to everyone. As we already
know there is no central authority that controls cryptocurrencies, (Bitcoins or Alt-
coins), a process called ‘Mining’ is behind the creation of these cryptocurrencies.

Over the past few years, mining process has significantly improved with better use of
hardware. As there are different types of cryptocurrencies, there are also different

https://medium.com/@BangBitTech/what-is-mining-how-cryptocurrency-works-3ee74f02bf42#:~:text=The idea is that miners,part of the block chain. 1/10


2/11/23, 11:21 PM What is Mining & How Cryptocurrency Works? | by BangBit Technologies | Medium

types of mining. To understand more what is mining, we can say; it is a decentralized


computational process which serves basically 2 purposes. First, confirms transactions
in a secure practice in the blocks, and second- creates new cryptocurrencies in each
new block.

Cryptocurrency Mining & the Blockchain

To understand mining, you need to first understand the blockchain. It works in a


simple process. All cryptocurrencies are recorded in the blockchain, in a series of
assembled transactions called blocks. The blockchain is a public ledger which is
frequently updated and shared under no central control. Miners are the ones who
ensure the blocks are legitimate and check if the same coin is not been used again
before the transaction has cleared so that the input & output expenses match. This is
how cryptocurrencies are created and new coins are made.

Thus, mining is a key part of the security of the cryptocurrencies system. The idea is
that miners group a bunch of transactions into a block, then repeatedly perform a
cryptographic operation called hashing zillions of times until someone finds a special
extremely rare hash value. At this point, the block has been mined and becomes part
of the block chain.

It works like this;

https://medium.com/@BangBitTech/what-is-mining-how-cryptocurrency-works-3ee74f02bf42#:~:text=The idea is that miners,part of the block chain. 2/10


2/11/23, 11:21 PM What is Mining & How Cryptocurrency Works? | by BangBit Technologies | Medium

Here, there are two things we need to understand here. Hash rate & Proof-of-Work &
Proof-of-Stake.

What is Hash Rate/Hash Power?

If you have interest in Cryptocurrencies, you must have heard the term ‘Cryptographic
Hash Function’. But ever wondered what exactly does it mean & how is this related to
cryptocurrency? The Hash Rate is the measurement unit of the processing power of
the Crypto network, and hashing is the kind of transformation process that turns a
string to some fixed alphanumeric sequence. Cryptocurrency network must have
mathematical and cryptography related operations for various security purposes.

The hash function generates a fixed-length output from any input. The output string
obtained as the result of hashing corresponds to the input data. Many blockchains use
the SHA-256 hashing algorithm generating output strings of 256 bits, or 64 characters.
Each new block contains the hashed value of the previous block, ensuring the
blockchain immutability. As soon as the data of any previous block is changed, the
hash no longer matches. While SHA-256 is currently the most popular hashing

https://medium.com/@BangBitTech/what-is-mining-how-cryptocurrency-works-3ee74f02bf42#:~:text=The idea is that miners,part of the block chain. 3/10


2/11/23, 11:21 PM What is Mining & How Cryptocurrency Works? | by BangBit Technologies | Medium

algorithm in crypto networks, others are also used, such as SHA-2, SHA-512 or Ethash.
To provide additional security, Bitcoin applies the SHA-256 function twice, a process
known as double-SHA-256.

Crypto network requires a lot of energy in order to solve mathematical computations


to find the blocks. These computations for finding blocks are basically mathematical
puzzles which a miner can’t guess without doing a lot of computation. A crypto miner
needs to hash the block’s header in such a way that it is either less than or equal to the
target. A miner can reach this target by changing a small portion of the block’s
headers, which is called a ‘nonce’. A nonce starts with “0” and increased each time to
achieve the required target. Since the changing of the nonce is not fixed, the chances
of getting this target are very low. You need a lot of attempts to change the nonce. The
number of attempts made per second is called hash rate and the entire process is
called Cryptocurrency Mining. Since the network is decentralized, it should arrive at
the consensus on which block to add. While many nodes can calculate the correct
hash, only first one is chosen. This block is added to the blockchain and the node that
found it gets the reward.

Hash rate denominations

https://medium.com/@BangBitTech/what-is-mining-how-cryptocurrency-works-3ee74f02bf42#:~:text=The idea is that miners,part of the block chain. 4/10


2/11/23, 11:21 PM What is Mining & How Cryptocurrency Works? | by BangBit Technologies | Medium

a) 1 KH/s is 1,000 (one thousand) hashes per second

b) 1 MH/s is 1,000,000 (one million) hashes per second.

c) 1 GH/s is 1,000,000,000 (one billion) hashes per second.

d) 1 TH/s is 1,000,000,000,000 (one trillion) hashes per second.

e) 1 PH/s is 1,000,000,000,000,000 (one quadrillion) hashes per second.

f) 1 EH/s is 1,000,000,000,000,000,000 (one quintillion) hashes per second.

Common Hash rate Conversions

a) 1 MH/s = 1,000 kH/s

b) 1 GH/s = 1,000 MH/s = 1,000,000 kH/s

c) 1 TH/s = 1,000 GH/s = 1,000,000 MH/s = 1,000,000,000 kH/s

Currently in Bitcoin, a successful hash must start with approximately 17 zeros, so only
one out of 1.4x10²⁰ hashes will be successful. In other words, finding a successful hash
is harder than finding a particular grain of sand out of all the grains of sand on Earth.

The Threat of Double Spending & How PoW resolve it?

Even before the invention of Bitcoin or any other Altcoins, there were sustainable
attempts made towards creating digital currencies. But all those attempts failed
because of the threat of using a currency value twice to perform different transactions.
Bitcoin has been able to sustain and grow because it solves the “double spending”
dilemma.

Bitcoin used a confirmation mechanism and maintain the universal ledger


“blockchain” which is similar to traditional cash monetary system. From its very
beginning blockchain maintains a chronologically-ordered, time-stamped transaction
ledger. A block is added to the ledger in a certain period of time and all the connected
nodes on the network keep a copy of this global ledger. Anyone can alter the ledger,
but they have to solve a puzzle or task first and then they add a block of transactions to

https://medium.com/@BangBitTech/what-is-mining-how-cryptocurrency-works-3ee74f02bf42#:~:text=The idea is that miners,part of the block chain. 5/10


2/11/23, 11:21 PM What is Mining & How Cryptocurrency Works? | by BangBit Technologies | Medium

a chain of previous transactions. In order to do a double spend, a bad actor must not
only solve the puzzle first to add his bad block — he has to get others to extend the
chain that he made. But legitimate players will not do this — they will only extend a
chain made of legitimate blocks. If most miners are honest, and everyone agrees that
the longest chain is authoritative, then the longest chain will be made of blocks
contributed by honest players. The transactions in these blocks will therefore be
legitimate, and not contain double spends.

Let’s take an example. If you buy something from one merchant for $1, you can’t buy
anything from another merchant using the same $1. If you could, then there is no
value of money as everyone would have unlimited money and the scarcity, which gives
currency value, would vanish. Blockchain core network protects against double-
spending by the verification of each transaction with the use of Proof-of-Work (PoW)
mechanism. Transactions are finalized and approved by the miners after verification.
If anyone tries to duplicate a transaction, it will show in the network that it is
counterfeit and would not be accepted. You can’t double spend, once a transaction is
approved. Digital currency has become viable by solving this double spending
problem.

The Concept of Proof of Work (PoW)

There are two main Blockchain systems that most of the crypto networks are using &
both of these systems oversee how transactions are verified on the decentralized
network.

A Proof-of-Work system directs its users to perform certain tasks to participate in the
block. The tasks are usually tough for the participants, but relatively easy for the server
to evaluate. In case of Bitcoin & Ethereum, PoW exists in the form of miner nodes
striving to resolve a block or group transactions together in a sequential order and
have that block accepted onto the global blockchain of that system. The only way to
have its block accepted is to accurately guess the nonce, or by a random number
generated by the network. If a miner couldn’t guess the nonce before another appears,
must start again to guess the new nonce.

On the other hand, Proof-of-Stake is a different way to validate transactions. Though


this is also an algorithm, and the purpose is same as PoW, the process is quite different

https://medium.com/@BangBitTech/what-is-mining-how-cryptocurrency-works-3ee74f02bf42#:~:text=The idea is that miners,part of the block chain. 6/10


2/11/23, 11:21 PM What is Mining & How Cryptocurrency Works? | by BangBit Technologies | Medium

here. As in case of PoW, a miner is rewarded by resolving mathematical problems and


creating new blocks, in Proof-of-Stake, the creator of a new block is chosen in a
deterministic way, depending on its wealth, also defined as stake. This means that in
the PoS system there is no block reward, so, the miners take the transaction fees.

Types of Crypto Mining: An Overview

Initially, mining could be done via any computer component that has processing
power and memory (ex: CPU). But with changing time, miners needed high speed and
efficiency. Old methods of mining resulted in high consumption of electricity and a lot
of effort. Then came GPU. GPUs generated more hash rate. Now miners have specially
designed hardware for mining called ASIC. There are several coins which are ASIC
resistant and can be mined using GPUs only. The basic crypto mining techniques are;

https://medium.com/@BangBitTech/what-is-mining-how-cryptocurrency-works-3ee74f02bf42#:~:text=The idea is that miners,part of the block chain. 7/10


2/11/23, 11:21 PM What is Mining & How Cryptocurrency Works? | by BangBit Technologies | Medium

GPU & ASIC are two of the most prolific crypto mining techniques which are widely
used. These both are profitable.

ASIC Mining

ASIC means Application-Specific Integrated Circuit. This is basically a machine used


for mining certain crypto coins. Let’s take the example of Bitcoins. A Bitcoin ASIC
machine processes complex algorithms and receives a small amount of Bitcoin. ASICs
can mine more than one algorithms, but mostly they are specific to one coin. Coins
like Bitcoin, Litecoin, Dash, DGB-Qubit, Quark can be mined through ASIC.

Benefits

· Easy to use

· Comparatively less priced

· High ROI

· Compact

Example of few popular ASCIs

· ANTMINER L3+ (LITECOIN)

· ANTMINER S0 (BITCOIN)

GPU Mining

GPU stands for Graphics Processing Unit. In GPU a complex Proof of Work is solved to
legitimate a transaction to add a new block in the blockchain. Like ASCI, a miner will
get a reward in the form of crypto coin. A GPU mining rig consists of a set of GPUs
working in a computer set-up. More the GPUs, more the hash power. There are many
GPU mining currencies like Ethereum, Bitcoin, Monero, Monacoin, LBRY Credits etc.

Benefits

· Flexible coin options

https://medium.com/@BangBitTech/what-is-mining-how-cryptocurrency-works-3ee74f02bf42#:~:text=The idea is that miners,part of the block chain. 8/10


2/11/23, 11:21 PM What is Mining & How Cryptocurrency Works? | by BangBit Technologies | Medium

· Easy to purchase

· High resale value

· Less power consumption

· Good warranty

· Quieter operating environment

Example of few popular GPUs

· NVIDIA GEFORCE GTX 1080 Ti

· RADEON RX VEGA 64 LIQUID

You have to keep various factors before going for any of the above mining processes.
Electric consumption is the foremost factor you need to keep in mind. You can start
with GPU mining & when you got sufficient ROI, you can switch to ASCI.

A Summary: How Cryptocurrencies Work?

As we already know, a cryptocurrency runs on a blockchain, which is a shared ledger


across a network of computers. The updated transaction is distributed and made
available to all coin holders of the chain. Every single transaction made is recorded in
the blockchain. The blockchain is run by miners, who use powerful computers to
record the transactions. Their core work is to update each time a transaction is made
and also ensure the authenticity of the data to confirm each transaction is secure and
processed properly. For conducting this, miners are paid cryptocurrencies as fees by
vendors or merchants for each transaction.

The value of cryptocurrencies shifts depending on demand & supply, as there is no


fixed value for it. Buyers and sellers need to agree on a value which is based on the
current cryptocurrency trading amount. Since there is no controlling body present,
and it is a peer-to-peer transaction, there is no third-party transaction fee involved.
The identity of the buyers and sellers are not revealed, however, each transaction is
made public to all in the blockchain network. Anyone can earn cryptocurrencies
through exchanges found online or through mining.
https://medium.com/@BangBitTech/what-is-mining-how-cryptocurrency-works-3ee74f02bf42#:~:text=The idea is that miners,part of the block chain. 9/10
2/11/23, 11:21 PM What is Mining & How Cryptocurrency Works? | by BangBit Technologies | Medium

Understanding the concepts which are fundamental to cryptocurrency is a challenge.


You need to go through various resources available online. Different kind of
explanations works for different people. We all learn in different ways. If you want to
understand more about mining & how crypto works, contact one of our blockchain
consultants today. We will be happy to assist you.

Bitcoin Proof Of Work Cryptocurrency Bitcoin Mining Blockchain

Open in app Sign up Sign In

About Help Search Medium


Terms Privacy

Get the Medium app

https://medium.com/@BangBitTech/what-is-mining-how-cryptocurrency-works-3ee74f02bf42#:~:text=The idea is that miners,part of the block chain. 10/10


2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

Published in The Startup

Kirill Eremenko Follow

May 4, 2018 · 11 min read · Listen

Save

How does Bitcoin / Blockchain Mining work?


From logistics to healthcare, from social media to real estate, from the energy sector to
the global economy — Blockchain is predicted to transform almost every single
industry in the next ten years. Often described as even more revolutionary than
Artificial Intelligence, this technology is entering our lives at mind-blowing rates.

While inspiring overall, this extreme pace also comes with a negative side: it means
that education simply cannot keep up. The absence of quality training programs
around blockchain means that many people will either miss out on opportunities in
this new and exciting field, or even worse — will make premature career choices based
on an erroneous understanding of what is possible and what isn’t.

There are lots of concepts that allow Blockchain-powered projects and ideas to exist. It
would take a whole online course to cover all of these topics (see end of this post for more
details). That’s why today we are going to laser-in on just one concept. For this article
I’ve picked perhaps the most used and, at the same time, most misunderstood topic:
Mining.

We’ve all heard about Bitcoin mining and miners. We’ve probably even used these
terms. But what exactly do these miners do? What is mining all about? Those are the
question we will be answering today and we will do this in three parts:

Part 1: What’s a cryptographic hash?


https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 1/14
2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

Part 2: The cryptographic puzzle

Part 3: Block configuration

Note: We’re going to look at the example of Bitcoin. Other cryptocurrencies such as Ethereum
may use different ideas (e.g. a different type of hash function) and therefore the specifics will
vary, however the underlying concepts remain the same.

Part 1: What’s a cryptographic hash?


You may have already heard that a blockchain is a series of successive block
cryptographically linked together:

But what does this mean and how is this connected to mining? Let’s have a closer look.

An individual block in a blockchain contains the following elements: block number,


data stored in the block, hash of the previous block and hash of the current block.

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 2/14
2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

A hash (or cryptographic hash) is a long number which acts as a digital fingerprint of
any collection of data. In Bitcoin the SHA256 hashing function is used which generates
a 64-digit hexadecimal number. For example, the cryptographic hash of the words in
this paragraph is:

C019286295F2CDEC9958BEE25B9603B5F94C76B2CCC69A59CE54872ED26DC479

Note: in the images here hashes are shortened for illustration purposes.

Hashing algorithms have many interesting properties, however today we are most
interested in three: 1) the SHA256 function is deterministic — you will always get the
same hash output if you recalculate the function with the same input; 2) the SHA256
function is impossible to reverse-engineer. Meaning that you can never know in
advance what hash value you will get until you actually calculate it; and 3) if you feed
the SHA256 function two even slightly varying inputs (for example, you change a dot
for a comma), you will get wildly different outputs.

From our example above, we would input the current block’s number, the data stored
in the block and the hash of the previous block into the SHA256 function to get the
value of the current block’s hash:

SHA256(Block Number, Data, Previous Block’s Hash) -> Hash

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 3/14
2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

Now we can see how the blocks are linked — not only does each block reference the
previous block’s cryptographic hash — but, in fact, that hash directly affects the value
of the current block’s hash. Therefore, if anyone were to tamper with any given block’s
data, such action would render not only that specific block’s hash invalid — but also all
of the following blocks’ hashes invalid.

Such connection between blocks means that the Blockchain as a whole is much more
tamper-proof than standard database structures and other record-keeping methods.
And since a Blockchain is in essence a ledger of records, this tamper-proof property is
known as the “Immutable Ledger” property.

Okay, great. That’s how blockchains work. But what has this got to do with mining? The
straightforward answer is that mining is all about calculating the hash value for the
newest block which is being added to the chain. However, it’s not all that simple.

The thing is that the SHA256 function only takes a fraction of a second to calculate.
And yet, you may have heard of the numerous mining pools such as BTC.com and
AntPool, and even industrial scale mines — all competing to generate the next Bitcoin
block. So the question is — why do we need all that computing power?

Part 2: The Cryptographic Puzzle


This is where start adding layers of complexity. Buckle up!

Blocks in the blockchain have another field which we have not spoke about yet. This
field is called “The Nonce” which stands for number used only once:
https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 4/14
2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

The Nonce is an integer number and along with the Block Number, Data and Previous
hash the Nonce serves as an input for the SHA256 function to calculate the current
block’s hash:

SHA256(Block Number, Nonce, Data, Previous Block’s Hash) -> Hash

Unlike other components of a block, the Nonce is designed to be totally under our
control. This means that now we have a mechanism to vary the current block’s hash
while keeping the data inside it intact. Indeed, thanks to the nature of the hash
function (property #3 in our discussion above), every time we select a new Nonce for the
same block the resulting hash will be a different value.

Alright, that’s great. But what has any of this got to do with mining? This is where we
come to the fun stuff.

There is a total of 16⁶⁴ possible SHA256 cryptographic hash values (each hexadecimal
digit has 16 possible values and there are 64 of them in a hash). However, not all of
them are valid hashes. Why is that? Well, every two weeks the Bitcoin network will
define a minimal target for the hash. Anything above this target will be rejected,
anything below — accepted.

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 5/14
2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

The diagram above illustrates the pool (not to be confused with ‘mining pool’) of all
possible SHA256 hashes — starting at the bottom with smallest and increasing towards
the largest at the top. Somewhere along the vertical we have the target. Note that this
diagram is for illustrative purposes only as it is not proportionate — we’ll see why in a
bit.

At the time of writing the target is:

0000000000000000005d97dc0000000000000000000000000000000000000000

What is really important in the target is the number of leading zeroes. Just like in the
decimal system, leading zeros in a fixed-size number will determine its magnitude.
Every leading zero reduces the number’s magnitude by a factor of 16 (ten in the
decimal system, but here we’re working with hexadecimals).

There are 18 leading zeros in the current target, meaning that the number of total valid
hashes is 16⁴⁶ (only 64-18=46 non-zero digits remain). Therefore, the probability that a
randomly picked hash is valid can be calculated as:

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 6/14
2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

16⁴⁶ / 16⁶⁴ = 16^(-18) = 0.00000000000000000002%

In Bitcoin mining terms, this is the probability that any given Nonce value will
generate a valid hash for the current block. We can now see why the diagram is out of
proportion: the pool of valid hashes in reality is extremely small in comparison to the
complete SHA256 pool.

And that’s what the cryptographic puzzle is all about: miners compete to find a Nonce
(also called a Golden Nonce) which will generate a valid hash for the upcoming block.
Whoever finds it first is allowed to add the block to the chain and get’s their reward of
12.5 Bitcoins. At the time of writing one Bitcoin is worth around $10,000 USD making
mining a rather worthwhile activity.

How to read this diagram: the red ‘X’ marks relate to SHA256 hashes while the labels beside
them illustrate which Nonce generated which hash value.

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 7/14
2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

The target is defined based on the network’s hashrate (aggregate computational power
of all Bitcoin miners). The more miners join the network — the lower the target will be,
and therefore the harder it will be to find a suitable hash. The goal of this difficulty
algorithm is to ensure that only one new block to is added every 10 minutes. This is part
of the Bitcoin monetary policy to control the total number of coins in circulation.

In a nutshell, that’s what the millions and millions of mining machines are doing day
and night — they are simply iterating different values of the Nonce in hopes of being
the first to find a valid hash for the next block. Once a valid hash if found, the block is
added to the chain and the race starts over again, this time for the next block.

Part 3: Block configuration


Just when you thought we were done… There’s more.

The Nonce is an integer value with 32 bits of memory allocated to it. Meaning that it
has a limited range of around 4 Billion values. This poses two problems:

First, even an average mining device can calculate up to 100 million hashes per
second, and therefore will go through the Nonce range in 40 seconds. And that’s an
average miner. Mining pools and industrial scale mines are able to go through the
Nonce range in fractions of a second.

Secondly, the chance of finding a valid hash is so small that even with 4 billion tries the
probability of success is still extremely low:

4 * 10⁹ * 0.0000000002% = 0.0000000001%

So what’s the solution?

For starters, the block contains… you guessed it — another field which we haven’t
spoken about yet. This field is a timestamp representing the current Unix time
(number of seconds elapsed since 1st January 1970):

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 8/14
2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

The Timestamp is also included in the SHA256 calculation for the hash of the current
block that’s being mined:

SHA256(Block Number, Timestamp, Nonce, Data, Prev. Block’s Hash) -> Hash

And since the timestamp is constantly refreshing (until the block is successfully
mined), this effectively resets the Nonce range every second. Why? Well, as we
discussed at the very start — even if the inputs of the SHA256 function are varied
slightly, this causes the hash to change.

Therefore, if we try all 4 Billion Nonce values for a fixed combination of other inputs
(block number, timestamp, data, previous block’s hash) but have no luck finding a
valid hash, all we have to do is wait until the the timestamp increases. A change in the
timestamp will mean that the combination is now different and if we try all 4 Billion
Nonce values again, every time we will get a brand new hash value.

The timestamp solves the problem for the average miner since it will reset before they
get to the end of the Nonce range (reminder: average miner takes 40 seconds to do 4 Billion
passes). However, for a mining pool or industrial scale miner even one second is too long
— as we discussed, they would get through the Nonce range in fractions of a second. So
how do they solve the problem? This is where block transaction configuration comes
in.

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 9/14
2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

Participants of the Bitcoin network transact with each other all the time. However, a
new block is only added once every ten minutes. So where do the transactions go
before they are added to a block? New entries are added to a staging area called the
mempool. It is then the miners’ job to pick up a batch of these transactions from the
mempool and add them to the new block they are mining.

Block size is limited and not all transactions from the mempool will fit into the new
block. This means that miners get to pick which transactions will go into the next
block. What this also means is that miners can change the configuration of
transactions at will (before the block has been successfully mined).

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 10/14
2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

And this is how miners get additional control over the hash. Well… Control isn’t the
right word since the hash cannot be reverse engineered or predicted. Variability is a
better term here: changing the configuration of transactions creates additional
variability in the hash function inputs.

Similar to the timestamp situation, whenever we try out all 4 Billion possible values in
the Nonce range and have no luck, all we have to do is slightly alter the combination of
transactions which we have selected from the mempool.

The main difference here is that we don’t have to wait. By altering the selected
transactions, we can reset our Nonce range at will — therefore we can do this as many
times per second as we want. Of course, all this is done algorithmically. This way even
mining pools and industrial scale miners can test new hash values continuously without
any idle time.

Let’s sum up
We’ve covered a lot of ground. Let’s recap the Bitcoin / Blockchain mining process to
ensure we haven’t missed anything:

1. A hash is a digital fingerprint of any collection of data. Blocks in a blockchain are


cryptographically linked because each one includes the preceding block’s hash in the
https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 11/14
2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

calculation of its own hash. Tampering with data in any one block will render its and
all following blocks’ hashes invalid.

2. The cryptographic puzzle requires miners to find a hash smaller than the set target
for it to be valid. Miners search for a valid hash by iterating through a designated
parameter within the block called the Nonce. Whoever is first to find a valid hash gets
to add the block and collect the reward.

3. The Nonce range contains 4 Billion possible values which is insufficient to find a
valid hash with a high degree of certainty. Resetting of the Nonce range is achieved by
including the current timestamp and through varying the configuration of transactions
included in the the block.

Join us
In March this year we successfully funded a Kickstarter project to create the most
comprehensive online course on blockchain the World has ever seen.

Today this course is Live on Udemy.com where over 3,000 students have already signed
up to master the concepts of Blockchain, Bitcoin, Smart Contracts and more. If you’d

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 12/14
2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

like to become a Blockchain pioneer, then join us on this incredible adventure and take
your career to the next level:

https://www.udemy.com/build-your-blockchain-az/?couponCode=MEDIUM90

The link above already includes a special coupon for our Medium readers. Use it to get
90% OFF.

See you inside!

Kirill Eremenko

This story is published in The Startup, Medium’s largest entrepreneurship publication followed
by 320,924+ people.

Subscribe to receive our top stories here.

Blockchain

Sign up for Top 5 Stories


By The Startup

Get smarter at building your thing. Join 176,621+ others who receive The Startup's top 5 stories, tools, ideas, books —
delivered straight into your inbox, once a week. Take a look.

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 13/14
2/11/23, 11:23 PM How does Bitcoin / Blockchain Mining work? | by Kirill Eremenko | The Startup | Medium

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.com/swlh/how-does-bitcoin-blockchain-mining-work-36db1c5cb55d 14/14
2/11/23, 11:25 PM What is a Nonce?. A nonce simply stands for a Number used… | by Vu Nam Hung | Vu Nam Hung | Medium

Published in Vu Nam Hung

Vu Nam Hung Follow

Jul 6, 2017 · 11 min read · Listen

Save

What is a Nonce?
A nonce simply stands for a Number used ONCE. It’s a unique token used to add a layer
of security to your application and also to validate the intent of a user initiated action.

This Nonce is generated by a server-side application, stored on the server and sent to
the client to be part of the payload it’s going to send back to the server. This way, you
have a way to validate the payload and have a higher level of certainty that the request
was actually made by the client.

Why use a Nonce?

A nonce could be seen as a one time password for user initiated actions. May it be
sending a form, encrypting data or executing an action, the nonce adds a level of
security by preventing a malicious script sending forged requests to your application.
This is called Cross Site Request Forgery ( CSRF or XSRF ) and malicious scripts use
this method to send requests on your server in a way that you have not intended to.
This can have important consequences depending on what your script is used for.

An example of this is an attacker putting up a script on his website that POST to a form
on your website automatically on an authenticated user session without the user really
wanting to do that specific action. That was a mouthful! In other words, an attacker
disguising a link to your authenticated user doing something (potentially bad) that the
user never intended to do.
https://medium.com/vunamhung/what-is-a-nonce-c1d7a840c565#:~:text=A nonce simply stands for a Number used ONCE.,of a user initiated action. 1/13
2/11/23, 11:25 PM What is a Nonce?. A nonce simply stands for a Number used… | by Vu Nam Hung | Vu Nam Hung | Medium

So if your form doesn’t contain a nonce, then there is not much that prevents an
attacker to flood bad data in your database, potentially bringing down your whole site
or worse, costing you or your users to lose money or to leak private information. If
your form contains a nonce, then the POST would not go through since the nonce
would not be able to be validate positively coming really coming from that user. It
would not satisfy the intent part of the request.

This example includes forms as it’s an easy target for CSRF, but really, any requests
made to a server that a script is listening for is vulnerable to CSRF if no precaution are
taken to prevent it.

Breaking down the process of a nonce, it should look something like this:

1. The server generates the unique token ( nonce ), stores it locally and passes it on to
the client.

2. The client does it’s thing, prepares the payload and includes the nonce in it.

3. When the server receives the payload, it first checks if it contains a nonce, then, it
will validate it by comparing it to the one stored locally. If a match can be made,
the payload is considered genuine. If not, the payload should not be trusted.

4. After the validation returned a match, the process should invalidate ( or destroy )
the nonce for it to be a true used ONCE number.

If you properly create your nonce, CSRF should not be a problem. Since a properly
formed nonce should contain at least a secret key ( like a secret salt securely stored on
your server ) and a unique or at least very descriptive action as a name ( maybe
including a timestamp ? ), then there is no way an attacker could recreate a valid nonce
without having access to both parameters.

So a true nonce would be destroyed after it’s been validated, effectively preventing an
action of being performed twice ( or multiple times ), may it be maliciously or
accidentally, without being validated again by a new nonce. A nonce also prevents
CSRF attacks since secret salts and other unique parameters are used to created the
nonce and are not available to an attacker to replicate a fake nonce.

About WordPress Nonces Implementation


https://medium.com/vunamhung/what-is-a-nonce-c1d7a840c565#:~:text=A nonce simply stands for a Number used ONCE.,of a user initiated action. 2/13
2/11/23, 11:25 PM What is a Nonce?. A nonce simply stands for a Number used… | by Vu Nam Hung | Vu Nam Hung | Medium

Ok, so now that we explained what a nonce is, let’s see why WordPress nonces are not
true nonces.

The way WordPress implements nonces lacks the one part that makes a nonce a nonce,
it’s “used ONCE” part.

WordPress creates a nonce that will remain valid for at least 12 hours by default (can
be valid for up to 24 hours). This implementation in itself invalidates the definition of a
true nonce because a generated nonce can be used an unlimited amount of time,
within that valid period. A new one will be generated every 12 hours (UTC time), and
will remain valid for a maximum of another 12 hours depending on when it was
generated within the tick cycle (See graph below).

Tick tock

This brings me to talk about ticks.

Ticks are what WordPress uses, as one parameter, to create a nonce.

It is generated by the wp_nonce_tick() function used in the nonce creation process.

So what is a tick? It’s a value that changes a midnight (+1 second) and midday (+1
second) by 1 unit. So every 12 hours (UTC time).

You might have read that a WordPress nonces are valid for 24 hours, but that’s just not
true. At least not entirely.

A WordPress nonce is valid for a maximum of 24 hours. Or in truer terms, it is valid for
the current tick’s value and the previous one.

But since a tick changes every 12 hours, a nonce will only truly be valid for 24 hours if
it’s created at the beginning of the tick, specifically, at hour 0:00:01 or 12:00:01. The
more you advance towards the end of the current tick, the shorter the lifespan of the
nonce will be (or closer to a lifespan of 12 hours).

As you can see in the graph, a nonce created within the end of a tick, will have a
shorter lifespan than a one created towards the beginning. This is because a wp nonce
is generated with that tick’s value as one of it’s parameters. If we look at how
https://medium.com/vunamhung/what-is-a-nonce-c1d7a840c565#:~:text=A nonce simply stands for a Number used ONCE.,of a user initiated action. 3/13
2/11/23, 11:25 PM What is a Nonce?. A nonce simply stands for a Number used… | by Vu Nam Hung | Vu Nam Hung | Medium

wp_verify_nonce() verifies a nonce, we’ll see that it checks the current tick value, and
the previous one (tick — 1). If the wp nonce is verified close to 24 hours later and it was
created deeper within the cycle of the tick, then the nonce would be 2 ticks behind,
failing the verification.

On the graph, only NONCE 1, 13 and 25 will be valid for close to 24 hours, assuming
they are generated at the beginning of the hours not the end of it.

I agree that in reality, this should not be that much of an issue, since nonce should be
used relatively quickly after their creation to verify actions/requests.

But it’s a misconception thinking that WordPress nonces are valid for 24 hours, when
in reality, we should say they are valid for 2 ticks or for a maximum of 24 hours.

And it’s not a good idea to rely on WordPress nonces to validate an action that could
take more than 12 hours for a user to actually request. Since the nonce will become
invalid anywhere between 12 and 24 hours, chances are that the nonce validation
would fail and results in unexpected behaviours

WordPress Nonces functions

Here’s a list of useful WordPress functions to manipulate nonces

Creation functions

wp_create_nonce()

wp_nonce_field()

wp_nonce_url()

Verification functions

wp_verify_nonce()

check_admin_referer() — name is misleading but still used for backward


compatibility

check_ajax_referer()

https://medium.com/vunamhung/what-is-a-nonce-c1d7a840c565#:~:text=A nonce simply stands for a Number used ONCE.,of a user initiated action. 4/13
2/11/23, 11:25 PM What is a Nonce?. A nonce simply stands for a Number used… | by Vu Nam Hung | Vu Nam Hung | Medium

Other functions

wp_nonce_ays()

wp_nonce_tick()

WordPress Nonces hooks

Also, here’s some hooks you might find useful

Filter: nonce_life

Filter: nonce_user_logged_out

Action: wp_verify_nonce_failed

Action: check_admin_referer

Action: check_ajax_referer

Invalidating WordPress Nonces

Like I discussed above, nonces will auto expire in maximum 24 hours after they’ve
been created.

But I prefer to say, they will auto expire 2 ticks from now.

The other way a nonce can become invalid is if a user’s session token changes. That
state change occurs when a user logs out and back in again. Since a new session token
is generated, all previous nonces won’t validate anymore.

To make things clearer, WordPress doesn’t store the nonce it creates for a user. Instead,
it stores the session token and will use it to rehash a nonce upon validation. If the
session has not changed and the nonce is still within the 2 ticks valid period, then the
submitted nonce and the rehashed one will match. Of course, like I just told you, if
either the current tick is 2 or greater than the one used to create the nonce or the
session token changes, then the nonce is invalid.

Security Concerns

https://medium.com/vunamhung/what-is-a-nonce-c1d7a840c565#:~:text=A nonce simply stands for a Number used ONCE.,of a user initiated action. 5/13
2/11/23, 11:25 PM What is a Nonce?. A nonce simply stands for a Number used… | by Vu Nam Hung | Vu Nam Hung | Medium

WordPress not offering true nonces doesn’t mean you should not implement it within
your application. It’s still useful to prevent CSRF.

But you should not rely on nonces to securely allow actions that should be restricted to
specific users or users roles within your WordPress installation.

Your scripts should only allow such actions for users with the right capabilities
(permissions) to do so.

Here, your best tool to use is current_user_can() and wrap your functions within this
check.

Remember that nonces will tell you that the payload is from a genuine source (user),
but it does not tell you if that source has sufficient permission to actually execute the
payload.

This should be taken care of by another process, thus checking against capabilities.

Using WordPress Nonces

Ok, let’s give you a few example to show you how easy it is to implement a nonce in
your code.

Like I listed above, there are 3 functions available to create a nonce wp_create_nonce(),
wp_nonce_field() and wp_nonce_url().

wp_create_nonce()

The first one is a general usage function, meaning you can use the created nonce
anywhere you would like.

The function takes 1 parameter, the $action name (optional) and returns the nonce for
you to use.

While the action name is optional, it is recommended to supply one as specific to the
action as possible. This will prevent a user having the same nonce for 2 different
actions. For instance, deleting a custom post type and sending an email.

https://medium.com/vunamhung/what-is-a-nonce-c1d7a840c565#:~:text=A nonce simply stands for a Number used ONCE.,of a user initiated action. 6/13
2/11/23, 11:25 PM What is a Nonce?. A nonce simply stands for a Number used… | by Vu Nam Hung | Vu Nam Hung | Medium

So let’s say I have a plugin that sends email to my users. The user I want to send an
email to is stored in $send_to_id. I will then pass that user id value in the request so I
can used again when I’ll be verifying the nonce.

Then to create a unique action nonce I would simply do it like this

$send_nonce = wp_create_nonce( ‘send_email_user_’ . $send_to_id );

This could then be used within an URL like this

<a href=”send_mail.php?action=send_user_email&nonce_token=<?php echo esc_attr(


$send_nonce ); ?>&user=<?php echo esc_attr( $send_to_id ); ?>”><?php esc_html_e(
‘Send Email to User’, ‘textdomain’ ); ?></a>

wp_nonce_field()

This function will output or return the nonce and markup for an hidden form input.

This function takes 4 optional parameters. In order with their default values: $action =
-1, $name = “_wpnonce”, $referer = true and $echo = true

Again, while optional, it is recommended to provide better security, to set a custom


and specific $action value and a custom $name for the field. The value of $name will
be the name of the field what you will use to retrieve the value of the created nonce in
your request ( $_REQUEST, $_POST or $_GET ).

The $referer parameter outputs a second hidden field with the name _wp_http_referer
containing the value of the referrer URL as found in the ‘REQUEST_URI’ element of the
$_SERVER PHP superglobal variable, unless it is set to false.

Finally, the wp_nonce_fields() function prints by default the field, but if you set $echo
to false the function will return it so you can use it within PHP.

So, reusing the same sending email example as above, creating the nonce and
outputting the nonce and referrer fields using this function is as simple as

<form method=”post”>

https://medium.com/vunamhung/what-is-a-nonce-c1d7a840c565#:~:text=A nonce simply stands for a Number used ONCE.,of a user initiated action. 7/13
2/11/23, 11:25 PM What is a Nonce?. A nonce simply stands for a Number used… | by Vu Nam Hung | Vu Nam Hung | Medium

<! — some form inputs here … →

<input type=hidden name=”user” value=”<?php echo esc_attr( $send_to_id ); ?>”>

<?php wp_nonce_field( ‘send_email_user_’ . $send_to_id, ‘nonce_token’ ); ?>

</form>

wp_nonce_url()

This third function provided by WordPress to create a nonce, outputs an escaped and
formed URL containing your nonce.

This functions takes in 3 parameters. In order, with their default value: $actionurl,
$action = -1 and $name = “_wpnonce”.

$actionurl is required and is the URL to which you should add your nonce. Here also,
providing a descriptive and unique action name and custom name for the query string
is optional, but recommended.

Using again the scenario above: sending an email to a user. Here’s what it would look
like using wp_nonce_url()

<?php

$url = wp_nonce_url( admin_url(), ‘send_email_user_’ . $send_to_id, ‘nonce_token’ );

$url = add_query_arg( ‘user’, $send_to_id, $url ); // Add the id of the user we send to

?>

<a href=”<?php echo $url; ?>”><?php esc_html_e( ‘Send Email to User’, ‘textdomain’ ); ?
></a>

wp_verify_nonce()

Once you have created your nonce, and used it, you need a way to verify it. Your
general goto function to complete this will be wp_verify_nonce().

https://medium.com/vunamhung/what-is-a-nonce-c1d7a840c565#:~:text=A nonce simply stands for a Number used ONCE.,of a user initiated action. 8/13
2/11/23, 11:25 PM What is a Nonce?. A nonce simply stands for a Number used… | by Vu Nam Hung | Vu Nam Hung | Medium

This function takes in 2 parameters, the first one, $nonce is required and is the actual
value of the nonce. The second one, $action is optional, but you will need to provide it
if you used an action name when creating your nonce. Remember that action names
are recommended practice.

So let’s see how to use the function, still using our send email example.

$nonce = $_REQUEST[ ‘nonce_token’ ];

$send_to_id = $_REQUEST[ ‘user’ ];

if ( ! wp_verify_nonce( $nonce, ‘send_email_user_’ . $send_to_id ) ) {

die( __( ‘Security check’, ‘textdomain’ ) );

} else {

// Nonce validated. Do stuff here.

Since wp_verify_nonce() will return 1 if the nonce was generated within the current
tick value and 2 if the nonce was generated in the previous tick value. Then you could
do different stuff based on when the nonce was generated.

$nonce = $_REQUEST[ ‘nonce_token’ ];

$send_to_id = $_REQUEST[ ‘user’ ];

$nonce = wp_verify_nonce( $nonce, ‘send_email_user_’ . $send_to_id );

switch ( $nonce ) {

case 1:

echo ‘Nonce was generated in the current tick’;

break;

https://medium.com/vunamhung/what-is-a-nonce-c1d7a840c565#:~:text=A nonce simply stands for a Number used ONCE.,of a user initiated action. 9/13
2/11/23, 11:25 PM What is a Nonce?. A nonce simply stands for a Number used… | by Vu Nam Hung | Vu Nam Hung | Medium

case 2:

echo ‘Nonce was generated in the previous tick’;

break;

default:

exit( ‘Nonce is invalid’ );

check_admin_referer()

Another function you can use to verify a nonce is check_admin_referer(). While the
name is improper and may be misleading, it is still kept for backward compatibility.
Also, know that using this function without providing an $action is obsolete since
version 3.2.

So basically, this function now behaves the same as wp_verify_nonce() except it will
die calling the wp_nonce_ays() function which display the Are you sure? message.

Example of usage

$nonce = $_REQUEST[ ‘nonce_token’ ];

$send_to_id = $_REQUEST[ ‘user’ ];

if ( check_admin_referer( $nonce, ‘send_email_user_’ . $send_to_id ) ) {

// Nonce validated. Do stuff here.

check_ajax_referer()

A last way to verify a nonce would be using the check_ajax_referer() function.

https://medium.com/vunamhung/what-is-a-nonce-c1d7a840c565#:~:text=A nonce simply stands for a Number used ONCE.,of a user initiated action. 10/13
2/11/23, 11:25 PM What is a Nonce?. A nonce simply stands for a Number used… | by Vu Nam Hung | Vu Nam Hung | Medium

As the name of the function implies, this last validation function is best used within
AJAX request to prevent processing request external to the blog.

The function takes 3 parameters. They are with they default values: $action = -1,
$query_arg = false and $die = true.

The to verify the action, you call check_ajax_referer() hooking into the dynamic wp
AJAX hook endpoint.

<?php

//Set Your Nonce

$ajax_nonce = wp_create_nonce( ‘send_email_user_’ . $send_to_id );

?>

<script type=”text/javascript”>

jQuery(document).ready(function($){

var data = {

action: ‘bn_ajax_send_email_user’,

nonce_token: ‘<?php echo $ajax_nonce; ?>’,

user: ‘<?php echo $send_to_id; ?>’

};

$.post(ajaxurl, data, function(response) {

alert(“Response: “ + response);

});

});

</script>
https://medium.com/vunamhung/what-is-a-nonce-c1d7a840c565#:~:text=A nonce simply stands for a Number used ONCE.,of a user initiated action. 11/13
2/11/23, 11:25 PM What is a Nonce?. A nonce simply stands for a Number used… | by Vu Nam Hung | Vu Nam Hung | Medium

then you hook a custom function to the action defined in your javascript AJAX
definition.

add_action( ‘wp_ajax_bn_ajax_send_email_user’, ‘bn_ajax_send_email_user_callback’


);

function bn_ajax_send_email_user_callback() {

if ( check_ajax_referer( ‘wpdocs-special-string’, ‘nonce_token’ ) ) {

bn_send_email( $_REQUEST[ ‘user’ ] );

wp_die(); // Need to exit the AJAX callback

WordPress True Nonce

While implementing your nonce methods could be relatively easy to implement, why
reinvent the wheel when you could start of by using what’s done already!

There’s a repo on github called wp-simple-nonce that works just fine and will bring
you true nonce for you to implement in your application.

While WordPress nonces implementation is good to prevent CSRF, it is not very useful
to prevent multiple submission of the same data, which is often a reason to implement
nonces within your application. This is why you might want to take a look at WP Simple
Nonce

Wrap up

I hope you found this post constructive, if you have questions, comments or concerns,
let me know by commenting below!

Cheers!

https://medium.com/vunamhung/what-is-a-nonce-c1d7a840c565#:~:text=A nonce simply stands for a Number used ONCE.,of a user initiated action. 12/13
2/11/23, 11:25 PM What is a Nonce?. A nonce simply stands for a Number used… | by Vu Nam Hung | Vu Nam Hung | Medium

Security

About Help Terms Privacy

Get the Medium app


Open in app Sign up Sign In

Search Medium

https://medium.com/vunamhung/what-is-a-nonce-c1d7a840c565#:~:text=A nonce simply stands for a Number used ONCE.,of a user initiated action. 13/13
2/11/23, 11:27 PM Ethereum Series — Understanding Nonce | by Manan Patel | The Startup | Medium

Published in The Startup

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

Manan Patel Follow

Aug 6, 2019 · 4 min read · · Listen

Save

Ethereum Series — Understanding Nonce

(source — beppegrillo.it)

The nonce is one of the most important and least understood component of an
ethereum transaction.

https://medium.com/swlh/ethereum-series-understanding-nonce-3858194b39bf 1/6
2/11/23, 11:27 PM Ethereum Series — Understanding Nonce | by Manan Patel | The Startup | Medium

As defined by Ethereum Yellow Paper, nonce is -

A scalar value equal to the number of transactions sent


from this address or, in the case of accounts with
associated code, the number of contract-creations made
by this account.
As per the definition, nonce is a property of transaction originating address. It is not
stored on the ethereum blockchain, but rather calculated by counting the number of
transactions sent from an address.

An ethereum transaction is composed of following components —

{
"nonce" : 'how many confirmed transactions this account has sent
previously?',
"gasPrice" : 'price of gas (in wei) the originator is willing to pay
for this transaction',
"to": 'recipient of this transaction(either smart contract or EOA)',
"value": 'how much ether this transaction pays',
"data": 'any binary data payload',
"v,r,s": 'three components of ECDSA signature of originating account
holder'
}

Disclaimer — This is an abstract version of ethereum transaction structure. In reality, it is


not composed in JSON like structure, rather is serialized using Recursive Length Prefix (RLP)
encoding scheme. Also, field labels are not part of actual serialized transaction, but shown
here for clarity.

Problems that nonce helps solving


Order of transactions

https://medium.com/swlh/ethereum-series-understanding-nonce-3858194b39bf 2/6
2/11/23, 11:27 PM Ethereum Series — Understanding Nonce | by Manan Patel | The Startup | Medium

Ethereum is a decentralised network of nodes. When you send a transaction to the


ethereum blockchain using a wallet provider like Infura or Metamask, it gets sent into
the mempool until some miner mines it and includes it in a valid block. Suppose you
want to send 2 transactions transferring 10 and 14 ETH respectively and want them to
be mined sequentially. You would not wait after sending one transaction till it gets
mined and included in a block. Instead, you would send out both transactions one after
the other.

Now without nonce, it would be impossible for miners to know your intent of
maintaining the order of transactions. However with nonce, if your first transaction
(10 ETH) has nonce 0 (assuming its a new account) then 14 ETH transaction will have
nonce 1. Now, transaction with 14 ETH won’t be mined unless previous transaction of
10 ETH (with lower nonce) is mined. Hence, maintaining the sequence of transactions.

Prevention of Replay Attacks

Say you want to swap 10 ETH for 2000 DAI in Uniswap. Currently, your account balance
is 200 ETH (wow!!). To swap 10 ETH, you signed a transaction sending 10 ETH to the
ETH/DAI Uniswap Exchange and broadcasted into the blockchain.

In absence of nonce, your above transaction structure would look something like this

{
"gasPrice" : "10000000000",
"to": "0xdaeb8d6348e30677955f8127759a66443a99fe1f,
"value": "10000000000000000000",
"data": "",

"v,r,s": "some bytes of your ECDSA signature"


}

when above transaction is serialised to be sent to blockchain, it is converted (say)


following bytes of transaction data

https://medium.com/swlh/ethereum-series-understanding-nonce-3858194b39bf 3/6
2/11/23, 11:27 PM Ethereum Series — Understanding Nonce | by Manan Patel | The Startup | Medium

25de0d5a1693d4e45ce0305d42774b5bf73cbd9e14230194c35545e0f01ee45ce0305d
42774b5bf73cbd9e0d5a1693d4e45ce0305d427

Then this transaction is sent to blockchain and mined. Once, transaction is mined, you
receive your 2000 DAI. This data is visible on blockchain to anyone. So, anyone can
copy and paste this transaction data and send to the network, thus executing what is
called ‘replay’ attack on your account. Thus draining your ETH reserves.

By including the nonce in the transaction data, each transaction data output is unique
even if all other variable remains same. So, if someone tries to carry out ‘replay’ attack,
miners reject that transaction as ‘duplicate’ transaction (since the nonce has been used
before for previous transaction). Hence, this way, nonce helps prevent such replay
attacks.

Trouble with nonces


Using multiple wallet sources concurrently for the same account

Practically, nonce is the count of all confirmed transactions from an EOA (externally-
owned account) on the ethereum blockchain. Usually, your chosen wallet app takes
care of nonce management for you. And this works almost perfect as long as that
wallet app is the single source of your account’s interface to the blockchain. As soon as
you start using other wallets to use with the same account, things gets complicated,
since all wallets have their own state of nonces for that account.

Tracking nonces

Consider another scenario where you are tasked with airdropping ERC20 tokens to
1000 survey participants. Doing it manually using Metamask or other wallets is not
feasible and inconvenient.

Ideally, you would write some script or develop some application to do that. Thus, you
would need to maintain your own nonce tracker (piece of code that sequentially and
incrementally generates next nonce for a given account for a new transaction) or use
some third party nonce tracking library like that provided by Metamask (see below).

MetaMask/nonce-tracker
https://medium.com/swlh/ethereum-series-understanding-nonce-3858194b39bf 4/6
2/11/23, 11:27 PM Ethereum Series — Understanding Nonce | by Manan Patel | The Startup | Medium

You can't perform that action at this time. You signed in with another tab or window. You signed
out in another tab or…
github.com

Gaps in nonces

If there are gaps in nonces, all next transactions sits in the mempool waiting for the
gap to be filled. (e.g.) if total transaction confirmation count for account X is 8 (nonce =
8), and transaction with nonce 10 from account X is broadcasted to network, it will sit
in mempool till another transaction from account X with nonce 9 is broadcasted and
mined. Thus, filling the gap.

In conclusion, nonce is very powerful component that provides lots of benefits and
helps maintain proper functioning of Ethereum network. As an ethereum Dapp
developer it is important to understand and acknowledge its importance to create great
user experiences and avoid troubles discussed above.

Ethereum Ethdev Web 3 Cryptocurrency Blockchain

Sign up for Top 5 Stories


By The Startup

Get smarter at building your thing. Join 176,621+ others who receive The Startup's top 5 stories, tools, ideas, books —
delivered straight into your inbox, once a week. Take a look.

Your email

https://medium.com/swlh/ethereum-series-understanding-nonce-3858194b39bf 5/6
2/11/23, 11:27 PM Ethereum Series — Understanding Nonce | by Manan Patel | The Startup | Medium

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

Open in app Sign up Sign In


About Help Terms Privacy

Search Medium

Get the Medium app

https://medium.com/swlh/ethereum-series-understanding-nonce-3858194b39bf 6/6
2/11/23, 11:29 PM What is Bitcoin mining, and how does it work? | @blockchain

Published in @blockchain

Blockchain.com Follow

Dec 16, 2022 · 8 min read · Listen

Save

Bitcoin Mining, Explained


What is Bitcoin mining, and how does it work?

Many people new to crypto wonder:

How do new bitcoins (BTC) come into existence?

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 1/11
2/11/23, 11:29 PM What is Bitcoin mining, and how does it work? | @blockchain

How do bitcoins move from place to place?

What makes Bitcoin secure?

What if we told you the answer to all three questions was the same: Bitcoin mining.

Mining is an essential, but often misunderstood concept in cryptocurrency.

This article covers:

What Bitcoin mining is and how it works

The environmental impacts of mining

What the future may hold for Bitcoin mining

If you’re new to Bitcoin, you’ll want to read our article “Bitcoin, Explained” first to get a
better understanding of the original cryptocurrency.

What is bitcoin mining?

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 2/11
2/11/23, 11:29 PM What is Bitcoin mining, and how does it work? | @blockchain

The bitcoin network is a blockchain, a linked series of data “blocks” with each block
containing a set of bitcoin transactions. All over the world, thousands of Bitcoin
miners race to be the first to complete a complex cryptographic “puzzle” using
specialized computer equipment.

The math problems the miners solve during each puzzle period (or “block”) enable the
release of new bitcoins and the confirmation of transactions on the network.

Every time a miner successfully verifies a block of bitcoin transactions, they’re


rewarded with a certain amount of bitcoin, an incentive for miners to do their work
and keep the bitcoin network secure.

Once a transaction is validated by a Bitcoin miner, the block is added to the


blockchain, and the update is processed across the network. This process takes place
about every ten minutes.

In short, mining is how:

new bitcoin comes into existence

transactions happen on Bitcoin’s proof of work blockchain

the network stays secure

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 3/11
2/11/23, 11:29 PM What is Bitcoin mining, and how does it work? | @blockchain

Here’s how the process works in more detail:

1. When a new transaction is made on the Bitcoin network, it is broadcast to all nodes
in the network.

2. These nodes then race to validate the transaction by solving a complex


computational puzzle. The first node to solve the puzzle adds the transaction to the
blockchain and broadcasts the solution to the rest of the network.

3. Other nodes in the network check the solution to verify that it is correct. If it is,
they add the transaction to their own copy of the blockchain and move on to the
next puzzle.

4. As a reward for their efforts, the miner who solved the puzzle is awarded a certain
number of bitcoins. This helps to incentivize miners to contribute their
computational power to the network.

5. The difficulty of the puzzles is adjusted over time to ensure that it takes an average
of about 10 minutes to add a new block of transactions to the blockchain. This
helps keep the rate at which new bitcoins are created steady and makes it more
difficult for attackers to manipulate the network.

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 4/11
2/11/23, 11:29 PM What is Bitcoin mining, and how does it work? | @blockchain

What is a bitcoin miner?


Miners are computers, and they are almost always an ASIC miner.

ASIC stands for Application-Specific Integrated Circuit, and while there are a variety of
ASICs created for different purposes, these are made just to mine bitcoin.

While standard consumer devices like CPUs and GPUs were used in the past to mine
bitcoin, those systems don’t offer the computational power needed to solve the hashing
puzzle at the current level of mining difficulty.

Miners on the Bitcoin blockchain earn bitcoin in two ways:

Block rewards. When a miner is the first to solve the validation riddle, they earn
BTC and add the next block of data to the chain.

Transaction fees. In return for validating a transaction, miners earn a percentage


of the network fee.

Page not available


This content is not available in your
country.

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 5/11
2/11/23, 11:29 PM What is Bitcoin mining, and how does it work? | @blockchain

Listen to the full podcast with Jaime Leverton, CEO of Hut 8 Mining

Bitcoin mining creates new bitcoins


There will only ever be 21 million bitcoins in existence.

The final bitcoin is expected to be mined in 2140, and this scarcity is where the
comparison to gold comes from. Once the last bitcoin is mined, that’s all there will
ever be, making bitcoin a deflationary asset.

The very first Bitcoin miners received 50 BTC as a block reward. However, the next
halving will be in 2024, further reducing the block reward to 3.125 BTC.

As you can imagine, Bitcoin mining has become big business. There are mining
“farms,” also known as hashing facilities, all over the world, and a quick online image
search will show the scale of these operations.

Gone are the days of a single Bitcoin user mining on their PC; computational power is
king, and more is better when it comes to processing transactions, winning the block
reward, and securing the blockchain.

Mining pools offer an alternative for regular users to participate in mining, without
needing to purchase warehouses full of ASIC mining rigs. In a mining pool, individual
miners lend their computing power to a mining farm through a shared server.

In exchange for their computing power, miners in the pool receive a proportional
share of the block reward when their pool solves the hash.

Bitcoin mining secures the blockchain


The Bitcoin blockchain is an open-source, decentralized ledger; essentially, a record
book of all the transactions that have occurred on the blockchain. When a new block is
added to the chain, all of the nodes receive the new copy of the blockchain.

These transactions are validated using a Proof of Work consensus mechanism,


meaning all of the nodes on the blockchain have competed to solve a puzzle, then
agreed that the transaction details are correct.

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 6/11
2/11/23, 11:29 PM What is Bitcoin mining, and how does it work? | @blockchain

This is how the Bitcoin blockchain is secured. If a hacker tries to manipulate the
blockchain, the data they try to enter into the ledger won’t match up with the data that
other nodes have, flagging it as a fraud.

Even if a hacker had enough computing power to go back far enough in the blockchain
to rewrite a transaction, it would be so costly and time consuming that it likely
wouldn’t be profitable.

This type of attack is called a 51% attack, and it would cost billions of dollars to
attempt. Even if successful, an attack of this type would essentially destroy the
blockchain by eroding the trust in the ledger, and the price of bitcoin would likely fall
to zero, making the entire thing pointless.

This is the superpower of the Proof of Work consensus mechanism–it takes a lot of
time, money and energy to validate transactions, and this work is self-protecting since
it’s almost impossible to undo.

The security of the blockchain increases as more miners join the network, since more
transactions can be processed and there are more nodes available to share greater
consensus.

The more transactions that are processed and validated, the larger the amount of data
that a criminal would have to “rewind” to hack the network.

Bitcoin mining and energy use


There’s been a lot of controversy over the energy usage of cryptocurrency in general,
and a lot of that has been directed at mining in particular.

Concerns about e-waste from mining equipment and of excess electricity


consumption, and the fossil fuels that create that electricity, have generated intense
debate around this topic.

At the time of this writing (November 2022), Bitcoin operations expend just over 100
Terawatt hours (TWh) of energy each year. As a point of reference, that’s about the
same amount of energy that is required to power all of the refrigerators in the United
States.

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 7/11
2/11/23, 11:29 PM What is Bitcoin mining, and how does it work? | @blockchain

For a global comparison, air conditioning alone uses 2,199 TWh per year.

The need for greater computing power, and the hefty price tag that comes with the
equipment and electricity needed to run these operations, has resulted in innovative
expansions into crypto mining.

For example, many mining operations have moved to countries with an abundance of
electricity, such as Canada and Iceland, that would otherwise go unused.

The oil and gas industry has become involved in mining, since they often have power
that would be wasted, and the cryptocurrency mining industry gets more than half of
its power from sustainable energy sources.

In this way, miners could potentially make the power grid more efficient by harnessing
non-traditional energy sources.

Many critics ask why Bitcoin doesn’t just move to a more energy efficient consensus
mechanism like Proof of Stake. This is a complex question, but in short, Proof of Work
has some distinct advantages over Proof of Stake with regard to the purpose of bitcoin.

BTC is a store of value and part of what maintains this value is the difficulty in creating
new bitcoins and the inability of malicious actors to hack or even game the system in
an effort to monopolize control of the currency.

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 8/11
2/11/23, 11:29 PM What is Bitcoin mining, and how does it work? | @blockchain

The Proof of Work consensus mechanism provides unique benefits in this regard,
making it optimal for a cryptocurrency like bitcoin that could be a long-term store of
value.

The future of Bitcoin mining

What happens when all 21 million bitcoins have been mined?

As you’ve read, miners are responsible for a lot more than just creating new bitcoins.
They’ll still validate transactions, and collectively secure the entire Bitcoin network.

Miners won’t receive block rewards anymore, but they will still receive transaction
fees. The validation of the network will continue to be an extremely important
function.

If there weren’t miners to validate new copies of the ledger, the blockchain would likely
fall under attack, rendering bitcoin as a store of value useless.

Even after all bitcoins are created, mining is still necessary to maintain the value of the
bitcoin cryptocurrency and process ongoing transactions on the network.

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 9/11
2/11/23, 11:29 PM What is Bitcoin mining, and how does it work? | @blockchain

Mining is essential to the Proof of Work consensus mechanism, and miners have
proven that they are committed to finding new ways to power their operations, and
subsequently, Bitcoin.

There’s another way to get bitcoin though, and it doesn’t involve setting up a mining
rig.

Buying BTC may be a more straightforward way of adding it to your holdings, and if
you choose to use a dollar cost averaging method, you can buy bitcoin incrementally,
over a long period of time, instead of trying to time the market.

If you’ve never bought BTC before, you’d need what’s called an “on-ramp” — a way of
exchanging fiat currency for crypto. Then, you can transfer your crypto to a non-
custodial wallet, so you have complete control over your funds.

Blockchain.com is the only place you can find both of these wallet types in one place,
and you can create your free account in just a few minutes.

Get Started

Important Note:

This information is provided for informational purposes only and is not intended to substitute
for obtaining accounting, tax or financial advice from a professional advisor.

The purchase of crypto entails risk. The value of crypto can fluctuate and capital involved in a
crypto transaction is subject to market volatility and loss.

Digital currencies are not bank deposits, are not legal tender, and are not backed by the
government. Blockchain.com’s products and services are not subject to any governmental or
government-backed deposit protection schemes.

Legislative and regulatory changes or actions in any jurisdiction in which Blockchain.com’s


customers are located may adversely affect the use, transfer, exchange, and value of digital
currencies.
https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 10/11
2/11/23, 11:29 PM What is Bitcoin mining, and how does it work? | @blockchain

Bitcoin Cryptocurrency Blockchain Proof Of Work Btc

About Help Terms Privacy

Get the Medium app


Open in app Sign up Sign In

Search Medium

https://medium.com/blockchain/bitcoin-mining-explained-e03356bba148 11/11
2/11/23, 11:31 PM Everything You Should Know About Bitcoin Mining | by GreekDataGuy | DataDrivenInvestor

Published in DataDrivenInvestor

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

GreekDataGuy Follow

May 23, 2021 · 7 min read · · Listen

Save

BITCOIN

Everything You Should Know About Bitcoin


Mining
More than you think. Mining powers the whole platform

https://medium.datadriveninvestor.com/everything-you-should-know-about-bitcoin-mining-d62c5a20d10a 1/13
2/11/23, 11:31 PM Everything You Should Know About Bitcoin Mining | by GreekDataGuy | DataDrivenInvestor

Photo by Tima Miroshnichenko from Pexels

Disclaimer: This is not advice — financial, investment, or otherwise. Consult your financial
advisor before investing in or trading cryptocurrencies.

You’ve heard the analogy.

Bitcoin is like gold. Mining creates bitcoins. And like gold, the more that is mined, the harder
it becomes to mine more.

It’s a bad analogy.

It completely misses the fact that without mining, there could be no Bitcoin
transactions at all.

Here’s my version of bitcoin mining, from start to finish.

This is a long post, but it builds on itself. Stick with me.

https://medium.datadriveninvestor.com/everything-you-should-know-about-bitcoin-mining-d62c5a20d10a 2/13
2/11/23, 11:31 PM Everything You Should Know About Bitcoin Mining | by GreekDataGuy | DataDrivenInvestor

Miners start with a record of Bitcoin owned by each user


This information is available to anyone who downloads the blockchain, which is
available to anyone who wants it.

The blockchain is literally an accounting ledger containing every transaction that’s


ever occurred. From this, current balances are easily derived.

Technically we’re talking wallets, not users. But it’s a subtle distinction.

Bitinfocharts publishes the richest wallets. Take a look for fun.

Credit: bitinfocharts. Yes. There’s a wallet containing $11 trillion USD in Bitcoin.

Transactions are “complete” when added to the blockchain


Bitcoin is not physical cash.

https://medium.datadriveninvestor.com/everything-you-should-know-about-bitcoin-mining-d62c5a20d10a 3/13
2/11/23, 11:31 PM Everything You Should Know About Bitcoin Mining | by GreekDataGuy | DataDrivenInvestor

Credit: Google Finance. Backed by nothing but worth a lot.

You only have as much money as the blockchain ledger says you do. Money is officially
“sent” when miners update their ledgers to reflect changes. All miners update their
ledgers in the same way.

So like banks track balances electronically, so does Bitcoin.

But while a bank has the final say over it’s ledger, enabling it to resolve disputes as it
sees fit, Bitcoin does not not. No single party decides the truth.

A decentralized system with no single source of truth comes with risks and challenges:

1. What happens when a Bitcoin user sends the same Bitcoin token to 2 different
parties (aka. double spend)?

2. How do miners stay stay in sync about the current state of the blockchain (aka.
how much money each wallet has)?

The answer is mining.

Now it gets interesting


Mining and transactions are 2 sides of the same coin.
https://medium.datadriveninvestor.com/everything-you-should-know-about-bitcoin-mining-d62c5a20d10a 4/13
2/11/23, 11:31 PM Everything You Should Know About Bitcoin Mining | by GreekDataGuy | DataDrivenInvestor

Without one, the other could not exist.

Let’s say, Sally sends Carlos 1 Bitcoin


Sally logs into her wallet, inputs Carlos’ wallet address, and clicks send.

What happens next?

First, Sally’s wallet announces to all miners that she is transferring the funds.

But miners do not immediately update their ledgers.

At this point, the transaction is unverified and is not yet added to the blockchain.

Sally and Carlos are now in limbo, waiting for the transaction to be processed.

Miners race to solve a hard math problem


Each miner collects unverified transactions into a block (about 500 transactions), and
then races to solve Bitcoin’s Proof of work.

This challenge is similar to guessing acorrect value from a quadrillion possibilities.


With no patterns to go off or learn from, the only strategy is brute force. Try as many
values as possible.

This makes it purely a game of processing power.

In reality there are multiple correct values. Read on.

What is Proof of Work?


Proof of Work is the system Bitcoin uses, forcing miners to do a lot of computation in
order to find a correct value. While also making correct solutions easily verifiable to
any party.

https://medium.datadriveninvestor.com/everything-you-should-know-about-bitcoin-mining-d62c5a20d10a 5/13
2/11/23, 11:31 PM Everything You Should Know About Bitcoin Mining | by GreekDataGuy | DataDrivenInvestor

In Bitcoin’s case, this involves a hash function.

While requirements for correct answers change over time, Bitcoin currently requires
miners to find inputs to it’s hash function that result in an output which begins with 19
zeros.

A correct solution might look like this:


000000000000000000069aef2b97ba47122bfe11d81abb58c91068d331226623

We’ll explain hash functions in a moment.

The first miner to discover a correct solution broadcasts their answer. They win the
round.

All other miners then add the winning miners block to their ledgers. The transactions
of the winner miner now exist in the blockchain and can no longer be worked on by
other miners.

What is a hash function?


A hash function converts an arbitrary string of values (ie: a word, sentence,
numbers…) into a fixed length string.

For example, a simple fictional hash function could do something like this.

Input | Output
---------------------------------------------
'hello world' | hd72kf97x
'hello world 2' | l9ancg478
'123' | nfhyeiv00
'I like pasta on rainy days' | x913gzmaw

Bitcoin uses a modified version of SHA-256.

We’ll get back to SHA-256 in a moment.

Recognize that a similar input does NOT result in a similar output. So there’s no
incentive to do anything other than guess random inputs.

https://medium.datadriveninvestor.com/everything-you-should-know-about-bitcoin-mining-d62c5a20d10a 6/13
2/11/23, 11:31 PM Everything You Should Know About Bitcoin Mining | by GreekDataGuy | DataDrivenInvestor

What are inputs to Bitcoin’s hash function?


The inputs for Bitcoin’s hash function are predetermined. You must follow the rules.

But that doesn’t mean each user uses the same inputs.

There are 6 inputs to Bitcoin’s hash function.

1. Block version number. Indicates the current rule set for validating blocks.
Currently this is 0x20000004 but changes periodically. Everyone uses the same
version as a hash input.

2. Previous block header hash. This is the output hash associated with the previous
block in the blockchain. This ensures the ledger is an unbroken chain with each
block referencing the block before it. This will be the same for all miners at a given
time.
A recent example:
1b9affbba072ba2e923797d3b2050b9b9c8baacf696f84ac9940282b5568c547 .

3. Current block transactions hash. A hash based on transactions that the miner has
included in the current block. This is different for each miner because each miner
is likely working on a different block of transactions.
A recent example:
11a510d7adcde1ad5c8b33c35f5902f08cdb1d9800161f8af3874258f935ecea

4. Current time. A unix timestamp representing the time the miner started hashing
inputs for the current block. The miner sets this time so it will be different between
miners.

5. Target nBits. An encoded version of the criteria that successful hash outputs must
meet (aka. begin with at least 19 zeros). The threshold is revised every 2,016 blocks
so that the blockchain continues growing at it’s planned rate of 1 block every 10
minutes.

6. Nonce (aka. random positive integer). A random number that’s incremented every
time inputs are hashed. A 1 integer change in this number completely changes the
hash output.

https://medium.datadriveninvestor.com/everything-you-should-know-about-bitcoin-mining-d62c5a20d10a 7/13
2/11/23, 11:31 PM Everything You Should Know About Bitcoin Mining | by GreekDataGuy | DataDrivenInvestor

Credit: en.bitcoin.it/wiki

Hash inputs are concatenated and fed to the hashing algorithm.

#################
# Pseudo code #
#################
block_header = version + prevHash + curHash + time + diff + nonce

Because changing a single input completely changes the output, it’s unlikely that any 2
miners are generating the same outputs.

What hashing algorithm does Bitcoin use?


Bitcoin uses Double SHA-256.

Which is just the output of SHA-256 re-fed into SHA-256.

#################
# Pseudo code #
#################
block_header = version + prevHash + curHash + time + diff + nonce
sha_function( sha_function( block_header ) )

You can try an online SHA-256 calculator here.

Let’s try hashing something with the same algorithm Bitcoin uses. We’ll start with a
string and hash it twice.

Input: Big money

https://medium.datadriveninvestor.com/everything-you-should-know-about-bitcoin-mining-d62c5a20d10a 8/13
2/11/23, 11:31 PM Everything You Should Know About Bitcoin Mining | by GreekDataGuy | DataDrivenInvestor

Output 1: 5f5255f01f4d7196484869c824266fbe5c2fa0fad9485dd911d507d2812fab7f

Now let’s re-hash that hash.

Output 2:
8aa2a47234e9c320bbe3248b6a03fb5c68546ad0988b3faa6d0731805b19ad16

If you hash this yourself, you will get exactly the same output. That’s the nature of hash
functions. Cool, no?

Do all miners work on the same blocks of transactions?


We mentioned this before. But here is a little more explanation.

Miners choose which transactions to include in their blocks. Blocks have a maximum
size of 1MB and each transaction is about 0.5kb.

While miners make money from earning Bitcoin on successfully mined blocks. They
also make money on transaction fees. These vary by transaction.

So miners have incentive to choose transactions with the highest fees.

The first miner to solve the problem wins


They get Bitcoins for their work.

When a miner finds a solution to the hash problem, they announce it to all miners.
Miners then add the mined block to each of their ledgers. Because of this, miners
continue to stay in sync.

What if a miner announces a fake solution?

Well. It’s easy for all other blocks to check. They simply pass the announcing miner’s
header into the hash function and confirm if the same output is generated.

That’s the beauty of Proof of Work. Hard to solve but easy to verify.

https://medium.datadriveninvestor.com/everything-you-should-know-about-bitcoin-mining-d62c5a20d10a 9/13
2/11/23, 11:31 PM Everything You Should Know About Bitcoin Mining | by GreekDataGuy | DataDrivenInvestor

Mining powers the whole system


Decentralized electronic currencies have challenges that we mentioned above.

1. Double spend

2. Staying in sync

The nature of mining solves these.

The double spend problem


Bitcoin is not physical money. Physical money cannot be spent twice. Once you hand
$20 to your barber, you don’t have it anymore. You can’t give it to someone else.

Nowadays, non-Bitcoin transactions are also often electronic. But because they’re
controlled by Visa or Bank of America, disputs can be investigated and resolved by the
institution.

This is less straightforward with digital currency.

In a decentralized digital currency, nothing stops Boris from transmitting the same
token to 2 different parties to buy 2 different things with the same money.

https://medium.datadriveninvestor.com/everything-you-should-know-about-bitcoin-mining-d62c5a20d10a 10/13
2/11/23, 11:31 PM Everything You Should Know About Bitcoin Mining | by GreekDataGuy | DataDrivenInvestor

Credit: en.bitcoinwiki.org

Bitcoin’s design prevents this, via mining.

Mining ensures validity


The nature of mining prevents both double spend and keeps decentralized ledgers in
sync.

1. Mining a block takes a long time. Adding blocks to the blockchain is slow.

2. Verifying/recomputing blocks is fast. It’s easy for miners to catch up.

This makes it easy to to keep ledgers in sync.

Money spent in one transaction cannot be used in another. The second “overlapping”
transactions in is simply cancelled after the first is accepted.

https://medium.datadriveninvestor.com/everything-you-should-know-about-bitcoin-mining-d62c5a20d10a 11/13
2/11/23, 11:31 PM Everything You Should Know About Bitcoin Mining | by GreekDataGuy | DataDrivenInvestor

Conclusion
You now understand how mining works, and why it’s necessary.

Equipped with this knowledge, you can also begin to make sense of conversations
around mining.

Like, “Can I make money mining?”. Probably not. It’s literally a function of the cost of
your processing power. You can’t compete with companies operating their own dirty
power plants to mine bitcoin.

And, “Why does bitcoin use so much energy”. Well, Proof of Work is literally designed
to use a lot of energy.

But if you leave with any more understand than you came with, I’m happy.

Was this helpful? Do you have questions? Let me know in the comments.

Bitcoin Crypto Bitcoin Mining Decentralization Economics

Get an email whenever GreekDataGuy publishes.


By signing up, you will create a Medium account if you don’t already have one. Review
our Privacy Policy for more information about our privacy practices.

Subscribe

About Help Terms Privacy


https://medium.datadriveninvestor.com/everything-you-should-know-about-bitcoin-mining-d62c5a20d10a 12/13
2/11/23, 11:31 PM Everything You Should Know About Bitcoin Mining | by GreekDataGuy | DataDrivenInvestor

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.datadriveninvestor.com/everything-you-should-know-about-bitcoin-mining-d62c5a20d10a 13/13
2/11/23, 11:34 PM Working Backwards to Find Bitcoin’s Ultimate Target Price This Halving Cycle | by Sense and Cents | Coinmonks | Medium

Published in Coinmonks

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

Sense and Cents Follow

Mar 2, 2021 · 8 min read · · Listen

Save

Working Backwards to Find Bitcoin’s Ultimate


Target Price This Halving Cycle

In my post, Making Money Using Bitcoin Halving Cycles, I analyzed pricing targets for
Bitcoin based on its historical price movements during Bitcoin’s halving cycles. We are
https://medium.com/coinmonks/working-backwards-to-find-bitcoins-ultimate-target-price-this-halving-cycle-389bc60011a8 1/9
2/11/23, 11:34 PM Working Backwards to Find Bitcoin’s Ultimate Target Price This Halving Cycle | by Sense and Cents | Coinmonks | Medium

in the midst of the third Bitcoin halving cycle and the ultimate question is what will
happen next for Bitcoin’s price? In my post Bitcoin: When to Cash Out or Crash Out, I
mentioned some possible extension targets (such as $57k which it ran to quickly) but
ultimately advised one to de-risk a bit on Bitcoin since it was getting so high in price
that there was more risk at that point (which it preceded to dip about 25% in this most
recent dip from $58k to $43k where it appears the price will hold for now).

As we get closer to the end of this halving cycle (which at the 12 month mark is May
2021 or 18 month mark is November 2021), it’s time to work on the “end game” for this
cycle. One major important stat we should know about the Bitcoin halving cycle is:

During each of the last two halving cycles, Bitcoin lost 80–83% of its value from it’s
halving cycle HIGH to the post-halving cycle LOW (as seen below)

Prices on chart courtesy of 99bitcoins.com

Looking at the past two halving cycle lows, we see that the pre-cycle low to post-cycle
low in 2012 increased by a factor of 21.427x (from $10.35 to $221.77) and in 2016
increased by a factor of 5.584x (from $578.97 to $3,232.93). If the 2020 pre-cycle to post-
cycle low decreases at the same rate (decrease factor of 3.837x) from 2016 to 2020, then
the 2020 post-cycle low should have an increase factor of 1.455x meaning the 2020
post-cycle low from the pre-cycle low of $8,465.45 should be $12,318.79. If Bitcoin
copies it’s previous halving cycles and loses 80%-83% of its value and $12,318.79 is the
post-cycle bottom, then we should expect Bitcoin cycle high targets from $61,593.95
to $72,463.47.

Is $12,318.79 going to be the post-cycle bottom? This is very possible as before the
2020–2021 cycle run-up, the $10k-$12k area acted as a very strong resistance area from
2019–2020 (and the longer term the resistance, the more bullish and powerful the
break above as we saw Bitcoin go straight up from $12k to $20k from October 2020 to
December 2020.)

https://medium.com/coinmonks/working-backwards-to-find-bitcoins-ultimate-target-price-this-halving-cycle-389bc60011a8 2/9
2/11/23, 11:34 PM Working Backwards to Find Bitcoin’s Ultimate Target Price This Halving Cycle | by Sense and Cents | Coinmonks | Medium

We saw another powerful move when Bitcoin broke above $20k. Once that 2017 cycle
high was breached, it moved straight to $42k and then another high of $58k.

Looking at the charts and price action during this cycle from a technical analysis
standpoint (or even a basic chart view), one could reasonably expect the $20k price
level to hold and never dip below again. If you followed Bitcoin during its epic rise,
you would have noticed that Bitcoin whales were accumulating and HODLing at the
following levels:

$23k-$24k

$28k-$30k

$38k-$40k

$43k-$44k

These price levels could very well be areas Bitcoin never dips below again. If we work
backwards using these price levels as the post halving cycle low, we get much higher
estimates for what this cycle high could be if we follow the 80% drop rule (for example,
if we say the post cycle low is $43k and that represented an 80% drop from the Bitcoin
halving cycle high, then we could expect the Bitcoin halving cycle high to go as high as
$215k). Here are some price targets based on these supposed price level supports and
assuming the Bitcoin post-cycle drop percentage to that support area.

https://medium.com/coinmonks/working-backwards-to-find-bitcoins-ultimate-target-price-this-halving-cycle-389bc60011a8 3/9
2/11/23, 11:34 PM Working Backwards to Find Bitcoin’s Ultimate Target Price This Halving Cycle | by Sense and Cents | Coinmonks | Medium

Besides the expected 80%-83% drop, I added other possible percentages that Bitcoin
could drop instead. As Bitcoin becomes more and more institutionalized and
mainstream, it should become less volatile, perhaps more like the stock market. In
recent history, the worst S&P 500 drops were:

51% in 2000–2002 (Dot-com Bubble)

59% in 2008 (Great Recession)

33% in 2020 (Covid-19)

Based on those metrics, we could see Bitcoin drop “only” 50% this halving cycle from
the cycle high. Using that as a guide, we could see price targets of $60k-$100k if we
estimate Bitcoin only dropping 50%-83% (as highlighted in blue above). Going more
extreme and still expecting an 83% drop and there are upside targets of $117k-$250k as
seen in the table above.

Looking at the common stock market declines as compared to Bitcoin’s halving cycle
declines, we can guess that Bitcoin will end up losing 60%-70% (the percentage
between the common stock market declines of 50% and previous Bitcoin cycle decline
of 80%) from it’s top this halving cycle if it follows previous cycles. Using this as our
guide, I believe it is highly likely (90%) that Bitcoin will reach a halving cycle high of
at least $58k-$65k, somewhat likely it could be at least $80k, and less likely it reaches
$95k during this cycle. Max Keiser recently stated in the near term Bitcoin should hit
$77k within the next couple of months due to his analysis of the Bitcoin hash rate. With
every small 25%-30% correction we get in Bitcoin, we actually get a more solid support
area for Bitcoin. These dips then could be interpreted as miners are selling Bitcoin in
order to raise enough capital to improve their systems (and thus raising the hash rate)
so they can continue to reap the mining rewards associated with Bitcoin. Miners would
not continue to mine and invest in their systems unless they believed the price of
Bitcoin would continue higher.

For one just trying to figure out Bitcoin’s pricing action to when it is at a top will be to
watch if Bitcoin makes a very parabolic move that would lead to an even bigger crash.
As mentioned in Bitcoin: When to Cash Out or Crash Out, you will need to see and find
where this many trillions of dollars can come from to continue the bull case but from a
moderate estimate, we should be able to reach a $1.5 trillion market cap for Bitcoin
https://medium.com/coinmonks/working-backwards-to-find-bitcoins-ultimate-target-price-this-halving-cycle-389bc60011a8 4/9
2/11/23, 11:34 PM Working Backwards to Find Bitcoin’s Ultimate Target Price This Halving Cycle | by Sense and Cents | Coinmonks | Medium

this cycle. That would translate to about an $80k price target if this halving cycle’s bull
run continues to the end of 2021 (for an 18 month halving cycle instead of 12 month).

As mentioned in my last article, it’s important to manage one’s risk and I will most
likely de-risk and sell off half of my position at these levels ($58k, $65k, $80k, &
$100k) with the idea of holding some Bitcoin until the next halving cycle where it
could reach those even higher estimates that match the price targets of $146k by JP
Morgan, $220k by Max Keiser, or even $400k by Guggenheim Partners. Either way, if it
doesn’t reach these targets this halving cycle, if you can HODL until the next halving
cycle 3 years from now, you could be much better off. Will you be able to HODL for 3
years after losing 60–70% of the value from your Bitcoins to the next halving cycle? Or
will you do some wise “sell half” strategies, as my investment guru cousin “Joe Money”
has taught me, to make sure you always have some skin in the game while locking in
profit. The easiest thing to do is to HODL until the institutions are all in the game, but
everyone has to size their risk and their opportunity (cost). Only time will tell what was
best but it’s a good idea to have at least one horse on this Bitcoin race always.

If you liked this article, I would appreciate a Clap. Don’t forget to follow and if you think any
of your friends would enjoy this article, please share it with them. Thanks for reading.

Check out my other Bitcoin related articles.

Making Money Using Bitcoin Halving Cycles

The Ten Major Downside Risks of Investing in Bitcoin


https://medium.com/coinmonks/working-backwards-to-find-bitcoins-ultimate-target-price-this-halving-cycle-389bc60011a8 5/9
2/11/23, 11:34 PM Working Backwards to Find Bitcoin’s Ultimate Target Price This Halving Cycle | by Sense and Cents | Coinmonks | Medium

5 Things You Can Do To Invest In Bitcoin Successfully

10 Reasons Why You Want to Invest in Bitcoin

(Goodbye Robinhood?) It’s Time to Diversify your Bonds…I Mean Brokers

Bitcoin: When to Cash Out or Crash Out

Disclaimer: This material should not be considered investment advice. I am not a registered
investment advisor. Under no circumstances should any content from my content be used or
interpreted as a recommendation to buy or sell any type of security or commodity contract.
This material is not a solicitation for a trading approach to financial markets or
cryptocurrencies. Any investment decisions must in all cases be made by the reader or by his
or her registered investment advisor. This information is for educational purposes only.

Join Coinmonks Telegram group and learn about


crypto trading and investing
Also, Read
What is a Flash loan?

The Best Crypto Trading Bot | Grid Trading

3Commas Review | Pionex Review | Coinrule review

AAX Exchange Review | Deribit Review |FTX Exchange Review

NGRAVE ZERO review | Phemex Review | PrimeXBT Review

Bybit Exchange Review | Bityard Review | CoinSpot Review

3Commas vs Cryptohopper | Earn crypto interest

The Best Bitcoin Hardware wallet | BitBox02 Review

Ledger vs Ngrave | Ledger nano s vs x

Crypto Copy Trading Platforms | Bityard copy trading

Vauld Review | YouHodler Review | BlockFi Review


https://medium.com/coinmonks/working-backwards-to-find-bitcoins-ultimate-target-price-this-halving-cycle-389bc60011a8 6/9
2/11/23, 11:34 PM Working Backwards to Find Bitcoin’s Ultimate Target Price This Halving Cycle | by Sense and Cents | Coinmonks | Medium

The Best Crypto Tax Software | CoinTracking Review

Best Crypto Lending Platforms | Leveraged Token

Ledger Nano S vs Trezor one vs Trezor T vs Ledger Nano X

BlockFi vs Celsius | Hodlnaut Review

Bitsgap review | Quadency Review | Bitbns Review

Ellipal Titan Review | SecuX Stone Review

DEX Explorer | w | LocalBitcoins Review

Best Blockchain Analysis Tools | Earn Bitcoin

Crypto arbitrage guide: How to make money as a beginner

Best Crypto Charting Tool | Best Crypto Exchange

How to buy Bitcoin in India?

Bitcoin exchange in India | Bitcoin Savings Account

What are the best books to learn about Bitcoin?

Get Best Software Deals Directly In Your Inbox

https://medium.com/coinmonks/working-backwards-to-find-bitcoins-ultimate-target-price-this-halving-cycle-389bc60011a8 7/9
2/11/23, 11:34 PM Working Backwards to Find Bitcoin’s Ultimate Target Price This Halving Cycle | by Sense and Cents | Coinmonks | Medium

Bitcoin Cryptocurrency Stock Market Hodl Investing

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

https://medium.com/coinmonks/working-backwards-to-find-bitcoins-ultimate-target-price-this-halving-cycle-389bc60011a8 8/9
2/11/23, 11:34 PM Working Backwards to Find Bitcoin’s Ultimate Target Price This Halving Cycle | by Sense and Cents | Coinmonks | Medium
By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.com/coinmonks/working-backwards-to-find-bitcoins-ultimate-target-price-this-halving-cycle-389bc60011a8 9/9
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

Published in FCAT Blockchain Incubator

RJ Rybarczyk Follow

Dec 9, 2020 · 23 min read · Listen

Save

Understanding the Bitcoin Blockchain Header


The composition of the block header is an intricate and highly consequential process. If
Bitcoin is a living, breathing organism, then the block header is the heart of the entire
machine. The “block” in the Bitcoin blockchain is what moves and settles millions of dollars of
value every 10 minutes and in the block. The block header is what notarizes the funds in a
block, votes on consensus decisions and ultimately directs and defines the movement and
legitimacy of Bitcoin transactions.

The version number provides means for network softfork upgrades. The previous block hash
links the current block to its parent, creating the chain in “blockchain”. The Merkle root
cryptographically ties all the transactions in a block to their associated header. The timestamp
acts as a verifiable timestamping system, which is useful in many applications outside of
Bitcoin. The encoded target difficulty lets the miner know what the network will accept as
valid. And finally, the nonce provides a dedicated search space for the miners to mine,
propelling the network forward.

This post aims to provide a technical overview of each of these fields with the intention of
being a technical reference for the Bitcoin block header.

Introduction
Bitcoin’s blockchain is comprised of blocks. Blocks (and transactions) are versioned
binary data structures. There are two parts to a block, the transaction block (where all

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 1/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

the block’s transactions reside in their entirety), and the block header. The block
header is a short and strictly formatted data field that prepends every block. It includes
six fields, all with differing functionalities, and the SHA256d hash of these fields acts
as the block’s identifier. The block header is the focus of this post and we will continue
to dive into it in depth, but first let’s briefly touch on the transaction block.

When a network participant submits a new transaction to the network, it is appended


to a list of all the other unconfirmed transactions. This list is called the mempool.
Miners are the network participants responsible for choosing the unconfirmed
transactions from the mempool to be included in the next block. This next block is
called the candidate block. It is the miner’s responsibility to construct a valid block. A
valid block is one whose block header hashes to a number that is less than or equal to a
number set by the Bitcoin network, called the target.

The miner performs a large number of hashes in search of a valid block hash that
meets the target requirement. In order to create new hashes from the same block data,
a field in the header called the nonce field is dedicated for the miner to quickly change
in order to generate unique hashes in the processes of finding a valid block. As will be
further discussed, the nonce field only provides four bytes (2³² bits) that can be
changed. Therefore, the search space is 2³² bits, meaning that up to 4,294,967,296

unique hashes can be generated for the block if nothing except for the nonce value is
changed. While this may seem like plenty of search space, it is actually quite small
given the Bitcoin ASIC hardware available today. For example, Bitmain’s Antminer S19
Pro ASIC miner performs at 110 Th/s. That is ~2⁴⁶ hashes per second. So, this machine
completely exhausts the search space provided by the nonce field in under one
millisecond.

Once the search space is exhausted, the miner must create a new block from a new set
of transactions. Constructing this new block can be computationally expensive and
bandwidth intensive. Therefore, miners have an incentive to find ways to expand the
search space outside of the dedicated four-byte nonce. There are multiple ways of
expanding the search space: miners can use (1) unused version field bits, (2) a portion
of the time field bits, and (3) a few extra bits in the script signature of the coinbase
transaction. The latter is generally referred to as the extranonce, although it is not a
formally defined field in the Bitcoin protocol.

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 2/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

Like all data, transactions boil down to series of bytes. It is undesirable to have blocks
that have too many bytes or are too “heavy” because of different resource constraints.
The two more common constraints are (1) uplink related (bandwidth/latency), and (2)
verification related (how fast the CPU can verify transactions). Storage related
constraints are not as much of an issue now since storage has become rather cheap
and nodes can prune. But larger blocks can deter space constrained individuals from
running a full node, thus damaging network decentralization. Furthermore, without a
block size limit, the network becomes susceptible to DDoS attacks from bad actors
spamming low value transactions to the network. To combat these things, there is a
consensus-imposed cap on the block size constraint called the block weight.

What motivates miners to mine blocks? They have two sources of revenue: the block
subsidy (which will be discussed next), and transaction fees. It is a delicate balance for
a miner to maximize their transaction fee profit by including as many transactions in
the candidate block as possible, while also keeping the block weight under 4MB. This
type of problem is akin to the knapsack problem, and it is of this author’s opinion that
transaction selection is a fascinating problem, just not a glamorous one.

There is one special type of transaction called the coinbase transaction that is
pertinent to the discussion of the block header. The coinbase transaction is included as
the first transaction in every block and is responsible for minting new bitcoins (the
block subsidy) and paying out the miner’s reward. As alluded to earlier, the malleable
bits in the coinbase transaction are leveraged to increase a miner’s search space.

The Block Header


We are now ready to discuss the bitcoin block header. The header is 80 bytes and
contains six different data fields, each in little endian format.

It is necessary to understand binary numbers, hexadecimal numbers, and endianness


in order to be able to parse and understand block header and transaction contents. To
explain these, a quick detour is taken in the proceeding subsection. If the reader is
already familiar with these concepts, this section can be skipped.

Pertinent Number Systems & Endianness


Binary, Decimal, and Hexadecimal Number Systems

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 3/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

Integers are very commonly expressed with the base 10 number system, commonly
called the decimal system. They can be equivalently expressed in any other base,
however. The two other number systems that are useful in understanding these lower
level Bitcoin concepts are binary numbers (base 2) and hexadecimal numbers (base
16). Changing the base from 10 to 2 or 16 (or any number for that matter) does not
change the integer’s value, only how it is expressed.

Binary numbers are base 2, therefore only two values are needed to express the full
range of integers. These values are 0 and 1. For example, considering the u8 type
numbers (each number is 8 bits long):

Decimal and Binary Comparison

Note how much more verbose binary numbers are in comparison to the decimal
numbers.

It is common to prepend the character “ b ” to a binary number. For example, the


binary equivalent of the base 10 number 4 is equivalent is written as b0100 .

You may be wondering why four digits are used to express, for instance, the binary
number b0000 0001 . Why not just b1 ? This is because in computer memory, you must
choose the number of bits required for an integer ahead of time. So, if the integer may
have to represent any number up to b1111 1111 , then in memory the integer must
always take up eight digits, even if it isn’t using all of the digits all of the time.

Putting an optional space in between every four zeros of a binary number makes it
easier to read but holds no other significance.

Hexadecimal numbers are base 16, therefore 16 values are needed to express the full
range of numbers. These values are 0–9 and A — F.

Decimal and Hexadecimal Comparison

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 4/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

Note how in this case, the decimal system is more verbose than that of the
hexadecimal.

It is common to prepend the characters “ 0x ” to a hexadecimal number. For example,


the base 10 number 3,735,928,559 hexadecimal equivalent is written as 0xDEADBEEF .

Furthermore, note that 0xDEADBEEF is a four-byte number. Every two characters is


equivalent to a single byte: 0xDE is one byte, 0xAD is one byte, and so forth.

For the sake of completeness, the decimal number 3,735,928,559 binary equivalent is
b1101 1110 1010 1101 1011 1110 1110 1111 .

Little Endian vs Big Endian

To give a taste for the concept of endianness, in English we say “23”, but in the German
language they say “3 and 20”. It is the same number, just expressed differently.
Endianness is a similar concept, big endianness orders the most significant digits first,
and little endian orders the least significant digits first. The terms “big endian” and
“little endian” is a reference to the book Gulliver’s Travels by Jonathon Swift. In the
story, there were two groups of people, Big
Endian and Little Endian. The Big Endian group broke their eggs from the top, the
Little Endian group from the bottom. Chaos ensues over this preposterous and
insignificant difference in egg-breaking methodology.

At a lower level, endianness has to do with how a computer’s processor loads a value
into its registers (memory). Namely, how the bytes are ordered.

In big endian format, the most significant bytes are read first. This is how we
intuitively read numbers. The decimal number 3,735,928,559 written in big endian
hexadecimal format is 0xDEADBEEF , exactly what one would expect. In a big endian
formatted system, this number is stored in computer memory in binary as follows (the
hexadecimal values are also presented for clarity):

Big Endian Formatted Binary and Hexadecimal Numbers

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 5/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

Alternatively, a number can be stored in computer memory using little endian


formatting. In little endian format, the least significant bytes of the number are read
first. This is not how numbers are intuitively read.

In a little endian formatted system, this number is stored in computer memory in


binary as follows (the hexadecimal values are also presented for clarity):

Little Endian Formatted Binary and Hexadecimal Numbers

When comparing the big endian and little endian formats, it is (hopefully) clear that
the only difference is the byte order. In big endian, the hexadecimal equivalent of
3,735,928,559 is 0xDEADBEEF . In little endian, the hexadecimal equivalent is
0xefbeadde. It is important to be aware of endianness because the little endian
formatted number 0xEFBEADDE is still representing the decimal number 3,735,928,559 ,

not the decimal number 4,022,250,974 .

Remember, all of these numbers are equivalent, just expressed in different ways. For
the most part, it does not matter if a system or program uses big or little endian, what
matters is consistency.

Bitcoin (mostly) uses little endian format, and it is important to keep that in mind
moving forward.

Back to the Block Header


Returning to the block header.

In its hexadecimal format, a typical block header looks like this:

Bitcoin Block Header of Block at Height 645,536

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 6/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

This block header is from the block at height 645,536 and was mined by Slushpool. It
will be used as an example throughout this post.

Each field, its data type, and a very brief description is detailed in the following table.

Block Header Data Fields

How the Block Header is Used in the Mining Process


On a high level, the process of mining boils down the following steps:

1. Select a suitable version number and current epoch time. From the network,
retrieve the previous block hash of the latest block on the
longest chain and the target.

2. Select a number of unconfirmed transactions from the mempool to include in the


candidate block.

3. Construct the coinbase transaction.

4. Calculate the Merkle root from the coinbase transaction and selected transactions.

5. Concatenate these values to create the block message.

6. Select a number for the nonce and append it to the block message, creating the full
candidate block header.

7. Perform the SHA256 hash on the block header (twice) and compare the result to the
network target.

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 7/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

8. If the block header hash is less than or equal to the target, the
block is valid, and the miner propagates it to the network for
confirmation by their peers. They then return to step 1 and commence
mining on the next candidate block.

9. If the block header hash does not satisfy the target, the block is invalid and the
miner returns to step 6, incrementing the nonce and trying their luck again.

These steps are detailed in the flowchart below.

Flowchart of the Mining Process to Construct a Block Header

Now that the block header has been defined and the important role it plays in Bitcoin
has been expressed, each parameter can be explored in more detail.

Version

Version Field of Block at Height 645,536


https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 8/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

The version field is usually treated as a four-byte big endian number interpreted as
type int32 and contains extra bits that miners can use to signal readiness for softfork
proposals and for an additional search space of 2¹⁶.

For such an unassuming field, there is a lot to unpack when it comes to the version
number of a block. The version number provides the means in which miners can
signal their readiness for network softfork upgrades. The success or failure of a miner-
activated softfork proposal is dependent upon if enough incoming blocks have
signaled their readiness. Here, “readiness” means that the miner has updated their
software to be compatible with the Bitcoin client release containing the proposed
changes. An example of a softfork proposal is the segwit softfork.

The three most significant bits of the version fields are reserved for future possible
mechanism upgrades. Currently, the three most significant bits must be set to b001.
This means that the minimum allowed version number in big endian is 0x2000000

( b0010 0000 0000 0000 0000 0000 0000 0000 ). And the maximum version number in big
endian is 0x3FFFFFF ( b0011 1111 1111 1111 1111 1111 1111 1111 ).

At the time of writing this post, the version number behaves in accordance with the
BIP9 specification. Before diving into BIP9, let’s take a look at how the version number
has evolved since the birth of the network.

A Brief History of the Block Header Version Field


Version 1 started with the genesis block in 2009. Until September 2012, no meaningful
signaling took place during this time.

In September 2012, Bitcoin Core v0.7.0 introduced BIP34 which rendered version 1
blocks to be non-standard. Specifically, this BIP did two things:

1. Give miners a structured way to signal readiness to accept a softfork proposal. This
was achieved by the double-threshold switchover mechanism, also called
IsSuperMajority() , which consists of two thresholds called the 75% rule and the 95%
rule. The 75% rule states that once 750 out of the last 1,000 blocks signal readiness by
setting their version 2 or greater, then any new blocks that specify version 2 in the
block header must comply with the softfork proposal specification. Otherwise the
block would be rejected by the network even if it was valid by version 1 standards.
https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 9/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

After this occurs, the 95% rule states that once 950 out of the last 1,000 blocks are
version 2 or greater, then all version 1 blocks will be rejected.

2. Specify the actual soft fork proposal which requires all version 2 or higher blocks to
include the block height as the first item in the script signature of the coinbase
transaction.

It took around six months until version 2 blocks were the standard, with the last
version 1 block at height 227,835 timestamped at 2013–03–24 15:49:13 GMT.

The softfork proposal defining version 3 is specified in BIP66 and was introduced in
February 2015 in Bitcoin Core v0.10.0. Version 3 blocks restrict signatures to strict DER
encoding. The method to signal readiness followed BIP34.

The softfork proposal defining version 4 is specified in BIP65 and was introduced in
November 2015 in Bitcoin Core v0.11.2. Version 4 blocks recognized a new op code for
the Bitcoin scripting system, OP_CHECKLOCKTIMEVERIFY , that allows UTXOs to be
unspendable for a certain amount of time.

While the IsSuperMajority() signaling method specified in BIP34 worked, it did have
some problems. Namely, (1) the lack of a timeout and (2) the use of integer values
rather than bits for signaling (explained further below). BIP9 solved both of these
issues.

BIP9 Version Field Improvements


BIP9 defines the version number behavior that is currently used. It requires that each
softfork proposal have four parameters:

1. A distinguishing name.

2. A bit in the version field that when flipped signifies miner readiness. The number of
the bit location is denoted by N.

3. A starttime that specifies when the selected bit gains its meaning.

4. A timeout, such that if the proposal has not been locked in by X date, it is deemed to
be failed.

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 10/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

By flipping a single bit in the version field rather than setting the field to a specific
integer number (as in BIP34), multiple proposals can be active at once.

Rusty Russell’s “BIP9: versionbits In a Nutshell” blog post does an exceptional job of
explaining the development and significance of the version field. We will build off this
post and continue to explore the version field in detail. Let’s start by examining exactly
how the bit flipping specified in BIP9 works.

The full 32-bit binary representation of the typical big endian version number of
0x20000000 is expressed as

b0010 0000 0000 0000 0000 0000 0000 0000

This follows the rule set in BIP9 that the topmost bits must be b001 or greater.

Now, let’s say there is a new soft fork proposal called BIPN₀ that sets the readiness bit
location to 0 (N = 0), requiring that the 0ᵗʰ bit be set to 1 for the miner to signify
readiness. The version number in big endian would then be 0x20000001 , or

b0010 0000 0000 0000 0000 0000 0000 0001

This miner has now signaled their readiness for BIPN₀.

Now, let’s say there are simultaneously two additional soft fork proposals active. BIPN₁
(N = 1) and BIPN₂ (N = 2). Perhaps this miner is only ready for BIPN₀ and BIPN₂, not
BIPN₁. With the BIP9 mechanism, this is not an issue. The miner would signify
readiness for only BIPN₀ and BIPN₂ by setting the 0ᵗʰ and 2ⁿᵈ bits to 1 and leaving the
1ˢᵗ bit as 0. The version number in big endian would then be 0x20000005 , or

b0010 0000 0000 0000 0000 0000 0000 0101

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 11/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

The ability to have multiple soft fork proposals active at any given time makes this
mechanism superior to BIP34’s use of integer values.

Miners can and do use this the version field to gain extra search space. This is called
overt ASIC boost via version rolling. Initially after BIP9 was introduced, miners were
still using all the version bits to perform an overt ASIC boost. However, this resulted in
nodes generating warnings as they were trying to interpret the bits as a signaling for a
non-existent softfork proposal. BIP320 solved this issue by designating 16 bits for overt
ASIC boosts, and by leaving 13 bits open for softfork proposal signaling. This gives the
miner a search space of 2¹⁶ and leaves room for 13 simultaneous softfork proposals.

Previous Block Hash

PrevHash Field of Block at Height 645,536

The previous block hash field is a little-endian formatted 32-byte value interpreted as
type char[32] that is the hash of the previous block. This field is what provides the link
between the current and previous block in the network.

Merkle Root

Merkle Root Field of Block at Height 645,536

The Merkle root field is a little-endian formatted 32-byte value interpreted as type
char[32] . The Merkle tree structure is used throughout the field of computer science
for numerous purposes. In Bitcoin, a Merkle tree is used to cryptographically tie each
transaction that is in the transaction block to the block header in a succinct 32 bytes.
https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 12/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

Each transaction is a leaf of the Merkle tree. The transactions must be included in
topological order. Meaning, when txₙ₊₁ spends an output of txₙ, txₙ₊₁ must be sorted to
a later position in the block than txₙ.The very first leaf in the Merkle tree. This first
leaf, tx₀, is reserved for the coinbase transaction.

Finding the Merkle Root


Once a miner has selected the transactions to include in the candidate
block, the following steps are performed to derive the Merkle root:

1. In pairs of two, each transaction id (SHA256d hash of the transaction) is


concatenated together.

2. The concatenated transaction pair is hashed via the SHA256d hashing algorithm.
The digest of this hash becomes a new branch in the tree.

3. Again, in pairs of two, the digests are concatenated together and hashed via the
SHA256d algorithm producing a new branch in the tree.

Step 3 is repeated until only one hash remains, the Merkle root hash, which is the value
stored in the block header.

Merkelization of an Arbitrary Dataset

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 13/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

Time

Time Field of Block at Height 645,536

The time field is a little-endian formatted four-byte value interpreted as type uint32

that is the epoch timestamp of the current block. The job of the timestamp is to
provide means for the network to determine how fast blocks are being confirmed so it
can adjust the difficulty every 2,016 blocks (about 2 weeks). Consensus rules constrain
the range of accepted timestamp values to about a three-hour window, leaving 2¹³ bits
that can be used for extra search space.

A valid timestamp must be greater than the median timestamp of the previous 11
blocks. At a confirmation rate of 10 minutes per block, this is one hour from the
submission time of the candidate block. The timestamp must also be less than the
network-adjusted time plus two hours. This three-hour window is 10,800 seconds
which yields 2¹³ extra bits of search space by

2ˣ = 10,800
x = ln(10,800) / ln(2)
x = 13.3987 => 13

The network-adjusted time is the node-local UTC plus the median offset from all
connected nodes. Network time is never adjusted more than 70 minutes from local
system time.

An unintended but useful consequence of including the timestamp field in the block
header of a healthy decentralized network is that the Bitcoin blockchain can be used as
an effective time stamping tool.

Bits
https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 14/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

Bits Field of Block at Height 645,536

The bits field is a little endian formatted four-byte value interpreted as type int32 that
encodes the current target threshold in a compact four-byte field. The resultant block
hash must be under the target in order to be considered a valid solution by the
network. The target is updated every 2,016 blocks (roughly two weeks), so every block
header submitted during the 2,016-block time frame will have the same target value
encoded in the header.

As we know, to find a block hash, the block header data fields (the version, previous
block hash, Merkle root, target, time, and nonce) are all concatenated and hashed
together via the SHA256d hashing operation. The resultant hash is the candidate
block’s header hash and acts as a unique identifier for this block. In order to be
considered valid, the hash must be less than or equal to the current network target
which reflects how easy or difficult it is for a miner to mine a valid block. Without the
target, it would be effortless to create a valid block and the network would fracture and
fall apart.

The maximum target produced by a SHA256d hash is


0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF or in base 10,
26,959,946,667,150,639,794,667,015,087,019,630,673,637,144,422,540,572,481,103,610,24

9,215 . This is a very big number. Bitcoin stores the target as a floating-point type, so the
truncated form used is
0x00000000FFFF0000000000000000000000000000000000000000000000000000 , which again in
base 10 is
26,959,535,291,011,309,493,156,476,344,723,991,336,010,898,738,574,164,086,137,773,09

6,960 . This is still a huge number.

In order to fit this large number into a four-byte space it uses a compact format. This
format sacrifices granularity for byte space. The following steps detail how to retrieve
the target from the bits value.

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 15/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

1. Swap endianness from little endian format in the block header, to big endian,
0x2F931D1A → 0x1A1D932F . Ultimately it does not matter the endianness used as long as
everything stays consistent.

2. Separate the first byte, 0x1A , from the remaining bytes, 0x1D932F . This first byte is
called the mantissa (also called significand). The mantissa is the part of a floating-
point number that represents the number of significant digits. It is then multiplied by
the base, which in this case is 2, and raised to the exponent to give the value of the
number.

Therefore, the target threshold is extracted from the bits field by:

Target = Mantissa × Base⁽ᴱˣᵖᵒⁿᵉⁿᵗ ⁻ ᴸᵉⁿᵍᵗʰ ᵒᶠ ᴹᵃⁿᵗᶦˢˢᵃ⁾

Using this equation, the target threshold for this block is found by:

Target = 0x1D932F × 2⁽⁸ˣ⁽⁰ˣ¹ᴬ ⁻ ³⁾⁾


= 0x1D932F × 2⁽⁸ ˣ ⁽²⁷ ⁻ ³⁾⁾
= 0x1D932F0000000000000000000000000000000000000000000000

Note that the difference between the exponent and the length of the mantissa is
multiplied by 8 in the above equation. This is a slight short cut, leveraging the fact that
there are eight bits in one byte. So instead of writing each of the parameters out in
binary, which would be much more verbose, each byte is taken in its entirety.

3. The result of step 2 can now be compared to the header hash. If the header hash is
equal to or below the target threshold, it satisfies the Bitcoin consensus rules and can
be confirmed on chain.

0x0000000000001D932F0000000000000000000000000000000000000000000000
0x00000000000016BF116FC90CF45AEC2DA4D13349358159D8B4EDDCB37EAB295B

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 16/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

Writing the numbers in their equivalent base 10 form looks like:

47525089675259291211422247200069659468817014361857087365971968
36551990950853533658225321687497789580066641734434828845787483

Therefore, since the header hash value is less than the target, this is a valid header.

Let’s explore a little deeper as to why this formula was chosen and how it works. The
format itself originates from the IEEE 754 standard for floating-point arithmetic which
just details how computers store floating-point numbers.

Consider a 16-bit register containing the number 11:

b0000 0000 0000 1011

A 16-bit register only has space for, you guessed it, 16 bits. If we shift the bits over by
the number of available bits (16), we encounter an overflow and lose our number 11:

Lost Bits | Remaining Bits


1011 | 0000 0000 0000 0000

To prevent this from happening we impose that we can only shift by our available bits
minus the number of bits we want to make sure we keep. In this case, 16 – 4 = 12 ,

which would yield

Lost Bits | Remaining Bits


|1011 0000 0000 0000

So, that is why we subtract the number of bytes from the exponent when calculating
the target: to prevent against edge cases where the exponent would cause an overflow
and we would lose significant digits of our mantissa.
https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 17/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

Nonce

Nonce Field of Block at Height 645,536

The nonce field is a little endian formatted four-byte value interpreted as type int32

that is incremented in order to create a new hash of the current block with the
intention of finding one that meets the current target. It provides 2³² bits of search
space.

The nonce parameter plays an essential role in finding a valid block. Without the
nonce, every single time a miner constructs a block that did not meet the network
difficulty, they would have to modify the transaction set, recalculate the Merkle root,
rebuild the block header, and rehash. This requires a non-negligible amount of
computational work. The nonce makes it such that the miner only needs to construct
the block header candidate once, keeping all the variables constant except for the
nonce. The miner will increment the nonce and then rehash the block until (1) the
block header hash either meets the difficulty target (they found a valid block header),
(2) the block becomes stale (a competing miner found a valid block header), or (3) they
run out of
nonce search space.

The Coinbase Transaction


Coinbase transaction is a special type of transaction in every bitcoin block — the only
transaction that does not point to an existing UTXO, but instead mints new bitcoin
according to the bitcoin protocol monetary policy.

The coinbase transaction is important for three main reasons: (1) it is


responsible for minting new UTXOs, (2) it provides extra search space to the miner,
and (3) it provides the miner with the means to tag a block as their own.

The coinbase transaction for block 645,536 is the following:

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 18/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

Coinbase Transaction of Block at Height 645,536

Each field, its datatype, and a very brief description is detailed in the following Table.

Transaction Data Fields

For the purposes of this post, the script signature is the field of importance because it
is where the miner gains extra search space and also where the miner can put in their
identifier.

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 19/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

Script Signature (Unlocking Script)

Script Signature in the Coinbase Transaction of Block at Height 645,536

The script signature, also called the unlocking script, is of variable byte length which
is capped by consensus. Typically, the unlocking script contains conditions that allow
the consumption of the previous transaction’s UTXO. In the coinbase transaction,
however, there is no UTXO being consumed, only new UTXOs being minted. Instead,
the script signature contains the block height (as specified by BIP34) and any other
information the miner chooses to put here. Very commonly this includes any
extranonce parameters and any identifying “signatures” that the miner may optionally
include.

The extranonce parameter is not a strict field defined by the Bitcoin protocol, but
rather some bits that the miner can optionally use to increase their search space. Many
pools support the extranonce parameter and put restrictions on its length. It is
common to see an eight byte extranonce.

Breaking down the script signature, the first 1–9 bytes indicates the length of the
unlocking script which is of variable. In this case, the length is 0x4B (decimal 75 )

bytes.

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 20/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

The next byte indicates the length of the next portion of the coinbase transaction. In
this case, it is 0x03 , which indicates that the next three bytes, 0xA0D909 , are of
significance. These bytes are the block height of 645,536 in little endian hexadecimal
format in accordance with BIP34. The next 64 bytes contain the extranonce
parameter(s) and any other information the miner chooses to put there. The size of the
extranonce parameter typically varies from pool to pool.

Finally, the last seven bytes, 0x2F736C7573682F is the optional identifier that Slushpool
uses for their blocks, /slush/ . By providing this identifier, Slush is making it publicly
known that this block came from their pool.

Of course, any entity could put this same text in the coinbase transaction and pretend
to be Slushpool (or any other miner). And, conversely, Slush (or any other miner) could
exclude their typical identifier from the coinbase script signature and anonymously
mine the block.

This identifier is optional for any miner to put in their designed characters. Most of
them normally put their name to show they are mining blocks (which makes sense
from marketing perspective to show how successful your pool is) but a miner can put
whatever they want or leave it empty. To get a feel for how many miners include an
identifier in the script signature of the coinbase transaction, 77.7% of blocks included
an identifier over the four-day time span from September 25ᵗʰ, 2020 through
September 28ᵗʰ, 2020.

Conclusion
Understanding the block header is essential to understanding mining and Bitcoin as a
whole. The block header plays many important roles in the Bitcoin protocol, each of its
six fields working together to form the backbone of the network.

The block header is the avenue by which all the transactions in a block are linked
together via the Merkle root, and further link that block to its parent with the previous
block hash, creating the chain. The version number is used by miners for protocol
upgrade support and readiness signaling. The encoded target difficulty lets the miners
know what the network will accept as valid, and the nonce provides them with a
dedicated search space for the valid hash.

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 21/22
2/11/23, 11:36 PM Understanding the Bitcoin Blockchain Header | by RJ Rybarczyk | FCAT Blockchain Incubator | Medium

The block header is exceptional in its simplicity, yet full of applications and use cases.
While its format has held up for over a decade now, it still is flexible enough to adapt as
the network changes and grows. How fields operate can and does change for the
better, as seen with the softfork upgrading mechanism defined by the version field.
How fields are used changes as well, as seen with how miners can use nontraditional
fields to accommodate more search space via the version, timestamp, and coinbase
transaction. The creativity of the bitcoin developers and users in leveraging the block
header and its associated fields to accomplish more and enable new use cases, is
astonishing, and we cannot wait to see what the next decade of innovation brings us.
But whatever it is, we are certain that the block header will be the backbone of this
beautiful system.

957560.1.0

Special Thanks
I would like to give a special thanks to Amanda Fabiano, Juri Bulovic, Brian Wright, Val
Open in app Sign up
Wallace, Carl Dong, Rusty Russell, Sam Abbassi, Mark (Murch) Erhardt, and NicoleSign In
Dodes for all their feedback and help.
Search Medium

Bitcoin Blockchain Block Header Coinbase Mining

About Help Terms Privacy

Get the Medium app

https://medium.com/fcats-blockchain-incubator/understanding-the-bitcoin-blockchain-header-a2b0db06b515 22/22
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

Published in Phala Network

Phala Network Follow

Jul 30, 2021 · 18 min read · Listen

Save

Reading | The Evolution of Mining: CPU, GPU,


ASIC… Phala
After reading this article, you’ll have an understanding of how traditional Proof of
Work systems work, why they are doomed to keep moving towards ASICs, and how
Phala network will bring the original dream of CPU mining back to life.

The Dawn of Cryptocurrency: CPU mining


https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 1/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

via: unslpash.com

The first cryptocurrency mining was done on the common chip at the center of every
computer — the CPU — so the original Bitcoin mining machines were PCs. The first
Bitcoins were created on Jan 3rd, 2009, mined by Satoshi Nakamoto on his personal
computer.

Many crypto assets, like BTC, LTC, and DOGE, use a PoW(Proof of Work)algorithm
in their consensus. This work is sometimes referred to as a “puzzle,” but it really refers
to a brute-force effort. It’s just a matter of trying a computation over and over until a
qualifying answer is found — so the faster we can find potential answers, the sooner a
qualifying answer can be found.

To be clear: the PoW algorithm asks miners to repeatedly increase a “nonce” number
(just any number they can only use once) and perform the same hashing algorithm on it,
trying over and over until stumbling across a nonce that leads to a hash which qualifies
as a solution.

“Mining” serves multiple goals:

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 2/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

1. It creates a unique hash for each block of transactions. The Consensus rules of the
bitcoin system require specific qualities in the hash, making it “difficult” to find, as
well as making the block contents verifiable, unfalsifiable, and trackable.

2. The Consensus rules require that each block include the previous block’s hash,
forming a chain. But if two miners each produce a different block as the “next”
block, they will disagree and the system needs a way to choose which of these new
blocks will continue the true chain, so

3. The rules also dictate that the chain with the most cumulative work in the hashes is
the true chain, settling any disagreement. This also means that any attempt to re-
write the last few blocks of the chain would require an enormous amount of work
to produce valid hashes: more than all the work already spent for all those blocks
combined. The combination of these Consensus rules forms the fundamental basis
of the bitcoin’s decentralized security model: the cumulative work performed to
create the hashes of a chain of blocks is presumed to be more work than anyone
else could perform, which secures the chain against changes without resorting to
any “authority” to dictate things.

4. Lastly, the Consensus rules allow the miner who finds a qualifying hash to earn
some new bitcoin for itself. This reward simultaneously provides incentives for
miners to mine, and provides for the issuance of new bitcoin over time.

This fourth point explains why miners mine — for the earnings! But their work is
needed to address the first three points above.

To put it all together, a PoW Consensus system inextricably links the work to the
security of the network: the work which secures the blockchain is the work which
earns the cryptocurrency.

But this work is simply computations made to pick up the fitting hash, which one could
argue is wasteful, given the amount of compute resources dedicated to it.

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 3/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

The “Work” of Crypto Mining… and the Rise of the GPU

via: unslpash.com

It turns out that certain kinds of computations are more efficient on GPUs (Graphics
Processing Units) than on CPUs, and this applies to the specific kinds of computation
used for bitcoin mining (SHA256 hashing). A single GPU could outpace dozens of CPUs.
Miners talked about this in the first year of bitcoin mining, and when the first GPU
mining software was published on Sep 18th, 2010, many early bitcoiners became GPU
miners. Soon, mining rigs consisting of several high-end graphic cards became
common. GPUs quickly out-competed CPUs by such wide margins that CPU miners
would lose more money on electricity than they could earn in BTC.

What is it that Makes GPUs Better for Mining?

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 4/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

Remember that in PoW miners need to repeat the same hashing computation on
numbers they can only use once (nonces) over and over until the stumble upon a nonce
that produces a hash that satisfies the difficulty condition?

Knowing this about PoW algorithms, we can now compare CPUs to GPUs and see why
one works better.

A CPU chip has a branch prediction unit, storage units, and a few branch modules. A
CPU can run a very wide variety of tasks based on varying logic, often running a few
tasks in parallel. Of course, in PoW mining, there’s never a change in logic. We need to
run the exact same task as quickly as possible, and its ideal is to run the same task
many, many, many times in parallel — effectively testing many nonces at the same
time.

A GPU chip is much better designed for this. Instead of linear thread management and
careful control of scheduling branches, the GPU is tailor-made to run hundreds and
even thousands of simultaneous calculations of the same type at the same time. This
is also what makes a GPU excellent for geometry while a CPU excels in logic. For
example, a GPU may receive a command like “draw a rectangle of this size at these
coordinates,” and the GPU will simultaneously compute hundreds of pixels (using the
same formula many times at once) to create the rectangle almost instantly. This kind of
ability is a great match for a PoW’s processing needs!

This made the graphics card far more efficient for PoW mining and it quickly replaced
the CPU as BTC miners learned this. An interesting side note: when Etherum’s miners
adopted GPUs for the Ethereum style of PoW mining, there was a long period when
regular PC gamers could hardly find NVIDIA RTX30 graphics cards because miners
snapped them up!

ASICs: the Era of Centralization

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 5/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

via: unslpash.com

Application-Specific Integrated Circuits (ASICs)are designed to complete very specific


computing tasks. Manufacturers design different chips for each PoW algorithm — one
chip for BTC’s SHA256 algorithm, a different chip for LTC’s Scrypt algorithm, etc. A
machine built with these PoW-specific chips is called an ASIC miner. Because an ASIC
chip is designed with a single algorithm in mind, the efficiency can be even better
than a GPU, which is designed for many sorts of graphics array work, but it also
cannot do anything else!

For example, a mainstream ASIC miner called the Ant S9 is equipped with 189 ASIC
chips with a combined computing speed of up to 13.5 TH/s, which is over 10 thousand
times the performance of a contemporary flagship graphics card like the GTX 1080Ti.
At the same time, the Ant S9 consumes only 1,350 watts of power, which is closer to 10
times the power draw of the graphics card. Since the operating expense for miners is
the cost of power, consuming 10X the power to produce 10,000X the work is a huge
gain.

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 6/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

In the race to perform more hashes to find a solution more quickly, ASICs will
eventually win.

But this leads to another problem: access to ASIC miners is a major up-front hurdle.
They are high in cost and low in supply. Not everyone can afford the expense, and even
if they can, the hardware is sometimes only available to those with connections (or
subject to government controls). In 2017, estimates were that 70% of Bitcoin hashing
power came from ASIC miners made by Bitmain, the biggest supplier worldwide.
Moreover, Bitmain were, themselves, involved in mining: around 51% of total blocks
were mined through BTC.com and Antpool, both of which belong to Bitmain. These
facts worried many in the Bitcoin industry because when a single entity controls 51%
of the hashpower, it becomes possible to perform a 51% attack to take over the
network. Others simply worried that with a huge fraction of the world’s Bitcoin mining
machines housed in one place (China), there could be a risk to the Bitcoin mining
world if authorities intervened (which, as we know today, actually happened recently. This
piece is written in June of 2021.)

Another big problem with ASICs is that they are single-purpose. You cannot even
repurpose a BTC ASIC into an LTC-mining one because the hashing algorithms are
different. So if a BTC ASIC becomes unprofitable due to improvements in newer
models, it becomes useless — all the while being orders of magnitude more powerful
than general CPUs or GPUs, but only for this one single purpose, which is hashing the
SHA256 algorithm. The problem is that in order to be competitive, these ASICS
consume the best silicone chips and require significant engineering effort, which
tends to become obsolete once a newer generation of ASICs is out. One could
consider this wasteful.

These concerns led to the development of algorithms that make it harder to make an
ASIC. Some are more complex, others change frequently, still others are built to
require more memory than can be easily built into an ASIC chip: Scrypt, Ethash,
Equihash, X17, X13, X16r, and other algorithms showed up over time, used by cryptos
like LTC, ETH, ZEC, DASH, BTG, RVN.

As the technology to build more complexity and memory into an ASIC chip progresses,
however, many of these “GPU-only” algorithms eventually got replaced by ASICs.

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 7/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

Satoshi Nakamoto saw this coming. Bitcoin’s original design called for miners to “vote
with their CPU power” as a way to enforce the rules of consensus. It’s clear that he
foresaw the advent of ASICs when he wrote that “as the network grows beyond a certain
point, it would be left more and more to specialists with server farms of specialized
hardware”. The seems to refer to ASICs; if Bitcoin became valuable enough to mine,
manufacturers would inevitably have an incentive to produce custom machines to
mine it.

Why is CPU Mining so Hard to Maintain?

via: unslpash.com

It boils down to technology and economics. Whether focused on GPU or CPU, any
“ASIC-resistant” algorithm will delay rather than prevent the appearance of ASIC mining
machines. Any high-quality crypto-asset ecosystem with the value being mined on a
PoW algorithm will attract professional miners; this is an economic market
inevitability. And the market will always develop more efficient tools using the latest
technology available. This is an inevitable path to ASICs.

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 8/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

An ASIC-resistant PoW algorithm may also be more vulnerable to attack. The most
heavily-mined coin that can be mined by a particular kind of ASIC — for example,
Bitcoin is the most heavily-mined coin using SHA256 ASIC miners — has a level of
safety against a 51% attack. This is because it’s simply not possible to suddenly find
enough additional ASIC mining hardware in the world to produce more hash power
than is already being used by honest miners to mine Bitcoin. This safety does not
extend to other coins mined with SHA256, because one would only need a small
fraction of the world’s SHA256 ASIC miners to perform an attack.

Similarly, Ethereum is the most heavily-mined coin using the Ethash algorithm, which
runs on GPUs… but as big as it is, Ethereum is still mined on a minority of the world’s
total GPUs. Because it is theoretically possible to acquire enough GPUs to over-power
the honest miners, Ethereum is theoretically less safe against this kind of attack than
Bitcoin. In this sense, the ASIC can be argued to make Bitcoin safer — but as we
discussed above, the centralization created by ASICs or their single-purpose nature can
lead to different vulnerabilities.

What are the Externalities of PoW?


Finally, search for optimizations in PoW computations also leads to optimizations in
energy consumption. PoW miners search for the cheapest energy possible, as by
reducing the electricity cost they become more efficient in computation resources.
Some of this cheap electricity comes from fossil fuel-based production, like coal. While
the concerns about the energy mix used in PoW mining have been slightly overblown
recently, it remains true that a significant portion of it (no less than 40%) is powered by
carbon-footprint heavy electricity production. One would even argue that the recent
crackdown on Chinese miners who mainly used renewable hydropower forced 20–30%
of them to move to areas like Kazakhstan where majority of electricity comes from
coal-burning, which ended up more harmful to the environment than officially
declared. But overall the trend is strong for miners to opt for renewable energy use
over time, which is glowingly cheaper than alternatives, so we don’t think the problem
is long-term.

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 9/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

But another way to look at the externalities produced by PoW is the fact that ASIC
production requires significant manufacturing efforts and contributes to global chip
and engineering talent shortage in hardware — requiring materials and labor to be
drawn into a single-purpose product, which has no other use in the world. This is a
much bigger problem long-term in our view. Currently, the Bitcoin network is
sufficiently secure for the foreseeable future and yet the race to build even better
ASICS and for miners to join the network never stops — so all of this computation
resource is overproduced while taking away from areas where it could have been used
more productively.

It seems that any PoW-based crypto asset, once it has value and is well-known, will be
on an inevitable path from CPU mining to GPU mining to ASIC mining. This appears to
be a forgone conclusion when using PoW in the Consensus algorithm to secure a
chain. This has multiple externalities that can be summarized as significant
inefficiencies and waste, as well as risking the network to become more centralized or
vulnerable to governments trying to shut it down due to those externalities.

So, what happens to the early Bitcoin dream, where anyone can join the network with
their computer, do work, and earn — “mine” — cryptocurrency? Is this model lost to
the world?

No.

Phala Network Mining


Phala Network’s system also ties together a large group of computers who get paid to
perform work — a mining network — but Phala has taken the novel approach of
separating Consensus from Computation.

For Consensus, Phala relies on NPoS (Nominated Proof of Stake), leveraging Polkadot’s
security system. This allows a tremendous level of security without relying on the work
from the miners.

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 10/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

via: How Nominated Proof-of-Stake will work in Polkadot

For Computation, Phala Network issues PHA tokens to miners as payment in return for
doing work. The beauty here is that since the work being done is not providing security
to the Consensus model, the work can be any sort of computation desired. Instead of
racing to find a random answer (as in Proof of Work), miners on Phala’s network can
perform whatever useful computations people want.

To protect the data and computations, Phala makes use of TEEs — Trusted Execution
Environments, a technology built into most modern CPUs. Jobs can be sent to miners
in encrypted form, which nobody can view. The jobs are taken by the miner and
dropped into the CPU’s internal TEE, inside which it is decrypted, the computation is
completed, and then the results are encrypted and sent back.

Notably, even the owner of the CPU cannot readily see what jobs or work are being
done inside the TEE, and neither the jobs nor the results are visible to anyone on the
network! This simultaneously protects the user and their data while ensuring that
miners can’t try to refuse certain kinds of jobs, or refuse jobs from certain users.
Miners have no idea what work their CPUs are doing, or for whom — all they know is
that they will be paid for doing the work (or they will lose money if they don’t do the
assigned jobs.)

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 11/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

Since the miners are blind to the work, and the network is blind to the data, all jobs are
simultaneously secure from prying eyes and secure against censorship.

Lastly, the whole Phala network is secured and maintained by a set of Gatekeepers,
which are similar to validators on Polkadot or Ethereum 2.0. They perform the NPoS
Consensus, receive jobs from users, dispatch the jobs to the miners, and then pay the
miners for their work. This creates a system where users sending jobs don’t know
where the work is done, miners don’t know what work they’re doing or for whom, and
the Gatekeepers acting as brokers in the middle are incapable of seeing any of it, apart
from “miner X did job Y for user Z and got paid”, or affecting this workflow due to
cryptoeconomic security guarantees.

This is how Phala Network tackles the issue of trust in the computation cloud. Because
the system does not require us to trust any piece of the system, it becomes trustless: a
system where trust is not necessary.

But most importantly any computation capacity Phala acquires is never redundant or
wasted, as it linearly scales the network’s throughput in terms of tasks it can perform
for multiple users with the growth of the mining community. CPUs used by the
network can be found in most general-purpose computers and don’t require excessive
energy consumption or industrial grade setups. There is no economic pressure on
miners to reduce costs in order to compete for network’s tasks, so there is no explicit
need to seek the cheapest electricity or create specialized hardware.

Thus, Phala’s mining, to the contrary of traditional PoW where computations and
consensus aren’t separated, is ESG-friendly as it improves the overall availability of
compute resources to the world and security of all its customers, makes the resources
more efficient in terms of use and maintenance by requiring general purpose
computers and reducing the need for centralized party that builds and maintains large
datacenters and, finally, doesn’t require excessive energy consumption or wasteful use
of single-purpose hardware.

All of these factors combined should significantly reduce the carbon footprint of
crypto and cloud industries when Phala grows and takes up significant portions of
those.

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 12/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

But how does Phala bootstrap a network and grow fast enough to out-compete less
ESG-friendly but larger networks? The answer is: by aligning network participants’
incentives with a token.

Where do the Payments to Miners Come From?


Phala was started with a fixed supply of 1,000,000,000 PHA. Of these, 70% (or
700,000,000) were reserved as Mining Rewards to be paid out to miners. While there
will never be more PHA created as Mining Rewards, these 700 million PHA will be
gradually paid out in declining amounts over a very long time. (See details and formulas
in the Technical Notes at the bottom.)

In addition, users submitting jobs will pay market-based Fees in PHA. The Fees and the
Rewards should, together, incentivize enough people to dedicate their CPUs to mining
often enough so that there is always a sufficient cloud of CPUs to meet processing
demands.

The Mining Reward amounts paid will be large at first, in order to attract a large
number of miners to the network while it’s still new and the value per PHA is relatively
low. As time passes, the Mining Reward will steadily decline, but increased utilization
will mean more in Fees. Over time, the Fee market will comprise a larger and larger
proportion of the payments to the miners, and the cloud of miners offering up their
CPUs will grow in proportion to the demand created by users.

This will create a similar effect as Bitcoin’s gradually decreasing reward emissions over
time: initially, bitcoin miners mostly received Rewards, but over time, more and more
of their payment will come from fees. The difference is that Phala Network will push
this process along more rapidly — taking years instead of decades to move from
“mostly Reward” to “mostly Fees” — and Phala Miners will be doing only as much
useful work as people are willing to pay for. The developer team behind Phala is going
to build a cloud platform to abstract away the complexities of having to deal with a
decentralized network and digital token payments — so that the user experience is
similar to Amazon’s AWS or Microsoft’s Azure. Combined with cheaper prices (as
miners are subsidized by the network) and enhanced security and privacy, this will help
https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 13/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

boost use of the network in the mid-term. Additionally, while Bitcoin still needs to
solve the fee payment problem in the future as the network’s utility is still being
worked out by the world, Phala won’t have to deal with this as the utility of cloud
compute services is already well established and growing.

Crucial Differences Between PoW and Phala’s TEE Miners


When a CPU does work in its TEE, the result is a natural “proof of work” because the
result of the calculation is proof that the CPU did the work. In this way, it’s similar to a
PoW mining system, where miners report “shares” (unqualified solutions) to provide
proof that they exist and proof that they are doing their fair share of work.

But Phala’s mining differs in a critical way: PoW miners are always racing to be the first
to find the solution, either for themselves or for their pool of miners. Finding a
solution first brings more rewards, so the number of miners will always grow in
proportion to the value being mind — in proportion to the price of bitcoin.

But in Phala’s TEE Mining there is no race. Miners get paid a small amount for being
online and available, and a larger amount if they are assigned work, but the work is
randomly distributed. There’s no race. And since the system will quickly transition
from Rewards to Fees, in just a few years the size of the cloud of miners will clearly be
a function of actual demand for computing resources, instead of work wasted in a race.

Phala TEE mining, therefore, counteracts both of the forces that push PoW systems
towards ASICs:

1. Because there is no race, there is less incentive to produce the very fastest
processor to “win”.

2. The nature of a job’s work is neither repetitive nor predictable; it can be for any
application a user submits! You can’t build Application-Specific Integrated Circuit
without knowing the Application.

3. In the Phala system, the computing power of the TEE miners is used for running
the world’s Computing tasks trustlessly. The users, jobs, and miners are managed

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 14/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

in a decentralized and trustless way by the blockchain, and the blockchain’s


Consensus is secured by a nominated Proof of Stake system.

The CPU Mining Dream Becomes a Reality Again


By separating the Consensus and the Computation, Phala has managed to re-create the
original state of Bitcoin: nearly anyone with a modern computer that supports TEEs
can decide to join the network and start mining to earn some cryptocurrency. But,
unlike Bitcoin, their computer will be doing useful work, so there’s no reason for
society to try to ban them for wasting energy in a race. Lastly, since the computation is
varied and unpredictable, there’s no avenue way for the market to lead to ASICs and
thus centralize around the most well-capitalized or equipped few operators.

As a side benefit, if someone decides to stop mining, they still have a useful device: a
computer with a CPU. If they want, they can even have their computer do mining when
they’re not using it. An ASIC miner serves no other purpose to society; if it isn’t mining,
it is just a waste of silicon, metal, and production energy.

* Technical Notes
Phala’s emissions will follow this exponential decline function:

Where t is the block time in Epoch, Iro is the initial release amount, and k is the
attenuation decay coefficient factor of each Epoch, which satisfies:

The parameters used by Phala Network are:

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 15/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

The incentivized roles and their reward share ratio in Phala Network are shown in the
following table:

About Phala
Phala Network tackles the issue of trust in the computation cloud.

This blockchain is a trustless computation platform that enables massive cloud


processing without sacrificing data confidentiality. Built around TEE-based privacy
technology already embedded into modern processors, Phala Network’s distributed
computing cloud is versatile and confidential. By separating the consensus mechanism
from computation, Phala ensures processing power is highly scalable but not wasteful.
Together, this creates the infrastructure for a powerful, secure, and scalable trustless
computing cloud.

As a member parachain of the Polkadot cross-chain ecosystem, Phala will be able to


provide computing power to other blockchain applications while protecting the data
layer, enabling possibilities like privacy-protected DeFi trading positions and
transaction history, co-computing DID confidential data, developing light-node cross-
chain bridges, and more.

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 16/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

On-chain services currently being developed on Phala Network include Web3


Analytics: high-performance smart contracts from Phala to enable highly concurrent
mass data analytics with privacy, paving the way for an alternative to Google Analytics
that inherently respects individual confidentiality.

🍽 — Subscribe | Website | Twitter | Github


🥤 — Discord | Forum | Telegram |Italiano |Français | Persian

Phala Network Cpu Mining Npos

119 1

Sign up for Phala Newsletter


By Phala Network

Stay tuned with Web3.0 world. Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 17/18
2/11/23, 11:39 PM Reading | The Evolution of Mining: CPU, GPU, ASIC… Phala | by Phala Network | Phala Network | Medium

About Help Terms Privacy

Get the Medium app


Open in app Sign up Sign In

Search Medium

https://medium.com/phala-network/reading-the-evolution-of-mining-cpu-gpu-asic-phala-87337d88aebd 18/18
2/11/23, 11:40 PM Bitcoin Hashrate is exploding! GPU Farms vs. ASIC | by CryptoTechJester a.k.a MarcB | Blockchain Biz | Dec, 2022 | Medium

Published in Blockchain Biz

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

CryptoTechJester a.k.a MarcB Follow

Dec 16, 2022 · 7 min read · · Listen

Save

Bitcoin Hashrate is exploding! GPU Farms vs.


ASIC
As Ethereum went to Proof-of-Stake, many wondered what the Ethereum miners,
especially the large-scale mining farms would do with their hardware. This article will
explore the transition of GPU farms to Bitcoin.

https://medium.com/blockchain-biz/bitcoin-hashrate-is-exploding-gpu-farms-vs-asic-106980a98637 1/8
2/11/23, 11:40 PM Bitcoin Hashrate is exploding! GPU Farms vs. ASIC | by CryptoTechJester a.k.a MarcB | Blockchain Biz | Dec, 2022 | Medium

Ethereum goes Proof-of-Stake


Ethereum, the world’s second-largest blockchain platform by market capitalization,
made the initial transition from proof-of-work (PoW) to proof-of-stake (PoS). This
change was highly anticipated by the Ethereum community and has the potential to
significantly impact the Ethereum network and its users.

But what exactly is proof-of-stake, and why did Ethereum making the switch?

In a proof-of-work system, like the one currently used by Ethereum, network


participants, known as miners, compete to solve complex mathematical equations to
validate transactions and add them to the blockchain. The first miner to solve the
equation is rewarded with cryptocurrency. This process consumes a large amount of

https://medium.com/blockchain-biz/bitcoin-hashrate-is-exploding-gpu-farms-vs-asic-106980a98637 2/8
2/11/23, 11:40 PM Bitcoin Hashrate is exploding! GPU Farms vs. ASIC | by CryptoTechJester a.k.a MarcB | Blockchain Biz | Dec, 2022 | Medium

energy and computing power, and has led to concerns about the environmental impact
of proof-of-work systems.

In contrast, proof-of-stake systems do not rely on miners to validate transactions.


Instead, network participants, known as validators, are chosen to create new blocks
based on the amount of cryptocurrency they hold, or their “stake,” in the network.
Validators do not need to solve complex equations, but rather, they “stake” their
cryptocurrency as collateral and are financially penalized if they act maliciously.

There are several benefits to using proof-of-stake over proof-of-work. One of the most
significant advantages is that proof-of-stake systems are more energy efficient because
they do not require miners to use high-powered computers to solve complex
equations. This makes proof-of-stake systems more environmentally friendly.

In addition, proof-of-stake systems can also be more secure because validators have a
financial incentive to act honestly and follow the rules of the network. This can make
proof-of-stake systems less vulnerable to attack than proof-of-work systems, which
rely on the sheer computational power of miners to secure the network.

Ethereum made the switch to proof-of-stake with the launch of Ethereum 2.0, also
known as Serenity. Ethereum 2.0 is a major upgrade to the Ethereum network that
includes the implementation of proof-of-stake, as well as other features such as
sharding and eWASM (Ethereum WebAssembly).

The transition to Ethereum 2.0 and proof-of-stake has been a long and complex
process, with the first phase of the upgrade, known as the Beacon Chain, launching in
December 2020.

While the transition to proof-of-stake has the potential to bring significant benefits to
the Ethereum network, it also comes with some challenges. One of the biggest
challenges was the need to transition existing Ethereum users and developers to the
new system. This process required education and support from the Ethereum
community to ensure a smooth transition.

The switch to proof-of-stake is an exciting development for the Ethereum network and
its users. It has the potential to significantly improve the scalability, security, and

https://medium.com/blockchain-biz/bitcoin-hashrate-is-exploding-gpu-farms-vs-asic-106980a98637 3/8
2/11/23, 11:40 PM Bitcoin Hashrate is exploding! GPU Farms vs. ASIC | by CryptoTechJester a.k.a MarcB | Blockchain Biz | Dec, 2022 | Medium

environmental impact of the network, positioning Ethereum for continued growth and
success in the future.

Unfortunately for many Ethereum miners, however, is that a stream of crypto revenue
is now gone, or at least changed. Miners will have to find other coins to mine to use
their expensive mining hardware.

And, as it turns out, the Bitcoin mining system is proving to be a good fit for many
miners.

Difference between mining Ethereum and Bitcoin


Mining cryptocurrency involves using powerful computer hardware to validate
transactions and add them to the blockchain. The type of hardware used can greatly
impact the efficiency and profitability of mining operations. In this section, we’ll
explore the differences between mining Ethereum and Bitcoin using graphics cards,
CPUs, and application-specific integrated circuits (ASICs).

First, let’s define each type of hardware:

Graphics cards: also known as graphics processing units (GPUs), these are
specialized chips designed to process large amounts of data quickly. They are
commonly used in gaming and professional graphics applications, but are also
popular for mining cryptocurrency because of their ability to handle complex
mathematical calculations.

CPUs: central processing units (CPUs) are the brains of a computer, responsible for
executing instructions and performing basic tasks. While they are not as powerful
as GPUs, they can still be used to mine cryptocurrency, especially in the early days
of a new coin when difficulty is low.

ASICs: application-specific integrated circuits (ASICs) are custom-built chips


designed specifically for mining a particular cryptocurrency. They are much more
efficient than CPUs and GPUs, but also much more expensive.

Now, let’s compare the differences between mining Ethereum and Bitcoin using these
different types of hardware:

https://medium.com/blockchain-biz/bitcoin-hashrate-is-exploding-gpu-farms-vs-asic-106980a98637 4/8
2/11/23, 11:40 PM Bitcoin Hashrate is exploding! GPU Farms vs. ASIC | by CryptoTechJester a.k.a MarcB | Blockchain Biz | Dec, 2022 | Medium

Ethereum: before the merge (transition to Proof-of-Stake), Ethereum could be


mined using either GPUs or CPUs, but GPUs were generally more efficient and
produce better results. This is because Ethereum used a memory-hard hashing
algorithm called Ethash, which required a large amount of memory to be effective.
As a result, GPUs with a lot of memory, such as those used for gaming, were well-
suited for Ethereum mining. ASICs were not able to mine for Ethereum.

Bitcoin: Bitcoin can be mined using either GPUs, CPUs, or ASICs. In the early days
of Bitcoin, it was possible to mine using a CPU, but as the network has grown and
difficulty has increased, this is no longer profitable. Today, most Bitcoin mining is
done using specialized ASICs, which are significantly more efficient and powerful
than CPUs or GPUs. However, ASICs are also much more expensive, and their use
has been controversial due to concerns about centralization.

The type of hardware used for mining cryptocurrency can greatly impact the
efficiency and profitability of the operation. Ethereum was mined using either GPUs
or CPUs, while Bitcoin can be mined using GPUs, CPUs, or ASICs. However, the most
efficient and powerful hardware for mining Bitcoin are ASICs. It’s important to keep in
mind that the use of ASICs has been controversial due to concerns about
centralization.

The shift from Ethereum to Bitcoin


While is it clear that ASICs have a clear advantage compared to GPUs when mining
Bitcoin, it is now a simple question of volume. GPU farms for Ethereum were huge, and
that hardware wasn’t going to sit idle for long. When the GPU power of farms is
combined, it can hold its own against small-quantity ASIC farms. As such, the hashrate
has exploded since the merge.

https://medium.com/blockchain-biz/bitcoin-hashrate-is-exploding-gpu-farms-vs-asic-106980a98637 5/8
2/11/23, 11:40 PM Bitcoin Hashrate is exploding! GPU Farms vs. ASIC | by CryptoTechJester a.k.a MarcB | Blockchain Biz | Dec, 2022 | Medium

Note, the crosshair is on September 6, 2022, the date of the Ethereum Merge.

On September 6, 2022, the Bitcoin hashrate was 224 million TH/s (Total Hashrate per
Second). On December 15, 2022, the Bitcoin hashrate was 261 million TH/s, a growth of
over 10%.

Now, let’s look at the mining difficulty.

Bitcoin mining difficulty is a measure of how difficult it is to solve the complex


mathematical equations that are used to validate transactions and add them to the
Bitcoin blockchain. The difficulty level is adjusted periodically to ensure that the
average time to mine a block remains constant, regardless of the overall computing
power of the network.

The Bitcoin network automatically adjusts the mining difficulty level every 2016
blocks, or approximately every two weeks. The difficulty level is adjusted based on the
overall computing power of the network, with the goal of keeping the average time to
mine a block at around 10 minutes. If the average time to mine a block falls below this
target, the difficulty level is increased to make it harder to mine new blocks. If the
average time to mine a block exceeds this target, the difficulty level is decreased to
make it easier to mine new blocks.

This automatic adjustment mechanism ensures that the Bitcoin network remains
secure and decentralized, even as the overall computing power of the network
changes. It also ensures that the rate of new Bitcoin released into circulation remains
constant, despite fluctuations in the overall computing power of the network.

https://medium.com/blockchain-biz/bitcoin-hashrate-is-exploding-gpu-farms-vs-asic-106980a98637 6/8
2/11/23, 11:40 PM Bitcoin Hashrate is exploding! GPU Farms vs. ASIC | by CryptoTechJester a.k.a MarcB | Blockchain Biz | Dec, 2022 | Medium

Bitcoin Mining Difficulty

The Bitcoin mining difficulty has increased since September 6 (the crosshair above).
But, a recent decrease in difficulty has produced the first profitable mining scenario in
quite a while, shown below. The green is profitable, and the red is not profitable.

At the far right, the green line returns!

It had been over 2 years since Bitcoin was profitable, even amidst the bull run of 2021!

Conclusions
The bitcoin mining world is constantly changing. Since the Ethereum merge, a slurry
of miners have shifted to Bitcoin. What will the future of Bitcoin mining bring,
especially when the next bull market brings new miners and higher Bitcoin prices?
Time will tell!

If you have enjoyed this article, please follow me on Medium, leave a clap, or a response.
Better yet, do all three!

https://medium.com/blockchain-biz/bitcoin-hashrate-is-exploding-gpu-farms-vs-asic-106980a98637 7/8
2/11/23, 11:40 PM Bitcoin Hashrate is exploding! GPU Farms vs. ASIC | by CryptoTechJester a.k.a MarcB | Blockchain Biz | Dec, 2022 | Medium

Bitcoin Ethereum Blockchain Cryptocurrency Proof Of Stake

Sign up for The Buzz


By Blockchain Biz
Open in app Sign up Sign In
Stay current on the future direction of Blockchain Biz and how to remain involved. Take a look.

Search Medium
Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/blockchain-biz/bitcoin-hashrate-is-exploding-gpu-farms-vs-asic-106980a98637 8/8
2/11/23, 11:43 PM How to build an Ethereum mining pool | by Ivan Bogatyy | Dragonfly Research | Medium

Published in Dragonfly Research

Ivan Bogatyy Follow

Jul 29, 2021 · 10 min read · Listen

Save

How to build an Ethereum mining pool


Mining pools are major power players in the Ethereum ecosystem. With miner-
extractable value (“MEV”) growing exponentially, the passing of EIP-1559 and the
upcoming merge, they have become louder and increasingly important actors in the
ecosystem.

For the uninitiated: mining pools are software providers who enable many mining
machines to pool together their mining power and share rewards. Mining pools are
essential in PoW mining on two levels: first, because earnings for individual miners are
highly volatile, and second, because setting up the software infrastructure around
mining is increasingly complex. By pooling resources, individual miners can lower
variance and have a more predictable business.

But with this power comes great responsibility, and mining pools hold a lot of power.
This is because mining pools ultimately decide which blocks get worked on by their
miners and which transactions are included in those blocks. Mining pools decide on
what MEV gets extracted and who gets to extract it, they vote on the gas limit, and they
take part in major political battles. That’s why it’s essential to Ethereum culture that
the barrier to entry for mining pools be as low as possible, to maximize
decentralization.

When MiningDAO set out to build our own independent pool, we were surprised to
find that it was incredibly challenging! There’s very little open and publicly shared info
https://medium.com/dragonfly-research/how-to-build-an-ethereum-mining-pool-6be356520b7a 1/10
2/11/23, 11:43 PM How to build an Ethereum mining pool | by Ivan Bogatyy | Dragonfly Research | Medium

on how to run a competitive mining pool, and a lot of the open-source software is out
of date. So we figured: let’s fix that by releasing an open-source, step-by-step guide.

Building a pool consists of two parts: (1) setting up a full node client with good peer-to-
peer networking and fast processing speed, and (2) connecting the full node to pool
software that manages hashrate and distributes workload across all the miners. Here,
we’ll cover both.

This guide comes from our first-hand experience building the MiningDAO.io pool,
and outlines how we brought our uncle rates from 10%-14% down to approximately
4%-5%, on par or better than some top-10 pools.

https://medium.com/dragonfly-research/how-to-build-an-ethereum-mining-pool-6be356520b7a 2/10
2/11/23, 11:43 PM How to build an Ethereum mining pool | by Ivan Bogatyy | Dragonfly Research | Medium

1) Set up Ethereum full node client


Running a mining pool requires running an Ethereum full node client. This client will
be responsible for receiving new blocks and pending transactions, as well as producing
its own blocks and broadcasting them to other nodes. This section covers how to
properly set up one’s full node client.

1.1) Server hardware requirements


Running a fully synced node requires fairly good hardware. We recommend at least
32GB RAM, and at least 2TB SSD storage (syncing the chain with HDD will take
https://medium.com/dragonfly-research/how-to-build-an-ethereum-mining-pool-6be356520b7a 3/10
2/11/23, 11:43 PM How to build an Ethereum mining pool | by Ivan Bogatyy | Dragonfly Research | Medium

forever).

Bandwidth is important as well. It is preferable to co-locate as close as possible to


other nodes, to receive new blocks as soon as possible. We recommend cloud-hosted
dedicated machines on services popular with other pools: OVH and Hetzner in Europe,
Alibaba and AWS in Asia.

1.2) Geth or OpenEthereum? Geth!


The next decision to make is which Ethereum client to use. The most popular and well-
tested choices are Geth and OpenEthereum (née Parity). Geth leads on protocol
development and is always up-to-date.

For comparison, we did some small-scale experimentation with Parity-2.7.2 (latest


stable branch before the OpenEthereum refactoring) and OpenEthereum, but both had
poor results with block import times and block production times, leading to
unacceptably high uncle rates. We welcome anyone to perform a more thorough A/B
test and reach out to us with more data, but at the current stage we simply recommend
Geth.

Here are the flags we use:

geth --datadir=/ssd/gethdata --syncmode=fast --cache=21000


--maxpeers=250 --txpool.globalslots=1000
--http --http.api=eth
--miner.etherbase='0xADDRESS' --mine --miner.threads=0
--miner.extradata='MiningDAO'
--miner.notify='http://127.0.0.1:8107' &>> ~/geth-log.txt

Here --cache=21000 means to allocate 21GB for in-RAM state storage (the most Geth
can handle), and the remaining flags will be explained below.

More importantly, the modifications to the Geth code we will describe below can be
found here as a repo to download, or here as a patch to apply.

1.3) Minimize frequency of empty blocks

https://medium.com/dragonfly-research/how-to-build-an-ethereum-mining-pool-6be356520b7a 4/10
2/11/23, 11:43 PM How to build an Ethereum mining pool | by Ivan Bogatyy | Dragonfly Research | Medium

Two things destroy value for miners: mining uncle blocks, and mining empty blocks.
In fact, the two are almost equally bad: uncle block rewards are 1.75 ETH , and empty
block rewards are 2 ETH , with no transaction fee surplus in both cases. For
comparison, full blocks with transaction fees typically bring 3-4 ETH in total rewards,
and sometimes a lot more. So why do mining pools sometimes produce empty blocks,
and how can one minimize their frequency?

When another pool mines a fresh block (say at height N ), any other blocks at height N

are likely to become uncles. So whenever a new block is found, Geth instantly switches
the miners' jobs to mine an empty block at height N+1 . This empty block does not have
transaction fees, but that is still better than mining blocks destined to become uncles.
Subsequently, geth constructs a "real" block at height N+1 , and switches the miners'
jobs once again. Constructing such a "real" block takes time (0.1-0.3 seconds), hence
the two-step process. But in that interim 0.1-0.3 seconds-long period miners are
working on an empty block.

It might be tempting to collect all the pending transactions to maximize fees, but
getting greedy with --txpool.globalslots substantially increases the amount of
processing Geth has to do to construct a "real" block (up to 1 second and more). We
recommend values no larger than 1000 or 2000 .

For more details on this, check out https://github.com/ethereum/go-


ethereum/issues/21899

1.4) Minimize frequency of uncle blocks


With empty blocks out of the way, we can get started on the hard part. To minimize
uncle rates, two things are key:

1. when other pools produce new blocks, learn about it as quickly as possible

2. when your pool produces a new block, propagate it as widely as possible (so others
start mining on top of it)

The first step to good p2p is, as explained earlier, running your full node on a cloud
server with good bandwidth next to other nodes.

https://medium.com/dragonfly-research/how-to-build-an-ethereum-mining-pool-6be356520b7a 5/10
2/11/23, 11:43 PM How to build an Ethereum mining pool | by Ivan Bogatyy | Dragonfly Research | Medium

Second, good bandwidth allows the node to handle more direct peers, thus reducing
the number of p2p hops necessary to receive new information. The Geth flag for the
number of peers is --maxpeers .

Below we will explain a few more nuanced and powerful tricks to maximize block
import speed and block propagation speed.

1.4.1) Use bloXroute


bloXroute is a service dedicated to improving connectivity between miners and
lowering their uncle rates. Most pools are connected to bloXroute, and even major
established pools report significant improvements from using bloXroute.
Measurements performed by KeeperDAO further confirm the massive advantage
bloXroute holds over comparable services.

Our experiments showed significant improvements as well. On a freshly-synced node


with default peer settings, approximately 90% of all new blocks come from bloXroute
first (and only 10% from all other peers). Even after our node has been fine-tuned to
connect to top peers, still 40%-60% of new blocks come from bloXroute first.

After following the bloXroute setup tutorial, don’t forget to add the bloXroute node into
the “trusted peers” set for your Geth, we will need that later. Trusted peers are pre-set
nodes that Geth will always connect to, irrespective of the random peer initialization
process. Trusted peers also do not count against the connections limit. Adding the
bloXroute gateway to trusted peers ensures Geth will not accidentally drop that
connection.

We further recommend connecting to Taichi Network. Taichi is a block propagation


network developed by Sparkpool. Connecting to it can be done by adding the Taichi
endpoints to the same trusted peers file.

1.4.2) Propagate your blocks aggressively


Whenever Geth successfully mines a new block, it sends the block to propagate across
the network. By default, Geth only propagates it to a random subset of size
sqrt(n_peers) , who then propagate the block to some of their peers, and so on. This
mechanism is not ideal even if all peers were equally useful, but it is especially

https://medium.com/dragonfly-research/how-to-build-an-ethereum-mining-pool-6be356520b7a 6/10
2/11/23, 11:43 PM How to build an Ethereum mining pool | by Ivan Bogatyy | Dragonfly Research | Medium

detrimental when some peers are more powerful than others and these peers end up
not being included in the subset.

In particular, the first thing to do upon mining a new block is to send it to bloXroute, so
that it will be forwarded to all the other participating mining pools. If the bloXroute
gateway doesn’t end up in that random sqrt(n_peers) subset, your chances of getting
uncled go way up!

Next, you’d want to send the block to the highest-quality peers, and then to all the
remaining peers.

We have open-sourced the following Geth patch and recommend applying it to your
client. It propagates all newly mined blocks to all trusted nodes (including bloXroute),
and then to all remaining peers.

1.4.3) Cultivate the most well-connected peers


Vanilla Geth is designed for maximum decentralization and a flat network structure.
This choice works well for hobbyists and supports a robust ecosystem of thousands of
nodes. However, as we’ve already seen in the previous section, these defaults do not
work as well for nodes that perform critical responsibilities and have significant dollar
costs associated with failures.

In reality, not all peers are equally useful. Some have slow connections and will
neither supply new blocks nor help your blocks propagate. Others, especially the
nodes of other mining pools, will produce a constant stream of new block data.
Following advice from Sparkpool, we tweaked our Geth to log which peers were the
first to send us a new block. Collecting that data for several months allowed us to
figure out the best peers to always keep connected to (via the “static”/”trusted” node
settings in Geth). Here is a Python script we used to process that data and convert it
into a trusted_nodes.json list that Geth can ingest.

Because MiningDAO is present in each geozone (North America, Europe, Asia), we


have data-mined the lists of top peers for each geozone. Unfortunately, we cannot
share the node IPs publicly to avoid the risk that these nodes will be DDoSed. Can
probably share privately on serious inquiries with good justification. Also happy to
share our own nodes in each geo for other pools to connect!

https://medium.com/dragonfly-research/how-to-build-an-ethereum-mining-pool-6be356520b7a 7/10
2/11/23, 11:43 PM How to build an Ethereum mining pool | by Ivan Bogatyy | Dragonfly Research | Medium

2) Set up mining pool software


Once the full node is set up properly, the next step is to set up the mining pool software
itself. This software will be responsible for handling connections from all the
individual miner rigs, keeping track of worker shares, and managing payouts.

2.1) Pick pool software


We briefly analyzed the following 4 options: miningcore, open-ethereum-pool, NOMP
(node open mining portal), and MPOS (mining portal open source). We later learned
about Flexpool Solo but did not experiment with it.

We had a great experience with Miningcore for two reasons. First, it keeps all past data
on disk in an SQL database, unlike open-ethereum-pool, which keeps data only in RAM
via Redis. Disk storage offers stability against reboots and ability to analyze historical
data. Second, we enjoyed the highly readable, object-oriented code of Miningcore.

Ultimately, MiningDAO ended up implementing our own pool software, written in Go


for speed and modeled after Miningcore. We expect to open-source our
implementation soon, but in the meantime we recommend using Miningcore.

2.2) Fix pool software latency


A major hiccup we encountered while using Miningcore is the way it processes work
updates. By default, Miningcore pings the full node RPC every 0.5 seconds to see if the
latest job has changed. This setup may work for other cryptocurrencies with longer
block times (it would be a negligible problem for Bitcoin with 10-minute blocks), but
for Ethereum such a setup leads to unacceptably high uncle rates.

For context, there is an easy way to calculate the increase in uncle rates from any
processing delay. Block times are Poisson-distributed, which means that no matter
how long it has been since the last mined block, the probability of finding the next
block in the next second (or millisecond or whatever) is always the same. For example,
Ethereum targets 13-second block times, which means the probability of a block being
mined in the next second is always 1 sec / 13 sec ~= 7.7% . So if your mining pool has
a 0.1 sec delay anywhere in the pipeline for any reason, it will have 0.1 sec / 13 sec

~= 0.77% extra uncle blocks as a result of that delay. The uncle blocks will come from
that 0.1 sec period of time that your miners are working on an outdated job.

https://medium.com/dragonfly-research/how-to-build-an-ethereum-mining-pool-6be356520b7a 8/10
2/11/23, 11:43 PM How to build an Ethereum mining pool | by Ivan Bogatyy | Dragonfly Research | Medium

Back to Miningcore. Using the formula above, a 0.5 second delay in updating the
miners’ job will lead to 0.5 sec / 13 sec ~= 4% extra uncle blocks (absolute, not
relative percentage). Naturally, such a high rate of unforced errors is unacceptable. We
have experimented extensively with lowering the update frequency from 0.5 seconds
down to 50 milliseconds and below, but found that setting rather unreliable: the
updates were still significantly delayed.

A better solution is to make use of Geth’s notifyWork feature, so that Geth proactively
sends job updates to the mining pool software as soon as they appear. We patched
Miningcore to support this option, and released the modification. After transitioning
to notifyWork , we found the communication delays between Geth and Miningcore to
become practically negligible, and thus our uncle rates significantly improved.

Conclusion
Hopefully this post proves useful and leads to more people running Ethereum mining
pools or solo-mining, helping keep Ethereum open and decentralized. To summarize,
we started with vanilla Geth on default settings and vanilla Miningcore
implementation. This default setup produced uncles at a rate of approximately
10%-14%. Progressively applying the modifications outlined here brought our uncle
rate down to 4%-5%, comparable or better than some existing top-10 pools (the
Etherscan uncle rate is a bit higher because we sometimes experiment in prod).

Our Geth modifications can be found here as a repo and here as a patch. Our
Miningcore modifications can be found here, and a corresponding pool config file can
be found here.

If you have further ideas on how to improve this setup, please send us a pull request or
an email!

Miningcore speedup developed by Alexander Melnikov. Many thanks for the suggestions and
ideas that came from Alex Obadia (Flashbots), Eyal Markovich and Shen Chen (bloXroute),
Xin Xu and Dr. Yang Ze (Sparkpool), Chris (Flexpool) and Haseeb Qureshi (Dragonfly
Capital).

https://medium.com/dragonfly-research/how-to-build-an-ethereum-mining-pool-6be356520b7a 9/10
2/11/23, 11:43 PM How to build an Ethereum mining pool | by Ivan Bogatyy | Dragonfly Research | Medium

Ethereum Cryptocurrency Mining

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.com/dragonfly-research/how-to-build-an-ethereum-mining-pool-6be356520b7a 10/10
2/11/23, 11:48 PM Blockchain-Based Document Timestamping and Verification | by Md Shariful Islam | Coinmonks | Medium

Published in Coinmonks

Md Shariful Islam Follow

Jul 20, 2021 · 10 min read · Listen

Save

Blockchain-Based Document Timestamping and


Verification

Picture taken from : originstamp

Introduction
The use of physical documents is cumbersome, and the world is moving towards the
use of digital documents. Digital documents are convenient to use, but proving their
https://medium.com/coinmonks/blockchain-based-document-timestamping-and-verification-1bafd36b6c1f 1/12
2/11/23, 11:48 PM Blockchain-Based Document Timestamping and Verification | by Md Shariful Islam | Coinmonks | Medium

authenticity is often a problem. Can it be proved that the document has not been
altered? Is it possible to prove the document you received is identical to the one you
viewed earlier? Since there is no common protocol to validate and verify digitized
documents, the process of analyzing the documents in private and government
institutions is difficult. If there were a mechanism to verify the authenticity of
documents and validate the authenticity and content of the documents, it would
facilitate users to manage their digital documents. The proposed solution for the
mentioned problems using Blockchain technology.

Secure storage, easy retrieval, and protected access to government documents hinder
efficient operations and increases costs for many governments. A blockchain-based
system can serve as a verification clearinghouse for these documents by providing
public and private proof of the veracity of a document or certification. A blockchain-
based document verification system can also be used to issue digital certificates that
are impossible to counterfeit. This helps eliminate reputational risks for an
organization as well as improve trust and transparency by its stakeholders.

Blockchain can solve the existing problem of verifying the validity of digital assets such
as a picture of a birth certificate, a pdf document stating any contract, or a signed legal
document specifying a business deal very efficiently and at a very low implementation
cost. Due to the characteristics of the Blockchain (the permanent decentralized ledger
of information), these digital signatures can be accessed by anyone. Hence anyone
with access to the Blockchain can now verify the authenticity of a digital asset without
having to rely on trusted intermediaries.

Decentralized Ledger

Related work
https://medium.com/coinmonks/blockchain-based-document-timestamping-and-verification-1bafd36b6c1f 2/12
2/11/23, 11:48 PM Blockchain-Based Document Timestamping and Verification | by Md Shariful Islam | Coinmonks | Medium

One of the major issues of the usage of digital documents is the blurred and non-
transparent process of verification. Digital documents are more prone to changes,
both intentional changes, and mistakes. To overcome this issue, people have been
trying various methods and schemes.

One of the well-known schemes is digital signatures with a public key infrastructure
(PKI). A valid digital signature ensures three major security requirements for a digital
document namely authenticity (the document was created by a known sender),
nonrepudiation (the sender cannot deny having sent the document), and integrity (the
document has not got altered in transit). But PKI based solution is not very popular in
terms of cost and usability. Moreover, the digital signature cannot identify the
existence of the document for a certain time or the provenance of a digital document
e.g. the prime owner of the document.

Nowadays many standalone document viewing and editing applications such as Adobe
Acrobat Reader, Microsoft Word facilities users to attach digital signatures to
documents. Plenty of digital signing services like Docusign and Echosign already exist
that can help to sign legal documents. All such document signing platforms allow their
users to sign documents securely and also provide cloud storage for the signed
documents. Since you need to blind trust third-party for storing your documents, these
services appeal more to enterprises than the average users.

The question is how can we create digital proof that a digital asset (soft copy of birth
certificate, business contract, educational certificate) has been certified (signed) by an
authorized organization or government institution and secondly, how can anybody
around the world verify the authenticity of a particular digital asset without having to
rely on a 3rd party or intermediary?

With Blockchain Document Signing, there is no need to blindly trust third parties,
neither for timestamping nor for storing signatures. It can be possible to replace the
third party and prevent anyone from going back and track records in case of
manipulation or disputes by building a blockchain document signing platform.
Blockchain provides integrity, to achieve authenticity, the blockchain-based document
verification solution. And currently, there is no digital document verification system
using Blockchain in Bangladesh.

https://medium.com/coinmonks/blockchain-based-document-timestamping-and-verification-1bafd36b6c1f 3/12
2/11/23, 11:48 PM Blockchain-Based Document Timestamping and Verification | by Md Shariful Islam | Coinmonks | Medium

Background
In this section, we provide some background on digital signature, document
timestamping, and trusted timestamping authority-

What is Digital signature?


A digital signature is a mathematical scheme for verifying the authenticity of digital
messages or documents. A valid digital signature, where the prerequisites are satisfied,
gives a recipient very strong reason to believe that the message was created by a
known sender (authentication) and that the message was not altered in transit
(integrity). A digital signature scheme typically consists of three algorithms;

1. A key generation algorithm that selects a private key uniformly at random from a set of
possible private keys. The algorithm outputs the private key and a corresponding public
key.

2. A signing algorithm that, given a message and a private key, produces a signature.

3. A signature verifying algorithm that, given the message, public key, and signature, either
accepts or rejects the message’s claim to authenticity.

Two main properties are required:-

1. First, the authenticity of a signature generated from a fixed message and fixed private
key can be verified by using the corresponding public key.

2. Secondly, it should be computationally infeasible to generate a valid signature for a


party without knowing that party’s private key. A digital signature is an
authentication mechanism that enables the creator of the message to attach a code
that acts as a signature.

What is Timestamping and TSA authority?


Trusted timestamping is the process of securely keeping track of the creation and
modification time of a document. Timestamps define as the standard of certain
documents or files that exists for a certain time period. It can be used to prove that a
document hasn’t been altered since the timestamp was issued. So to ensure the
existence of a document for a certain time, a trusted timestamp must be included with
digital signature.
https://medium.com/coinmonks/blockchain-based-document-timestamping-and-verification-1bafd36b6c1f 4/12
2/11/23, 11:48 PM Blockchain-Based Document Timestamping and Verification | by Md Shariful Islam | Coinmonks | Medium

Because if a document was disputed, it can be difficult to provide proof that the digital
signature was valid at the time of signing without a timestamp. This is because most
signing certificates expire after one or two years, making it difficult to prove the
document’s validity several years into the future. Without a timestamp for legally
binding documents such as business contracts, someone could alter the clock on their
computer and then alter and resign a document, which in turn could lead to costly
legal battles as different parties can dispute each other’s claims. That’s why a trusted
timestamp has to be issued by a trusted third-party — that’s why a Timestamp
Authority is needed. A Timestamping Authority who is trusted and permitted to time-
stamp information on request.

This authority can also be the verification body for the time-stamped information in
the future. In trusted timestamping services, time-stamped information may be
verified only if it is timestamped by an authentic TSA .e.g. GlobalSign.com. Most users
have to pay to use the service. But this service can be free of cost too
(https://www.freetsa.org).

Why timestamping using blockchain?


The blockchain itself provides all the characteristics of a trusted third party:-

It facilitates easy, fast, and secure online transactions. So documents can be


verified from anywhere.

It is a decentralized and distributed network, and registered transactions cannot be


altered retroactively so no need to trust a 3rd party timestamping authority.

This allows the participants to verify and audit transactions in an inexpensive


manner. No extra infra (software-hardware) is needed, unlike PKI and TSA.

It can also ensure the provenance and duplication of a digital document as digital
fingerprint is unique for each document. With a blockchain-based timestamping
service, the objectives of PKI, as well as a timestamping authority, can be achieved.

Proposed Solution and System Architecture


The solution proposed does not suggest storing the digital asset on the Blockchain (this
would be a very inefficient and expensive approach). Again it will lose confidentiality if

https://medium.com/coinmonks/blockchain-based-document-timestamping-and-verification-1bafd36b6c1f 5/12
2/11/23, 11:48 PM Blockchain-Based Document Timestamping and Verification | by Md Shariful Islam | Coinmonks | Medium

the original file is shared publicly with every node. Instead, it only stores the proof that
a digital asset has been certified (or signed) by an institution on the Blockchain. If
anybody would want to verify the legitimacy of a digital asset they can simply verify
the digital asset by vetting it using the proof provided. Hence, the Blockchain’s role in
this solution is to provide an immutable storage container for these proofs.

At a high level the proposed solution includes the following steps:

1. Creation of a digital fingerprint that is Cryptographic Hash (SHA-512) of the digital


document

2. Store the digital fingerprint of the digital asset to blockchain

3. Validation of the digital asset using the digital fingerprint stored on the Blockchain and
vetting of the institution that issued the asset.

https://medium.com/coinmonks/blockchain-based-document-timestamping-and-verification-1bafd36b6c1f 6/12
2/11/23, 11:48 PM Blockchain-Based Document Timestamping and Verification | by Md Shariful Islam | Coinmonks | Medium

System overview

A more detailed discussion of the system architecture is outlined in the next-

https://medium.com/coinmonks/blockchain-based-document-timestamping-and-verification-1bafd36b6c1f 7/12
2/11/23, 11:48 PM Blockchain-Based Document Timestamping and Verification | by Md Shariful Islam | Coinmonks | Medium

Stakeholders who can be involved in the blockchain document signing ecosystem can
be categorized into two types:-

Signer: Signers are those who want to digitally sign and create a digital timestamp
of their digital documents in the blockchain

Verifier: Anyone who wants to verify the documents shared by the signers.

Step 1: Digital Fingerprint


Just like the fingerprint that is unique to a human being, digital assets also have a
unique fingerprint. To be more exact, a digital asset’s fingerprint can be created by
using so-called cryptographic hash functions. These functions can take a file of almost
any size (word, excel, pdf, image, etc.) as an input parameter to create a string of
letters and characters (it’s a very unique fingerprint) as an output. Hash of the
document will be derived using the following formula:

𝐻𝑎𝑠ℎ = 𝑆𝐻𝐴-256(𝐷𝑎𝑡𝑎)

[SHA-256] is the SHA-256 hashing function [Data] represents contentsof the document

Step 2: Metadata of the document


In this step, extra meta-data information for the document can be collected. Meta-data
information may contain various information e.g. Name of the document, Name of the
owner, Address of owner, email, etc.

Step 3: Commit fingerprint and signature to blockchain


In this step, the digital fingerprint and meta-data of the document are ‘sent’ to the
Blockchain. This is now the first time in this solution an interaction with a Blockchain
is required. It is important to keep in mind that not the digital asset itself but only the
information about the asset (its fingerprint) and meta-data get stored on the
blockchain. After the transaction is successfully committed in the blockchain network,
it returns a transaction hash. This hash is unique for all blockchain transactions. This
hash ensures that there is a valid blockchain transaction but does not ensure the
integrity of the document.

Step 4: Transmission of the Signed Digital Asset

https://medium.com/coinmonks/blockchain-based-document-timestamping-and-verification-1bafd36b6c1f 8/12
2/11/23, 11:48 PM Blockchain-Based Document Timestamping and Verification | by Md Shariful Islam | Coinmonks | Medium

Using our existing ways of sharing information with tools such as email, online forms,
file-sharing platforms, etc., the digital asset can now be distributed to any party since
it is a file like any other one.

Note: There is no need to share the digital asset’s fingerprints as they are stored on the
Blockchain. Only the digital asset that is the digital document itself should be shared.

Step 5: Digital Asset Verification

The process for the recipient to verify the authenticity of a digital asset is similar to the
steps performed earlier starting with re-creating the digital fingerprint from the file
that has been received. Next, a request is launched to the Blockchain to retrieve the
fingerprint. Any verifier can verify the integrity and existence of the document from
the transaction time by simply uploading the same document in the system.

Prototype Implemention
A demo nodejs application has been developed based on this Proof-of-concept (POC).
In this demo, Ropsten blockchain network (test) has been used to store hash and meta-
data of any document in the blockchain. The app is currently hosted in Azure cloud
platform having following features-

https://medium.com/coinmonks/blockchain-based-document-timestamping-and-verification-1bafd36b6c1f 9/12
2/11/23, 11:48 PM Blockchain-Based Document Timestamping and Verification | by Md Shariful Islam | Coinmonks | Medium

Prototype of an online time-stamping and verification service with all possible rich
text documents ensuring data privacy.

Implementation of a web portal where users can register and upload digital
documents.

Integration with a local/public (test) Ethereum blockchain network.

Smart contract development to store useful in formation in the blockchain.

Live Demo URL: https://blockchain-timestamping.azurewebsites.net/

Github URL: https://github.com/sharif2008/blockchain-timestamping

Conclusion
Blockchain offers enormous opportunities to the document signing industry with its
features like trust and traceability. The proof of signature in the blockchain is not
controlled by any single entity. Members of the blockchain document signing platform
instead act as public notaries or witnesses to attest to the signature. A blockchain-
based signing platform also provides users with access to the document and with the
ability to quickly confirm the authenticity of a signature.

Feedback: [email protected]
https://medium.com/coinmonks/blockchain-based-document-timestamping-and-verification-1bafd36b6c1f 10/12
2/11/23, 11:48 PM Blockchain-Based Document Timestamping and Verification | by Md Shariful Islam | Coinmonks | Medium

PS: If you liked the article, please support it with claps 👏. Cheers

Crypto Trading Bot — Best Free Crypto Trading Bots in 2021


Best crypto trading bots for Binance, Coinbase, Kucoin, and other
crypto exchanges in 2021. Quadency, Bitsgap…
medium.com

Best 6 Crypto Trading Signals Telegram Channels


It is tedious to find the right crypto trading signals provider. So, in this
article, we will be talking about the best…
medium.com

BlockFi Review 2021: Pros, Cons and Interest Rates


Today, we came up with a comprehensive BlockFi review, a crypto
lending platform founded in 2017 and has its…
blog.coincodecap.com

Crypto Tax Software — Top 5 Best Bitcoin Tax Calculators [2021]


Whether you’re new to crypto or if you have been in the space for a
while, you’ll need to pay taxes.
medium.com

Pionex Review 2021 | Free crypto trading bot and Exchange


Pionex is the rising start that provides tools for trading automation. 9
crypto trading bots are provided on Pionex…
medium.com

https://medium.com/coinmonks/blockchain-based-document-timestamping-and-verification-1bafd36b6c1f 11/12
2/11/23, 11:48 PM Blockchain-Based Document Timestamping and Verification | by Md Shariful Islam | Coinmonks | Medium

Block Timestamping Digital Signatures

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
Open in app Sign up Sign In
practices.

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/blockchain-based-document-timestamping-and-verification-1bafd36b6c1f 12/12
2/11/23, 11:50 PM The Bitcoin whitepaper, explained and commented — section 3: timestamp server | by Raphael M. | Medium

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

Raphael M. Follow

Apr 4, 2020 · 4 min read · · Listen

Save

The Bitcoin whitepaper, explained and


commented — section 3: timestamp server
Following the previous installments of this series, we’re dissecting Satoshi Nakamoto’s
2008 whitepaper introducing Bitcoin to the world, section by section, and putting it in

https://meyer-raph.medium.com/the-bitcoin-whitepaper-explained-and-comment-section-3-timestamp-server-d5ceb84368a4 1/4
2/11/23, 11:50 PM The Bitcoin whitepaper, explained and commented — section 3: timestamp server | by Raphael M. | Medium

context. This time: section 3 — Timestamp server. As previously, quotes are from the
whitepaper.

You may remember from the previous parts that Bitcoin attempts to solve a common
problem of digital cash systems — namely, avoiding digital coins being spent twice —
without requiring a centralized authority. Instead, Nakamoto proposes to make the
record of transactions public and distribute it to all participants of a peer-to-peer
network. Problem: how to make everybody agree on a single history of transactions?

It boils down to making participants agree on the order of transactions: between


competing transactions (i.e. spending the same coin), which one came first? Let’s see
what Nakamoto has to say:

The solution we propose begins with a timestamp server. A timestamp server works by taking
a hash of a block of items to be timestamped and widely publishing the hash, such as in a
newspaper or Usenet post [2–5]. The timestamp proves that the data must have existed at the
time, obviously, in order to get into the hash. Each timestamp includes the previous
timestamp in its hash, forming a chain, with each additional timestamp reinforcing the ones
before it.

Let’s break it down:

first, we group transactions that appear more or less at the same time in bundles
called blocks. This is just done for efficiency: better timestamp a bunch of non-
competing transactions together than timestamp each of them individually!

then, we compute the hash of the transactions and publish it to an external outlet
with a wide audience like a newspaper. The hash, a tool borrowed from
cryptography, is a short digital number that can be computed quickly but cannot be
reversed. It’s a sort of digital digest of the data. This digest IS the timestamp: since
the hash was published, the data (that the hash sums up) must have existed at the
time of publication.

finally, as more transactions are recorded, and thus more blocks are added, each
new hash/digest will be computed from the current block AND the previous
hash/digest. Since hashes cannot be reversed, if block B’s hash can be computed
from block A’s hash, it proves that block A came before block B.
https://meyer-raph.medium.com/the-bitcoin-whitepaper-explained-and-comment-section-3-timestamp-server-d5ceb84368a4 2/4
2/11/23, 11:50 PM The Bitcoin whitepaper, explained and commented — section 3: timestamp server | by Raphael M. | Medium

Note that using cryptographic hashes to timestamp data wasn’t a new idea, even in
2008: Surety, a Florida based company, had been using these tools to create a public
record of timestamps by buying small ads every week in the New York Times since
1995! These were found in the “Notices & Lost and Found” section. The wide
distribution of the New York Times made it almost impossible for anyone to alter the
timestamps already published: you would have to find and replace all possible copies
of the particular edition you’re trying to modify.

The following figure from the whitepaper (with my coloring) illustrates how each new
timestamp is computed from the new transactions and the previous timestamp.

notice how each new timestamp is computed from 1) the previous block’s timestamp and 2) the current block of
transactions

Because hashes/timestamps are published widely, everyone can check when they were
published and that they indeed form a linear chain. In other words, everyone can
check that block B’s hash can be computed from block A’s hash (by redoing the
computation), thus establishing that transactions included in block A had to be
recorded before transactions from block B. It’s the kind of verification that miners
(peers that add blocks) do constantly in Bitcoin: always verifying that new blocks are
valid, and that old blocks have not been tampered with.

The chain of timestamps, computed recursively (each new one depends on the
previous ones), translates into a chain of recursively linked blocks… the blockchain
(although Nakamoto doesn’t use this terminology).

https://meyer-raph.medium.com/the-bitcoin-whitepaper-explained-and-comment-section-3-timestamp-server-d5ceb84368a4 3/4
2/11/23, 11:50 PM The Bitcoin whitepaper, explained and commented — section 3: timestamp server | by Raphael M. | Medium

It’s interesting to note, that, in this section, Nakamoto refers to an external media, such
as Usenet (internet forums popular in the 1990s) or a newspaper, to publicly broadcast
the timestamps. It’s just a temporary step to get us focused on the chain of timestamps
rather than the publishing mechanism itself.

In the next section, we’ll see how Nakamoto uses previous works such as Adam Back’s
Hashcash (1997), a mechanism originally proposed to combat junk emails, to provide a
publishing protocol that does not require an external media. See you then!

Previous: Section 2 — Transactions, next: Section 4 — Proof-of-Work

Give this story some claps if you learned anything and follow me to get new articles about all
Open in app Sign up Sign In
things crypto explained clearly. Thanks for reading!

Search Medium

Satoshi Nakamoto Bitcoin White Papers Timestamp Blockchain

About Help Terms Privacy

Get the Medium app

https://meyer-raph.medium.com/the-bitcoin-whitepaper-explained-and-comment-section-3-timestamp-server-d5ceb84368a4 4/4
2/11/23, 11:53 PM Bitcoin Mempool — Simply explained | by TheLuWizz | Coinmonks | Medium

Published in Coinmonks

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

TheLuWizz Follow

Dec 21, 2020 · 5 min read · · Listen

Save

Bitcoin Mempool — Simply explained

Bitcoin transaction life-cycle with Mempool. Image Source

In 2020, 11 years after Bitcoin's official birth, we hardly deal with Bitcoin's fundamental
technology but often talk about fourth and fifth-generation blockchains, sharding,
https://medium.com/coinmonks/bitcoin-mempool-simply-explained-7f76be235e85 1/7
2/11/23, 11:53 PM Bitcoin Mempool — Simply explained | by TheLuWizz | Coinmonks | Medium

side-chains on-chain analytics, and smart ways to trade cryptocurrencies. In today’s


article, however, we would like to talk about a fundamental feature of the Bitcoin
Blockchain: the Bitcoin Memory Pool, or Bitcoin Mempool for short.

Bitcoin Mempool — Simply and briefly explained


The question and related answer about the functioning and concept of the Bitcoin
Mempool can be explained both simply and somewhat more complexly. We start with
a simple explanation — Bitcoin Mempool in a Nutshell:

The Bitcoin Memory Pool, or Bitcoin Mempool for short, is the ‘waiting room’ for all
unconfirmed transactions on the Bitcoin network before they are (sequentially)
aggregated into blocks.

To express this more clearly, let’s rephrase the sentence a bit:

Transactions made on the Bitcoin network are not directly added to the blockchain in
the form of a block. They are first collected in the Bitcoin mempool and then
‘processed.’

So much for the simple explanation. To delve a little deeper, let’s take a look at how
transactions are propagated on the Bitcoin network. We also look at the role miners
play in this.

Bitcoin Mempool — Transactions and Miners


Again, there are two paths we can take: the simple path and the slightly more complex
path. Let’s start with a simple explanation here as well.

Bitcoin Mempool explained in simple terms


So the mempool is the waiting room for all unconfirmed transactions. Every Full Node
on the network has access to the mempool. As a reminder, a Full Node is any node that
stores all transactions and blocks of the Bitcoin Blockchain. Its goal is to validate the
transactions. Once they are validated, and in the mempool, the next goal is to validate
these unvalidated mempool transactions and integrate them into the Bitcoin
blockchain; this is the miners' task. The miners select a certain number of transactions
from the mempool and then try to solve a complex (energy-intensive) mathematical
problem.
https://medium.com/coinmonks/bitcoin-mempool-simply-explained-7f76be235e85 2/7
2/11/23, 11:53 PM Bitcoin Mempool — Simply explained | by TheLuWizz | Coinmonks | Medium

The collection of individual transactions is what we generally call a block. And the
miner or mining pool that solves this mathematical problem first adds the collection of
transactions (i.e., the block) to the Bitcoin blockchain. This now corresponds to the
first confirmation of the block.

Bitcoin mempool in detail — transactions, miners, and priorities


This section's starting point remains the same: the mempool is the waiting room of all
unconfirmed transactions before they get into a block. At this point, however, we need
to distinguish between full nodes and ‘mining nodes.’

A Bitcoin Full Node verifies transactions according to all valid rules.


When a node on the Bitcoin network receives a new transaction (TX), it verifies the
transaction according to the protocol's current rules. Bitcoin’s source code is
considered the source of truth here. If a transaction violates the rules (for example,
through an invalid signature), the transaction is not forwarded to the other peers.
However, once the transaction has been validated according to the valid rules, it is
added to the open transactions set, the Bitcoin mempool.

For a miner node/miner, the mempool is crucial for profitability and profit.
Those who send bitcoin on the network themselves may have noticed that their own
transaction gets ‘stuck’ on the network or takes a little longer. The explanation for this
is that the mempool plays a crucial role for miners (and thus confirms your
transaction).

To do this, we need to understand that Bitcoin mining's reward consists of two


components: the block reward (6.25 BTC) and the transaction costs.

Miners now have ‘the privilege’ to decide for themselves and freely which transactions
they choose from the mempool. They do this for economic reasons: they sort the
transactions from the mempool according to their fee rate. The fee rate is nothing
more than the transaction fee divided by the transaction size, whereby the transactions
with the highest fee rate are at the top. The aim is to maximize one’s profit and, thus,
profitability. Each transaction has a certain size, and the maximum block size is only 1
MB, the miner's sort according to profit maximization. And this is how the
transactions flow from the mempool into the Bitcoin blockchain. Voilá!

https://medium.com/coinmonks/bitcoin-mempool-simply-explained-7f76be235e85 3/7
2/11/23, 11:53 PM Bitcoin Mempool — Simply explained | by TheLuWizz | Coinmonks | Medium

Bitcoin mempool — a summary


So the Bitcoin mempool is the waiting room for unconfirmed transactions. These
move from the waiting room to the miners; they are sorted and processed according to
their profitability. According to economic considerations, the miners can decide for
themselves which transactions to select and do so, as just described. The Bitcoin
mempool has reached up to 50 MB sizes in the past — the last time in July this year. The
size of the mempool is an indicator of how “full” the Bitcoin network is at the moment
and how long one has to wait for the confirmation of a transaction in the worst case.

The Bitcoin mempool — the waiting room for unconfirmed transactions on the Bitcoin
network.

I share more intimate thoughts in a monthly newsletter that you can check out here.
Please let me know in a comment and join me on various social media platforms:

Twitter ● Instagram ● Facebook ● Snapchat ● LinkedIn

WHATEVER YOU DO, DO IT WITH LOVE AND PASSION!

Also, Read
Crypto Trading Bot

Uniswap API — How to get Uniswap data?

AAX Exchange Review | Referral Code, Trading Fee, Pros and Cons

Deribit Review | Options, Fees, APIs and Testnet

FTX Crypto Exchange Review

Bybit Exchange Review

The Best Bitcoin Hardware wallet

Crypto Copy Trading Platforms

Bitsgap vs 3Commas vs Quadency

The Best Crypto Tax Software

https://medium.com/coinmonks/bitcoin-mempool-simply-explained-7f76be235e85 4/7
2/11/23, 11:53 PM Bitcoin Mempool — Simply explained | by TheLuWizz | Coinmonks | Medium

Best Crypto Trading Platforms

Best Crypto Lending Platforms

Ledger Nano S vs Trezor one vs Trezor T vs Ledger Nano X

BlockFi vs Celsius vs Hodlnaut

Bitsgap review — A Crypto Trading Bot That Makes Easy Money

Quadency Review- A Crypto Trading Bot Made For Professionals

PrimeXBT Review | Leverage Trading, Fee and Covesting

Altrady review

Ellipal Titan Review

SecuX Stone Review

BlockFi Review | Earn up to 8.6% interests on your Crypto

Best Crypto APIs for Developers

Best Blockchain Analysis Tools

Crypto arbitrage guide: How to make money as a beginner

Top Bitcoin Node Providers

Best Crypto Charting Tool

What are the best books to learn about Bitcoin?

Get Best Software Deals Directly In Your Inbox

https://medium.com/coinmonks/bitcoin-mempool-simply-explained-7f76be235e85 5/7
2/11/23, 11:53 PM Bitcoin Mempool — Simply explained | by TheLuWizz | Coinmonks | Medium

Bitcoin Blockchain Technology Education Bitcoin Mining

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

https://medium.com/coinmonks/bitcoin-mempool-simply-explained-7f76be235e85 6/7
2/11/23, 11:53 PM Bitcoin Mempool — Simply explained | by TheLuWizz | Coinmonks | Medium
By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.com/coinmonks/bitcoin-mempool-simply-explained-7f76be235e85 7/7
2/11/23, 11:54 PM What is a mempool?. On the bitcoin blockchain, blocks… | by Tara Annison | Medium

Tara Annison Follow

Oct 11, 2019 · 3 min read · Listen

Save

What is a mempool?

On the bitcoin blockchain, blocks contain transactions, and transactions contain


information about who is sending what to whom e.g Bob is sending Alice 10 BTC.

This transaction must be created and signed by Bob (to prove he has the associated
private key to send the funds from the address to Alice’s address). It must then be
broadcast to nodes in the network so it can be validated and included in a block. Only
once it has been included in a block and there have been a number of other blocks
built on top of it, is it seen as confirmed. In general, a transaction with 6 block
confirmations is seen as ‘certain’ and a transaction with less than 3 block
confirmations is seen as potentially risky. This is due to the risk of block re-orgs,
orphaned blocks or network forks.

https://tara-annison.medium.com/what-is-a-mempool-f6a403d4871e 1/3
2/11/23, 11:54 PM What is a mempool?. On the bitcoin blockchain, blocks… | by Tara Annison | Medium

However, each block on the bitcoin blockchain can include only 1MB worth of
transactions — this is c2,500 transactions per block, and therefore there are many
transactions which are waiting to be included within a block. They wait in something
called a ‘mempool’ — short for ‘memory pool’.

When a miner is looking to build her next block, she selects transactions from this
mempool and puts them into her candidate block — the block she’s hoping will be
added to the blockchain if she can solve the cryptographic hash puzzle first. If Bob has
added a suitably attractive transaction fee to his transaction then it is more likely to be
selected by the miner from the mempool, if not then it may sit in the mempool until
the blockchain becomes less busy or the going fee decreases towards it. If the miner is
successful in having her block added to the blockchain then she gets to keep the
transaction fees associated with all transactions in her block, as well as the 6.25 newly
mined bitcoins.

Once a node receives a new transaction, it validates it and stores it within its local
mempool. It can then be selected to be included within a candidate block, left in the
mempool, or removed from the mempool if it’s included in another node’s confirmed
block. It is very rare that two nodes have the exact same mempool since they will be
receiving transaction broadcasts only from the nodes they are connected with,
however, many mempools are broadly similar.

It is also possible to query another node’s mempool using an inventory message


(referred to as an inv message) and receive a list of all transaction in that nodes’
mempool (unless a bloom filter is loaded and then only transaction matching the filter
are received). This is useful when starting a node since the mempool will be empty by
default and therefore the inv message to another node helps build up a picture of
Open in app
unconfirmed transactions within the network. Sign up Sign In

To view someSearch
mempoolMedium
statistics from the Blockchain.com nodes check here:
https://www.blockchain.com/en/charts/mempool-size

Bitcoin Blockchain Cryptocurrency Crypto Btc

https://tara-annison.medium.com/what-is-a-mempool-f6a403d4871e 2/3
2/11/23, 11:54 PM What is a mempool?. On the bitcoin blockchain, blocks… | by Tara Annison | Medium

10

About Help Terms Privacy

Get the Medium app

https://tara-annison.medium.com/what-is-a-mempool-f6a403d4871e 3/3
2/11/23, 11:57 PM Ethereum Memory pool. How does it work? | by Alberto Molina | Coinmonks | Medium

Published in Coinmonks

Alberto Molina Follow

Jun 15, 2022 · 6 min read · Listen

Save

Ethereum Memory pool. How does it work?


The Ethereum blockchain is actually a distributed ledger, just like the bitcoin
blockchain, it offers computing functionality in the form of smart contracts, but at its
most basic, it is just a bunch of blocks attached to each other (1-to-1) containing
transactions that change the state of the blockchain.

Nodes forming the ethereum network keep a copy of the blockchain, and are the ones
in charge of adding new transactions to it and assuring its consistency and validity.

The question is, how are transactions added to the blockchain by the nodes?

The process can be explained very easily : Nodes receive signed transactions from
wallets/users, and if the transactions are valid they add them to the blockchain.

Problem is, nodes might receive thousands of transactions, and blocks are added to the
blockchain at a quasi-constant rate (every few seconds), nodes might also receive
different transactions from different users and other nodes they are connected to….
We need to be able to have some kind of buffer to store all those incoming, yet to be
validated transactions… This is where the memory pool “MemPool” comes into play, I
will try to describe what it is and how it works from a generic point of view and what
“side effects” they might have.

https://medium.com/coinmonks/ethereum-memory-pool-how-does-it-work-6b6d8edfa0eb 1/8
2/11/23, 11:57 PM Ethereum Memory pool. How does it work? | by Alberto Molina | Coinmonks | Medium

What is it and how does it work?


How would anyone add a new transaction to the blockchain? let’s say someone who
wishes to send some money to another account?
Well the very first thing that this person should do is to generate the transaction.

He or she will have to indicate among other things :

The recipient of the transaction

The amount to be paid

The amount of fees that he or she is willing to pay for the transaction

The transaction signature (signed with a private key using a wallet for example).

Once the transaction is ready, it only needs to be included in a future block in order to
be accepted by the network.

The way to do that is to broadcast the signed transactions to one (or many) nodes
forming the blockchain network.

https://medium.com/coinmonks/ethereum-memory-pool-how-does-it-work-6b6d8edfa0eb 2/8
2/11/23, 11:57 PM Ethereum Memory pool. How does it work? | by Alberto Molina | Coinmonks | Medium

Nodes will receive your transaction and check its validity and authenticity before
forwarding it to other nodes in the network(they will check that the sender has enough
funds and more importantly that the signature is correct).

After checking the transaction, nodes will add it to their memory pool. Nodes will re-
check all their mempool transactions after each block gets added to the network since
it might contain transactions that invalidate some of the transactions they are keeping
in their mempool.

The mempool is basically RAM memory within nodes, where they keep all the “so-far”
validated transactions they have received but could not yet add to the blockchain.

Indeed blocks are generated every few seconds or minutes depending on the
blockchain, and they have a maximum size, meaning that they can only host a limited
number of transactions.

If the rate at which users are sending transactions to the blockchain is higher than the
rate at which blocks can be added to the blockchains, many transactions will have to

https://medium.com/coinmonks/ethereum-memory-pool-how-does-it-work-6b6d8edfa0eb 3/8
2/11/23, 11:57 PM Ethereum Memory pool. How does it work? | by Alberto Molina | Coinmonks | Medium

wait in the nodes memory pool.

It is important to note that because of its decentralized nature, nodes memory pools
might be different at any point in time, they might hold different transactions.
It is also important to note that your transaction might also exist in multiple nodes
mem pool at any point in time.

Sometimes we refer to the mempool as a single entity/location but it is in fact a combination


of all the mempools that exists at time T.

Nodes will pick transactions from their memory pool in order to build blocks to add to
the blockchain, but they will not follow a First in First Out strategy, they will pick what

https://medium.com/coinmonks/ethereum-memory-pool-how-does-it-work-6b6d8edfa0eb 4/8
2/11/23, 11:57 PM Ethereum Memory pool. How does it work? | by Alberto Molina | Coinmonks | Medium

they will consider the most convenient transactions for them, basically those that pay
the highest fees since they will be the ones to collect them.

Once a transaction is finally picked by a miner from its mempool and added to a block,
all the other nodes that contained the same transaction in their mem pool will proceed
to remove it since the same transaction can not be added twice into the blockchain.

The memory pool of each node is then like the waiting area of a train station, where
passengers wait for the next train to arrive and only those willing to pay the most will get in.
With the particularity that a single passenger could be at multiple train stations at the same
time, and the moment he or she gets into a train, he or she disappears from all the other train
stations!

Related Side effects

Cancelling Transactions

https://medium.com/coinmonks/ethereum-memory-pool-how-does-it-work-6b6d8edfa0eb 5/8
2/11/23, 11:57 PM Ethereum Memory pool. How does it work? | by Alberto Molina | Coinmonks | Medium

Nodes are untrusted agents, in the sense that they will always act in their best interest,
like we already described before, they will pick first those transactions that pay the
most, this is actually a behavior that we can use to our advantage since it will give us
the possibility to cancel transactions if required (transactions that have not yet been
added to the blockchain of course!!!).

In order to cancel a previous transaction, we need to submit to the network a new


transaction from the same account using the same nonce but with a higher fee.

Nodes will receive your new transaction and, since it pays a higher fee than the
previous one, they will add it to the blockchain first. Ethereum transaction nonces can
only be used once for a specific account, meaning that the moment they add the new
transaction to the blockchain, the old one becomes invalid and gets removed from the
mempools.

Front Running
Since Nodes keep transactions in their mempools before adding them to the
blockchain, they have access to their content and can check the output (state change)
they will cause to the blockchain in advance….

This can potentially be an issue for your dapp, let’s suppose that you are offering a
certain reward to the first account that submits a certain value (that hashes into a value
that you stored on your Smart contract). If someone submits the right answer to a
node, the node will have access to that value and can very easily generate its own
transaction, copy paste the content, and add it to the blockchain first, effectively
“stealing” the reward from the honest user.

This is just one example of front running but there are many more situations in which
the “speed” or “order” in which transactions are added to the blockchain can have an
impact on your dapp logic, you should always keep in mind that this can potentially
disrupt it.

Join Coinmonks Telegram Channel and Youtube


Channel learn about crypto trading and investing

https://medium.com/coinmonks/ethereum-memory-pool-how-does-it-work-6b6d8edfa0eb 6/8
2/11/23, 11:57 PM Ethereum Memory pool. How does it work? | by Alberto Molina | Coinmonks | Medium

Also, Read
Bookmap Review | 5 Best Crypto Exchanges in the USA

The Best Crypto Hardware wallet | Bitbns Review

10 Best Crypto Exchange in Singapore | Buy AXS

Red Dog Casino Review | Swyftx Review | CoinGate Review

Best Crypto to Invest in India | WazirX P2P | Hi Dollar Review

Ethereum Mempool Blockchain Front Running

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium
https://medium.com/coinmonks/ethereum-memory-pool-how-does-it-work-6b6d8edfa0eb 7/8
2/11/23, 11:57 PM Ethereum Memory pool. How does it work? | by Alberto Molina | Coinmonks | Medium

https://medium.com/coinmonks/ethereum-memory-pool-how-does-it-work-6b6d8edfa0eb 8/8
2/11/23, 11:59 PM What The Heck is UTXO. Peeking into the Bitcoin Transaction… | by Rajarshi Maitra | BitHyve | Medium

Published in BitHyve

Rajarshi Maitra Follow

Apr 25, 2020 · 10 min read · Listen

Save

What The Heck is UTXO

---------Kernel-----------
* Details of the Blockchain structure
* Details of the Transaction structure
* UTXO
* UTXO vs Account-Balanace Model

https://medium.com/bitbees/what-the-heck-is-utxo-ca68f2651819 1/12
2/11/23, 11:59 PM What The Heck is UTXO. Peeking into the Bitcoin Transaction… | by Rajarshi Maitra | BitHyve | Medium

Many words and idioms surrounding Bitcoin doesn’t always make obvious sense. Some
words mean something else than what they might suggest at first glance. Some don’t
create any impression on the reader’s mind when they first hear about it, precisely
because they never existed before in the English dictionary. They are purely
constructed from the design terminologies of the Bitcoin system. Sometimes rather
technical word sticks around in common lingo due to lack of better alternatives.

One such word is “UTXO”, which is almost as commonly used in the Bitcoin world as
“money” is used in the real world. Yet nobody knows what to think about, when they
first hear it. UTXO doesn’t have any previous precedence in the English language. It
means “Unspent Transaction Output”, which is a mouthful technical term and came
pretty much straight out of the Bitcoin codebase. Yet, its probably the most important
concept someone wanna wrap their head around if they plan to use Bitcoin effectively.

So in this article, we will dissect this term piece by piece, and hopefully, by the end, the
reader will have a graspable mental model to think about UTXOs, and be an efficient
Bitcoin user.

In order to imagine UTXOs, we need to look at the gears of the Bitcoin machine,
starting from the biggest structure of the system, the Blockchain.

The Blockchain
The Bitcoin machine is constructed out of mathematical structures. When I say
structure, think about abstract mathematical objects, which have semantical
meanings. A structure can contain raw data or more smaller structures within itself.
Depending upon the semantics of these structures (suggested by its name) the data
within them are interpreted by the protocol.

https://medium.com/bitbees/what-the-heck-is-utxo-ca68f2651819 2/12
2/11/23, 11:59 PM What The Heck is UTXO. Peeking into the Bitcoin Transaction… | by Rajarshi Maitra | BitHyve | Medium

Schematic of The Blockchain

Let us start with the most glorified data structure of this decade, A Blockchain. As the
name suggests, its a chain of Blocks. Its the largest of all the structures in the protocol
and as of writing sized about 310 GB for Bitcoin, which is a long list of Blocks (blocks
are also structures).

Each block contains two types of structures, a Header, and a Transaction List. The
header contains all metadata regarding a particular block, and among them is the
previous block hash that points to an earlier block (aka parent block). In this way, each
block points to its parent, which points to its parent, so on and so forth, all the way
back to the first block ever created (aka the genesis block). This pointing back into the
past creates this chain-like structure of the blocks, and thus appropriately named as a
Blockchain. A blockchain is nothing more than a linked list.

Block #10

The above figure shows the data contained in the 10th block of the Bitcoin blockchain.
The summary section specifies the Header data, and the section below specifies the
list of transactions. This block was mined on 9th Jan 2009 (see the time stamp field)
probably by Satoshi himself. In the transaction list there is only a single transaction of
50 BTC going to an address. This is the coinbase transaction, the first transaction in
every block where miners get their block reward. There was nobody else in the
network to transact with back then, so the only transaction in the list was the coinbase
transaction where the block creator claimed 50BTC for solving the Proof of Work.

https://medium.com/bitbees/what-the-heck-is-utxo-ca68f2651819 3/12
2/11/23, 11:59 PM What The Heck is UTXO. Peeking into the Bitcoin Transaction… | by Rajarshi Maitra | BitHyve | Medium

Now that we got the basic idea of blocks, let’s go one step deeper and look inside a
transaction.

The Transaction

The Transaction Structure

Peeling down a single transaction, we can find many different structures, which all
have their separate semantic meanings.

First is a Structure called Transaction Version, which is a version number specifying the
type of this particular transaction to the network. By reading the version number, a
node can determine the set of rules to be used to verify this particular transaction.

The last structure is Lock Time, which specifies whether a transaction can be included
in the blockchain right away or after some specified time.

In between them comes a list of Inputs and Outputs. These two are the most important
field for our discussion here.

A transaction Output consists of a cryptographic lock and a value. The details of the lock
will be described in a separate blog post (this is where the smart contract comes in).

https://medium.com/bitbees/what-the-heck-is-utxo-ca68f2651819 4/12
2/11/23, 11:59 PM What The Heck is UTXO. Peeking into the Bitcoin Transaction… | by Rajarshi Maitra | BitHyve | Medium

For now, you can simply imagine that the outputs are somehow locked and the input
provides a key to unlock them. The value is simply the amount in satoshis (sats) that is
locked inside the output.

Every Transaction input consists of a pointer and an unlocking key. The pointer points
back to a previous transaction output. And the key is used to unlock the previous
output it points to. Every time an output is successfully unlocked by an input, it is
marked inside the blockchain database as “spent”. Thus you can think of a transaction
as an abstract “action” that defines unlocking some previous outputs, and creating new
outputs.

These new outputs can again be referred by a new transaction input. A UTXO or
“Unspent Transaction Output” is simply all those outputs, which are yet to be unlocked
by an input.

Once an output is unlocked, imagine they are removed from circulating supply and
new outputs take their place. Thus the sum of the value of unlocked outputs will be
always equal to the sum of values of newly created outputs (ignoring transaction fees
for now) and the total circulating supply of bitcoins remains constant.

The below figure shows the transaction “action” schematic. A transaction consumes
some past UTXOs and spits out new UTXOs.

https://medium.com/bitbees/what-the-heck-is-utxo-ca68f2651819 5/12
2/11/23, 11:59 PM What The Heck is UTXO. Peeking into the Bitcoin Transaction… | by Rajarshi Maitra | BitHyve | Medium

Transaction Action Schematic

A UTXO is nothing more than locked up bitcoins. You can think of UTXOs as a box that
contains the coins and they can hold any amounts. Once you have some bitcoins, in the
Blockchain all you have is a bunch of UTXOs. For all practical purposes, you can think
of your UTXOs as your box full of sats.

The blockchain is a canonical list of all the transactions that were ever recorded by the
network. By tracing through them, we can construct what is known as a transaction
history graph. Every output can be traced in this way all the back to the instant where
it was first created by a coinbase transaction.

The figure below demonstrates the schematic of the Bitcoin transaction history graph.

https://medium.com/bitbees/what-the-heck-is-utxo-ca68f2651819 6/12
2/11/23, 11:59 PM What The Heck is UTXO. Peeking into the Bitcoin Transaction… | by Rajarshi Maitra | BitHyve | Medium

Transaction graph history

For example, in TX4 above, the input0 points back to output0 of TX2. The Outputs at
the last transactions namely TX6 and TX3, the one with 10K and 20K values are the
UTXOs. Because they have not yet been referred to by a transaction input. Once an
input points at them and provides the correct key to open them, they are spent and are
not considered UTXO anymore. They will be replaced by new UTXOs that will be
created by that future transaction.

One small detail to notice here is, for example, in TX1 the input0 points to an output
that had value 40K, but it creates a new output that has value 30K. The missing 10K is
the transaction fee. This is the fee paid to the miners for the inclusion of the particular
transaction in a new block. Higher the transaction fee, higher is the probability of
miners picking it up for inclusion in the next block.

The UTXO Set


The collection of all the UTXOs at any moment is called the UTXO set and is being
constantly maintained by every Bitcoin node. Technically they are known as the
chainstate and are stored in the chainstate data directory of a node. The chainstate
updates every time a new block is accepted in the blockchain. That block contains the

https://medium.com/bitbees/what-the-heck-is-utxo-ca68f2651819 7/12
2/11/23, 11:59 PM What The Heck is UTXO. Peeking into the Bitcoin Transaction… | by Rajarshi Maitra | BitHyve | Medium

list of latest transactions, which defines which of the previous UTXOs are spent and
which new UTXOs are created. Every Bitcoin node in the network will always have the
exact same copy the UTXO set in their local storage.

Size of the UTXO Set

As of writing, the size of this UTXO set is 4.1GB. And yes, if you own some bitcoin, your
UTXOs are also present inside my Bitcoin full node. But don’t worry, I cannot open
them.

As we have already mentioned, UTXOs are bitcoins, and they are represented in
different ways by different wallets for user information. When you query a wallet for
your bitcoin balance, the wallet in the backend gathers up all the UTXOs that you own,
and show you the sum of the value of these UTXOs. That sum is your final wallet
balance. These calculations happen in the background and are abstracted away from
users.
https://medium.com/bitbees/what-the-heck-is-utxo-ca68f2651819 8/12
2/11/23, 11:59 PM What The Heck is UTXO. Peeking into the Bitcoin Transaction… | by Rajarshi Maitra | BitHyve | Medium

The UTXO Model

Real World payment with UTXOs

In the real-world, the UTXOs are almost similar to physical cash/coins. When one tries
to spend cash in a shop, he gives up the entire note, takes the goods, and takes back the
remaining change. If one has a cash note of 10 bucks and wants to buy good priced 5
bucks, he doesn’t divide the note in half for the payment. Rather he gives up the full
note, and takes a new 5 bucks note as a change along with the goods.

UTXOs work in similar fashion. In a transaction, UTXOs are always consumed in full,
even if the required payment is of the partial value of the original UTXO. For example,
referring to the figure above, suppose Alice wants to pay Bob for some goods/services
which cost 6 BTC. But Alice only has a single UTXO of 10 BTC. She will create a
transaction that will consume up this whole UTXO of 10 BTC and create two new
UTXOs, one for Bob with 6 BTC and one for herself with 4 BTC value. The UTXO Alice
pays to herself is known as the change UTXO, and her wallet software automatically
tracks this UTXO to give her the final balance of 4 BTC. Every time a payment is made
for a smaller value than the available UTXOs, the wallet automatically creates the
change UTXO for the user.

Every UTXO is associated with a bitcoin address, and there are many types of
addresses (P2PKH, P2SH, Bech32, etc). Different addresses provide different
functionality for these UTXOs. For example, if one creates a multisignature UTXO, i.e.
https://medium.com/bitbees/what-the-heck-is-utxo-ca68f2651819 9/12
2/11/23, 11:59 PM What The Heck is UTXO. Peeking into the Bitcoin Transaction… | by Rajarshi Maitra | BitHyve | Medium

a UTXO that needs keys from 2 or more people to be spent, it is associated with an
address that starts with a 3… and looks like below:

3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy

If you have a bitcoin wallet with some balance, you can always try looking up for your
individual UTXOs.

UTXO vs Account-Balance Model


It should feel a little bizarre to think about this obscured concept of UTXO in a digital
payment system. UTXO feels inherently similar to physical cash, whereas, in digital
payment platforms, we deal with accounts. The account model is simply, where users
have one or multiple accounts, the amounts can be anything, and there is no concept
of change back. Credit is added to the balance, and debit is subtracted away.

Even though these two models achieve similar goals, i.e. pay money to people, they
both have some advantages and disadvantages.

UTXO models are better for scalability and privacy. The transaction logic is simplified
as each UTXO can only be consumed once and as a whole. Because the logic is simpler,
transaction verifications can be made parallel. Different schemes of privacy-
enhancing techniques can be developed using the UTXO model, like coin-join, etc. In
exchange for these benefits, the tradeoffs are in usability. UTXO model is inherently
unintuitive thus most of the wallets had to abstract away the UTXOs and simulate
normal account like UI for users. UTXOs are limited in terms of more exotic smart
contracts that executes based on the user’s total account balance.

Because of these reasons, Ethereum rejected the UTXO model and they went for a
simple and more flexible account-balance model.

https://medium.com/bitbees/what-the-heck-is-utxo-ca68f2651819 10/12
2/11/23, 11:59 PM What The Heck is UTXO. Peeking into the Bitcoin Transaction… | by Rajarshi Maitra | BitHyve | Medium

But in the end, they both have their tradeoffs.

Conclusion
It’s entirely possible that all the above details regarding UTXO has made you more
confused than before. That’s alright, we all had our weird moments with Bitcoin. To
gist it up, abstract the entire concept as follows and you should be alright.

UTXOs are locked up box full of coins.

The lock can be opened by providing the right key.

When you spend some bitcoin, you create a transaction (or the wallet does it for
you) that consumes some old UTXOs and creates a bunch of new UTXOs.

UTXOs are always consumed as a whole, and change UTXO is created automatically
by your wallet to get back the balance.

Every UTXO is associated with an address. Different types of address denotes


different types of UTXOs.

You should always be aware of your keys to open up the lock in your UTXO. Not
Your Keys, Not Your Coins.

So next time you use a wallet, see if you can figure out your individual UTXOs. Hint:
Figure out the transaction ID, and look it up on a block explorer.

Happy Bitcoining.

https://medium.com/bitbees/what-the-heck-is-utxo-ca68f2651819 11/12
2/11/23, 11:59 PM What The Heck is UTXO. Peeking into the Bitcoin Transaction… | by Rajarshi Maitra | BitHyve | Medium

Off to the moon!!

Bitcoin Utxo Blockchain Transactions Cryptocurrency

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.com/bitbees/what-the-heck-is-utxo-ca68f2651819 12/12
2/12/23, 12:01 AM UTXO (Unspent Transaction Output) and Account Model Comparison v. 2 | by Dmitry Mishunin | HackerNoon.com | Medium

Published in HackerNoon.com

Dmitry Mishunin Follow

Oct 23, 2018 · 5 min read · Listen

Save

UTXO (Unspent Transaction Output) and


Account Model Comparison v. 2

The basis of any financial system is the asset management method. It is impossible to
work with assets without a clear understanding of available balance. Double-entry
bookkeeping, as applied in classic accounting, or triple-entry bookkeeping, favored in
decentralized systems accounting, would not be applicable to blockchain platforms, if
platforms did not allow tracking the user balance.

https://medium.com/hackernoon/utxo-and-account-model-comparison-v-2-cdf9669c6c0d 1/6
2/12/23, 12:01 AM UTXO (Unspent Transaction Output) and Account Model Comparison v. 2 | by Dmitry Mishunin | HackerNoon.com | Medium

Currently, two popular balance models are: Unspent Transaction Output (UTXO) and
the Account Model. The first model is a directed graph of assets moving between
users, the second is a database with the current network state.

UTXO vs Account Model


A key advantage of the first model is the uniqueness of every coin, while the second
model provides a simpler smart contracts implementation. As both aspects are
important for a modern system, it is not reasonable to choose one model above the
other. This is confirmed by solutions applied for popular products. Tab. 1 presents the
models used by the most popular blockchains.

Popular Blockchain Design Comparison

+----------+---------------+-----------+-----------------+
| | Balance Model | Consensus | Smart Contracts |
+----------+---------------+-----------+-----------------+
| Bitcoin | UTXO | PoW | - |
| Ethereum | Account | PoW/PoS | + |
| EOS | Account | DPoS | + |
| Tron | UTXO+Account | DPoS | + |
| Qtum | UTXO+AAL | PoS | + |
| ICON | Account+? | LFT (BFT) | + |
+----------+---------------+-----------+-----------------+

Tab. 1. Popular Blockchain Design Comparison

It should be noted, that nearly all new systems have a hybrid balance model, while
Ethereum and EOS use a pure account model.

Pros and Cons of UTXO and Account Models


UTXO Model

Higher degree of privacy for new addresses, the coin does not have an owner

More easily scaled through sharding

Hard to work with smart contract states

Allows using multi-threading for computations


https://medium.com/hackernoon/utxo-and-account-model-comparison-v-2-cdf9669c6c0d 2/6
2/12/23, 12:01 AM UTXO (Unspent Transaction Output) and Account Model Comparison v. 2 | by Dmitry Mishunin | HackerNoon.com | Medium

Complete transparency of asset movements

Account Model

Need to store all accounts states

More efficient storage usage

Intuitively clear approach

Light clients can analyze the states more easily

High degree of fungibility; harder to track assets

To prevent the state machine from storing nonce, unused addresses are deleted

Inconvenient tracking of internal transactions in a public blockchain

Every transaction must have a nonce

UTXOs pros

1. Higher degree of privacy. If user utilizes a new address for each transaction they
receive, it will often be difficult to link accounts to each other. This greatly affects
currencies, and less the arbitrary DApps, as the latter are often required to keep
track of complex bundled state of users. Therefore, user state partitioning scheme
is not as straightforward as with currencies.

2. Feasible scalability paradigms. In theory, UTXOs are more compatible with certain
kinds of scalability paradigms, as it’s possible for only the owner of some coins can
maintain a Merkle proof of ownership. This means that even if everyone (including
the owner) decides to discard this data, then only the owner himself is at harm. In
an Account paradigm, losing the portion of a Merkle tree corresponding to an
account would make it impossible to process messages that refer to that account,
including even incoming transactions. However, there are other non-UTXO-
dependent scalability paradigms.

Account paradigm pros

https://medium.com/hackernoon/utxo-and-account-model-comparison-v-2-cdf9669c6c0d 3/6
2/12/23, 12:01 AM UTXO (Unspent Transaction Output) and Account Model Comparison v. 2 | by Dmitry Mishunin | HackerNoon.com | Medium

1. Large storage economy. For example, if an account has 5 UTXO, then switching
from a UTXO model to an Account model would reduce the space requirements
from (20 + 32 + 8) * 5 = 300 bytes (20 for the address, 32 for the txid and 8 for the
value) to 20 + 8 + 2 = 30 bytes (20 for the address, 8 for the value, 2 for a nonce (see
below)). In reality, savings are nowhere near this massive since accounts need to be
stored in a Patricia tree (see below), but they are remarkable nonetheless.
Additionally, transactions can be smaller (e.g. 100 bytes in Ethereum vs. 200–250
bytes in Bitcoin) because every transaction requires to make only a single
reference, signature and to produce just one output.

2. Greater fungibility. Since there is no blockchain-level concept of the source of a


specific set of coins, it becomes less practical, both technically and legally, to
institute a redlist/blacklisting scheme and to draw a distinction between coins
based on where they come from.

3. Simplicity. Account model is easier to code and comprehend, especially given


more complex scripts are being used. Although it is possible to shoehorn arbitrary
decentralized applications into a UTXO paradigm, via two following concepts. First
being providing the scripts an ability to restrict what kind of UTXO a given UTXO
can be transferred to. And second, also requiring the spends to include Merkle tree
proofs of change-of-application-state-root that scripts evaluate. However, this
makes such a paradigm much more complicated and ugly compared to simply
using the accounts.

4. Constant light client reference. Light clients can at any point access all data related
to an account by traversing the state tree in a specific direction. In a UTXO
paradigm, the references change with each transaction, which is a particularly
burdensome issue for long-running DApps that try to use the above mentioned
state-root-in-UTXO propagation mechanism.

Account paradigm cons

One weakness of the account paradigm is that in order to prevent replay attacks, every
transaction must have a “nonce”. The account keeps track of nonces used and only
accepts a transaction if its nonce is sequential to the last nonce used. This means that

https://medium.com/hackernoon/utxo-and-account-model-comparison-v-2-cdf9669c6c0d 4/6
2/12/23, 12:01 AM UTXO (Unspent Transaction Output) and Account Model Comparison v. 2 | by Dmitry Mishunin | HackerNoon.com | Medium

even no-longer-used accounts can never be pruned from the account state. A simple
solution to this problem is to require transactions to contain a block number, making
them un-replayable after some period of time, and reset nonces periodically. Miners or
other users will need to “ping” the unused accounts in order to remove them from the
state, as it would be too expensive otherwise with a full sweep as part of the blockchain
protocol itself.

Conclusions
It is observed that both models are roughly identical. Each one has its clear pros and
cons. This is once again proved by the community opinion demonstrating even
preference to both types. However, a popular trend nowadays is to use a hybrid
paradigm. It is reasonable to consider a hybrid model with UTXO being used for
balances and States for contracts. We also suggest learning the AVL+ tree from
Improving Authenticated Dynamic Dictionaries, with Applications to Cryptocurrencies
[https://eprint.iacr.org/2016/994.pdf] in regards to using the optimized model of proof.

HashEx website: https://hashex.org

Connect with me via LinkedIn https://www.linkedin.com/in/dmitrymishunin/

Blockchain Ethereum Utxo Unspent Transaction

90

Sign up for Get Better Tech Emails via HackerNoon.com


By HackerNoon.com

how hackers start their afternoons. the real shit is on hackernoon.com. Take a look.

https://medium.com/hackernoon/utxo-and-account-model-comparison-v-2-cdf9669c6c0d 5/6
2/12/23, 12:01 AM UTXO (Unspent Transaction Output) and Account Model Comparison v. 2 | by Dmitry Mishunin | HackerNoon.com | Medium

Your email

We couldn't process your request. Try again, or contact our


support team.

Get this newsletter


Open in app Sign up Sign In

By signing up, you will Search


create a Medium
Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/hackernoon/utxo-and-account-model-comparison-v-2-cdf9669c6c0d 6/6
2/12/23, 12:02 AM What is Unspent Transaction Output (UTXO)? - GeeksforGeeks

What is Unspent Transaction Output (UTXO)?


DataUpdated
Last Structures
: 11and Algorithms
May, 2022 Interview Preparation Data Science Topic-wise Practice C C+

Read Discuss

Blockchain is a digital, decentralized, distributed ledger. Blockchain utilizes a P2P (Peer

to Peer) network, where par ticipants present on the network are called nodes. The

ledger stores data about transactions. It is a chain of blocks, where its most significant

feature is that blocks are cr yptographically linked together.

Cr yptographically Linked Together

Each block in the blockchain except the first block (known as the genesis block)

contains a field called a previous hash. It is the hash of the previous block in the

chain. This makes blockchain ver y secure.

If an attacker attempts to change the data of a block, the hash of the block will

Start Your Coding Journey Now!


change, as stated earlier, the next block will be holding the hash of the current block,

Login Register
HIDE AD

https://www.geeksforgeeks.org/what-is-unspent-transaction-output-utxo/ 1/12
2/12/23, 12:02 AM What is Unspent Transaction Output (UTXO)? - GeeksforGeeks

if the hash changes the chain will get destroyed. Or, the attacker has to mine all the

blocks again from that point. This is a possibility in a 51% attack.

What is a Block?

A block in blockchain stores transactions. In the case of bitcoin, blocks are added to the

blockchain ever y 10 minutes, this might var y as a time to mine a new block depending on

the complexity of the target hash, and it might take more time to mine one block,

compared to the other.

When the block successfully gets mined by the miner, it gets added to the blockchain.

When the block gets added to the chain, the status of all the transactions inside the

Start Your Coding Journey Now!


block changes from unconfirmed to confirmed.

HIDE AD

https://www.geeksforgeeks.org/what-is-unspent-transaction-output-utxo/ 2/12
2/12/23, 12:02 AM What is Unspent Transaction Output (UTXO)? - GeeksforGeeks

In the case of bitcoin, the number of transactions that can be stored inside a block

isn’t fixed, but the maximum size of the block is set to roughly 1 MB, the block size can

slightly var y from 1 MB.

Empty blocks are valid, which means an empty block can be mined and added to the

chain.

Transaction

Peeling down a single transaction reveals several different structures in a transaction

that have different semantic meanings. The following are the different structures

present in the transaction:

1. Transaction version number: It is a version number specif ying the type of transaction

to the network. Through the transaction number, a node can determine the set of

rules to be used to verif y this par ticular transaction.

2. Output : Transaction output consists of a cr yptographic lock and time.

3. Input : Transaction input consists of a pointer and an unlocking key. The pointer points

to the previous transaction output. The unlocking key is used to unlock the previous

output the input points to. Ever y time output is unlocked by an input, it is marked in

the blockchain database as spent.

4. Lock Time : It specifies whether a transaction can be included in the blockchain right

away or af ter some specified time.

UT XO is all those outputs that are yet to be unlocked by an input.

Start Your Coding Journey Now! HIDE AD

https://www.geeksforgeeks.org/what-is-unspent-transaction-output-utxo/ 3/12
2/12/23, 12:02 AM What is Unspent Transaction Output (UTXO)? - GeeksforGeeks

Once an output is unlocked, they are removed from the circulating supply. The new

outputs take their place. Thus, the sum of the unlocked outputs will always be equal to

the sum of values of the newly created outputs.

What is a UT XO?

In bitcoin, the transaction lives until it has been executed till the time another

transaction is done out of that UT XO. UT XO stands for Unspent Transaction Output.

It is the amount of digital currency someone has lef t remaining af ter executing a

transaction.

When a transaction is completed, the unspent output is deposited back into the

database as input which can be used later for another transaction.

How is a UT XO created?

UT XOs are created through the consumption of existing UT XOs. Ever y Bitcoin

transaction is composed of inputs and outputs. Inputs consume an existing UT XO, while

outputs create a new UT XO.

UT XO Model

The UT XO model does not incorporate wallets at the protocol level. It is based on

individual transactions that are grouped in blocks. The UT XO model is a design common

to many cr yptocurrencies, most notably Bitcoin.

Start Your Coding Journey Now! HIDE AD

https://www.geeksforgeeks.org/what-is-unspent-transaction-output-utxo/ 4/12
2/12/23, 12:02 AM What is Unspent Transaction Output (UTXO)? - GeeksforGeeks

Cr yptocurrencies that use the UT XO model do not use accounts or balances. Instead,

UT XOs are transferred between users much like physical cash.

Each transaction in the UT XO model can transition the system to a new state, but

transitioning to a new state with each transaction is infeasible.

The network par ticipants must stay in sync with the current state.

To understand how transactions work, let’s have a look at an example :

1. Suppose the following bitcoins are received from the transactions. Each one of these

transactions is a UT XO.

2. Now I want to buy a car that costs 0.5 BTC.

3. In order to transfer 0.5 BTC, there is a need to choose one or multiple transactions as

input.

4. This is why, a transaction in bitcoin is different from banks, in the case of banks, one

would have entered an amount of 0.5 BTC, pressed transfer and it would have gone to

the seller, but this is not the case in bitcoin, here there is a need to choose one or more

UT XOs as the input.

5. In the case of cr yptocurrency, there is no such thing as an amount lying in your

account.

6. Let ’s choose 0.7 BTC from Sarah as input to purchase a car.

Start Your Coding Journey Now! HIDE AD

https://www.geeksforgeeks.org/what-is-unspent-transaction-output-utxo/ 5/12
2/12/23, 12:02 AM What is Unspent Transaction Output (UTXO)? - GeeksforGeeks

7. In the case of UT XO, the input amount can’t be lef t unspent, one can’t say that do

nothing with the remaining 0.2 BTC.

8. The remaining 0.2 BTC, has to be used in one of the following 3 ways-

Send the remaining amount back to your account, as we did in the above image.

Use the remaining amount as the transaction fee. Remember, that there should be

some transaction fee other wise no miner will add your transaction to block, and it

will remain unconfirmed.

Send the remaining amount to someone else.

9. Now that 0.5 BTC has been sent to the seller but no fee has been added, the

transaction didn’t get confirmed, and af ter 72 hours, 0.7 BTC will be refunded back.

10. So in order to send money to the seller, let ’s put those 0.2 BTC as fees for this

transaction.

11. In order to provide a transaction fee, nothing needs to be mentioned, if you don’t

send the remaining amount to anyone, it is assumed a transaction fee.

Start Your Coding Journey Now! HIDE AD

https://www.geeksforgeeks.org/what-is-unspent-transaction-output-utxo/ 6/12
2/12/23, 12:02 AM What is Unspent Transaction Output (UTXO)? - GeeksforGeeks

12. Now that the transaction fee has been added, a miner included this transaction in the

block and subsequently got 0.2 BTC as the transaction fee.

13. Let ’s have a look at our original UT XOs again.

14. The UT XO from Sarah is no longer there, the UT XO only lived till another transaction

was not done from it, but now it has been used in another transaction, i.e. to purchase

the car.

15. Transaction is stored inside a block, also it is one of four factors that changes the

hash of a block. This means if a miner chooses a different transaction keeping the other

Start Your Coding Journey Now!


4 factors the same, the hash will be different. 

HIDE AD

https://www.geeksforgeeks.org/what-is-unspent-transaction-output-utxo/ 7/12
2/12/23, 12:03 AM What is Unspent Transaction Output (UTXO)? - GeeksforGeeks

16. The factors that determine the hash of a block

Timestamp

Block Number: It is the serial number of the current block in the chain.

Data: The transactions stored on the block.

Nonce

17. If any one of these four factors changes even by 1 bit, the hash changes completely,

this is due to the avalanche effect.

UT XO Set

The total UT XOs present in a blockchain represents a set and is being constantly

maintained by ever y bitcoin node.

Each transaction consumes elements from this set and creates new ones that get

added to the set.

Thus, the set represents all of the coins in a par ticular cr yptocurrency system.

UT XO set is updated ever y time a new block is accepted in the blockchain.

Ever y Bitcoin node in the network will have the exact copy of the UT XO set in their

local storage.

The complete UT XO set can be summed to calculate the total supply of a

cr yptocurrency at a given point in time.

In the case of a valid blockchain transaction, only unspent outputs can be used to

fund fur ther transactions.

The condition that only unspent outputs may be used in fur ther transactions is

necessar y to prevent double-spending and fraud.

Impor tance of UT XO Model

Language Agnostic Smar t Contracts : The UT XO based smar t contracts are

independent of language and allow UT XOs to develop unique consensus

mechanisms.

Suppor t for Decentralized Exchanges and Atomic Swap: The UT XO model could

suppor t atomic swaps, hence enabling peer-to-peer cr ypto trades without the

involvement of a third par ty. The atomic swap feature of UT XOs offers a better facility

for direct cr yptocurrency trades between user wallets.

Start Your Coding Journey Now!


Scalability Benefits : Facility or parallel transaction processing reduces computation

load on the blockchain networks. HIDE AD

https://www.geeksforgeeks.org/what-is-unspent-transaction-output-utxo/ 8/12
2/12/23, 12:03 AM What is Unspent Transaction Output (UTXO)? - GeeksforGeeks

Privacy and Security: With new addresses used for ever y UT XO transaction, it is

impossible to track the transactions.

Prevents Double Spending : A UT XO can only be used once, this is fundamental within

the operation of the blockchain technology that guarantees that the currencies are

not used more than once.

More Flexibility: It provides more flexibility than fiat currency.

Simple parallelization: It allows for the simpler parallelization of transactions in the

smar t contracts.

UT XO vs Accounting Model

Below are some of the differences between the UT XO model and the Accounting model:

S.No. UT XO Model Accounting Model

1.  The transaction requires more storage The transaction requires less storage

space. space.

2. The state is saved in transactions. The state is saved on the nodes.

3. The transactions are computationally The transactions utilize complex

simpler. calculations.

4.  Bulk transactions are less efficient. Bulk transactions are more efficient.

Start Your Coding Journey Now! Like 0

HIDE AD

https://www.geeksforgeeks.org/what-is-unspent-transaction-output-utxo/ 9/12
2/12/23, 12:03 AM What is Unspent Transaction Output (UTXO)? - GeeksforGeeks

Previous Next

Related Articles

1. Blockchain Transaction Life-cycle

2. What is Coinbase Transaction?

3. How Bitcoin Transaction Works?

4. How to Check Your Ethereum Transaction?

5. How to Cancel a Bitcoin Transaction if it is Unconfirmed?

6. Transaction Flow in Hyperledger Fabric

7. How Blockchain Technology is Revolutionizing Industries?

8. Payment Channel Networks (PCL)

9. Ethereum (ETH) vs Ethereum Classic (ETC) in Blockchain

10. Using configtx.yaml to Build a Channel Configuration in Hyperledger

Ar ticle Contributed By :

mohitgfg0901
@mohitgfg0901

Start Your Coding Journey Now! HIDE AD

https://www.geeksforgeeks.org/what-is-unspent-transaction-output-utxo/ 10/12
2/12/23, 12:03 AM What is Unspent Transaction Output (UTXO)? - GeeksforGeeks

Vote for difficulty

Easy Normal Medium Hard Expert

Article Tags : Geeks-Premier-League-2022, Blockchain, Geeks Premier League

Improve Article Report Issue

A-143, 9th Floor, Sovereign Corporate Tower,


Sector-136, Noida, Uttar Pradesh - 201305

[email protected]

Company Learn
About Us DSA
Careers Algorithms
In Media Data Structures
Contact Us SDE Cheat Sheet
Privacy Policy Machine learning
Copyright Policy CS Subjects
Advertise with us Video Tutorials
Courses

News Languages
Top News
Python
Start Your Coding
Technology Journey Now!
Java HIDE AD

https://www.geeksforgeeks.org/what-is-unspent-transaction-output-utxo/ 11/12
2/12/23, 12:03 AM What is Unspent Transaction Output (UTXO)? - GeeksforGeeks

Work & Career CPP


Business Golang
Finance C#
Lifestyle SQL
Knowledge Kotlin

Web Development Contribute


Web Tutorials Write an Article
Django Tutorial Improve an Article
HTML Pick Topics to Write
JavaScript Write Interview Experience
Bootstrap Internships
ReactJS Video Internship
NodeJS

@geeksforgeeks , Some rights reserved

Start Your Coding Journey Now! HIDE AD

https://www.geeksforgeeks.org/what-is-unspent-transaction-output-utxo/ 12/12
2/12/23, 12:05 AM The Definitive Guide to Bitcoin Fees | by Jason Deane | The Startup | Medium

Published in The Startup

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

Jason Deane Follow

Jan 22, 2020 · 8 min read · · Listen

Save

The Definitive Guide to Bitcoin Fees


Why they’re there, how they’re calculated and who gets them

Image by annca from Pixabay

https://medium.com/swlh/the-definitive-guide-to-bitcoin-fees-9ba3c7498277 1/9
2/12/23, 12:05 AM The Definitive Guide to Bitcoin Fees | by Jason Deane | The Startup | Medium

We all know that when you send any amount of Bitcoin on the network or spend it in a
shop, a fee of some sort is usually added automatically to the transaction you are
making. But who gets it, how is it calculated and why is it there in the first place?

All good questions and, as Bitcoin usage continues to increase steadily around the
world, it’s one that will inevitably become more pertinent. This article will provide all
the answers you need in one place, now and (in theory) forevermore unless something
fundamental changes in the network itself.

Why are there even fees at all?


This question comes up from time to time and especially the further along the
cyberpunk or anti-establishment spectrum you are. However, whilst Bitcoin is
completely decentralized and there are, by definition, no central bodies involved, fees
are a good thing and do essential jobs.

First, attaching a value to transactions prevents spamming. Without it, anyone could
send Satoshis (that’s the fractional denomination of Bitcoin in the same way that cents
is the fractional denomination of the dollar) continuously across the network jamming
it up and bringing to a crawl relatively easily.

In theory, this still could be achieved by even a relatively small number of saboteurs,
but the addition of the fee now makes this a very expensive proposition with no real
benefit to those doing it. After all, it would not affect the blockchain, undo any
previous transactions or create more Bitcoin. In practical terms, it stops this
happening very efficiently.

Second, to put it bluntly, nothing in life is free. Someone has to pay for the electricity
and computing power than carries your Bitcoin transaction. The easiest and fairest
way to do this is to charge a fee when you’re actually using it. The fee is paid only by
the person sending the Bitcoin, not the payee, and its level depends on a lot of factors
as we’ll see.

How are fees calculated?


Well, if you were to ask someone who was deeply involved with the Bitcoin network,
they’d probably tell you to use the following ‘simple’ formula:

https://medium.com/swlh/the-definitive-guide-to-bitcoin-fees-9ba3c7498277 2/9
2/12/23, 12:05 AM The Definitive Guide to Bitcoin Fees | by Jason Deane | The Startup | Medium

Work out the size of your transaction in bytes, multiply it by the median byte size, take the
answer in Satoshis, divide it by 100 million to give you the answer in bitcoin and then
convert to your local currency.

However, that sounds like a lot of work to do when we want to do a simple transaction
and most of us wouldn’t know where to start anyway. How do I work out what the
median byte size is? Actually, how do I even work out what my transaction size is?
What the hell is a byte anyway?

Fortunately, almost all modern wallet systems work out the transaction fee
automatically when you go to make payment and often give you a couple of options.

In simple terms, the built-in calculator will take a look at how busy the network is, how
big your transaction is (in terms of bytes remember, not actual dollar amount) and
how quickly you want it sent. With Bitcoin, there is always a delay of some sort as the
transaction has to be confirmed in the network, and that can range from anywhere
from ten minutes upwards.

Here’s a screenshot from a sample transaction I’ve done from one of my wallets:

https://medium.com/swlh/the-definitive-guide-to-bitcoin-fees-9ba3c7498277 3/9
2/12/23, 12:05 AM The Definitive Guide to Bitcoin Fees | by Jason Deane | The Startup | Medium

Sample Bitcoin transaction showing ‘normal’ fee as at the time of writing this article. (image: author)

As you can see, in this case, the network fee has been calculated at 9 pence (around 12
cents) for a £100 ($130) transaction, which is a tiny fraction of the overall value.
However, I’ll have to wait over an hour for it to confirm with the recipient as it has
been given no priority over other transactions already in the queue.

If I want to do it more quickly, I can incentivize those running the network to give it a
priority by upping my offer of payment. By using the drop-down menu I can select
‘Priority’ and increase my payment to 38 pence (around 50 cents) for the same
transaction.

https://medium.com/swlh/the-definitive-guide-to-bitcoin-fees-9ba3c7498277 4/9
2/12/23, 12:05 AM The Definitive Guide to Bitcoin Fees | by Jason Deane | The Startup | Medium

The same transaction with a higher priority — and fee — attached to it. (Image: author)

This has the effect of bumping my transaction closer to the front of the queue and
getting it processed more quickly and you will notice that the confirmation time has
dropped to below an hour. This is an indication, but the reality, in this case, was that it
took just a few minutes.

You can reduce your fees by keeping your transactions to a minimum, for example, by
combining your payments to one person together. It is clearly more expensive to send
one cent one hundred times than it is to send one dollar once and this mirrors the real
world quite accurately. If you went onto a store and bought an item for a dollar, it

https://medium.com/swlh/the-definitive-guide-to-bitcoin-fees-9ba3c7498277 5/9
2/12/23, 12:05 AM The Definitive Guide to Bitcoin Fees | by Jason Deane | The Startup | Medium

would take longer to count one hundred pennies at the counter than it would to count
a single one-dollar bill.

However, fees can quite often be out of your control. One of the biggest criticisms of
Bitcoin remains its inability to scale and when thousands of people are transacting at
the same time, queues can build and fees can skyrocket.

This is best explained by imagining a bus where hundreds of people are trying to bid
for only a few seats. Those with very urgent business or deep pockets will offer the
driver more money than the previous person to get on in a sort of bidding war. This
drives up prices and if those who missed this bus don’t up their bids for the second or
the third that may come along, and so on, they may never get on at all.

This is exactly what happened in late 2017 when transactions backed up so much that
fees became enormous. Going forward this is still a possible scenario, although new
systems are in place or in development to reduce the effect.

One, called Segwit, (short for Segregated Witness) is already more or less standard on
the network and automatically built into our transactions to the degree that we’re not
even aware we’re using it. A second, called the Lightning Network, is an ambitious long
term project to group transactions together and only put them through the main
network when it is required.

This second development, however, is not yet widely available and should only be
attempted by advanced users in test scenarios. There is currently no date set for the
wide-scale availability of this system.

Who gets the fees?


The short answer is that the entire fee goes to the people who run the network, but
what does that mean exactly? After all, isn’t Bitcoin supposed to be decentralized and
have no middlemen?

Well, it is, but someone still has to pay for the computing power and the electricity that
is used to run the system. These people are called ‘miners’ for technical reasons
mainly, but also, I think it’s very apt as they work to be rewarded in ‘newly discovered’
Bitcoin as well as the fees for each transaction they complete.

https://medium.com/swlh/the-definitive-guide-to-bitcoin-fees-9ba3c7498277 6/9
2/12/23, 12:05 AM The Definitive Guide to Bitcoin Fees | by Jason Deane | The Startup | Medium

This is a complex process — the very basis of Bitcoin — and I don’t propose to cover it
here, but the point is that when you send your Bitcoin from your wallet, someone
somewhere has to make the transaction work. They then need to agree with everyone
else on the network to confirm that it’s valid. In simple terms, this is how the
blockchain works and how it retains its perfect transaction record, security and value.
If you ever look into it in great detail, you’ll discover it’s a genius bit of work.

The miners can be literally anyone: you, me, your next-door neighbor and so on, but if
you want to get involved, you will need to invest in specialist equipment and pay for the
electricity to run it. If that’s the case, then you would, naturally, want to be
compensated for it, wouldn’t you? No one could afford to do it for free and, as we’ve
seen, the system would be abused by spammers if it was.

The takeaway
None of us like to pay more than we have to, but the reality is that Bitcoin fees are,
mostly, incredibly cost-efficient when compared to the traditional, centralized,
banking system and usually much faster. This is especially true when international or
large payments are made.

Recently, 44,000 Bitcoin (around $310,000,000) were transferred from one wallet to
another. To do that via the traditional banking system would have been very slow,
subject to any number of checks and very expensive, especially if it was an overseas
transaction.

Worse, doing it via something like Western Union — assuming you even could — would
cost in the region of $6,000,000. Using Bitcoin, the cost was 32 cents, demonstrating
perfectly that the fee is based on the size of the transaction in bytes, not the value.

This is also not an isolated or extreme example. In the world of Bitcoin, this is even
quite normal.

However, while there is still some way to go in terms of fee stability and network
speed, it’s reassuring to know that your fees are going only to the people working hard
to secure the network.

https://medium.com/swlh/the-definitive-guide-to-bitcoin-fees-9ba3c7498277 7/9
2/12/23, 12:05 AM The Definitive Guide to Bitcoin Fees | by Jason Deane | The Startup | Medium

And, of course, you could even be part of that network if you wanted to, such is the
accessibility of the system.

If you enjoy reading stories like these and want to support me as a writer, consider
signing up to become a Medium member. It’s $5 a month, giving you unlimited access
to stories on Medium. If you sign up using my link, I’ll earn a small commission.

Join Medium with my referral link — Jason Deane


As a Medium member, a portion of your membership fee goes to writers
you read, and you get full access to every story…
jasonadeane.medium.com

Want free access to articles, analysis, podcasts and training webinars? Why not
subscribe to the ‘Bitcoin and Global Finance’ newsletter? Subscribers over 18, resident in
Europe (see list on subscription page) & new to Bitcoin can claim £10’s worth of Bitcoin on
joining! Unsubscribe at any time.

Disclosure: The author is a long term Bitcoin investor, user, and miner. If you found this
article useful, you may wish to follow him here.

Bitcoin Cryptocurrency Blockchain Finance Money

https://medium.com/swlh/the-definitive-guide-to-bitcoin-fees-9ba3c7498277 8/9
2/12/23, 12:05 AM The Definitive Guide to Bitcoin Fees | by Jason Deane | The Startup | Medium

Sign up for Top 5 Stories


By The Startup

Get smarter at building your thing. Join 176,621+ others who receive The Startup's top 5 stories, tools, ideas, books —
delivered straight into your inbox, once a week. Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

Open in app Sign up Sign In

Search Medium
About Help Terms Privacy

Get the Medium app

https://medium.com/swlh/the-definitive-guide-to-bitcoin-fees-9ba3c7498277 9/9
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

Published in Logos Network

Michael Zochowski Follow

Feb 6, 2019 · 31 min read · Listen

Save

Crypto Transaction Fee Economics Primer


A 360 foundational explainer on crypto fees and the optimal fee model.

Background:
While much attention has been paid to the issue of capacity and scalability, arguably
the larger hurdle to broad adoption of cryptocurrency is the steep transaction cost.
Over the past 12 months, Bitcoin and Ethereum transaction fees have averaged more
than $5 and $0.60, respectively, with peaks exceeding more than $20. As a result, a
number of large merchants and payment service providers — Steam, Stripe, Microsoft
— dropped Bitcoin payment integrations. While cryptocurrencies were originally
envisioned as a leap forward in payments, they often cost substantially more than
conventional payments rails. Along with the unacceptably slow speeds, this cost makes
crypto a strictly inferior payment option for most use cases.

If these networks are not useful now due to cost, how can they possibly gain enough
traction to make capacity matter?

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 1/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

LTM average transaction fees exceeded $5.00 and $0.60 for Bitcoin and Ethereum, respectively.

The economically astute reader will note that, in the traditional crypto model, capacity
and cost are, in fact, one and the same. Bitcoin, Ethereum, and most legacy crypto
networks have a dynamic, market-determined network fee. That is, users sending
transactions choose the amount of fee that they wish to pay, and then, validators
(miners, in the case of proof-of-work networks) choose which transactions they wish to
include. Naturally, validators will tend to choose the transactions with the highest fees
because that maximizes their profit.¹

This results in a classic supply-demand equilibrium, where the transaction fee is the
market clearing rate where supply meets demand. There is a scarce resource — the
space in the next block, or, more generally, the “slots” in the next set of transactions to
be processed — and as demand for that resource increases, so does its price.

As this logic suggests, the increases in fees in Ethereum and Bitcoin occurred during
periods of high transaction demand where capacity constraints were binding. Every
big ICO or DApp launch (CryptoKitties being the most notable example) saw a
commensurate spike in Ethereum transactions, and thus transaction fees, while the
Bitcoin mempool spiked massively during high excitement periods. The result was
highly congested networks where transactions with “normal” fees often waited days or
weeks for their transactions to be processed.

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 2/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

Alarmingly, this rise in prices occurred at effectively zero adoption of either Bitcoin or
Ethereum. The fact that these networks cost so much with such small volume
highlights their severe technical limitations vis-à-vis both capacity and cost. The fact
that other networks have not seen a similar spike in fees is a testament to their utter
lack of adoption, beneath even that of Bitcoin or Ethereum.

The issue of fees has not gone unnoticed. A number of newer networks have proposed
a variety of alternative fee structures, each claiming to “solve” the fee problem at
capacity. Most tantalizing, several networks, including EOS, IOTA, and Nano, claim to
have no fees by design. At first blush, this sounds great — if the protocol prohibits fees,
then they can’t rise! Like many claims in crypto, unfortunately, “zero fees” turns out to
be too good to be true.

There has been some sparse academic research into fees — see, for example, section
7.3 of this paper for a good review. Unfortunately, most research makes assumptions
about conditions to optimize around, such as some concept of “fairness” or
predictability, without justifying their objective functions. While such results may
sound good at first blush, how can we know which outcome, among many plausibly
good outcomes, is indeed the best? A more deductive and analytical approach is
needed.

What then, is the answer to the existential problem of fees? And how can we go about
thinking through the pros of cons of the various proposed fee models to figure out
which one is optimal? Luckily, these questions are relatively straightforward to answer
with basic economics.

Fee Economics 101


It turns out that crypto network costs are quite simple from a microeconomics
standpoint.² There is a single, self-contained market for a uniform good — a
transaction validation slot — with a set of effectively anonymous buyers and sellers.
There are relatively few exogenous factors or externalities that need to be taken into
account. While standard microeconomics models must be caveated heavily in normal
markets, the simple, insulated structure of crypto fee markets results in a
straightforward analysis.

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 3/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

The way economics analyzes this type of simple market is through supply and demand
curves. I won’t review the basics, but I will note several interesting considerations for
crypto fee markets. I’ll assume you know how supply and demand curves are used to
find market prices and what consumer and producer surplus and net welfare mean —
if you don’t, you should review the Wikipedia article.

The standard crypto fee market involves a set of producers (validators) supplying
validation slots that are bid for by consumers (the users of the network).

Interestingly, the crypto market differs from a simple supply-demand market in that
not everyone gets the good at the same price. If you submit a transaction with a fee of
$1 and the market clearing rate is $0.50, you will still pay $1. This ends up having no
impact on the actual market dynamics — it just shifts consumer surplus to producer
surplus.

The primary wrinkle for the crypto fee market is that supply is typically fixed —
Bitcoin, for example, has one block of roughly 2,000 transactions every 10 minutes, or
about 3 transactions per second. In general, there are only so many transactions per
second that a given network can process. Typically, crypto observers assume this
means that supply is perfectly inelastic — it can never increase or decrease.³

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 4/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

Most crypto networks have perfectly inelastic supply of validation slots

However, supply is only perfectly inelastic after a certain point. That is, supply is capped,
but the producers in the market won’t necessarily supply up to that cap for zero cost.
Specifically, the supply curve is upward sloping until it hits the cap (variable costs of
validation, typically quite small) and has an initial jump (fixed costs of validation,
often quite large). In Bitcoin, for example, fixed validation cost is very high, so
validators would not process transactions for free.

In reality, fixed costs do not impact the marginal production but rather the decision
whether to produce (validate) at all. The below chart roughly (but, strictly speaking,
inaccurately) accounts for the effect of fixed costs by shifting up the supply curve. It
does accurately show the net social welfare, which is our chief concern. As we will see
below, due to a variety of other factors, these fixed costs can be abstracted away into a
pure decision of whether or not to validate.

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 5/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 6/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

Updated supply and demand curves reflecting approximate fixed and variable costs of validation

The longtime Bitcoin enthusiast will object to this statement — for many years,
transactions with no fee were processed quite regularly in Bitcoin. There are a couple
of factors that impact this simple supply curve and explain this discrepancy.

First, traditional cryptocurrencies also include an inflationary validator payment (the


block reward). This has the effect of shifting the supply curve down, just as a
government subsidy shifts down a market supply curve. If the inflation is large
enough, the initial sloped section of the supply curve all falls below zero, meaning that
validators will process zero-fee transactions (typically, networks will not allow negative
transaction fees). As we will see later, however, inflation comes at a cost.

Second is the more nebulous concept of crypto enthusiasm and benevolence. Many
people derive utility or some uneconomic benefit from participating in and supporting
the network. This is seen in the people who run full nodes on Bitcoin and Ethereum,
https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 7/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

incurring the cost of running a node without any economic benefit.⁴ Sometimes, they
can actually derive some direct economic benefit — for example, a blockchain explorer
might run a full node and serve ads on the site, or a merchant might run a full node to
accept crypto payments and save on transaction fees. Regardless, the “enthusiasm”
factor has the same effect of the inflation subsidy of shifting the supply curve down.⁵
There is a limit though — once the cost exceeds their utility, these “benevolent”
participants will stop running their nodes.

An underappreciated reality is that there is a real economic cost of running a node.


Generally, this cost scales with transaction volume⁶ CPU, data storage, electricity, and
bandwidth are costly goods, and you need more of all of them for each additional
transaction you process each second. Due to this increasing cost, it is economically
unsound to rely on the goodwill of participants. We’ll explore this concept more in a
bit.

This variable cost manifests itself as an upward slope in the supply curve. In a well-
designed crypto network, the slope of the supply curve until it hits the capacity limit
should be quite shallow, reflecting the low marginal cost of validation. That is, as long
as you are already set up to validate, the incremental cost of validating one more
transaction is quite low. However, the aggregate cost of processing a large number of
transactions is non-negligible.

There are a few offsetting effects that shift the supply curve up. These include the
upfront costs of both staking and mining, such as buying network tokens or mining
equipment or the time and dollar cost of securing your operation, preventing DDoS
attacks, and so on. Validators will demand a certain minimum payment to supply their
service, which is reflected in the fixed costs mentioned previously.

Nevertheless, the net effect of these factors is that the entirety of the sloping part of
the supply curve is well below zero in a network like Bitcoin or Ethereum.

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 8/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

Net effect of inflation subsidy plus general enthusiasm shifts the supply curve down. Typically, this means we
can use the basic perfectly inelastic model since the upward sloping part of the curve is all below zero.

All this applies to traditional crypto networks where there is a true fixed capacity. In a
better-designed network where capacity is determined by validator hardware rather
than by network limitations, there will actually be a somewhat upward sloping supply
curve, since validators can upgrade their hardware if the fees rise commensurately.
The upward sloping curve also can reflect the differing costs of the various validators
— some may have cheaper access to electricity or hardware, for example.⁷

We’ll assume the fixed supply market in this article for simplicity. In general, though,
the fixed supply is a conservative assumption in that it makes the arguments for the
alternative (non-dynamic) fee models look better than under a variable supply

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 9/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

assumption.⁸ That is, all the conclusions in this article will apply equally or more to a
variable supply market.

Also, for simplicity, we will assume that transaction finality occurs concurrently with
consensus. This is not the case with proof-of-work and other probabilistic consensus
algorithms — in Bitcoin, for example, there is always a small chance that the
transaction can be reversed, which declines exponentially with number of blocks since
it was processed (at least probabilistically). There are several perverse dynamics in the
fee market under a probabilistic consensus, such as those detailed in a recent BIS
paper, that significantly complicate this analysis. Since these issues are primarily
security rather than economic considerations, and more robust non-probabilistic
consensus models offer strict improvements over the probabilistic ones, it is sufficient
here to note that they do not materially impact the broader conclusions.

An interesting alternative approach is to model the fee market as an auction (albeit a


non-standard one where there are repeated opportunities), but we will leave such
analysis for a future post. The conclusions are substantially the same as the basic
supply-demand model.

This simple fixed supply model provides a basis that now allows us to dig into the
various models for fees.

Fee models:
There are four main basic fee models:

1. No fees

2. Fixed fees

3. Inflation fees

4. Dynamic market fees

All other fee models boil down to either one or a combination of the four basic models.

From an economics standpoint, it is easiest to think of the dynamic market fees as the
“base case” that matches the standard supply-demand analysis outlined above. The

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 10/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

other three cases correspond to various shifts or changes in the supply and demand
curves, with implications for overall efficiency and global utility or welfare.

We’ll start with the no-fee model, which will also serve to illustrate as the most
extreme example of several problems that affect both the fixed and inflation fee
models.

Zero
The fee model that has made the biggest splash recently is the zero-fee model, with
IOTA, Nano, and others claiming to have no fees. The supposed value proposition is, of
course, compelling: if there are no fees, then anyone can use the network, no matter
the transaction size, and never have to worry about fees. Unfortunately, there are
several flaws with the no-fee model that make it unviable in a long-term, healthy
network.

The True Cost of Transacting


First, the true cost of transacting in a healthy network can never be zero. At a
minimum, there is some computational (and thus electric) cost to sending out a
transaction.

Of course, if a transaction only involves a cryptographic signature, then this


computational cost is virtually zero. However, any pseudo-anonymous network with
genuinely zero fees will inevitably be spammed until it becomes unusable (any zero-
cost long-term mitigations require some permissioning that breaks the fundamental
value proposition of a cryptocurrency). Thus, the network requires some economic
spam-prevention measure. Commonly, this is in the form of a proof-of-work proof, but
this is economically equivalent to a direct fee since computing the proof-of-work has a
non-trivial cost (otherwise, it would be useless at preventing spam).

While dynamic fees are represented in the demand curve itself, these hidden fees can
be represented by a downward shift in the demand curve since they decrease the net
utility a consumer gets from sending a transaction. Regardless, from a consumer’s
perspective, they can be viewed as equivalent costs to transacting, and all popular
zero-fee networks are just direct fee networks with a different name. There is a
significant difference from the validator’s perspective, however, since they are not
receiving any compensation.
https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 11/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

Tragedy of the Commons and Free Riders


The obvious question that arises in a network with no validator reward is why anyone
will validate on the network if they do not receive any payment?

IOTA answers this by forcing end users to validate other transactions in their own
transaction, which effectively ends up being an additional hidden fee. More
importantly, the resulting consensus model is insecure,⁹ so it is not a valid example of
a viable decentralized network fee model.

Other networks, notably Nano, claim that “Average Joe” network participants will run
full validator nodes since they use the network and would like to maintain it, rather
than simply relying on light wallets and third-party nodes. While this may seem
plausible on the surface, this argument has long been refuted by the Tragedy of the
Commons result.

The Tragedy of the Commons is a simple economic phenomenon that illustrates the
issues with common ownership of an asset or good that needs to be maintained. In its
classic formulation, a town has a common pasture area where its residents can let
their animals graze. This is a good outcome for everyone involved as it is much more
efficient than everyone keeping their own grazing grounds. However, the individual
townspeople have little incentive to contribute to the upkeep of the commons,
resulting in free riders. These people observe that they can pay nothing to maintain the
commons (and treat it more roughly than they would their own property) and still
enjoy the benefits of the common resource.

Each person who decides to free ride increases the cost of upkeep for everyone who
does pay since the same fixed upkeep cost must be met, resulting in a positive
feedback loop. Of course, the logical end result is virtually no one pays for the upkeep,
(anyone who does decide to pay is effectively left “holding the bag”) and the commons
becomes unusable for everyone. Like in the related Prisoner’s Dilemma, the game
theoretically dominant individual strategy of not paying leads to a worse outcome for
everyone involved.

More generally, given economically rational actors and the absence of an enforcement
mechanism, any common, shared resource will logically be abused by free riders. The

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 12/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

key lesson of the Tragedy of the Commons is that altruism or enthusiasm alone is not
enough to maintain a common good.

This is an empirically proven phenomenon that everyone should be able to identify in


their own lives; it comes as a shock to no one that people abuse and exploit common
resources like parks or public transportation more than their own goods.

There are a few mitigations to such an outcome. Often, a tax is levied on the entire
community to pay for upkeep. Alternatively, a toll or fee is charged for use of the
resource. Both of these approaches are inherently contrary to a zero-fee network.
Social pressures play an important role in preventing the worst abuses, as free riders
can be labeled as such and will have to deal with the consequent stigma, but this too is
contrary to a pseudo-anonymous, open network.

As an open, trustless, peer-to-peer system, a crypto network can be viewed as a form of


a commons. There is a certain amount of work (transaction validation) that needs to be
done to maintain a network and make it usable to the benefit of all. The fewer people
who do this work, the worse the network is for everyone — transactions may be slower,
security would be lower, and reliability would be worse — until it is useless for
everyone.

Unfortunately, as mentioned previously, this work is expensive, with both fixed


(acquiring network stake, setting up DDoS protection, ensuring sufficient reliability)
and variable (data, bandwidth, CPU, electricity, etc.) costs. A network that relies on
people doing this work out of genuine altruism or even based on the realization that
everyone is better off if the resource is maintained will inevitably have a Tragedy of the
Commons result, as economically rational actors will free ride off the other
participants. In a pseudo-anonymous crypto network with a non-trivial number of
transactions (and thus a non-trivial cost of validation or “upkeep”), this result is
economically inevitable.

There are some trivial cases where a Tragedy of the Commons may not be the end
outcome, particularly when the network is immature, as there are users who generally
derive utility from participating in the network, even for free. A network probably is
able to rely on enthusiasts if it only processes a few transactions per second, but once
it starts processing thousands of transactions per second, the large cost of running a

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 13/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

full node will likely soon outweigh the “soft” benefit those users get from running the
node. How many people are willing to pay hundreds of dollars per month to run a
node when they can free ride off others?

In existing crypto networks, the vast majority of users use light wallets that rely on
other nodes. In a network with a well-designed consensus, this does not increase their
risk of being a victim of a double spend or other attacks,¹⁰ so free riding is a dominant
strategy.

Nano is the most prominent proponent of this “validation by desire to participate”


strategy, but it ironically serves as an early example of the free rider phenomenon.
Virtually no true third parties run network validators, with almost all voting power
held by the development team or closely affiliated light wallets, applications, and
exchanges. The largest validator on the network, Binance, often does not even bother
voting in consensus, which has led to some practical issues and concerns.

As with all aspects of network design, the focus should not be on what works now but
what will work at maturity. The zero fee approach boils down to relying on user’s
altruism or enthusiasm, which is not a sustainable growth model.

Validator Complexity and Security


Even if validators participated solely out of altruism, it is doubtful that “Average Joe”
merchants and users would be able to maintain a robust network. A mature network
processing thousands of TPS will require substantial expertise in building and
maintaining a node, even in AWS or some other cloud service. Only so much can be
optimized and streamlined, as threat models evolve, security demands following best
practices, and networking itself is non-trivial. A regular company will only devote so
many technical resources and unproductive working capital (in the case of a staking
network) to run a secure, robust node on the network before giving up and just using a
third party instead.

The fact that many networks do not have the basic protections that result in this
complexity is not a signal that they are unneeded but rather a reflection that those
networks are poorly designed, not significant enough, or not sufficiently decentralized
to bother attacking. A poorly set up node that is subject to DDoS attacks and frequent
downtime does not contribute to the network and may, in fact, decrease its efficiency.
https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 14/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

Deadweight Loss in a Perfectly Inelastic Market


There is yet another issue at play: deadweight loss. Mandating zero fees is effectively
equivalent to imposing a price ceiling of zero on the market.

In a normal supply-demand market, price ceilings result in deadweight loss, which


means total welfare (consumer surplus plus producer surplus) decreases. In other
words, the economy overall is worse off. The same basic analysis has been
demonstrated in rent control, which results in fewer housing units overall and
decreased mobility. The end result benefits the few people who get rent controlled
apartments but hurts the rest of the population. Unlike rent control, however, where
there are several complicating factors, the transaction market is extremely simple and
self-contained, meaning that the deadweight loss analysis is straightforward.

The recent Econ 101 student will object by pointing out that the transaction market
differs from normal markets due to having a perfectly inelastic (fixed) supply (by our
previously stated assumption), which means that there would be no deadweight loss —
only a transfer of surplus from producer to consumer.

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 15/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

In a classic economic model, there is no deadweight loss due to a price ceiling in a market with perfectly
inelastic supply. However, this fails to recognize the “lottery effect,” where those that value the good the most
are not necessarily the ones that receive the good. Source.

Once the “lottery effect” is taken into account, there are many consumers who receive the good who value it
lower than the consumers without the price ceiling. This results in deadweight loss, which has practical usability
issues in the zero-fee model. Source.

However, this common economics result has a key flaw — it assumes that the
consumers that get the good are those that value it most. In reality, price ceiling
markets typically act as a lottery amongst all consumers whose reservation price
exceeds the price ceiling. The result is that the consumers that actually receive the
good have, as a whole, lower aggregate consumer surplus than the consumers that
receive the good in a free market. Thus, there is a true, overall deadweight loss even if
https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 16/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

supply is fixed. This insight is reflected in the more sophisticated Marshallian


approach.¹¹

By way of example, imagine that the network can process 10 transactions per second,
but there is demand for 100 transactions per second. In a zero-fee network, none of the
demand will be priced out by a fee, so all 100 transactions will be competing for 10
slots each second. Some of these transactions may be very important and thus highly
valued, such as paying a highway toll (a long delay could cause a huge traffic jam).
Other transactions will have barely any value at all to the participants, such as a
$0.0001 transfer. And yet, under the zero-fee system, both transactions will be equally
valued and likely to get one of the slots. If all of the slots are taken by low utility
transactions and many high utility transactions are excluded or delayed, then the
network will fail to maximize overall utility. And since any distribution of transactions
is almost certainly to have a large right tail, there are many more low utility
transactions than high utility transactions, all equally likely to get a spot.

This deadweight loss has real, practical implications — participants need a network
that will reliably prioritize their most important transactions, and one that cannot
reliably process your transaction due to this “lottery effect” will not be very useful.
For example, a merchant whose transaction may or may not be processed and who has
no discretion to increase the fee to prioritize the transaction may be left pending
indefinitely — hardly an acceptable outcome!

Note that high utility/value should not be confused with high amount. It is very possible,
for example, for a $1,000 transaction to only result in a $1 economic surplus between
the participants, as is very common in low-margin businesses. Conversely, a $10
transaction might result in $9 of surplus. Any prioritization rule, such as give
preference to larger transactions, is, at best, a first-order approximation with non-
trivial loss.

In the best case, the system will result in an obfuscated, back-room fee market where
validators are paid under the table for prioritizing specific users’ transactions. While
this would prevent the “lottery effect,” it is a strictly worse version of the transparent,
dynamic fee market and subject to abuse.

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 17/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

This is the essence of deadweight loss — a few lucky people benefit while everyone else
has a suboptimal outcome.

As a result of these issues, the zero-fee model is critically flawed and cannot support a
viable, long-term crypto network.

Inflation subsidy
A couple of the issues introduced by zero-fees boil down to the validators having no
incentive to run and maintain the network. Several networks, most notably EOS, have
tried to maintain the benefits of zero-fees to consumers while paying the validators
with newly-minted, inflationary tokens. Superficially, this seems to enable
transactions of any size and provide a legitimate incentive to validators.

While it does help solve the free rider and Tragedy of the Commons issues, the
inflation model too has several issues that make it unattractive for a sustainable
network.

The first issue again is one of deadweight loss and the “lottery effect.” Since the entire
cost of transacting is covered by the inflation subsidy, there is no ability for the market
to differentiate between high and low utility transactions. Just as in the zero-fee model,
this results in low utility transactions being given equal weight as high utility
transactions in competing for limited spots that are lotteried off by the validators.

This “lottery effect” severely hampers the overall usefulness of the network at
maturity. In the absence of any filter, extreme low-value transactions will dominate
and take most of the available slots, leaving legitimate, higher value transactions
waiting potentially indefinitely. As seen in Bitcoin and Ethereum over various points in
2017 when mempools ballooned, this effectively renders the network unusable to
average users. Although they allow dynamic fees, their capacity is so constrained that
these periods were equivalent to a lottery between high fee transactions.

The deadweight loss imposed by the inflation model can be viewed alternatively as
subsidy deadweight loss. While our idealized fee market is different due to the fixed
(perfectly inelastic) supply, the implication is the same: the market is being externally
subsidized, and those funds have to come from somewhere.

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 18/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

Deadweight loss from a subsidy in a standard market (without perfectly inelastic supply). A subsidy costs the
ecosystem as a whole more than it receives as benefit. Source

In a decentralized crypto network, the subsidy is not coming from the government but
rather inflation in the token supply. This inflation subsidy is like a government subsidy
in that the cost is ultimately borne by “society” as a whole — the holders of the tokens.
Each additional token created erodes the value of the existing tokens since there is no
change in total network value.

Thus, the inflation subsidy can be viewed as a proportional tax on existing token
holders that is redistributed to the validators on the network. If a network is worth
$1bn in aggregate, for example, a 10% inflation is equivalent to a 9.1% tax on token
holders that distributes $91mm to validators.¹² This tax is independent of the actual
utility the user derived from the network. In fact, a user who sends comparatively few
but high-value transactions may even derive less overall utility from the network than a
user with many low value (think a fraction of a cent) transactions who is able to grab
the vast majority of available transaction slots. This perverse dynamic discourages
users from holding tokens, with significant implications for network security and
growth.

It is generally considered far preferable to directly charge individuals in proportion to


their use of a shared, limited resource than subsidize via broad base taxation. An
analogous scenario is road usage, where funding via tolls (whether direct or indirect
via fuel taxes) is far more efficient than funding via general taxes.

So while the inflation-only model fixes several of the issues with the zero-fee model, it
still results in a suboptimal outcome that severely impairs network usefulness at
https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 19/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

maturity.

Fixed
The third major alternative fee model that new networks have adopted is fixed fees,
where every transaction pays the same fee that is set by the protocol. This has notably
been implemented by Stellar, in which each network version fixes the fee and
upgrades are required to modify that fee.

The reasoning behind fixed fees is admirable but ultimately flawed. At the surface,
fixed fees appear to be more equitable than dynamic fees, which ostensibly allow a
wealthier person to pay more fees to get their transaction confirmed faster.
Unfortunately, this logic does not quite hold, since it makes all transactions rather than
all users equitable. For example, a wealthy user who wants to send many small, low
utility transactions is advantaged versus a poorer user who has a few but relatively
higher utility transactions. Instead, fixed fees result in a worse outcome for the
network users as a whole compared to dynamic fees.

Under the economic framework, fixed fees can be viewed as a “top down”
management approach that results in deadweight loss relative to the “bottoms
up”/”invisible hand” of the dynamic fee model.

There are three possible outcomes for the fee charged under the fixed fee model, all of
which are strictly worse than the dynamic fee model.

First, the fee may be higher than the market clearing rate. This corresponds to a price
floor, which results in a deadweight loss. Practically speaking, it means that users of
the network are paying too much for the service provided, to the benefit of the
validators. Many socially valuable transactions that could use the network at the
dynamic market rate are unable to use the network under the higher fixed rate,
reducing overall social welfare. This is analogous to the purported impacts of
minimum wage, where the people who hold on to their jobs benefit but a
proportionally greater number of people lose their jobs, resulting in an overall
negative outcome. While the minimum wage case is controversial due to confounding
factors and complexity, the fee market, as we have observed previously, is extremely
simple and self-contained, and thus, the conclusions are straightforward.

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 20/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

Alternatively, the fee may be lower than the market clearing rate. This corresponds to a
price ceiling, also with deadweight loss. The zero-fee model is merely the most
extreme version of this price ceiling, and the same issues carry through with a non-
zero price ceiling. If the fixed fee is below the cost of validation, the network will likely
fail or become significantly impaired due to free riders causing a Tragedy of the
Commons.¹³ Regardless of the level of fixed price, treating all transactions equally
results in an adverse “lottery effect” that inefficiently allocates the scarce, valuable
resource of a transaction space. As with both the zero-fee and inflation-only models,
this effect at its most extreme can render the network unusable for many high-value
users like merchants.

The third possible outcome is that the fixed fee happens to exactly equal the market
clearing rate. In this case, the result is identical to the dynamic fee market. However, it
is objectively worse since exact equality is a degenerate case that is unlikely to hold for
long. Demand for transaction space naturally varies over time. One might expect, for
example, higher demand during the normal 9 to 5 business hours than on a Sunday at
5am. As demand shifts, the dynamic fee that optimizes overall social welfare will shift,
while the fixed fee, by definition, remains constant. At best, the “top down” upgrade
system would dynamically shift the fixed fee to match the market clearing rate, but
this of course just results in a more centralized version of dynamic fees.

There are a few points that supporters of fixed fees might raise to push back on this
logic. One potential benefit is that everyone pays the same rate, which may be more
equitable provided that the fixed fee is close to the dynamic fee. However, this does not
improve overall social welfare — it merely shifts surplus from producers to consumers.
Since users will not pay higher fees than the utility they derive from their transactions,
variations in transaction fees do not reflect any true economic inequality in the
system. Confusion on this point often arises over conflating transactions with users. A
quick counterexample is a poor user who wishes to pay many bills on the network
versus a rich user who only needs to send a single network transaction. In this case,
the poor user ends up unfairly paying more in the fixed fee market than the rich user.

Incidentally, there are some cognitive costs of forcing everyone to choose their own
fee. It is simple, however, to instead have everyone choose their maximum fee, and
then set the fee for everyone to the minimum fee paid in the batch of transactions,

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 21/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

which is the market-clearing fee. This largely eliminates the game played by users, and
thus the cognitive costs, when selecting fees.¹⁴

Second, fixed fees could help avoid short-term spikes in fees that have been observed
in both Bitcoin and Ethereum. While this is true by definition, this is actually not a
desirable outcome. The spikes in fees represent genuine spikes in demand for high-
value transactions. Why should a substantially lower value transaction be artificially
advantaged (relative to the dynamic fee outcome)? Forcing the fees to be consistent
and smooth does not eliminate these swings in demand — it merely makes it so
transaction confirmation behavior is a lot less certain and well behaved. Opaqueness is
a far cry from equity.

The third and most plausible, but still ultimately unconvincing, argument for fixed
fees is it simplifies the user experience and eliminates the possibility of “fat finger”
fees. This phenomenon appears to be relatively rare even in the remarkably user-
unfriendly world of crypto and is much better solved at the user application level
rather than at the protocol level. Simple checks like limits on fees, suggested fees, and
additional abstraction of the user away from the underlying protocol can eliminate the
vast majority of these occurrences. Levying the requirement on the base protocol to
make up for poorly designed user experiences at the expense of network efficiency is a
poor development approach.

Dynamic
The best basic fee model is dynamic fees. As stated in the model definition, allowing
users to set their own fee and letting validators select the transactions with the highest
fees for processing results in an efficient market for fees. This market incurs no
deadweight loss and maximizes overall social utility and network efficiency.

The dynamic fee market automatically adjusts to changes in capacity and demand and
efficiently allocates space to the highest utility transactions. This is a far better
outcome than the effective lottery imposed by the other models, where many low-
value transactions will take space from higher-value transactions.

The merits of this model have been touched on in the discussion of the other fee
models, but there are a few additional features that are worth mentioning.

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 22/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

Dynamic user defined fees allow users to effectively place “limit orders,” where they
can submit a low value transaction with a commensurately low fee. If the current
market clearing fee exceeds this set fee, the transaction can wait until a period of less
demand, when it will automatically be processed.

Most of the benefits of dynamic fees are observable at capacity. Before capacity is
reached, the equilibrium fee level should be less than or equal to the fixed fees or
implied inflationary fees (assuming that the latter two fees exceed the cost of
validation; otherwise the network is not sustainable). This means that the user of the
dynamic fee network is never worse off than users of other networks in the long run.

To the extent that the network capacity can vary with validator hardware, the rise in
fees when capacity is reached will encourage existing validators to upgrade their
hardware and better validators to join the network. The result is a higher performance
network that benefits all users.

A common critique of non-zero direct fee models is that they complicate token
transactions. For example, a stablecoin token user on Ethereum must buy Ether in
addition to the stablecoin to pay the gas fees. Once again, this is a user experience
rather than protocol issue, and making a quick fix at the protocol layer that erodes its
efficiency and overall usefulness is the wrong approach. As user experience continues
to improve, many of these issues can be easily abstracted away. Few users have
difficulties navigating the use of credits in mobile games or online services, and
network tokens held to pay fees can be viewed much the same way.

Ultimately, increasing capacity, rather than fiddling with fee models, is the best
approach to making fees equitable and accessible. Of the four basic fee models, only
dynamic fees do not have any serious long-term drawbacks.

When is inflation good?


While the dynamic fees model is the clear winner of the basic fee models, it is possible
that some combination of the fee models results in a better overall outcome. As we saw
in the discussion of the various models, the effects of each can be easily incorporated
into the microeconomic analysis. We can boil down each of the alternative models into
some form of price control, subsidy, or tax, all of which result in deadweight loss in the

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 23/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

self-contained fee market. This would seem to suggest that there is no place for
inflation in an economically rational design.

However, there are some additional macro considerations that impact this analysis and
suggest that there is a place for inflation in conjunction with a direct fee.

Inflation can help bootstrap an immature network to broader adoption in several ways.
First, it subsidizes early adopters at the expense of existing token holders. This is
equivalent to the founders and early investors in the network providing an incentive to
early adopters, which is a very common business strategy.

Second, inflation that exceeds the cost of validation can enable early users to transact
with zero fees for themselves, which can streamline the user experience. While it is a
poor long-term strategy to bend the protocol to deal with UX issues, the reality is that
the state of crypto infrastructure remains quite poor and justifies accommodating
initial users to get the network off the ground.

Third, inflation can help distribute tokens to early adopters who are meaningfully
contributing to the network. By providing a compelling value proposition at an early
stage, the network can attract strong validators that increase network decentralization
and robustness. Note that all of these benefits are short-term; at maturity, inflation for
the sake of users is harder to justify.

Nevertheless, there are compelling reasons to keep some inflation in the network long-
term: macroeconomic stability. The consensus in central bank monetary policy is that
optimal inflation in an economy is around 2% per annum. While antithetical to the
early crypto ethos that is highly critical of inflationary policy, a low amount of inflation
has clear benefits to an economic system by reducing frictions and promoting overall
growth.

The dangers of the alternative — deflation due to a growing economy with constant
monetary supply, like Bitcoin — are incontrovertible. By promoting hoarding of
money, deflation introduces frictions into the economy, which can result in a severely
adverse positive feedback loop called a deflationary spiral.

Before the introduction of modern central bank policy, deflation was at the center of
many of the most severe economic crashes. By maintaining some modest inflation, a
https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 24/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

crypto network can grease the wheels of its economy and mitigate several existential
risks.

Finally, there is a plausible reason to broadly tax the token holders on a network via
inflation. All users of the network derive a genuine benefit from the network’s
existence, whether they are currently using it or not. The very option of being able to
use an efficient, cheap, secure, and decentralized network going forward is a positive
externality — for example, as a hedge against potential censorship or infrastructure to
build a future business. While it is imperfect in its impact, an inflation tax does
accurately represent that not only the direct users of the network benefit from its
existence.

The Logos Approach


So what, then, is the optimal fee policy?

At Logos, we have concluded that the best approach is dynamic, user-paid fees plus
modest inflation. This combines the lessons of both the microeconomic and
macroeconomic models to promote sustainable growth across Logos’ life cycle.

By permitting users to choose their own fees and validators to prioritize transactions
accordingly, we can maximize overall network effectiveness and usefulness. The
dynamic fee model yields the best microeconomic outcome by responding instantly to
changes in demand and encouraging sustainable network growth.

The inflation component helps jumpstart the initial growth of the network in the short
term. In the long term, a reasonable level of inflation keeps the network economy
running smoothly and avoids major macroeconomic risks. By design, Logos
concentrates the most expensive validation tasks in the hands of a relatively small
number of delegates (while ensuring that these delegates are strictly accountable to
the rest of the network, and, thus, that the network has a high level of security). As a
result, a small amount of inflation can be a very large reward for the delegates,
ensuring healthy competition that maximizes network performance. Such a level of
inflation imparts very little deadweight loss on the overall network (provided that
there is a dynamic fee to eliminate the “lottery effect”), making this a good
compromise.

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 25/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

Logos’ biggest fee design is indirect: maximizing capacity. By providing optimal


infrastructure for payments that pushes capacity to the limits of hardware and beyond,
Logos ensures that direct fees will remain close to the marginal cost of validation, even
at global levels of adoption.

Conclusion
Ultimately, there is no single right economic fee model, and even top economists will
disagree over what is the proper level of inflation. Economic models are inherently
simplifying and can bely much of the complexity present in a market. While simple in
most respects, crypto has several unique properties that confuse this analysis in the
short term, particularly the emotionally charged ideologies that are inseparable from
the users of many networks.

Nevertheless, this does not invalidate the model conclusions. By applying simple
principles that are logically true at a mature, rational economic equilibrium, we are
able to see that the biggest buzz fee models — zero fees, fixed fees, and inflation only —
have severe limitations that will significantly impair networks that use them. While
alternative models may promote short-term growth, it is critical for projects and
communities to be realistic about what will work in the long term if they wish to
succeed.

Thanks to David Smalling for providing feedback on this article.

[1] Note that this isn’t strictly consistent with the empirical evidence from Bitcoin, but
uneconomic choice of transactions is declining as miners improve and legacy selection
rules that emphasized other traits are phased out. See Section 3.3 of this paper for
more info.

[2] This simplicity contrasts with the relative complexity of the payment interchange
fee market, where multiple intermediaries must be induced to participate in the
network.
https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 26/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

[3] We are ignoring big changes in hash power in a PoW network for simplicity.

[4] A related phenomenon is when people accept a lower salary to work in a field that
they are passionate about or strongly believe in.

[5] In reality, each participant will have a different “enthusiasm” utility, but we can
assume a constant shift down in the supply curve for simplicity.

[6] An interesting exception to this rule is sharding, but sharding itself is limited, and
the prevailing wisdom that sharding can scale a network without limit is provably
false. In general, sharding just pushes out this scaling problem to each shard.

[7] The fixed capacity should not be confused with the ability of the development team
to increase that capacity. The fixed capacity results in a vertical supply curve, and an
increase in that capacity would shift that curve right. This is very different than an
upward sloping supply curve, as the former requires an exogenous network upgrade,
while the latter occurs dynamically at a given network configuration.

[8] Spoiler alert — the dynamic fee model is the economically best fee model.

[9] Without getting too technical, IOTA lacks any Byzantine fault tolerance and is
susceptible to double spend attacks.

[10] This is not true in proof-of-work networks where simple payment verification is a
non-trivial problem, but more advanced consensus models make SPV simple and
secure.

[11] for a good discussion of this issue, see the comments of this article.

[12] There is no endogenous increase in total network value with inflation. The
previous holders now own 90% of the total token supply, while the validators now own
10%.

[13] This logic also holds for an inflation only model that does not sufficiently reward
validators.

[14] See Basu et al. for an analysis of this simple fix.

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 27/28
2/12/23, 12:07 AM Crypto Transaction Fee Economics Primer | by Michael Zochowski | Logos Network | Medium

If you’d like to keep up with what we are doing:

Follow us: Twitter | Discord | Telegram | Reddit

Read: White paper | Logos website

Open in app Sign up Sign In

Decentralization Fintech
Search Medium Cryptocurrency Blockchain Blockchain Technology

About Help Terms Privacy

Get the Medium app

https://medium.com/logos-network/crypto-transaction-fee-economics-primer-948d1d93a4f5 28/28
2/12/23, 12:09 AM Crypto Wallets, Explained. What is a crypto wallet? | by Blockchain.com | @blockchain | Medium

Published in @blockchain

Blockchain.com Follow

Jul 13, 2022 · 5 min read · Listen

Save

Crypto Wallets, Explained

What is a crypto wallet?


A crypto wallet is a digital or software-based way to access your cryptocurrencies.

Unlike a regular wallet, a crypto wallet doesn’t actually hold your assets. Instead, it
stores credentials called private keys that give you access to your assets on the
blockchain.
https://medium.com/blockchain/crypto-wallets-explained-f9199e621366#:~:text=A crypto wallet is a,your assets on the blockchain. 1/8
2/12/23, 12:09 AM Crypto Wallets, Explained. What is a crypto wallet? | by Blockchain.com | @blockchain | Medium

Depending on the type of crypto wallet you have, you can:

Send, receive, and pay with crypto

Store crypto

Create a digital “vault” online that only you can access

Interact with web3 applications that let you lend and borrow against your crypto

Buy, sell, and store NFTs

Earn on your crypto in a crypto rewards account

To recap: crypto wallets store your public and private keys as well as a linked receiving
address so you can send and receive crypto securely

How a crypto wallet works


Crypto wallets consist of three parts: a public key, a private key, and a public receiving
address.

Whenever someone sends crypto from their wallet, they must use their private key to
“sign,” or confirm, the transaction. This digital signature is like a fingerprint, unique to
each individual and their private key, proving that the transaction is coming from the
legitimate owner of the wallet and hasn’t been tampered with.

What are private and public keys?

https://medium.com/blockchain/crypto-wallets-explained-f9199e621366#:~:text=A crypto wallet is a,your assets on the blockchain. 2/8


2/12/23, 12:09 AM Crypto Wallets, Explained. What is a crypto wallet? | by Blockchain.com | @blockchain | Medium

Crypto wallets all begin with a private key, a long, randomized string of letters and
numbers. These private keys can also take the form of a QR code or mnemonic phrase.

This private key is used to generate a public key through an encryption process. While
it’s easy to verify that a specific private and public key fit together as a pair, you can’t
“work backwards” and figure out a private key from its public key.

This “one-way” — or “trap-door” — encryption, makes it possible to share a public key


without worry that someone will figure out your private key and steal your crypto.

Next, the public key undergoes a mathematical function that “compresses” it into a
receiving address (either a QR code or a shorter string of numbers and letters) where
you can actually send crypto.

You can generate many public keys — each with their own separate receiving address
— from one private key.

Most of the time, you don’t interact directly with these digital keys. Instead, they get
stored in wallet files or managed by crypto wallet apps.

What makes crypto wallets secure?


Cryptocurrency relies on cryptography, the art of protecting data through codes and
digital puzzles called ciphers.

https://medium.com/blockchain/crypto-wallets-explained-f9199e621366#:~:text=A crypto wallet is a,your assets on the blockchain. 3/8


2/12/23, 12:09 AM Crypto Wallets, Explained. What is a crypto wallet? | by Blockchain.com | @blockchain | Medium

When you use your private key to sign a transaction, the network can verify that the
private and public keys represent a pair — while still maintaining the privacy of the
information.

Since anyone can remove funds from an address with that address’s matching private
key, it’s critical to protect your private key information.

Again, crypto wallets usually manage your private and public keys for you, but it’s
important to know that they exist and what they do.

Why crypto wallets matter


A crypto wallet provides a secure way to store your cryptocurrency, send, and receive
it. You can also track your crypto balance and transactions and swap one
cryptocurrency for another.

Arguably, though, the greatest benefit is the ability to custody your own funds, or “be
your own bank.”

When you hold assets at a traditional financial institution, like a bank or broker, you
entrust them with your private information and rely on them to keep your funds safe.
They may also charge fees for their services.

With any cryptocurrency wallet that lets you remain in control of your private keys,
you are in complete control of your assets. No one can access your funds without your
permission, and you don’t have to pay anyone to custody your funds.

This gives you full control of your cryptocurrency and helps keep it safe from hacks,
scams, and theft. In countries facing high levels of inflation or capital controls, crypto
wallets give people a way to store value that can’t be confiscated by their governments.

To recap: Crypto wallets that let users hold their private keys make self-custody possible for
everyone.

That said, not all crypto wallets are created equal. Read on to discover the different
kinds of crypto wallets you can select.

Kinds of crypto wallets


https://medium.com/blockchain/crypto-wallets-explained-f9199e621366#:~:text=A crypto wallet is a,your assets on the blockchain. 4/8
2/12/23, 12:09 AM Crypto Wallets, Explained. What is a crypto wallet? | by Blockchain.com | @blockchain | Medium

There are two main types of crypto wallets: custodial and non-custodial.

Custodial wallets vs. non-custodial wallets

https://medium.com/blockchain/crypto-wallets-explained-f9199e621366#:~:text=A crypto wallet is a,your assets on the blockchain. 5/8


2/12/23, 12:09 AM Crypto Wallets, Explained. What is a crypto wallet? | by Blockchain.com | @blockchain | Medium

Custodial wallets
Custodial wallets are like bank accounts.

They are managed by a third party, which could be an exchange, a company, or even
just another crypto user. These wallets are convenient because you don’t have to worry
about losing your private keys or managing them yourself.

However, custodial wallets come with risks. Because a third party manages your
crypto, they also control your crypto keys. This means that if the company goes out of
business or is hacked, your crypto could be at risk.

Non-custodial wallets
Non-custodial wallets are the opposite of custodial wallets.

https://medium.com/blockchain/crypto-wallets-explained-f9199e621366#:~:text=A crypto wallet is a,your assets on the blockchain. 6/8


2/12/23, 12:09 AM Crypto Wallets, Explained. What is a crypto wallet? | by Blockchain.com | @blockchain | Medium

With a non-custodial wallet, you are the only one who has access to your private keys.
This might sound like a recipe for disaster (after all, if you lose your keys, you lose your
crypto), but non-custodial wallets actually offer two big advantages.

First, because you are the only one who has access to your private keys, non-custodial
wallets are much more secure than custodial wallets. If a non-custodial wallet is
hacked, your crypto is safe because the hacker does not have your private keys.

Second, non-custodial wallets give you full control of your crypto. This means that you
can use your crypto however you want, without having to worry about third-party
restrictions.

Choosing a crypto wallet


When choosing between a custodial or non-custodial wallet, there is no perfect choice.
Each has tradeoffs. The key is finding a wallet that best fits your needs.

If you are new to crypto or just want to dip your toe in the water, a custodial wallet
might be a good choice. These wallets are easy to use and require no special expertise.

If you want total control over your crypto or plan on using web3 applications, a non-
custodial wallet is the way to go. These wallets might be slightly more complicated to
use, but they offer greater security and flexibility.

The Blockchain.com Wallet gives you custodial and non-custodial wallet options in the
same app, making it easy to buy, sell, store, and secure your crypto with less effort than
managing multiple wallets or apps.

We call our custodial wallet a ‘Trading Account’ and our non-custodial wallet a ‘Private
Key Wallet’.

Sign up for a Blockchain.com Wallet today:

https://medium.com/blockchain/crypto-wallets-explained-f9199e621366#:~:text=A crypto wallet is a,your assets on the blockchain. 7/8


2/12/23, 12:09 AM Crypto Wallets, Explained. What is a crypto wallet? | by Blockchain.com | @blockchain | Medium

How to Sign up for a Blockchain.com Wallet

Open in app Sign up Sign In

Trading Account (custodial wallet)


Search Medium

Private Key Wallet (non-custodial)

Bitcoin Crypto Wallet Non Custodial Wallet Custodial Wallet

About Help Terms Privacy

Get the Medium app

https://medium.com/blockchain/crypto-wallets-explained-f9199e621366#:~:text=A crypto wallet is a,your assets on the blockchain. 8/8


2/12/23, 12:11 AM The Ultimate Guide to Cryptocurrency Wallets (1) | by 李婷婷 Lee Ting Ting | Coinmonks | Medium

Published in Coinmonks

李婷婷 Lee Ting Ting Follow

Jun 2, 2021 · 8 min read · Listen

Save

The Ultimate Guide to Cryptocurrency Wallets (1)


A Detailed Comparison of 6 Safe & Easy-to-use Crypto Wallets

Overview
Hi all! It has been a while since I wrote the previous article as the DeFi space keeps
people busy every day. As a heavy user myself, I want to write this post to share my
insights on choosing crypto wallets. I will mainly focus on Mobile and Non-Custodial
wallets (meaning that you have full control of your private key), as I think this is the
safest and most convenient way to interact with the blockchain on a day-to-day basis.
Let’s get started! :)

Quick Table Summary


We will explain each of the wallet details below. Feel free to share the two tables with
your friends if you find it helpful!

https://medium.com/coinmonks/the-ultimate-guide-in-choosing-cryptocurrency-wallets-1-d8ae5b49a957 1/13
2/12/23, 12:11 AM The Ultimate Guide to Cryptocurrency Wallets (1) | by 李婷婷 Lee Ting Ting | Coinmonks | Medium

Comparison Metrics
Here is a list of important points I will be considering when choosing wallets:

1. Safety: Are my funds safe in the wallet? Can I have full control of my funds by
holding my private key? Can the wallet provider do malicious things with my
private key?

https://medium.com/coinmonks/the-ultimate-guide-in-choosing-cryptocurrency-wallets-1-d8ae5b49a957 2/13
2/12/23, 12:11 AM The Ultimate Guide to Cryptocurrency Wallets (1) | by 李婷婷 Lee Ting Ting | Coinmonks | Medium

2. Usability: Is the wallet easy to use intuitively? so that I won’t accidentally press a
weird button and lose all my funds?

3. Conveniency: Is there a DApp browser in the wallet? How convenient is it to send


transactions using the wallet? Do I have to hold the specific native currencies
whenever I want to interact with a different blockchain?

4. Compatibility: Can I use the wallet to interact with any blockchain I want? Or I will
need to download many different wallets just to interact with a specific
blockchain?

5. Functionalities: Are there additional cool features exclusive to the wallet? For
example, some wallets offer better staking rates to keep growing your crypto while
locking it in the wallet. Some wallets also offer direct fiat-to-crypto purchasing and
a one-pager to invest in different DeFi products.

The Comparison

1. MetaMask
One the most well-known and popular wallets that offers any customization

Safety: ★★★★★

Seed phrases and private keys are encrypted with your password. You have full control
of all your private keys. Your funds are at risk only when a hacker has full access to
your computer AND password.

Usability: ★★☆☆☆

This wallet is not designed for newbies and would require users to have a medium level
of knowledge to make the best use of it. For example, users have to know how to
properly control their private key and be sure not to connect wallet on malicious
websites. Also, a lot of custom assets are not displayed automatically in the wallet until
you manually add the token address here.

Conveniency: ★★☆☆☆

https://medium.com/coinmonks/the-ultimate-guide-in-choosing-cryptocurrency-wallets-1-d8ae5b49a957 3/13
2/12/23, 12:11 AM The Ultimate Guide to Cryptocurrency Wallets (1) | by 李婷婷 Lee Ting Ting | Coinmonks | Medium

Although it has DApp browser in the wallet, it requires you to have the native currency
to interact with the blockchain. For example, if you want to interact with Ethereum,
Polygon, Solana, BSC, and Tron at the same time, you will have to hold a small amount
of ETH, MATIC, SOL, BNB, TRX in your wallet.

Compatibility: ★★★★☆

It is my favorite wallet because it has the best compatibility! You can interact with ANY
EVM compatible blockchain on MetaMask as long as you have the Network RPC URL
(See this guide to add custom networks here). Best of all, you can add ANY assets,
including NFTs you issued yourself, to be shown in the wallet. However, other non-
EVM compatible blockchains like Flow and Solana cannot be added to MetaMask.

Functionalities: ★★☆☆☆

Users can purchase crypto with fiat in the app (Apple Pay / Wyre / Bank). In addition,
there is a swap feature released recently to get the best price from decentralized
exchanges (charging 0.743% fee). Except these, there are only basic features like
transfer, receive, browse DApps, and display assets.

(Screenshots from the MetaMask app :D)

https://medium.com/coinmonks/the-ultimate-guide-in-choosing-cryptocurrency-wallets-1-d8ae5b49a957 4/13
2/12/23, 12:11 AM The Ultimate Guide to Cryptocurrency Wallets (1) | by 李婷婷 Lee Ting Ting | Coinmonks | Medium

2. Blocto
One of the most user-friendly wallets that require zero transaction fee and the main
mobile wallet to interact with the Flow Blockchain.

Safety: ★★★★★

Both custodial and non-custodial options are available, so the security is the same as
MetaMask if you opt-in the non-custodial mode.

Usability: ★★★★★

This wallet is designed especially for crypto newbies. When you enter the DApp
browser, it shows a list of commonly used DApps so that users don’t need to memorize
website URLs and potentially navigate to the wrong ones. On the tokens page, you also
don’t need to know how to “switch networks” to receive tokens on different
blockchains. You can view all assets on one screen.

Conveniency: ★★★★★

Besides having DApp browser, it pays the transaction fee for you for all blockchain with
Blocto points! Once registered, you will receive 3000 FREE points to send transactions,
meaning that you can try out DApps at zero cost! Blockchain newbies don’t have to
understand the use of native currencies.

Compatibility: ★★☆☆☆

As it is not designed for advanced crypto users, you cannot add other blockchains
freely to the app. Currently they support Ethereum, Binance Smart Chain, Tron, Flow,
and Solana (soon). You also cannot add customized assets. All tokens and NFTs can only
be listed by the Blocto team. This is to prevent newbies from accidentally touching
unknown tokens or blockchains. Also noted that it is very expensive to create
Ethereum account as it is a smart contract wallet.

Functionalities: ★★★★★

This is the ONLY software wallet for the Flow blockchain to stake tokens (earn FLOW
by locking tokens in the app), swap (exchange FLOW & tUSDT), and display NFTs

https://medium.com/coinmonks/the-ultimate-guide-in-choosing-cryptocurrency-wallets-1-d8ae5b49a957 5/13
2/12/23, 12:11 AM The Ultimate Guide to Cryptocurrency Wallets (1) | by 李婷婷 Lee Ting Ting | Coinmonks | Medium

(showcase your NFTs on Versus and maybe NBA Top Shot in the future)! So there is no
second option if you want to interact with Flow. In the meantime, it allows purchasing
crypto with fiat (Moonpay).

(Screenshots from the Blocto app :D)

3. imToken
The wallets that have the most monthly active users (maybe more than MetaMask!),
Asian users (has WeChat support), and rich functionalities.

Safety: ★★★★★

Similar to MetaMask, it allows you to take full control of your private keys.

Usability: ★★★☆☆

As this app is not designed for newbies, it has more advanced settings which may seem
confusing. For example, you need to switch to different blockchains using the sidebar
to interact with them. However, it’s better than MetaMask in that it automatically
detects and shows any type of assets you have, which you can choose whether to

https://medium.com/coinmonks/the-ultimate-guide-in-choosing-cryptocurrency-wallets-1-d8ae5b49a957 6/13
2/12/23, 12:11 AM The Ultimate Guide to Cryptocurrency Wallets (1) | by 李婷婷 Lee Ting Ting | Coinmonks | Medium

display in the app or not. It also has a rich DApp browser home screen showing many
common apps by category.

Conveniency: ★★☆☆☆

Users have to hold native currencies to interact with different blockchains.

Compatibility: ★★★★★

They offer great compatibility which users can add customized network RPCs just like
in Metamask. Best of all, they have over 10 blockchain networks available for use by
default without requiring users to add these RPC networks themselves. (See this guide
to add custom networks)

Functionalities: ★★★★★

This wallet contains one of the richest functionalities in one single app. Not only can
you stake and swap tokens (Tokenlon) directly in the app, but also see the latest market
price of each asset!

(Screenshots from the imToken app :D)

https://medium.com/coinmonks/the-ultimate-guide-in-choosing-cryptocurrency-wallets-1-d8ae5b49a957 7/13
2/12/23, 12:11 AM The Ultimate Guide to Cryptocurrency Wallets (1) | by 李婷婷 Lee Ting Ting | Coinmonks | Medium

4. Math Wallet
The wallet that supports most blockchains (more than 65 types) by default.

Safety: ★★★★★

Similar to MetaMask, it allows you to take full control of your private keys.

Usability: ★★★★☆

Again, this wallet is for more advanced users who want to be able to interact with all
kinds of blockchains. It’s better than MetaMask in that you don’t need to manually add
many blockchains RPC URLs by yourself. It’s one click away! Similar to imToken, it
shows a long list of command DApps in their browser.

Conveniency: ★★☆☆☆

Users have to hold native currencies to interact with different blockchains.

Compatibility: ★★★★☆

It supports most types of blockchains I’ve ever heard of (except Flow, Flow is only on
Blocto). However, you cannot add customized networks as well.

Functionalities: ★★★★★

They have a very interesting and useful feature — Cross-chain Swap, where you can
exchange tokens between different blockchains directly. Other than this, they have a
news tab showing the latest trend in the crypto world.

https://medium.com/coinmonks/the-ultimate-guide-in-choosing-cryptocurrency-wallets-1-d8ae5b49a957 8/13
2/12/23, 12:11 AM The Ultimate Guide to Cryptocurrency Wallets (1) | by 李婷婷 Lee Ting Ting | Coinmonks | Medium

(Screenshots from the MathWallet app :D)

5. Zerion
The app to manage your entire DeFi portfolio on different chains in one place.

Safety: ★★★★★

Similar to MetaMask, it allows you to take full control of your private keys.

Usability: ★★★★★

This app comes to the top of my mind when I want to view all my DeFi positions! I have
used InstaDApp, ApeBoard, etc, and found that this app and Zappar (no app yet)
support the most types of DeFi assets on different blockchains. It also shows real-time
prices, profit and loss, price line charts to give you an overview of how your portfolio is
going.

Conveniency: ★★☆☆☆

There is no DApp browser inside the app. When you click on features such as swap
token, it will redirect you to imToken to confirm and execute the transaction. Thus,
you will have to hold native currencies in imToken.

https://medium.com/coinmonks/the-ultimate-guide-in-choosing-cryptocurrency-wallets-1-d8ae5b49a957 9/13
2/12/23, 12:11 AM The Ultimate Guide to Cryptocurrency Wallets (1) | by 李婷婷 Lee Ting Ting | Coinmonks | Medium

Compatibility: ★★★☆☆

Although it can display most assets on different blockchains, it sometimes failed to


fetch all DeFi assets on Binance Smart Chain and Polygon.

Functionalities: ★★★★★

It has the most comprehensive dashboard of DeFi products and tokens to invest in! For
example, you can get an overview of how each token grows recently, buy DeFi indexes
(such as DPI), and deposit in Curve pools using the shortcut in the app (later redirected
to imToken to finish the transaction)!

(Screenshots from the Zerion app :D)

6. Trust Wallet
The wallet with the best UI for the minimalist lifestyle

Safety: ★★★★★

Similar to MetaMask, it allows you to take full control of your private keys.

https://medium.com/coinmonks/the-ultimate-guide-in-choosing-cryptocurrency-wallets-1-d8ae5b49a957 10/13
2/12/23, 12:11 AM The Ultimate Guide to Cryptocurrency Wallets (1) | by 李婷婷 Lee Ting Ting | Coinmonks | Medium

Usability: ★★☆☆☆

This app is also for more advanced users like MetaMask.

Conveniency: ★★☆☆☆

DApp browser is in the app. However, you still need to have native currencies.

Compatibility: ★★★☆☆

Over 35 types of blockchains are supported. However, you cannot add additional
blockchain networks to the app.

Functionalities: ★★☆☆☆

Similar to Blocto, it allows crypto purchasing with Moonpay. It also offers token
swapping and BNB staking (for some reason I can’t stake on iOS app) feature directly in
the app. Other than these, only basic functions are provided

(Screenshots from the Trust Wallet app :D It also has light mode)

https://medium.com/coinmonks/the-ultimate-guide-in-choosing-cryptocurrency-wallets-1-d8ae5b49a957 11/13
2/12/23, 12:11 AM The Ultimate Guide to Cryptocurrency Wallets (1) | by 李婷婷 Lee Ting Ting | Coinmonks | Medium

Wrap up
Now you have an overview of 6 different mobile wallets and their comparison in terms
of safety, usability, conveniency, compatibility, and functionalities. One side note is
that although all wallets are ranked 5 stars in safety, all of the above are “hot”
(software) wallets and they are not as secure as “cold” (hardware) wallets such as
Ledger. You should only keep the assets that you’ll be using frequently in hot wallets.

In the next post, I will cover 5 more wallets, including Argent, Crypto.com,
TokenPocket, Coin98, and 1inch. Feel free to suggest your favorite wallet for me to
review!

Thank you for your time reading. Any suggestions are welcomed and feel free to point
me out if anything is unclear. See you next time! :)

Blockchain Cryptocurrency Bitcoin Technology Defi

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

https://medium.com/coinmonks/the-ultimate-guide-in-choosing-cryptocurrency-wallets-1-d8ae5b49a957 12/13
2/12/23, 12:11 AM The Ultimate Guide to Cryptocurrency Wallets (1) | by 李婷婷 Lee Ting Ting | Coinmonks | Medium

About Help Terms Privacy

Get the Medium app

Open in app Sign up Sign In

Search Medium

https://medium.com/coinmonks/the-ultimate-guide-in-choosing-cryptocurrency-wallets-1-d8ae5b49a957 13/13
2/12/23, 12:13 AM How To Generate Public and Private Keys for the Blockchain | by Artiom Baloian | Medium

Artiom Baloian Follow

Dec 3, 2018 · 4 min read · Listen

Save

How To Generate Public and Private Keys for the


Blockchain

Introduction
Public Key Cryptography, or Asymmetric Cryptography, is a cryptographic system
that uses two pairs of keys: Public Key and Private Key. This is one of the most
important part of cryptocurrency protocols, and it is used in several places: crypto
wallet creation, to ensure that crypto coins can only be spent by owners, signing of
transactions (digital signature).These are the core components of cryptocurrency
protocols. In short, if you send cryptocurrencies to others you sign that transaction
using your private key (or signature key generated from using a private key) and the
transaction is verified using your public key. So, if hackers obtain your private key, they
would be able to send your cryptocurrencies to themselves.

https://baloian.medium.com/how-to-generate-public-and-private-keys-for-the-blockchain-db6d057432fb 1/4
2/12/23, 12:13 AM How To Generate Public and Private Keys for the Blockchain | by Artiom Baloian | Medium

There are a couple of algorithms to generate public and private keys. For example,
Bitcoin protocol uses Elliptic-Curve Cryptography (ECC) and Elliptic Curve Digital
Signature Algorithm (ECDSA) for digital signature. In this article I am going to explain
Rivest–Shamir–Adleman (RSA) and compare it with ECC. RSA is one of the first and
most widely used public key cryptosystems. It is named after its founders, Ron Rivest,
Adi Shamir, and Leonard Adleman and it has become almost synonymous with public
key cryptography.

RSA Algorithm
RSA makes extensive use of arithmetic operations using modulo-n (mod n) arithmetic.
x mod n simply means the remainder of x when divided by n.
For example, 17 mod 5 = 2.
In general, RSA consists of three major parts (sometimes it makes sense to add public
key sharing):

Generate the public key and the private key

Encrypt data using generated public key

Decrypt data using generated private key

Generate the public key and the private key

To generate the public and private RSA keys, Alice or/and Bob (two fictional characters
who have become the industry standard for discussions about cryptography) would
perform the following steps:

1. Choose two large prime numbers, p and q. The larger the values, the more difficult
it is to break RSA, but the longer it takes to perform the encoding and decoding.

2. Compute n = pq and z = (p — 1)(q — 1).

3. Choose a number e, less than n, that has no common factors, other than 1, with z
or their greatest common divisor (gcd) equals 1, gcd(e, z) = 1. In this case, e and z
are said to be relatively prime. e will be used in encryption.

4. Find a number d, such that ed — 1 is exactly divisible by z. In another way ed mod z


= 1. d will be used in decryption.
https://baloian.medium.com/how-to-generate-public-and-private-keys-for-the-blockchain-db6d057432fb 2/4
2/12/23, 12:13 AM How To Generate Public and Private Keys for the Blockchain | by Artiom Baloian | Medium

5. The public key that Bob or Alice makes available to the world is the pair of
numbers (n, e) and the private, which must be secret, is the pair of numbers (n, d).

Encrypt data using generated public key

Suppose Alice wants to send Bob a message, which is represented by bit pattern
integer number m (plaintext message), where m < n. The encrypted value c (ciphertext)
of plaintext message m is c = m^e mod n
Ciphertext c will be sent to Bob. Note that Alice encrypts the message using Bob’s
public key.

Decrypt data using generated private key

To decrypt received ciphertext c Bob computes m = c^d mod n which requires use of his
private key (n, d).

The security of RSA relies on the fact that there are no known algorithms for quickly
factoring (prime factorization) a number. In this case the public value n into p and q.

RSA vs ECC
In ECC a private key is a randomly generated integer number. In Bitcoin protocol it is
256 bit
(32 bytes) integer number. A public key is calculated/derived from a private key using
elliptic curve cryptography, but not vice versa and compressed public key size is 33
bytes. ECC can use the same algorithm but with different elliptic curves to generate a
public key. Bitcoin protocol uses Secp256k1 and public keys are either compressed or
uncompressed.

RSA keys (public, private and signature) are big and key generation is slow.
On the other hand, RSA is easy to implement, while ECC is difficult to properly
implement. In December 2010, PlayStation 3 was hacked, because Sony did not
properly implement the algorithm. This is why it is recommended to use already tested
libraries like OpenSSL to generate ECC key pairs.

About a year ago I implemented an open source library called eccpem and put it on
GitHub, which generates ECC key pairs and stores them on the .pem files using

https://baloian.medium.com/how-to-generate-public-and-private-keys-for-the-blockchain-db6d057432fb 3/4
2/12/23, 12:13 AM How To Generate Public and Private Keys for the Blockchain | by Artiom Baloian | Medium

OpenSSL library.

Conclusion
Most cryptocurrency protocols use ECC & ECDSA instead of RSA. There are at least two
reasons:

1. ECC uses much less memory than RSA, which is important in crypto protocols.

2. ECC is faster than RSA.

Q: Which one is a secure algorithm?


A: They both are secure for now.

Open in app
Bitcoin Blockchain Blockchain Development Cryptography Crypto Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://baloian.medium.com/how-to-generate-public-and-private-keys-for-the-blockchain-db6d057432fb 4/4
2/12/23, 12:15 AM Public and Private Keys in Cryptocurrency | by Blockchain Tech | Coinmonks | Medium

Published in Coinmonks

Blockchain Tech Follow

May 1, 2022 · 3 min read · Listen

Save

Public and Private Keys in Cryptocurrency

Well,

https://medium.com/coinmonks/public-and-private-keys-in-cryptocurrency-c0910d6a1c20 1/5
2/12/23, 12:15 AM Public and Private Keys in Cryptocurrency | by Blockchain Tech | Coinmonks | Medium

Today, we are going to discuss public and private key, and how it is a very crucial part
of cryptocurrency.

Cool!

You all know what is a key right? In our daily life, we are using it for locking purposes,
let’s say, you have a key for your luggage, or you may have a key for your bag, etc. Like
this, we will use this key in cryptocurrencies.

Let’s see how :)

You may have heard that bitcoin is based on cryptography, which is a branch of
mathematics used extensively in computer security. Cryptography means “secret
writing” in Greek, but the science of cryptography is more than just secret writing.

Ownership of bitcoin is established through digital keys, bitcoin addresses, and digital
signatures. The digital keys are not actually stored in the network but are instead
created and stored by users in a file, or simple database called a wallet. Keys enable
many of the interesting properties of bitcoin, including decentralized trust and
control, ownership, and a cryptographic-proof security model.

So, here keys come into the picture. let’s explore them.

Private Key
A private key is simply a number, picked at random. Ownership and control over the
private key is the root of user control over all funds associated with the corresponding
bitcoin address. The private key is used to create signatures that are required to spend
bitcoin y providing ownership of funds used in a transaction. The private key must
remain secret at all times because revealing it to third parties is the same as giving
them control over the bitcoins secured by that key.

https://medium.com/coinmonks/public-and-private-keys-in-cryptocurrency-c0910d6a1c20 2/5
2/12/23, 12:15 AM Public and Private Keys in Cryptocurrency | by Blockchain Tech | Coinmonks | Medium

You can pick your private keys randomly using just a coin, pencil, and paper: toss a
coin 256 times and you have the binary digits of a random private key you can use in a
bitcoin wallet. The public key can then be generated from the private key.

Example:
1E99423A4ED27608A15A261A2B0E9E52CED330AC530EDEC322C8FFC6A32S5EFYYCD0D
D

Public Key
The public key is calculated from the private key using elliptic curve multiplication,
which is irreversible: K = k*G, where k is the private key, G is a constant point called
the generator point, and K is the resulting public key. We can generate multiple public
keys from a private key, but it is impossible to generate the private key, from a public
key.

Elliptic curve multiplication is a type of function that cryptographers call a “trap door”
function: it is easy to do in one direction and impossible to do in the reverse direction.
The owner of the private key can easily create the public key and then share it with the
world knowing that no one can reverse the function and calculate the private key from
the public key. This mathematics trick becomes the basis of an unforgettable and
secure digital signature that proves ownership of bitcoin funds.

This is the basic idea about public and private keys. I am sure you got some idea of
how these work inside a cryptocurrency.

https://medium.com/coinmonks/public-and-private-keys-in-cryptocurrency-c0910d6a1c20 3/5
2/12/23, 12:15 AM Public and Private Keys in Cryptocurrency | by Blockchain Tech | Coinmonks | Medium

That’s all for today.

See you soon with a new article!

Join Coinmonks Telegram Channel and Youtube


Channel learn about crypto trading and investing
Also, Read
Bookmap Review | 5 Best Crypto Exchanges in the USA

The Best Crypto Hardware wallet | Bitbns Review

10 Best Crypto Exchange in Singapore | Buy AXS

Red Dog Casino Review | Swyftx Review | CoinGate Review

Best Crypto to Invest in India | WazirX P2P | Hi Dollar Review

Blockchain Cryptocurrency Crypto Bitcoin Cryptography

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

Open in app Sign up Sign In


By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

Search Medium
https://medium.com/coinmonks/public-and-private-keys-in-cryptocurrency-c0910d6a1c20 4/5
2/12/23, 12:15 AM Public and Private Keys in Cryptocurrency | by Blockchain Tech | Coinmonks | Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/public-and-private-keys-in-cryptocurrency-c0910d6a1c20 5/5
2/12/23, 12:17 AM Understanding SegWit. The First layer scaling solution is… | by Ruma Das | Coinmonks | Medium

Published in Coinmonks

Ruma Das Follow

Jun 7, 2020 · 4 min read · Listen

Save

Understanding SegWit

The First layer scaling solution is comprised of 3 different scaling mechanisms:

· Sharding

https://medium.com/coinmonks/understanding-segwit-7a1e206aff7b#:~:text=What is SegWit%3F&text=i.e separating the signatures from,size limit of b… 1/6


2/12/23, 12:17 AM Understanding SegWit. The First layer scaling solution is… | by Ruma Das | Coinmonks | Medium

· Hard fork

· SegWit

In my last two articles, I have already covered Hard Fork and Sharding. So here in this
article, I will focus on the last scaling solution i.e SegWit.

What is SegWit?
SegWit stands for Segregating Witness

i.e separating the signatures from the transactions.

In this process, certain parts of a transaction are removed, which will free up space so
that more transactions can be added to the chain. The idea behind using this method is
to overcome the block size limit of blockchain transactions. In simple terms, SegWit
changed the way data are stored, therefore helping the Bitcoin network to run faster
and more smoothly.

It was suggested as a soft fork change in the transaction format of Bitcoin in the Bitcoin
Improvement Proposal number BIP141.

Problem Statement
In the Bitcoin platform, Blocks are getting generated every 10 minutes and are
constrained to a maximum size of 1 megabyte (MB). As the number of transactions is
increasing, more blocks need to be added to the chain. But due to the block size
constraint, only a certain number of transactions can be added to a block. The weight
of the transactions can cause delays in processing and verifying transactions.
Sometimes, it takes hours to confirm a transaction as valid. This can slow down
further when the network is busy.

The Solution
To overcome the block size limit issue and to enhance the transaction speed, the
transaction is divided into two segments. Removing the unlocking signature (witness)
from the original portion and appending it as a separate structure at the end. The
original portion will still have the sender and receiver data, and the new “witness”
structure would contain scripts and signatures. The original data segment would be

https://medium.com/coinmonks/understanding-segwit-7a1e206aff7b#:~:text=What is SegWit%3F&text=i.e separating the signatures from,size limit of b… 2/6


2/12/23, 12:17 AM Understanding SegWit. The First layer scaling solution is… | by Ruma Das | Coinmonks | Medium

counted normally, but the new “witness” segment becomes one-fourth of its original
size.

Digital signature accounts for 65% of the space in a given transaction.

SegWit is backward compatible, which means nodes that are updated with the SegWit
Bitcoin protocol can still work with nodes that haven’t been updated.

SegWit measures blocks by block weight.

The formula used to calculate block weight:

(tx size with witness data stripped) * 3 + (tx size)

Since segregated witness creates a sidechain where witness data is stored, it prevents
transaction IDs from being altered by dishonest users. It also addresses signature
malleability, by serializing signatures separately from the rest of the transaction data,
so that the transaction ID is no longer malleable.

History
Pieter Wuille, a bitcoin developer, first proposed the concept of SegWit.

On 24 July 2017 as a part of the software upgrade process i.e Bitcoin Improvement
Proposal (BIP) 91, the concept of Segregated Witness is activated at block 477,120.

Within one week of implementation, the bitcoin price seen a spike of 50%. The
transaction usage rate using SegWit further increased from 7% to 10% in the first week
of October. As of February 2018, SegWit transactions exceed 30%.

However, a group of China-based bitcoin miners were unhappy with the


implementation and later forked to created Bitcoin Cash.

Lightning Network — Layer 2 solution


Lightning Network operates on top of bitcoin and is referred to as a “Layer 2”
component. It is an off-chain micropayment system that is designed to enhance the
transaction speed in the blockchain network.

https://medium.com/coinmonks/understanding-segwit-7a1e206aff7b#:~:text=What is SegWit%3F&text=i.e separating the signatures from,size limit of b… 3/6


2/12/23, 12:17 AM Understanding SegWit. The First layer scaling solution is… | by Ruma Das | Coinmonks | Medium

SegWit acts as a base component for the Lightning Network. By implementing SegWit,
the transaction malleability issue can be prevented which will allow this secure
payment system to process millions of transactions per second in the Bitcoin network.

Advantages of SegWit:
· Prevents transaction malleability problem.

· Prevents signature malleability problem.

· Helps in scaling the bitcoin network.

· Increases block size.

· Reduced transaction fees.

· Acts as a base for the lightning protocol.

Conclusion
There is no doubt that Bitcoin technology is very revolutionary but like any other
technology, it has certain drawbacks as well as challenges. Scaling is one of them
which has restricted in large scale applications adopted. It is capable of processing
only 7–10 transactions per second on the base layer. Many developers, researchers
from the Bitcoin community are working hard to overcome the problem. SegWit along
with the Lightning Network together aiming to allow Bitcoin to process millions (or
more) transactions per second. But the real scenario will depend on the success of
future projects.

Get Best Software Deals Directly In Your Inbox

https://medium.com/coinmonks/understanding-segwit-7a1e206aff7b#:~:text=What is SegWit%3F&text=i.e separating the signatures from,size limit of b… 4/6


2/12/23, 12:17 AM Understanding SegWit. The First layer scaling solution is… | by Ruma Das | Coinmonks | Medium

Bitcoin Segwit Lightning Network Blockchain

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

https://medium.com/coinmonks/understanding-segwit-7a1e206aff7b#:~:text=What is SegWit%3F&text=i.e separating the signatures from,size limit of b… 5/6


2/12/23, 12:17 AM Understanding SegWit. The First layer scaling solution is… | by Ruma Das | Coinmonks | Medium
By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

Open in app Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/understanding-segwit-7a1e206aff7b#:~:text=What is SegWit%3F&text=i.e separating the signatures from,size limit of b… 6/6


2/12/23, 12:20 AM Segregated Witness Simplified.. The Cryptocurrency world is abuzz with… | by Geet Sameer | Coinmonks | Medium

Published in Coinmonks

Geet Sameer Follow

Mar 10, 2018 · 5 min read · Listen

Save

Segregated Witness Simplified.


The Cryptocurrency world is abuzz with a new word called Segregated Witness
(SegWit) since the implementation of SegWit in the Bitcoin Network in August 2017.
Many cryptocurrency experts are heralding SegWit as the panacea for Bitcoin
problems. As the world is going gaga over this new technology, many are left
wondering what it means. This article covers everything one needs to know regarding
Segregated Witness. So let’s get started.

Segregated Witness( SegWit):

Before we look at the definition of Segregated Witness, let’s go back to the Bitcoin
History for a better understanding of SegWit.

Blockchain:

Bitcoin is developed in 2009 as a decentralized platform to carry out peer-peer


transactions without the need of a central regulatory. All the transactions are carried
on Blockchain. In simple terms, a blockchain is a network where all the bitcoin
transaction data and bitcoin itself (technically speaking- there are no bitcoins, in
reality, it’s all ledger balances in the blockchain network) gets stored.

Let’s understand, behind the scenes in bitcoin blockchain transaction with an


example.

https://medium.com/coinmonks/segregated-witness-simplified-b0e56103750f 1/7
2/12/23, 12:20 AM Segregated Witness Simplified.. The Cryptocurrency world is abuzz with… | by Geet Sameer | Coinmonks | Medium

A wants to send 1 Bitcoin to B.

For a regular fiat currency (paper money) online transaction, A should have an
account number, transaction password( or PIN) to send the money and of course
money in his bank account. And also A needs B’s bank account number.

Similarly to send Bitcoins A needs an address( which is similar to the bank account), a
private key(identical to transaction password or PIN) to sign the transaction data
digitally, and also A needs the address of B( similar to the bank account).

So when A sends 1 Bitcoin to B, the information goes to blockchain network for


verification. What information goes to the network is illustrated below for your better
understanding.

Verification of transaction:

Verification of Transaction on Blockchain:

As we learned earlier bitcoin is not centrally regulated. Then Who verifies the
transactions? The answer is bitcoin miners. Who are miners? Miners can be anyone. It
can be you or I who verifies the bitcoin transactions using powerful computers. What
do miners get in return? Miners are rewarded with Bitcoins for successful verification
of each transaction.

Let’s look how the verification of the transaction is done on the blockchain.

So first the miners check whether A has sufficient funds that is 1 bitcoin( As told
earlier all the information of bitcoin data and bitcoin itself is stored in Blockchain
network.)

Now the question arises, how do the miners know how many bitcoins A have?

https://medium.com/coinmonks/segregated-witness-simplified-b0e56103750f 2/7
2/12/23, 12:20 AM Segregated Witness Simplified.. The Cryptocurrency world is abuzz with… | by Geet Sameer | Coinmonks | Medium

Simple. Using the digital signature on the transaction data and the Address of A, the
miners run different algorithms on their computer to connect to the place where A’s
bitcoins are stored in the blockchain network. If A has the required bitcoins then
based on the transaction data (send 1 bitcoin to B), the bitcoin is transferred to B.

This is how a transaction is verified on the blockchain.

Now that we are clear on what constitutes a transaction and how it is verified let’s
understand Segregated Witness.

What is Segregated Witness(SegWit)

SegWit is formulated by Dr. Pieter Wuille. Segregated means separation, witness


means digital signature. Segregated Witness is a process by which the block size limit
is increased by segregating the digital signature from the original data.

What does this imply?

As seen earlier any transaction contain digital signature plus original data that is the
address of both sender and receiver and the transaction data. The segwit process
separates the digital signature from data and moves it to a structure towards the end of
the transaction to reduce the size of the transaction, as the digital signature occupies
65% of the transaction space.

Why SegWit:

Ok, now let’s understand why SegWit is implemented in blockchain to increase the
block size.

Before we go into it, let’s understand what a block is.

For any transactions to get verified it needs to be entered into a block.

The original bitcoin block size is only 1 Mb.

The increased usage of bitcoins for payments due to its popularity has resulted in
substantial transactions piling up for verification(As told earlier for any transaction to
be verified, first it needs to be added to a block).

https://medium.com/coinmonks/segregated-witness-simplified-b0e56103750f 3/7
2/12/23, 12:20 AM Segregated Witness Simplified.. The Cryptocurrency world is abuzz with… | by Geet Sameer | Coinmonks | Medium

As you see A’s transaction is put in waiting line (also known as Mempool in
cryptocurrency dictionary). And there is only one more transaction that can be entered
into the present block. If A wants his transaction to be verified fast, he has to pay
higher transaction fee than others before him in the waiting line. That way his
transaction gets recorded in the block before the other two and gets verified.

These cut in lines resulted in higher transaction fees which profited the miners and
exchanges with the actual bitcoin user at a loss.

To address this scalability issue, Segregated Witness process increases the block size
limit(the number of transactions added to a block)without actually increasing the
block size (1Mb) by removing the digital signature (which occupies 65 % of the
transaction volume) and adding it to the end of the transaction.

https://medium.com/coinmonks/segregated-witness-simplified-b0e56103750f 4/7
2/12/23, 12:20 AM Segregated Witness Simplified.. The Cryptocurrency world is abuzz with… | by Geet Sameer | Coinmonks | Medium

Advantages of Segregated Witness:

Scalability — Increase in block size limit increases the number of transactions that
get verified per second.

Malleability- Since the digital signature is detached from the input, the hacker
can’t change the transaction without also nullifying the digital signature which
makes it impossible to alter the data and steal bitcoins.

Get Best Software Deals Directly In Your Inbox

SegWit Vs. SegWit2x:

The segwit process increases the block size limit without increasing the actual size of
the block (1Mb). Whereas proposed SegWit2X increases the block size from the present
1Mb to 2 Mb.

https://medium.com/coinmonks/segregated-witness-simplified-b0e56103750f 5/7
2/12/23, 12:20 AM Segregated Witness Simplified.. The Cryptocurrency world is abuzz with… | by Geet Sameer | Coinmonks | Medium

SegWit was implemented as a soft fork in the bitcoin blockchain on 24th August 2017.
Proposed SegWit2x is the hard fork in the bitcoin blockchain. SegWit2x could not be
implemented as there are no backers.

Platforms which adapted Segregated Witness:

Segregated Witness was implemented on 24th August 2017 in bitcoin blockchain.


SegWit has also been implemented in currencies such as Litecoin, DigiByte, and
Vertcoin.

Click to learn more about blockchains

Bitcoin Cryptocurrency Segwit Blockchain Blockchain Development

Sign up for Coinmonks


By Coinmonks

https://medium.com/coinmonks/segregated-witness-simplified-b0e56103750f 6/7
2/12/23, 12:20 AM Segregated Witness Simplified.. The Cryptocurrency world is abuzz with… | by Geet Sameer | Coinmonks | Medium

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.com/coinmonks/segregated-witness-simplified-b0e56103750f 7/7
2/12/23, 12:22 AM Ch6: Something on Private Key, Public Key & Bitcoin Address | by Khor Aik Cheow, PhD | Medium

Khor Aik Cheow, PhD Follow

Jun 24, 2020 · 4 min read · Listen

Save

Ch6: Something on Private Key, Public Key &


Bitcoin Address

A wallet can contain multiple sets of private & public key pair and bitcoin address. A
private key is private, and you do not share it. You can however share your public key
and bitcoin address with others. However, the public key is very long. Most people
prefer to share bitcoin address, which is a shorter version of the public key. Private key
https://medium.com/@ackhor/something-on-private-key-public-key-bitcoin-address-6b0c18bb7374 1/6
2/12/23, 12:22 AM Ch6: Something on Private Key, Public Key & Bitcoin Address | by Khor Aik Cheow, PhD | Medium

is like a password for the email address where you need to keep it confidential. Bitcoin
address is similar to the email address you share with others so you can receive emails.

If you look at any of the bitcoin transactions on the blockchain explorer, you can see
the bitcoin address (highlighted in red below) on the input and output part of the
transaction.

When you click any of the bitcoin addresses, you will be shown the details of that
particular bitcoin address (such as address, format, number of transactions made,
amount of bitcoins received/sent, final bitcoins balance, and past transactions record).

https://medium.com/@ackhor/something-on-private-key-public-key-bitcoin-address-6b0c18bb7374 2/6
2/12/23, 12:22 AM Ch6: Something on Private Key, Public Key & Bitcoin Address | by Khor Aik Cheow, PhD | Medium

Wallet generates the private key, the corresponding public key and the corresponding
bitcoin address. The relationship between the private key, the public key and the
bitcoin address is shown below. The diagram might look daunting. Don’t worry about
it! Just know that the bitcoin address is generated from the public key; The public key
is generated from the private key.

https://medium.com/@ackhor/something-on-private-key-public-key-bitcoin-address-6b0c18bb7374 3/6
2/12/23, 12:22 AM Ch6: Something on Private Key, Public Key & Bitcoin Address | by Khor Aik Cheow, PhD | Medium

A private key is a 32 bytes number that can be expressed in a few formats:

On the other hand, a public key is a 33/65 bytes number of 66 or 130 characters. Public
key hash is a 20 bytes number of 40 characters. Bitcoin address is 25 bytes number
with 26 to 35 characters, starting with ‘1’, or ‘3’ or ‘bc1’.

Below is a summary table comparing the size of the private key, the public key, the
public key hash and the bitcoin address.

https://medium.com/@ackhor/something-on-private-key-public-key-bitcoin-address-6b0c18bb7374 4/6
2/12/23, 12:22 AM Ch6: Something on Private Key, Public Key & Bitcoin Address | by Khor Aik Cheow, PhD | Medium

Visually, you can see that the public key is the longest string. The bitcoin address is
therefore more ‘share-friendly’ than the public key.

When a receiver gives his/her bitcoin address to a sender, the wallet of the sender will
decode the receiver’s bitcoin address back to public key hash.

Sender’s wallet can then ‘lock’ receiver’s public key hash in a P2PKH (Pay-To-Public-
Key-Hash) payment to receiver. Some articles use ‘bitcoin address’ and ‘public key
hash’ interchangeably. This article separates the two terms to avoid confusion.

https://medium.com/@ackhor/something-on-private-key-public-key-bitcoin-address-6b0c18bb7374 5/6
2/12/23, 12:22 AM Ch6: Something on Private Key, Public Key & Bitcoin Address | by Khor Aik Cheow, PhD | Medium

Beside bitcoin address, receiver’s wallet can also send public key and script hash to
sender’s wallet, so that sender can make a P2PK (Pay-To-Public-Key) and P2SH (Pay-To-
Script-Hash) payment respectively.

Remember
Open in app Sign up Sign In

· A wallet can Search


generate multiple sets of private key, public key & bitcoin address.
Medium

· Private key is secret. You can share bitcoin address.

· Bitcoin address is generated from public key; Public key is generated from private
key.

Blockchain Bitcoin Bitcoin Private Key Bitcoin Addresses Bitcoin Public Key

About Help Terms Privacy

Get the Medium app

https://medium.com/@ackhor/something-on-private-key-public-key-bitcoin-address-6b0c18bb7374 6/6
2/12/23, 12:24 AM Public Keys, Private Keys and Bitcoin Address | by Karthik Margabandu | Medium

Karthik Margabandu Follow

Jul 31, 2017 · 3 min read · Listen

Save

Public Keys, Private Keys and Bitcoin Address


My previous post on the nitty gritty of the transactions covered how peer-to-peer
transactions work in a bitcoin Blockchain. There are 3 items that are imperative for
this — Public Key, Private Key and Transaction Message.

Like any currency, Bitcoins have a controlled supply. The bitcoin generation algorithm
has been defined in such a manner that it takes care of how the coins will be created
and at what rate. There is no centralized party in this process.

Newer coins are generated as and when blocks are added to the chain. This is called
mining. Hence peer-to-peer transactions play a huge part in this as they are indirectly
the trigger.

Private Key is essentially a randomly generated number which is analogous to a


password. Private keys are help in accessing the unspent money associated with the
corresponding public key. It is a 256 bit integer. Private keys help in creating a Digital
Signature which helps the miners verify the identity of the person transacting.

Public Key is the ‘To Address’ in the transaction. It is a pair of two 256 bit numbers (512
binary digits) with a possibility of 2256 combinations. Earlier, the bitcoin Blockchain
followed ‘Pay to Public Key’ transaction method where the ‘To Address’ was the
person’s Public Key.

Both the Private and Public keys are part of the Elliptic Curve Digital Signature
Algorithm (ECDSA). This is a cryptographic algorithm that Bitcoin has adopted to

https://medium.com/@karthikmargabandu7/public-keys-private-keys-and-bitcoin-address-bf26125addf7 1/4
2/12/23, 12:24 AM Public Keys, Private Keys and Bitcoin Address | by Karthik Margabandu | Medium

ensure funds can be accessed and spent only by rightful owners and this can easily be
verified by anybody with access to the books (Blockchain).

In order to improve the security in this transaction process as a fail-safe back-up,


bitcoin moved from ‘Pay to Public Key’ to ‘Pay to Public Key Hash’ system where the ‘To
Address’ was replaced from Public Key to Public Key Hash.

The way these keys work are as follows,

1. Private Key is a randomly generated 256 bit integer that is similar to a password and
is advisable not to share this with others

2. ECDSA helps in deriving the Public key from the Private key

3. The Public Key Hash or more commonly called Bitcoin Address is obtained by
hashing the Public key using RIPMED160 (cryptographic function)
https://medium.com/@karthikmargabandu7/public-keys-private-keys-and-bitcoin-address-bf26125addf7 2/4
2/12/23, 12:24 AM Public Keys, Private Keys and Bitcoin Address | by Karthik Margabandu | Medium

Public Key = ECDSAexponentiation(Private Key)

Bitcoin Address = RIPMED(SHA256(Public Key))

Currently, there are different types of transactions systems that are possible — Pay to
Public Key, Pay to Public Key Hash, Multi-sig (two or more parties are required to sign
the transaction) etc.

These different systems ensure different levels of security and it’s purely up to the user
to determine the kind of transaction system preferred.

Exchanges like Coinbase have a hosted wallet service. This means that the private keys
are not given to the customers. These exchanges manage the private keys through
passwords, 2 step verification, device confirmation etc. This is part of their secure cold
storage technology. Customers only have access to their bitcoin address and the rest is
taken care of by these exchanges.

Scripts in Bitcoin Blockchain

Bitcoin Blockchain network uses scripts which serve as list of instructions for each
transaction to describe how the person receiving the bitcoin can possibly gain access
to it and spend it.

These scripts are part of the ECDSA and help in locking and unlocking the transaction
input and output so that people are able to transact securely.

Eg. The output of a transaction would contain a column ‘Script Public Key’. This is pretty
much the lock for a transaction.

A sample value in this would like — OP_DUP_HASH160<X’s Public Key>OP_EQUAL


OP_CHECKSIG (X is the person to whom the money is being sent)

This is unlocked (X basically accesses this money that he has received) by


<X’s Signature> <X’s Public Key>

These scripts function well for peer-to-peer transactions but is very limited when it
comes to broader applications which led to the foundation of Ethereum Blokchain.
https://medium.com/@karthikmargabandu7/public-keys-private-keys-and-bitcoin-address-bf26125addf7 3/4
2/12/23, 12:24 AM Public Keys, Private Keys and Bitcoin Address | by Karthik Margabandu | Medium

More on this in the subsequent post.

Bitcoin Cryptocurrency Blockchain Technology Internet

80 2

Open in app Sign up Sign In

About Help Search Medium


Terms Privacy

Get the Medium app

https://medium.com/@karthikmargabandu7/public-keys-private-keys-and-bitcoin-address-bf26125addf7 4/4
2/12/23, 12:27 AM Hierarchical Deterministic (HD) Wallet | by Kerala Blockchain Academy | Medium

Kerala Blockchain Academy Follow

Dec 3, 2021 · 6 min read · Listen

Save

Hierarchical Deterministic (HD) Wallet


By Sumi Maria Abraham, Research & Training Engineer Kerala Blockchain Academy

Wallets are something that always stays closer and pampered. Be it the wallet we carry in our
bags or the payment wallets we use for exchanges. They are incredibly dear as they maintain
our assets. Similar is the case of a blockchain wallet. A blockchain wallet allows users to
manage different cryptocurrencies — for example, Bitcoin or Ethereum. It is software that
helps someone exchange funds quickly. Here, the transactions are cryptographically signed;
the user’s privacy and identity are preserved. Blockchain wallets do not store coins, unlike our
traditional wallets. Instead, they keep the keys of the cryptocurrency user. The coins are stored
in the blockchain. The relationship between keys-coins is similar to that between debit/credit
card- fiat currency managed by banks. Like, we conduct transactions using debit/credit cards,
cryptocurrency transactions are conducted using a pair of keys: public key & private key.

https://kbaiiitmk.medium.com/hierarchical-deterministic-hd-wallet-4b883faab955 1/10
2/12/23, 12:27 AM Hierarchical Deterministic (HD) Wallet | by Kerala Blockchain Academy | Medium

In a blockchain wallet, the user’s account address is derived from the public key, and
anyone who knows the public key can transfer the funds quickly. However, the private
key acts like a PIN kept secret as it’s used to transfer funds from an account.

Wallets are classified based on how their keys are generated. They can be non-
deterministic(random) wallets or deterministic (seeded) wallets. In random wallets, the
keys are randomly generated values. However, maintaining a random wallet is
problematic since a user should keep a backup copy of all the keys.

https://kbaiiitmk.medium.com/hierarchical-deterministic-hd-wallet-4b883faab955 2/10
2/12/23, 12:27 AM Hierarchical Deterministic (HD) Wallet | by Kerala Blockchain Academy | Medium

Here comes the seeded wallet as aide. Here, the keys are mathematically generated
from a seed, which is a random alphanumeric number. The seed will have an alternate
representation of 12–24 English words called the seed phrase, which is user-friendly
compared to the alphanumeric representation. An example is shown below

Under seeded wallets, only seed needs to be backed up since the remaining keys can
be retrieved from it. So a single value can represent thousands of keys stored in a
wallet.

Hierarchical Deterministic Wallet (HD Wallet)

HD Wallets generate keys from the master key in a hierarchical manner, following a
tree-like pattern.

https://kbaiiitmk.medium.com/hierarchical-deterministic-hd-wallet-4b883faab955 3/10
2/12/23, 12:27 AM Hierarchical Deterministic (HD) Wallet | by Kerala Blockchain Academy | Medium

Now let us see how keys are generated in HD wallets. For that, we are taking
MetaMask. MetaMask is the commonly used HD wallet to interact with the Ethereum
blockchain.

Let’s go ahead and understand HD keys based on creating a MetaMask Wallet using its
browser extension. Detailed installation procedures and settings are omitted as we
discuss steps related to key generation alone. Check this link for the MetaMask
installation demo video.

Download the MetaMask from here. Complete the signup process. You will be
redirected to a page that has the seed phrase.

https://kbaiiitmk.medium.com/hierarchical-deterministic-hd-wallet-4b883faab955 4/10
2/12/23, 12:27 AM Hierarchical Deterministic (HD) Wallet | by Kerala Blockchain Academy | Medium

Well, How did you get the seed phrase ?. When you sign up, let’s see what MetaMask
does at the back end.

Initially, a random number will be selected as the root seed. The root seed will undergo
certain mathematical transformations, including hashing. The resulting value is used
to construct the seed phrase by choosing a sequence of 12–24 words from a BIP39 word
list. The number of words in the seed phrase depends on the size of the root seed. The
user should keep the Seed phrase secret since the wallet can be recovered using it.
Once the seed phrase is generated, MetaMask will prompt the user to re-enter the seed
phrase.

https://kbaiiitmk.medium.com/hierarchical-deterministic-hd-wallet-4b883faab955 5/10
2/12/23, 12:27 AM Hierarchical Deterministic (HD) Wallet | by Kerala Blockchain Academy | Medium

Next, is the generation of the master key. The root seed is fed as input to a hash
function and, the resulting hash is used to create a master private key and a master
chain code. The hash function consists of multiple stages of mathematical operations.
The concept of hashing is explained here.

The master public key is derived from the master private key, and the account address is
generated from the public key.

The master key is used to generate a sequence of child keys. Each of these child keys
can act as a parent key and generate a series of keys, calling grandchildren of the
master key. This can be repeated any number of times, expanding the tree structure by
increasing the number of levels. Here chain code is a value used for generating child
keys (not to be confused with chain code in Hyperledger Fabric, which refers to a
program).

https://kbaiiitmk.medium.com/hierarchical-deterministic-hd-wallet-4b883faab955 6/10
2/12/23, 12:27 AM Hierarchical Deterministic (HD) Wallet | by Kerala Blockchain Academy | Medium

Changing the index value allows creating the other children in the sequence. In
Bitcoin, each parent key can have 2 billion children keys.

Only the seed phrase, account address and private key will be revealed to the user. The
rest of the values are used for back-end processing alone.

Once you create a MetaMask wallet, an account will be generated by default.

https://kbaiiitmk.medium.com/hierarchical-deterministic-hd-wallet-4b883faab955 7/10
2/12/23, 12:27 AM Hierarchical Deterministic (HD) Wallet | by Kerala Blockchain Academy | Medium

There is an option to export private key, which shows the private key after confirming
the password. The private key will be required if an account needs to be imported to
another wallet.

Further accounts can be created using the options provided in the interface.

You can either create a new account using MetaMask or import an existing account by
specifying the private key.

https://kbaiiitmk.medium.com/hierarchical-deterministic-hd-wallet-4b883faab955 8/10
2/12/23, 12:27 AM Hierarchical Deterministic (HD) Wallet | by Kerala Blockchain Academy | Medium

If anyone tries to create a wallet in another system using your seed phrase, all your
keys can be retrieved using that seed phrase. So do not reveal the seed phrase to
anyone.

There are various types of deterministic wallets. So what is the benefit of using HD
Wallets ? Let us analyze it based on the concepts discussed.

The key generation’s tree structure can reflect the organizational structure in HD
wallets. Each branch or account can be assigned to specific departments or purposes.
It also allows a user to create multiple public keys.

The public-key, private-key, and account addresses are indistinguishable since all
follow alphanumeric format. HD wallets also provide options for creating public keys
without accessing their corresponding private keys. It is, therefore, useful in e-
Open in app Sign up Sign In
https://kbaiiitmk.medium.com/hierarchical-deterministic-hd-wallet-4b883faab955 9/10
2/12/23, 12:27 AM Hierarchical Deterministic (HD) Wallet | by Kerala Blockchain Academy | Medium
Open in app Sign up Sign In
commerce applications like online shopping websites, where a separate address is
required for every transaction. Also, HD wallets can be used in secure servers which
Search Medium
use account addresses to read or receive funds, without providing an option to send
funds from an account. But if an adversary manages to leak a child-private key, it can
be combined with chain code to generate all the private keys of child nodes and the
parent-private key. This situation can be avoided by using the private key to derive the
chain code, which does not reveal any child’s private keys.

HD wallets provide robust privacy as separate keys can be generated for each
transaction. Since you have multiple addresses, others in the network will not be able
to figure out which addresses are linked to you. Your accounts remain secure as long as
the master key is kept secret. If you lose your recovery phrase, your coins may get lost
forever.

Some examples of HD wallets are Electrum, Trezor etc. If you are interested in trying
the key generation, check out this link.

Blockchain Wallet Hd Wallet Public Key Cryptography Private Key Blockchain

71 1

About Help Terms Privacy

Get the Medium app

https://kbaiiitmk.medium.com/hierarchical-deterministic-hd-wallet-4b883faab955 10/10
2/12/23, 12:29 AM Hierarchically Deterministic Wallets — The Concepts | by Vault0x | Vault0x | Medium

Published in Vault0x

Vault0x Follow

Nov 27, 2017 · 7 min read · Listen

Save

Hierarchically Deterministic Wallets — The


Concepts

A wallet is a system which allows the end-user to send and receive cryptocurrency
transactions by using a pair of keys and a deterministic wallet is a system of master
and child keys which are derived from a single starting point known as a seed. The
seed can be used to regenerate a wallet without the need for any other information. It

https://medium.com/vault0x/hierarchically-deterministic-wallets-the-concepts-3aa487e71235 1/8
2/12/23, 12:29 AM Hierarchically Deterministic Wallets — The Concepts | by Vault0x | Vault0x | Medium

is even possible to create public addresses without using private keys. Seeds are
typically serialized into human-readable words in a Mnemonic phrase.

The Bitcoin wallets use randomly generated keys. Early wallets introduced the concept
of backing up the keys. To avoid the necessity for a backup after every transaction, 100
keys are cached in a pool of reserve keys. These wallets should not be shared or used
on multiple systems. They support hiding their private keys by using the wallet
encryption feature and not sharing the password, but such emasculated wallets can no
more generate public keys.

These shortcomings are not found in Deterministic wallets. There is no need for
frequent backups. Elliptic curve mathematics allow schemes where one can calculate
the public keys without revealing the private keys. For example, an e-commerce
business can use web server to create new public addresses for each order or customer
without knowledge of private keys.

However, still deterministic wallets typically consist of a single “chain” of key pairs.
Since, there is only one chain; wallet cannot be shared partially. However, in some
cases one only wants some (public) keys to be shared and recoverable. In the example
of e-commerce, the web server needs access to only the wallets which will be used to
receive payments. Hierarchical deterministic wallets described under BIP-0032 allow
such selective sharing by supporting multiple key pair chains, derived from a single
root.

Key Derivation
Conventions

Bitcoin uses elliptic curve cryptography with the field and curve parameters defined
by secp256k1. As standard conversion functions, we assume:

point(p): returns the coordinate pair resulting from EC point multiplication of the
secp256k1 base point with the integer p.

ser32(i): serialize a 32-bit unsigned integer i as a 4-byte sequence, most significant


byte first.

ser256(p): serializes the integer p as a 32-byte sequence, most significant byte first.

https://medium.com/vault0x/hierarchically-deterministic-wallets-the-concepts-3aa487e71235 2/8
2/12/23, 12:29 AM Hierarchically Deterministic Wallets — The Concepts | by Vault0x | Vault0x | Medium

serP(P): serializes the coordinate pair P = (x,y) as a byte sequence using SEC1’s
compressed form: (0x02 or 0x03) || ser256(x), where the header byte depends on
the parity of the omitted y coordinate in the public key.

parse256(p): interprets a 32-byte sequence as a 256-bit number, most significant


byte first.

Extended Keys

Extended Keys are the major building principles behind the Heuristic Deterministic
wallets. Let’s see how to derive many child keys from a parent key. First of all, we
extend both public and private keys with an extra 256 bits of entropy known as chain
code. This code consists of 32 bytes and is identical for corresponding private and
public keys.

Extended private key: (k, c), with k the normal private key, and c the chain code.
Extended public key: (K, c), where K = point(k) and c the chain code.

Each extended key has 231 normal child keys and 231 hardened child keys. All child
keys have an index. Indices used by the normal child keys are from 0 through 231–1.
The hardened child keys use indices 231 through 232–1. Hardened key indices are also
written as iH representing i+231.

Before we move ahead let’s understand the normal and hardened child keys.
Hardened child key = hash(parent private key + index)
Non-hardened child key = hash(parent public key + index)

When we use an extended public key, we can derive non-hardened child public keys.
This is useful in situations where we want to accept payments without immediately
being able to spend them. For example, if we had a website selling clothes, our web
server could create an extended public key and accept payments. This will prevent any
loss of money in case server gets hacked. So that’s a reason we need non-hardened
derivation.

When we extend a private key, we can also derive hardened keys but with the risk of
putting a hash of our private key on the server.

https://medium.com/vault0x/hierarchically-deterministic-wallets-the-concepts-3aa487e71235 3/8
2/12/23, 12:29 AM Hierarchically Deterministic Wallets — The Concepts | by Vault0x | Vault0x | Medium

Non-hardened public keys also have some limitations and are weaker when an attacker
has:

The extended public key.

One of the derived non-hardened private keys.

In this circumstance, it’s possible to work out the private key of the extended public
key. Then we can get every key that can be derived from it, hardened and non-
hardened.

Child Keys Derivation

To compute the corresponding child extended key, we need parent extended key and
an index i. Depending on child key being hardened or non-hardened and parent key
being private or public keys, a different algorithm is used.

Derive private child key from private parent key

The function CKDpriv((kpar, cpar), i) → (ki, ci) computes a child extended private key
from the parent extended private key:

Check whether i ≥ 2³¹ (whether the child is a hardened key). If so (hardened child):
let I = HMAC-SHA512(Key = cpar, Data = 0x00 || ser256(kpar) || ser32(i)). (Note: The
0x00 pads the private key to make it 33 bytes long). If not (normal child): let I =
HMAC-SHA512(Key = cpar, Data = serP(point(kpar)) || ser32(i))

Split I into two 32-byte sequences, IL and IR.

The returned child key ki is parse256(IL) + kpar (mod n).

The returned chain code ci is IR.

In case parse256(IL) ≥ n or ki = 0, the resulting key is invalid, and one should


proceed with the next value for i. (Note: this has probability lower than 1 in 2¹²⁷.)

Derive public child key from public parent key

https://medium.com/vault0x/hierarchically-deterministic-wallets-the-concepts-3aa487e71235 4/8
2/12/23, 12:29 AM Hierarchically Deterministic Wallets — The Concepts | by Vault0x | Vault0x | Medium

The function CKDpub((Kpar, cpar), i) → (Ki, ci) computes a child extended public key
from the parent extended public key. It is only defined for non-hardened child keys.

Check whether i ≥ 2³¹ (whether the child is a hardened key). If so (hardened child):
return failure. If not (normal child): let I = HMAC-SHA512(Key = cpar, Data =
serP(Kpar) || ser32(i)).

Split I into two 32-byte sequences, IL and IR.

The returned child key Ki is point(parse256(IL)) + Kpar.

The returned chain code ci is IR.

In case parse256(IL) ≥ n or Ki is the point at infinity, the resulting key is invalid,


and one should proceed with the next value for i.

Derive public child key from private parent key

To formulate the public child key from private parent key. The functions defined above
can directly be used:

To compute the public child key of a parent private key:

N(CKDpriv((kpar, cpar), i)) (works always).

CKDpub(N(kpar, cpar), i) (works only for non-hardened child keys).

Derive private child key from public parent key

This is not possible as the public key doesn’t hold the required information.

Building the Key Tree

We build the tree up with one root, the master extended key m. By evaluating
CKDpriv(m,i), which is defined above for several values of i, we get a number of level-1
derived nodes. As each of these is again an extended key, CKDpriv can be applied to
those as well.

To shorten notation, BIP-0032 defined CKDpriv(CKDpriv(CKDpriv(m,3H),2),5) as


m/3H/2/5. So this notation represent the the level 3 key at index 5.
https://medium.com/vault0x/hierarchically-deterministic-wallets-the-concepts-3aa487e71235 5/8
2/12/23, 12:29 AM Hierarchically Deterministic Wallets — The Concepts | by Vault0x | Vault0x | Medium

Equivalently for public keys, we write CKDpub(CKDpub(CKDpub(M,3),2),5) as M/3/2/5.

This results in the following identities:

N(m/a/b/c) = N(m/a/b)/c = N(m/a)/b/c = N(m)/a/b/c = M/a/b/c.

N(m/aH/b/c) = N(m/aH/b)/c = N(m/aH)/b/c.

However, N(m/aH) cannot be rewritten as N(m)/aH, as the latter is not possible.

source: https://github.com/bitcoin/bips/blob/master/bip-0032/derivation.png

Master Key Generation

The total number of possible extended key pairs is almost 2512, but produced keys are
only 256 bits long. Master keys are generated from potentially short seed value and not
directly.

Generate a seed byte sequence S of a chosen length (between 128 and 512 bits; 256
bits is advised) from a (P)RNG.

https://medium.com/vault0x/hierarchically-deterministic-wallets-the-concepts-3aa487e71235 6/8
2/12/23, 12:29 AM Hierarchically Deterministic Wallets — The Concepts | by Vault0x | Vault0x | Medium

Calculate I = HMAC-SHA512(Key = “Bitcoin seed”, Data = S)

Split I into two 32-byte sequences, IL and IR.

Use parse256(IL) as master secret key, and IR as master chain code.

In case IL is 0 or ≥n, the master key is invalid.

Serialization of Keys

Extended public and private keys are serialized as follows:

4 byte: version bytes (mainnet: 0x0488B21E public, 0x0488ADE4 private; testnet:


0x043587CF public, 0x04358394 private)

1 byte: depth: 0x00 for master nodes, 0x01 for level-1 derived keys, ….

4 bytes: the fingerprint of the parent’s key (0x00000000 if master key)

4 bytes: child number. This is ser32(i) for i in xi = xpar/i, with xi the key being
serialized. (0x00000000 if master key)

32 bytes: the chain code

33 bytes: the public key or private key data (serP(K) for public keys, 0x00 || ser256(k)
for private keys)

This 78 byte structure can be encoded like other Bitcoin data in Base58, by first adding
32 checksum bits (derived from the double SHA-256 checksum), and then converting to
the Base58 representation. This results in a Base58-encoded string of up to 112
characters. Because of the choice of the version bytes, the Base58 representation will
start with “xprv” or “xpub” on mainnet, “tprv” or “tpub” on testnet.

When a serialized extended public key is imported, the implementation verifies if a


point on the curve corresponds to an X coordinate in the public key. The extended
public key will not be valid if this is not verified.

This section specified key trees and their nodes. The next step is to create a wallet
structure on this tree. The clients are encouraged to use this layout as a guide, though

https://medium.com/vault0x/hierarchically-deterministic-wallets-the-concepts-3aa487e71235 7/8
2/12/23, 12:29 AM Hierarchically Deterministic Wallets — The Concepts | by Vault0x | Vault0x | Medium

the layout defined in this section is a default only. In the next section we will discuss
how this concept can be used to apply to different types of wallets? And how this
makes a more secure wallet?

Bitcoin Blockchain Hd Wallet Cryptography

About Help Terms Privacy

Open in app Sign up Sign In


Get the Medium app

Search Medium

https://medium.com/vault0x/hierarchically-deterministic-wallets-the-concepts-3aa487e71235 8/8
2/12/23, 12:43 AM What is Ethereum?. The ultimate guide to understand… | by Michele D'Aliessi | Medium

Michele D'Aliessi Follow

Jan 8, 2018 · 8 min read · Listen

Save

What is Ethereum?
The ultimate guide to understand Ethereum in simple words.

In a nutshell: Ethereum is a powerful, decentralised, super computer running on


blockchain technology. Some key innovations make Ethereum a unique project with all
the necessary building blocks to create a new, better, more secure, privacy and trust
oriented internet. And that’s a big deal.

Why is it so interesting?
Well, first of all it is “decentralised”: this global computer runs on a network of
machines (nodes) distributed around the world (more specifically, it runs on a
blockchain). This means that it cannot be stopped, you can’t just unplug it or halt its
operations. In fact, anyone who wants to run a node of the network can do so from any

https://medium.com/@micheledaliessi/what-is-ethereum-f4c5e566ff77#:~:text=In a nutshell%3A Ethereum is,privacy and trust oriented internet. 1/8


2/12/23, 12:43 AM What is Ethereum?. The ultimate guide to understand… | by Michele D'Aliessi | Medium

computer connected to the internet, without asking for permission. Also, being
decentralised, it cannot be easily hacked¹ because there is no central point of failure.

“It’s ubiquitous, where there is internet there is Ethereum.” - by Gavin Wood

Who actually runs Ethereum then? It doesn’t belong to anyone. There is no single
entity who controls it, as of today it is governed by a community of software developers
that write code and run the nodes of the network using their computers. With no single
entity managing it, Ethereum is a truly decentralised project which is being built by
the crowdsourced work of many skilled computer programmers. The efforts for
improving Ethereum technology are coordinated by the Ethereum Foundation, a non
for profit organisation who’s mission is to “[…] build a more globally accessible, more
free and more trustworthy Internet”.

It’s an open project, in fact anyone can make use of this global computer. It can have as
many users as we want, and anyone can both read the code that such computer is
running or write new code that the computer can run. This means you can run your
own applications on it, or just use applications developed by others. Ethereum code is
open source and available on github.com/ethereum.

There is no middleman, users can interact directly with other users with no third party
involved. And when you decide to interact via an application built on Ethereum by a
third party you can read the code directly to make sure the application does what it
says it does. No middleman, no surprises².

The code running on Ethereum is immutable. The transactions, the data stored, the
programs written are permanent. Once deployed on the global computer they cannot
be changed. This means that not only you can verify the code of any application and
understand what it does, but it also means once you’ve verified it you can be sure
nobody will be able to change it ex-post. Written, running code cannot be changed³.

The interactions with this computer are extremely secure. In fact, any interaction with
the computer (being it deploying new code, interacting with existing applications or
exchanging value) is cryptographically signed - which in simple words means that it
can not be altered or replicated⁴.

https://medium.com/@micheledaliessi/what-is-ethereum-f4c5e566ff77#:~:text=In a nutshell%3A Ethereum is,privacy and trust oriented internet. 2/8


2/12/23, 12:43 AM What is Ethereum?. The ultimate guide to understand… | by Michele D'Aliessi | Medium

You own your data, you keep your value. On Ethereum each user will be able to decide
which data to share and which data to keep, so you will be in full control of who uses
your data and what for. Moreover, should your data generate value (i.e. like all the data
you share on Facebook, that is a goldmine for advertisers) you will be able to retain
(and profit from) that value too.

As you can see from the chart below, Ethereum attracted a lot of attention lately and its
adoption rate is growing exponentially.

Number of transactions per day on Ethereum. Source: Etherscan.io

So, what can Ethereum be used for?


Ethereum aims to be a platform on which anyone can create applications for value and
data exchange. Its technology is based on “smart contracts”, programs that run on
Ethereum and execute transactions of value and information.

Let me give you an example. Imagine Jack has solar panels installed on his roof and his
neighbour Alice would like to use Jack’s renewable energy to recharge her electric bike
during peak time at midday. However, each charge is worth just a few cents and they
don’t want to deal with exchanging a few pennies every day after each charge. If Jack
and Alice would like to automate the payment in a smooth, seamless fashion they
could just write a smart contract on Ethereum (nothing crazy, it’s just some code) that
checks how much energy Alice’s bike is using from Jack’s solar panels, multiplies it by
the current electricity market price (at the time of the charge) and transfers the correct

https://medium.com/@micheledaliessi/what-is-ethereum-f4c5e566ff77#:~:text=In a nutshell%3A Ethereum is,privacy and trust oriented internet. 3/8


2/12/23, 12:43 AM What is Ethereum?. The ultimate guide to understand… | by Michele D'Aliessi | Medium

amount from Alice’s account to Jack’s one automatically. Done. No third party. No extra
fees charged.

Is the technology ready to be used? Yes, so much so that the United Nations are using
it to provide food to thousands of refugees.

Ethereum can be used to build unstoppable


applications that coordinate the exchange of value
and information for the public.
Here below are some of the most interesting applications that can be built on Ethereum
(with some real examples):

Identity management. Since each user on the Ethereum platform signs digitally all
his/her interactions with smart contracts or other users, it is possible to associate
an identity to a user and all actions performed by that user will be connected to
his/her identity. - Civic and Blockstack are two projects that aim at managing identity
on the blockchain.

Trust and Transparency. Every time an agreement can be expressed via


programming language, smart contracts can be used as a way to replace (and
enforce) contracts between parties. It can also be used for transparency. For
example: let’s say you want to donate to a non-for-profit organisation but want to
make sure they use the funds to support clean water projects in Africa. You can
write an application on Ethereum that monitors how your funds are used in real
time. - Take a look at AidCoin.

Crowdfunding. Ethereum smart contracts allow you to generate tokens that can be
sold in exchange for “real money”, effectively funding your new project or new
venture. Very much like Kickstarter or Indiegogo, but without the need to rely on a
third party. - Read more about Initial Coin Offering (ICO).

Marketplaces. Imagine building an Airbnb where guests can interact directly with
hosts and that has no service charges, or a Facebook where users interact directly
own all their data and get a share of the payment advertisers do to gain their

https://medium.com/@micheledaliessi/what-is-ethereum-f4c5e566ff77#:~:text=In a nutshell%3A Ethereum is,privacy and trust oriented internet. 4/8


2/12/23, 12:43 AM What is Ethereum?. The ultimate guide to understand… | by Michele D'Aliessi | Medium

attention. Ethereum enables that too. - A decentralised version of LinkedIn called


Indorse is already live.

Copyright/ownership repository. When you send a transaction on the Ethereum


network the information you add to such transaction are permanently stored on
the Ethereum blockchain. They are immutable, have a time stamp of when they
have been added and cannot be removed. For these reasons you can store a proof
of ownership, register your IP or the copyright of a song or a book, on the
Ethereum blockchain with the certainty that nobody can delete it and you will
always be able to prove that you are the author/owner of such document. - MIT
built a system to release certificates on the blockchain called Blockcerts.

Governance. Ethereum is a good platform to handle voting systems at scale. Since


each user of this global computer can interact with it in a secure way, Ethereum
can be used to implement voting systems for elections, corporate governance,
decision making and consensus agreement. - Abu Dhabi Stock Exchange and the
Russian government are now experimenting voting systems based on blockchain.

So, Ethereum is an extremely powerful platform on which we can build applications


that can exchange value and information in a very secure way. Being still in its infancy
it has several limits (i.e. it can only execute 10–15 transactions per second at the
moment), but it is evolving rapidly thanks to the large community of developers
working on it. Hopefully, this new technology will be leveraged to solve some of the
biggest problems we are facing today and not just to collect some virtual kitties.

How can I use Ethereum?


The first step to use Ethereum is to get your own Ethereum wallet and buy some Ether
(ETH) in order to make your first transactions. You can do so on exchanges like
Coinbase (10$ for free with my invitation). Once you have set up your wallet, you can
interact with Ethereum applications and transfer Ether between accounts. If you would
like to learn how to code in Solidity (the programming language of Ethereum), these
zombies are a good way to get started. Are you a developer? Here you can find an in-
depth, professional course to learn how to program Ethereum.
https://medium.com/@micheledaliessi/what-is-ethereum-f4c5e566ff77#:~:text=In a nutshell%3A Ethereum is,privacy and trust oriented internet. 5/8
2/12/23, 12:43 AM What is Ethereum?. The ultimate guide to understand… | by Michele D'Aliessi | Medium

If you would like to learn more about how Ethereum works behind the scenes, the
short article below covers the logic and mechanics of how Ethereum works.

How Does Ethereum Work?


The logic and mechanics behind Ethereum explained in simple words.
medium.com

Useful links
Learn more about Ethereum project - link

See the network of computers running Ethereum in real time - link

How to get your own Ethereum online wallet - 10$ free on Coinbase

How to keep your Ether safe - link

How to install and run your own Ethereum node - link (pro)

Learn more about how the blockchain works - link

How to keep your Ether safe - link

If you found this article useful please hit the “Clap” button👏 on the left as many times as
you feel like or donate some Ether (ETH) to my address below:
0x7cf57FE1310f832B16bE1f38c2710bDfD2f820D5

Notes:

https://medium.com/@micheledaliessi/what-is-ethereum-f4c5e566ff77#:~:text=In a nutshell%3A Ethereum is,privacy and trust oriented internet. 6/8


2/12/23, 12:43 AM What is Ethereum?. The ultimate guide to understand… | by Michele D'Aliessi | Medium

1. In order to “hack” the network, a potential hacker would need to control 51% of the
computing power of the whole network and forge malicious blocks. This is really
hard to do because the mechanics of how blockchain works. Follow this link if you
want to learn more.

2. Surprises can still happen if hackers mess up with the code. While it’s hard to hack
the blockchain which runs Ethereum, it’s fairly easy to identify bugs in the smart
contracts used to run applications on top of this platform. Therefore, proof testing
the code of smart contracts becomes essential to avoid major hacks.

3. The deployed code cannot be changed unless the community running the whole
network agrees to do so with a “hard fork” or “soft fork”. These forks are hard to
implement and rewrite part of the blockchain database behind Ethereum. You can
learn more about blockchain forks on Wikipedia.

4. Transactions on the Ethereum network are signed with “asymmetrical


cryptography”, it’s a strong encryption system that makes sure information cannot
be altered unless the sender of that information wants to. You can read more about
it here.

How Does the Blockchain Work?


Blockchain technology explained in simple words
medium.com

Blockchain Ethereum Ethereum Blockchain ICO Bitcoin

https://medium.com/@micheledaliessi/what-is-ethereum-f4c5e566ff77#:~:text=In a nutshell%3A Ethereum is,privacy and trust oriented internet. 7/8


2/12/23, 12:43 AM What is Ethereum?. The ultimate guide to understand… | by Michele D'Aliessi | Medium

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.com/@micheledaliessi/what-is-ethereum-f4c5e566ff77#:~:text=In a nutshell%3A Ethereum is,privacy and trust oriented internet. 8/8


2/12/23, 12:45 AM Everything You Need To Know About Ethereum — For Beginners | by Mofrad Muntasir | DataDrivenInvestor

Published in DataDrivenInvestor

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

Mofrad Muntasir Follow

Mar 10, 2022 · 7 min read · · Listen

Save

Everything You Need To Know About Ethereum


— For Beginners
Ethereum is more than a cryptocurrency — it’s a platform to use
Blockchain technology for numerous purposes

https://medium.datadriveninvestor.com/everything-you-need-to-know-about-ethereum-for-beginners-3f8790a5bed9 1/10
2/12/23, 12:45 AM Everything You Need To Know About Ethereum — For Beginners | by Mofrad Muntasir | DataDrivenInvestor

Photo by Kanchanara on Unsplash

In 2008, a person ( or a group of people) with the pseudonym “Satoshi Nakamoto”


popularized blockchain by introducing the cryptocurrency bitcoin. Since then, Bitcoin
& other cryptocurrencies (and NFTs recently) have been regularly hitting the
headlines.

By 2011, many individuals became interested in earning Bitcoin and one of them was a
17-year-old named Vitalik Buterin. To earn Bitcoin, he started writing for Bitcoin Weekly
— the owner of which offered 5 Bitcoins per article. When that site closed down due to
insufficient funds, Mihai Alisie reached out to Vitalik to start a new publication. They
formed the Bitcoin Magazine — later dubbed as the first serious publication on
cryptocurrencies.

Fast forward to 2013, Vitalik published a white paper arguing that “Bitcoin needed a
scripting language for application development”. When that thought failed to gain
traction, he proposed the development of a new platform. From there, along with
Gavin Wood, Joseph Lubin, and Charles Hoskinson, he co-founded Ethereum.

https://medium.datadriveninvestor.com/everything-you-need-to-know-about-ethereum-for-beginners-3f8790a5bed9 2/10
2/12/23, 12:45 AM Everything You Need To Know About Ethereum — For Beginners | by Mofrad Muntasir | DataDrivenInvestor

Ethereum Is More Than a Cryptocurrency


It’s a decentralized computer network enabled by a cryptocurrency called Ether. Of
course like Bitcoin, Ether can be traded for cash. But that’s not the main purpose of
Ethereum.

The main intention of Ethereum is to provide a decentralized network that can be used
to build and run applications. Similarly, Ether’s main purpose is to power this network.

Ethereum is also powering NFTs because of ERC-721 NFT Token Standard. This token
allows a person to permanently link a digital asset to the token.

We can compare Ethereum with an operating system like iOS. It hosts


the environment where you can build apps and interact. Like Apple Pay,
Ether enables transactions and can be traded (although differently).

The 3 layers of Ethereum


Ethereum has 3 layers — EVM (Ethereum Virtual Machine), Ether, and Gas.

Ethereum Virtual Machine (EVM)


Ethereum.org compares EVM with a cloud or an ocean wave. EVM exists as one single
entity maintained by thousands of connected computers running an Ethereum client.

Ethereum Virtual Machine (EVM) is a virtual machine that acts as a decentralized


computer. This virtual machine is the backbone of Ethereum’s entire operating
structure.

The Ethereum protocol keeps the continuous, uninterrupted, and immutable


operation. EVM deploys extra functionalities to the Blockchain to ensure users face
limited issues on the distributed ledger.

https://medium.datadriveninvestor.com/everything-you-need-to-know-about-ethereum-for-beginners-3f8790a5bed9 3/10
2/12/23, 12:45 AM Everything You Need To Know About Ethereum — For Beginners | by Mofrad Muntasir | DataDrivenInvestor

In addition, EVM enables the environment for building, deploying, and operating
Smart Contracts. These Smart Contracts are essential in building Decentralized Apps
(dApps).

EVM is the bridge that creates the user interface for Blockchain
technology. Like Shopify uses the web to enable end users, EVM (in a
more robust way) uses Blockchain to make it accessible to end users.

Ether
However, running EVM is not cheap.

Ether is the cryptocurrency that pays for the operations within the Ethereum network.
Every program, action, and service in the Ethereum network requires computing
power. Ether is the payment method network participants use to complete operations.

If you are familiar with how Blockchain works, you know that to
establish a block, miners have to complete a complex mathematical
equation. After completing an equation in Blockchain, miners get
Bitcoin as a reward. Ether serves the same purpose for Ethereum.

In addition to that, Ether is required for every transaction and using or building any
dApp. The user who requests the transaction can set the amount of Ether they’re
willing to pay. However, higher payment guarantees faster processing time. Crypto
wallets like Metamask allow users to see how much time is required to complete a transaction
and show a recommended fee.

Gas
The same way a car needs fuel, gas powers the Ethereum network. It is the unit that
refers to the amount of computational effort required for completing operations on the
Ethereum network.

Each Ethereum transaction requires a fee to compensate for the computational


resources it requires. Gas shows the required fee to successfully conduct a transaction.

https://medium.datadriveninvestor.com/everything-you-need-to-know-about-ethereum-for-beginners-3f8790a5bed9 4/10
2/12/23, 12:45 AM Everything You Need To Know About Ethereum — For Beginners | by Mofrad Muntasir | DataDrivenInvestor

To purchase gas, users need to spend Ether. The unit used for Gas is Gwei (Giga Wei)
which equals 0.000000001 ETH. Gas price is usually a multiple of Gwei.

After the London Upgrade in September 2021, a base fee has been set for each block.
Users can add a tip (priority fee) with the base fee if they want to reward the miner
more.

For example, John wants to send 1 Ether to Edith. That transaction has
a gas limit (requirement) of 10,000. The base price of gas is 100 Gwei
and John adds 10 Gwei as the tip. Total transaction fee would be = Gas
Limit * (Base Price + Tip) = 10,000 * (100 + 10) = 1100000 Gwei. That
equates to 0.0011 ETH. In total, John will pay 1.0011 ETH, Edith will
receive 1 ETH and the miner will get 0.0011 ETH.

Some Uses of Ethereum & Ether

https://medium.datadriveninvestor.com/everything-you-need-to-know-about-ethereum-for-beginners-3f8790a5bed9 5/10
2/12/23, 12:45 AM Everything You Need To Know About Ethereum — For Beginners | by Mofrad Muntasir | DataDrivenInvestor

Photo by Kanchanara on Unsplash

Building on an innovative decentralized network enabled by Bitcoin cryptocurrency,


Ethereum created a global decentralized computer network that connects a
marketplace of decentralized applications (dApps). These apps and Ethereum provide
unprecedented security and efficiency. Using simple yet efficient Smart Contracts,
Ethereum has been used for applications in various fields. Let’s look at some examples
of how Ethereum can be used —

Games like Cryptokitties, Acebusters

Cloud-based operating systems

Identity verification

Currency exchange

E-commerce

Documenta notarization

Social Network

Message Platform

Decentralized News verification

While most cryptocurrencies are used as a payment method or a tool of trading, Ether
is more than that. It also has multiple uses — thanks to the main purpose of Ethereum.
They are —

Trade for other cryptocurrencies & NFT

Exchange with government-issued Fiat currency

Use to operate dApps

Purchase gas to conduct any transaction

Because of these additional usages, Ether’s price may have more stability than other
cryptocurrencies. Although the jury is still out on that, it’s obvious that with more
https://medium.datadriveninvestor.com/everything-you-need-to-know-about-ethereum-for-beginners-3f8790a5bed9 6/10
2/12/23, 12:45 AM Everything You Need To Know About Ethereum — For Beginners | by Mofrad Muntasir | DataDrivenInvestor

widespread use, there would always be a steady demand for Ether. That might also
mean that Ether’s price will not go as high as Bitcoin as the other operations will likely
get hampered then.

Differences between Ether & Bitcoin


Shorter block time: Block time refers to the speed of adding a block to the
blockchain. In Ethereum, it takes 10–20 seconds whereas Bitcoin mining takes ~10
minutes.

Limited Bitcoin causes fewer rewards: Bitcoin has a hard cap of 21 million
meaning in total there can’t be more than 21 million Bitcoins. Currently, over 18
million are in circulation. It’s getting harder to get rewarded for Bitcoin mining.
Ethereum, on the other hand, has an annual cap of 18 million which allows miners
to get rewards consistently. ~120 million Ethers are in circulation right now.

Partial reward: If two miners solve the equation at the same time but one of them
gets ahead because of lag time, that miner will become the winner of the reward.
Bitcoin doesn’t reward the second miner. For smaller-scale miners, that can be a
problem. Ethereum partially rewards the second miner to keep the pool
competitive.

Some of The Challenges of Ethereum


While Ethereum is the most prominent way of making blockchain technology
widespread & accessible, it doesn’t come without some challenges.

There’s not much room for experimentation as users have to pay for each
transaction. The paywall is likely to discourage users to explore usages beyond
existing ones. For developers, Ethereum has test networks that provide dummy
ETH for testing. A similar method needs to be incorporated for end-users to ensure they
don’t have to spend (at least not much) in the learning period.

https://medium.datadriveninvestor.com/everything-you-need-to-know-about-ethereum-for-beginners-3f8790a5bed9 7/10
2/12/23, 12:45 AM Everything You Need To Know About Ethereum — For Beginners | by Mofrad Muntasir | DataDrivenInvestor

The transaction speed is faster than Bitcoin but much slower than an optimized
centralized network. Ethereum is planning to move from the “Proof of Work” to the
“Proof of Stake” concept. That might improve the transaction speed.

To summarize
Blockchain technology has taken the world by storm. In just a decade, it has created a
new dimension of tech with significant financial value.

While this guide may work as an entry to the world of Ethereum, it’s important to stay
abreast with the latest changes. This is a fast-moving tech that has been changing
substantially every year.

Since becoming a Medium Paid Member in September 2020, I learned a boatload about
marketing strategy & data-driven marketing — resulting in better performance at my work.
Articles on personal growth also helped me in my personal growth. If you are not a member,
become one by clicking the link below. It’s only $5 a month and the content you’d get is
incredibly good.

Join Medium with my referral link - Mofrad Muntasir


As a Medium member, a portion of your membership fee goes to writers
you read, and you get full access to every story…
kmofradm.medium.com

A portion of your membership will go to support the author & other Medium
contributors at no extra cost to you.

Source:

1. Vitalik Buterin

https://medium.datadriveninvestor.com/everything-you-need-to-know-about-ethereum-for-beginners-3f8790a5bed9 8/10
2/12/23, 12:45 AM Everything You Need To Know About Ethereum — For Beginners | by Mofrad Muntasir | DataDrivenInvestor

2. https://ethereum.org/en/developers/docs/evm/

3. https://coinmarketcap.com/alexandria/glossary/ethereum-virtual-machine-evm

4. https://www.investopedia.com/terms/e/ether-cryptocurrency.asp

5. https://www.techrepublic.com/article/ethereum-a-cheat-sheet-for-professionals-
everything-you-need-to-
know/#:~:text=In%20short%2C%20Ethereum%20is%20a,mining%20done%20by%2
0other%20users.

6. https://ethereum.org/en/history/

7. https://ethereum.org/en/developers/docs/smart-contracts/

8. https://www.investopedia.com/terms/p/proof-stake-pos.asp

Schedule a DDIChat Session in Blockchain and Cryptocurrency:

Experts - Blockchain and Cryptocurrency - DDIChat


DDIChat allows individuals and businesses to speak directly with
subject matter experts. It makes consultation fast…
app.ddichat.com

Apply to be a DDIChat Expert here.


Work with DDI: https://datadriveninvestor.com/collaborate
Subscribe to DDIntel here.

Blockchain Cryptocurrency Ethereum Business Investing

https://medium.datadriveninvestor.com/everything-you-need-to-know-about-ethereum-for-beginners-3f8790a5bed9 9/10
2/12/23, 12:45 AM Everything You Need To Know About Ethereum — For Beginners | by Mofrad Muntasir | DataDrivenInvestor

Get an email whenever Mofrad Muntasir publishes.


By signing up, you will create a Medium account if you don’t already have one. Review
our Privacy Policy for more information about our privacy practices.

Subscribe

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.datadriveninvestor.com/everything-you-need-to-know-about-ethereum-for-beginners-3f8790a5bed9 10/10
2/12/23, 12:48 AM Measuring Ethereum Nodes. There was a post recently comparing… | by Igor Artamonov | Coinmonks | Medium

Published in Coinmonks

Igor Artamonov Follow

Oct 8, 2019 · 5 min read · Listen

Save

Measuring Ethereum Nodes


There was a post recently comparing online nodes for Ethereum and Bitcoin, where I
mentioned in comments that numbers related to Ethereum are not representative
enough.

https://medium.com/coinmonks/measuring-ethereum-nodes-530bfff08e9c 1/10
2/12/23, 12:48 AM Measuring Ethereum Nodes. There was a post recently comparing… | by Igor Artamonov | Coinmonks | Medium

William Mougayar ⬢ · Sep 22, 2019


@wmougayar · Follow
Global Rankings of 33 Live Blockchains by Active Nodes.
#1. Ethereum 9,157
#2. Bitcoin 8,702
Full spreadsheet here.
docs.google.com/spreadsheets/d…
(Upcoming blog post with more details, stay tuned)
Data sampled Sept 19-21 2019. Total nodes: 43,380.

Igor Artamonov
@splix · Follow

Ethernodes shows all Ethereum compatible nodes with


network id 1, which includes ETC, Callisto, Nekonium and
like a couple of thousand of nodes with non-eth genesis
block (tests?) or in syncing (so may become etc after
passing block 1920k)
9:23 PM · Sep 23, 2019

2 Reply Share

Read more on Twitter

https://medium.com/coinmonks/measuring-ethereum-nodes-530bfff08e9c 2/10
2/12/23, 12:48 AM Measuring Ethereum Nodes. There was a post recently comparing… | by Igor Artamonov | Coinmonks | Medium

I’ve been tracking online Ethereum nodes for some time now, so I have all this data for
further analysis. I publish some of the results for the Ethereum Classic network on the
Gastracker page, though I have more detailed data, with deeper insights about all
Ethereum based networks.

So what is the problem with crawling the Ethereum network? First and the most obvious
obstacle is the existence of Ethereum and Ethereum Classic because both share the
same protocol, same identifiers, and same initial history, including genesis block.
Nodes from both networks sporadically connect to each other, exchanging new
transactions and data from a shared history. By connecting to an ETH node, you can’t
be sure that all of its peers are ETH nodes as well. Initial Handshake doesn’t provide
enough information, so a node keeps connections even with a peer from another
network, telling other ETH nodes about that node, and so on.

Network ID 1 is not Ethereum


That’s the main issue with data provided by services like Ethernode. It just shows all
nodes, regardless of the actual chain. It, in fact, doesn’t say “ETH nodes” anywhere, but
“nodes with network id 1”, which is shared by a few different blockchains, not only ETH
and ETC.

The only way to distinguish them is to connect to them and download part of the
blockchain history, as it has different blocks for different forks. From my experience,
less than ~70% of such nodes are actual Ethereum nodes.

Here is a distribution of nodes per chain with network id = 1, i.e., all of them are in the
same bucket on the Ethernodes page.

https://medium.com/coinmonks/measuring-ethereum-nodes-530bfff08e9c 3/10
2/12/23, 12:48 AM Measuring Ethereum Nodes. There was a post recently comparing… | by Igor Artamonov | Coinmonks | Medium

Unique nodes for the past 7 days; unknown — nodes here are nodes that respond with network_id 1, but their
genesis block doesn’t match any of well-known blockchains; eth_or_etc — are nodes just shares commons
history of ETC and ETH; usually, those nodes are just doing the initial sync

In total there are ~10,000 nodes, with only ~6000 ETH nodes, 1000 of ETC nodes, and
2000+ of other networks.

Compare to distribution of all Ethereum based networks (i.e. not only network_id = 1):

Unique nodes for the past 7 days

One thing that may be misleading here is that not all 6000 of such nodes are always
available. The data above is based on the past 7 days, and it includes all nodes that
https://medium.com/coinmonks/measuring-ethereum-nodes-530bfff08e9c 4/10
2/12/23, 12:48 AM Measuring Ethereum Nodes. There was a post recently comparing… | by Igor Artamonov | Coinmonks | Medium

showed up at least once. Though during a typical day less than half of them are online:

Unique ETH nodes per day

Geth vs Parity
The other thing is the difference between Geth and Parity behavior. These two are
leading node implementations, and they share most of the market. However, it’s tough
to measure the exact numbers of their shares, and any mistake in bot logic leads to
distortion of resulting numbers.

Why is that? It seems that Parity and Geth have different usage scenarios; first is
prevailing on servers, and second is more common on desktop. Ethereum official

https://medium.com/coinmonks/measuring-ethereum-nodes-530bfff08e9c 5/10
2/12/23, 12:48 AM Measuring Ethereum Nodes. There was a post recently comparing… | by Igor Artamonov | Coinmonks | Medium

wallet Mist was coming with Geth, and the same was for Classic Geth, which was used
by Emerald Wallet for desktop on ETC.

This difference in an environment (desktop vs. server) leads to a situation when Geth is
harder to catch. One problem is that online time for Geth is short. Another problem,
which probably makes a substantial impact, is that home internet is usually
misconfigured for port forwarding and firewalls and less stable than the Internet in a
datacenter. Because of that, you cannot connect to such Geth instance but should
expect an incoming connection from it. For this case, the bot needs to make sure that
all possible Geth instances somehow learn about the bot and connects to it to
introduce itself.

To illustrate that, take a look at the distribution of nodes which allowed incoming
connection by different software.

In my experience, about 70% of Geth nodes don’t allow incoming connections,


compared to 52% for Parity. On the other hand, Parity nodes are not so active in the

https://medium.com/coinmonks/measuring-ethereum-nodes-530bfff08e9c 6/10
2/12/23, 12:48 AM Measuring Ethereum Nodes. There was a post recently comparing… | by Igor Artamonov | Coinmonks | Medium

discovery of other nodes, which may be explained that such nodes are running on a
server, and actively discover for peers only in the first few minutes after launch.

Countries
Distribution by a country could be interesting as well:

Please note the number for China. I’m sure the real amount of nodes in China is at
least twice as larger, but the bot can’t connect to them because of the Great Firewall.
The only way to measure everything correctly would be running a bot instance in
China mainland, though I’m not sure how, but I certainly want to do in some future.

Watching forks
One of the main reasons why I created my scraper bot is to watch hard forks, to track
the progress of network upgrade, i.e., which versions of the software are online.
Sometimes it shows fascinating artifacts, like one I posted before Constantinople
upgrade:

https://medium.com/coinmonks/measuring-ethereum-nodes-530bfff08e9c 7/10
2/12/23, 12:48 AM Measuring Ethereum Nodes. There was a post recently comparing… | by Igor Artamonov | Coinmonks | Medium

Notice how the share of compatible Parity nodes is growing organically over time, but
Geth makes a huge spike in one day. It probably means that there is a way to control
the distribution of the majority of Geth nodes, and therefore the network itself.

Another example is a recent ETC upgrade, which was made even without the majority
of node consensus. Risky, but fortunately, it didn’t damage the network. It took about a
week after the fork to reach 50% of nodes upgrades, though the upgrade is not finalized
yet, nodes are still in the process of upgrade. Even worse, some of the old nodes are still
actively mining the old unforked chain.

https://medium.com/coinmonks/measuring-ethereum-nodes-530bfff08e9c 8/10
2/12/23, 12:48 AM Measuring Ethereum Nodes. There was a post recently comparing… | by Igor Artamonov | Coinmonks | Medium

ETC Atlantis upgrade progress; vertical line is the date of the fork, horizontal lines are 50% (acceptable for pre-
fork) and 80% (acceptable for post-fork); notice the spike of Geth nodes on September 29, most of them were
just fresh nodes launched in different regions of Asia, most were shot down in a few days

It’s hard to measure the Ethereum network, though there is undoubtedly a lot of
interesting data and insights. I still work on improving the bot, trying to gather more
details with better precision, and hope to crawl other blockchains as well.

If you use data from the article, please put a link back to this page. Thank you. For further
questions, you can reach me by [email protected]

Get Best Software Deals Directly In Your Inbox


Open in app Sign up Sign In

Search Medium

Ethereum Statistics Node Blockchain Analytics


https://medium.com/coinmonks/measuring-ethereum-nodes-530bfff08e9c 9/10
2/12/23, 12:48 AM Measuring Ethereum Nodes. There was a post recently comparing… | by Igor Artamonov | Coinmonks | Medium

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/measuring-ethereum-nodes-530bfff08e9c 10/10
2/12/23, 12:50 AM Ethereum Node Types: An Introduction | by Jon Law | Coinmonks | Medium

Published in Coinmonks

Jon Law Follow

Mar 2, 2022 · 2 min read · Listen

Save

Ethereum Node Types: An Introduction

The Ethereum network recognizes three types of nodes used by individuals to support
the network.

1) Full node: A full node stores the complete blockchain, and participates in block
validation and verification, and provides full service to the network and clients on the
https://medium.com/coinmonks/ethereum-nodes-types-an-introduction-11313f25f962 1/4
2/12/23, 12:50 AM Ethereum Node Types: An Introduction | by Jon Law | Coinmonks | Medium

network. Requires enough local storage resources to accommodate the blockchain.


Size requirements increase with the age of the network, and can reach hundreds of
gigabytes.

2) Light node: A light node stores only the blockchain headers, which is sufficient to
provide validation of data, but not to participate in the network in the same way a full
node can. This type of node is most useful on resource-constrained devices such a
smartphones or low power systems.

3) Archive node: An archive node stores the full blockchain, as with the full node, and
can perform the same network services. However, the archive node also maintains
data on the state of the blockchain at each block level. This additional data allows for
lookups of transactions and balances without needing to rescan the entire chain from
the genesis block. This is useful for block explorers or other tools that access snapshots
of the chain at points in time. Providing this additional data requires more substantial
resources, with storage needs potentially of multiple terabytes.

Cover image attribution: Worldspectrum from Pexels

Join Coinmonks Telegram Channel and Youtube


Channel learn about crypto trading and investing
Also, Read
How to Buy Cryptocurrency in Canada?

Bored Ape Yacht Club (BAYC) Review

5 Best Crypto Trading Terminals | Best DeFi Apps

Best Online Casinos | Binance Review | BitMEX Review

Sparrow Exchange Review | Nash Exchange Review

Best Crypto Trading Bots in the US | Changelly Review

Earn Passive Income Using Crypto Arbitrage In India


Open in app Sign up Sign In
Godex.io Review | Invity Review | BitForex Review
https://medium.com/coinmonks/ethereum-nodes-types-an-introduction-11313f25f962 2/4
2/12/23, 12:50 AM Ethereum Node Types: An Introduction | by Jon Law | Coinmonks | Medium

Search
Best Bitcoin Medium
Margin Trading | Lolli Review | Bityard Margin Trading

Create and sell your first NFT | Crypto Trading Bot

Ethereum Node Blockchain Ethereum Blockchain Ethereum Wallet

Enjoy the read? Reward the writer.Beta


Your tip will go to Jon Law through a third-party platform of their choice, letting them know you appreciate their story.

Give a tip

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

https://medium.com/coinmonks/ethereum-nodes-types-an-introduction-11313f25f962 3/4
2/12/23, 12:50 AM Ethereum Node Types: An Introduction | by Jon Law | Coinmonks | Medium

Get the Medium app

https://medium.com/coinmonks/ethereum-nodes-types-an-introduction-11313f25f962 4/4
2/12/23, 12:52 AM Types of Accounts in Ethereum. Disclaimer: I don’t consider myself to… | by P10 | Coinmonks | Medium

Published in Coinmonks

P10 Follow

Jan 19, 2022 · 3 min read · Listen

Save

Types of Accounts in Ethereum


Disclaimer: I don’t consider myself to be an expert, consider this as a beginner’s word to an
absolute beginner. Please do consider reading the references below.

Blockchain is often represented as a distributed transactional ledger, i.e. a record of


who owns how much and a record of all the transactions. While this is true for bitcoin
and bitcoin forks, Ethereum and EVM based blockchains add the ability to deploy
smart contracts. Effectively creating programable money, adding intrinsic value to
ether.

Smart Contracts lives on an address like a normal ethereum account. But there are few
differences

Types of accounts

There are 2 types of accounts in the Ethereum blockchain.

1. EOA — Externally owned Accounts

2. Contracts- the awesome stuff.

https://medium.com/coinmonks/types-of-accounts-in-ethereum-5a004f60c79a 1/5
2/12/23, 12:52 AM Types of Accounts in Ethereum. Disclaimer: I don’t consider myself to… | by P10 | Coinmonks | Medium

EOA- Externally owned accounts


Are controlled by a private key, accounts that are owned by people, crypto exchanges,
businesses, etc. The one who owns the private keys has access to funds.

The private key is 32 bytes (64 hex characters), usually randomly generated by the
wallet.

The public key is derived from the private key using ECDSA.

The address is the last 20 bytes (40 hex characters) of the public key, with a 0x prefix.

The private key is used to sign a transaction to prevent forgery. As long as the private
keys are secure, it is impossible to fake a transaction as long as 50%+ miners are not
acting maliciously, in the current (PoW) consensus model.

Smart Contracts
Smart contracts accounts have code and storage associated with them they are not
controlled by a private key, but by the code associated with it.

Smart contracts are essential a program that lives in the blockchain.

They cost some gas to deploy as they use storage as soon as they are created.

They are usually written in solidity although other options like Vyper are also there.

Their USP is that once deployed they can not be edited. While this may sound like a
drawback, it is the reason smart contracts are so powerful.

Once deployed all the parties concerned knows how it will execute, it cannot be
tampered with. This removes the requirement of trust among the parties and also
increases transparency.

However, selfdestruct is added as a fail-safe, as an absolute last resort.

Creating a smart contract costs gas as code and storage is being deposited.

NOTE

https://medium.com/coinmonks/types-of-accounts-in-ethereum-5a004f60c79a 2/5
2/12/23, 12:52 AM Types of Accounts in Ethereum. Disclaimer: I don’t consider myself to… | by P10 | Coinmonks | Medium

Smart contracts cannot initiate a transaction, They solely act on external messages
but once a transaction is started a smart contract can trigger other contracts or
transfer ether.

Contracts cannot accept payment until a payable method is implemented.

Common properties

Both the accounts can receive, transfer and hold ether.

All accounts have 4 fields

nonce — number of transactions initiated by the EOA or number of contracts deployed


by the smart contract.

balance- Wei owned by the account (1ether = 10¹⁸ Wei)

CodeHash — (IMMUTABLE field) Hash for the code associated with smart contracts.
For an EOA it is an empty string.

Storage Hash — the Merkle root hash of the entire state tree for contracts, empty for
EOA.

Deploying a smart contract


A smart contract runs on EVM (Ethereum Virtual Machine).

The solidity code is converted to byte code which can be deployed to the network and
can be understood by the EVM.

ABI (Application Binary Interface) — is important for interacting with smart contracts,
it list functions, their expected return types and parameters.

Reading and Writing contract’s state

To access a contract’s publically available properties or a view no gas is required.

However, any function that changes the state of the contract gas is required.

https://medium.com/coinmonks/types-of-accounts-in-ethereum-5a004f60c79a 3/5
2/12/23, 12:52 AM Types of Accounts in Ethereum. Disclaimer: I don’t consider myself to… | by P10 | Coinmonks | Medium

EVM based blockchains


The above said is true not just for ethereum in particular but also for all ethereum
based blockchains.

For eg: Polygon, Avalanche C-chain, testnets etc.

References
https://ethereum.org/en/developers/docs/accounts/ (MUST READ)

https://hackernoon.com/getting-deep-into-evm-how-ethereum-works-backstage-
ac7efa1f0015

Self Destruct | Solidity by Example | 0.8.10


An example of how to delete your smart contract by calling seldestruct
in Solidity
solidity-by-example.org

Join Coinmonks Telegram Channel and Youtube


Channel learn about crypto trading and investing
Also, Read
Bookmap Review | 5 Best Crypto Exchanges in the USA

The Best Crypto Hardware wallet | Bitbns Review

10 Best Crypto Exchange in Singapore | Buy AXS

Red Dog Casino Review | Swyftx Review | CoinGate Review

Best Crypto to Invest in India | WazirX P2P | Hi Dollar Review

Best Crypto Trading bots in Canada | KuCoin Review

https://medium.com/coinmonks/types-of-accounts-in-ethereum-5a004f60c79a 4/5
2/12/23, 12:52 AM Types of Accounts in Ethereum. Disclaimer: I don’t consider myself to… | by P10 | Coinmonks | Medium

Ethereum Solidity Blockchain Smart Contracts

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

Open in app Sign up Sign In


By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.
Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/types-of-accounts-in-ethereum-5a004f60c79a 5/5
2/12/23, 12:55 AM Ethereum account. This post is a reference to “How does… | by 胡家維 Hu Kenneth | Coinmonks | Medium

Published in Coinmonks

胡家維 Hu Kenneth Follow

May 7, 2018 · 5 min read · Listen

Save

Ethereum account
This post is a reference to “How does Ethereum work, anyway?” which written by “
Preethi Kasireddy” and can be found here.

Externally Owned Accounts (User accounts is controlled by private keys)

Contracts Accounts (controlled by code)

Discover and review best Blockchain softwares


https://medium.com/coinmonks/ethereum-account-212feb9c4154 1/10
2/12/23, 12:55 AM Ethereum account. This post is a reference to “How does… | by 胡家維 Hu Kenneth | Coinmonks | Medium

Account state
The account state consists of four components, which are present regardless of the
type of account:

nonce: If the account is an externally owned account, this number represents the
number of transactions sent from the account’s address. If the account is a contract
account, the nonce is the number of contracts created by the account.

balance: The number of Wei owned by this address. There are 1e+18 Wei per Ether.

storageRoot: A 256-bit hash of the root node of a Merkle Patricia tree that encodes
the storage contents of the account (a mapping between 256-bit integer values),
encoded into the trie as a mapping from the Keccak 256-bit hash of the 256-bit
integer keys to the RLP-encoded 256-bit integer values. This tree encodes the hash
of the storage contents of this account, and is empty by default.

codeHash: The hash of the EVM (Ethereum Virtual Machine) code of this account
— this is the code that gets executed should this address receive a message call; it is
immutable and thus, unlike all other fields, cannot be changed after construction.
All such code fragments are contained in the state database under their
corresponding hashes for later retrieval. For contract accounts, this is the code that
gets hashed and stored as the codeHash. For externally owned accounts, the
codeHash field is the hash of the empty string.

refer to the ethereum yellowpaper for more detail

Externally owned accounts (EOAs)


https://medium.com/coinmonks/ethereum-account-212feb9c4154 2/10
2/12/23, 12:55 AM Ethereum account. This post is a reference to “How does… | by 胡家維 Hu Kenneth | Coinmonks | Medium

An externally controlled account

has an ether balance,

can send transactions (ether transfer or trigger contract code),

is controlled by private keys,

has no associated code.

Contract accounts (some articles call Contract Wallet)


A contract

has an ether balance,

has associated code,

code execution is triggered by transactions or messages (calls) received from other


contracts.

when executed — perform operations of arbitrary complexity (Turing


completeness) — manipulate its own persistent storage, i.e., can have its own
permanent state — can call other contracts

Contract accounts in Exchange Send Ether (ETH) to a user account has a fee of 21000
gas but sending ETH to a contract has a higher fee, which depends on the contract
code and data being sent in the transaction.

Advantages of contract accounts over User Account:


Contract account can list incoming transactions

Contract account can be setup as Multisig Accounts

A Multisig Account can be structured such that it has a daily limit which you
specify, and only if the daily limit is exceeded will multiple signatures be required

Disadvantages of contract accounts over User Accounts:


Contract accounts incur a cost whenever you use them.

https://medium.com/coinmonks/ethereum-account-212feb9c4154 3/10
2/12/23, 12:55 AM Ethereum account. This post is a reference to “How does… | by 胡家維 Hu Kenneth | Coinmonks | Medium

Creating user accounts does not cost any gas but creating contract accounts does. You
pay to create and use Contract accounts because they use the valuable computational
and storage resource of the network.

Another point is that an externally owned account can send message to other
externally owned accounts OR to other contract accounts by creating and signing a
transaction using its private key. A message between two externally owned accounts is
simply a value transfer. But a message from an externally owned account to a contract
account activates the contract account’s code, allowing it to perform various actions
(e.g. transfer tokens, write to internal storage, mint new tokens, perform some
calculation, create new contracts, etc.).

Unlike externally owned accounts, contract accounts can’t initiate new transactions on
their own. Instead, contract accounts can only fire transactions in response to other
transactions they have received (from an externally owned account or from another
contract account). We’ll learn more about contract-to-contract calls in the
“Transactions and Messages” section.

Tools :

Etherum online wallet : https://wallet.ethereum.org

MetaMask

Types of contract account

https://medium.com/coinmonks/ethereum-account-212feb9c4154 4/10
2/12/23, 12:55 AM Ethereum account. This post is a reference to “How does… | by 胡家維 Hu Kenneth | Coinmonks | Medium

There are two type of contract account — Simple account & Multisig( Multisignature)
account

Simple account & Multisig account are created and owned by Accounts.

Simplet account : Only one account bother creates and owns the account.

Multisig account : A Multisig Wallet has several owner Accounts one of which will
also be the creator Account.

To create a simple wallet :


1. Click on ADD WALLET CONTRACT.

2. Under WALLET CONTRACT TYPE ensure that SINGLE OWNER ACCOUNT is


selected, then enter a name for your wallet.

3. Click on CREATE. Then enter the password of the current account you used in

https://medium.com/coinmonks/ethereum-account-212feb9c4154 5/10
2/12/23, 12:55 AM Ethereum account. This post is a reference to “How does… | by 胡家維 Hu Kenneth | Coinmonks | Medium

To create a Multisig wallet :


1. Click on ADD WALLET CONTRACT.

2. Under WALLET CONTRACT TYPE select MULTISIGNATURE WALLET CONTRACT.

3. Set up how many owner owns this wallet. The default is 3 owners. In my case, I
change it to 2.

4. Fill in owners’ address which depends on your settings.

5. Click on CREATE. Then enter the password of the current account you used.

6. Copy and paste the addresses of the other two owner Accounts.
IMPORTANT: Do not add a Contract Wallet as the owner of a Multisig Wallet. Only
Accounts can be owners.

The default settings for Multisig accounts is displayed. In this example, we are going
with the default 2-of-3 setting, but we have reduced the daily limit to 10 ether.

https://medium.com/coinmonks/ethereum-account-212feb9c4154 6/10
2/12/23, 12:55 AM Ethereum account. This post is a reference to “How does… | by 胡家維 Hu Kenneth | Coinmonks | Medium

https://medium.com/coinmonks/ethereum-account-212feb9c4154 7/10
2/12/23, 12:55 AM Ethereum account. This post is a reference to “How does… | by 胡家維 Hu Kenneth | Coinmonks | Medium

Multisig account user case

https://medium.com/coinmonks/ethereum-account-212feb9c4154 8/10
2/12/23, 12:55 AM Ethereum account. This post is a reference to “How does… | by 胡家維 Hu Kenneth | Coinmonks | Medium

Open in app Sign up Sign In

Search Medium

Click to read more about ethereum

Ethereum Blockchain Tutorial Transactions Ethereum Wallet

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

https://medium.com/coinmonks/ethereum-account-212feb9c4154 9/10
2/12/23, 12:55 AM Ethereum account. This post is a reference to “How does… | by 胡家維 Hu Kenneth | Coinmonks | Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/ethereum-account-212feb9c4154 10/10
2/12/23, 12:59 AM Smart Contracts On The Blockchain: A deep dive in to Smart Contracts | by ABHISHEK KUMAR | Medium

ABHISHEK KUMAR Follow

Apr 30, 2018 · 11 min read · Listen

Save

Smart Contracts On The Blockchain: A deep dive


in to Smart Contracts
It is becoming difficult for the ordinary person to avoid the Blockchain buzz, and
Businesses cannot shy away from blockchain either.

Many multinational companies have already jumped onto the blockchain bandwagon
and are working on their own projects to stay ahead of the competition.

According to Accenture research published at the start of 2017, investment banks alone
could save up to $12 billion per year by adopting blockchain and smart contracts,
effectively a program code that automatically performs some actions when pre-
defined conditions occur (i.e. if X does Y, then execute Z).

Gartner has estimated that by 2022, smart contracts will be in use by more than 25% of
global organizations.

Major technology providers like IBM ,Microsoft ,TCS ,Accenture are offering
blockchain solutions to enterprise clients. Tech start-ups too are aggressively
capitalizing on the boom by building new products and services that depend on the
technology.

For other businesses, however, the big question is how blockchain adoption can
benefit them. There is no question that modern business environments require
companies to make technology integral to their strategy.

https://abhibvp003.medium.com/smart-contracts-on-the-blockchain-a-deep-dive-in-to-smart-contracts-9616ad26428c#:~:text='Smart contracts'%2C a… 1/13


2/12/23, 12:59 AM Smart Contracts On The Blockchain: A deep dive in to Smart Contracts | by ABHISHEK KUMAR | Medium

Cost Reduction & Efficiencies: Cutting out middleman means savings for the business.
According to a McKinsey report it is estimated that blockchain could save businesses at
least $50 billion in B2B transactions by 2021.

So what are Smart Contracts

A smart contract is a computer protocol intended to digitally facilitate, verify, or


enforce the negotiation or performance of a contract. Smart contracts allow the
performance of credible transactions without third parties. These transactions are
trackable and irreversible.Smart contracts were first proposed by Nick Szabo, who
coined the term, in 1994.

Proponents of smart contracts claim that many kinds of contractual clauses may be
made partially or fully self-executing, self-enforcing, or both. The aim of smart
contracts is to provide security that is superior to traditional contract law and to reduce
other transaction costs associated with contracting. Various cryptocurrencies have
implemented types of smart contracts.

‘Smart contracts’, are programs that are written on the underlying distributed ledger
and are executed automatically by nodes on the network. Smart contract have to be
verifiable by each node on the network, it means that all nodes on the network must
see the same data. Smart contracts are complex and their potential goes beyond the
simple transfer of assets, being able to execute transactions in a wide range of fields.
Such as insurance, crowdfunding , logistics, medicine, gaming industry, entertainment
industry, etc.

https://abhibvp003.medium.com/smart-contracts-on-the-blockchain-a-deep-dive-in-to-smart-contracts-9616ad26428c#:~:text='Smart contracts'%2C a… 2/13


2/12/23, 12:59 AM Smart Contracts On The Blockchain: A deep dive in to Smart Contracts | by ABHISHEK KUMAR | Medium

Blockchain was initially designed for P2P money only. But it soon showed the potential
to be used for any kind of P2P value transaction on top of the Internet. The Ethereum
project thus introduced the idea of decoupling the contract layer from the blockchain
layer, where the ledger itself is used by smart contracts that trigger transactions
automatically when certain pre-defined conditions are met. By decoupling the smart
contract layer from the blockchain layer, Blockchains like Ethereum aim to provide a
more flexible development environment than the Bitcoin Blockchain.

A smart contract is a computer code running on top of a blockchain containing a set of


rules under which the parties to that smart contract agree to interact with each other.
If and when the pre-defined rules are met, the agreement is automatically enforced.
The smart contract code facilitates, verifies, and enforces the negotiation or
performance of an agreement or transaction. It is the simplest form of decentralized
automation.

It is a mechanism involving digital assets and two or more parties, where some or all of
the parties deposit assets into the smart contract and the assets automatically get
redistributed among those parties according to a formula based on certain data, which
is not known at the time of contract initiation.

If and when all parties to the smart contract fulfill the pre-defined arbitrary rules, the
smart contract will auto execute the transaction. These smart contracts aim to provide
transaction security superior to traditional contract law and reduce transaction costs of
coordination and enforcement.

The term smart contract is a bit unfortunate since a smart contract is neither smart
nor are they to be confused with a legal contract.

•A smart contract can only be as smart as the people coding taking into account all
available information at the time of coding.

•While smart contracts have the potential to become legal contracts if certain
conditions are met, they should not be confused with legal contracts accepted by
courts and or law enforcement. However, we will probably see a fusion of legal
contracts and smart contracts emerge over the next few years as the technology
becomes more mature and widespread and legal standards are adopted.

https://abhibvp003.medium.com/smart-contracts-on-the-blockchain-a-deep-dive-in-to-smart-contracts-9616ad26428c#:~:text='Smart contracts'%2C a… 3/13


2/12/23, 12:59 AM Smart Contracts On The Blockchain: A deep dive in to Smart Contracts | by ABHISHEK KUMAR | Medium

Many people are critical of the name “smart contract”. One reason being that a smart
contract is not necessarily smart. It is just a set of instructions that anyone can write,
and people are very capable of creating some pretty dumb smart contracts.

The name smart contract is also misleading because it is not really a contract, at least
not in the sense that it’s anything that needs to be complied with or upheld. A normal
contract has legal consequences in the ‘real world’. If the counterparty of a contract
does not uphold their part of the agreement, the legal system can be used to hold them
accountable. On the contrary, a smart contract does not have to be upheld by anyone,
it’s a set of instructions that self-executes. A smart contact does not have much
precedence in the ‘real world’. It is only able to send transactions to other accounts on
the blockchain, any other precedence must be acquired by creating a legal wrapper
around the blockchain agreement.

Smart Contract Code is a Law

A smart contract essentially consists of two elements which you need to


understand/trust:

The code and how this is interpreted

The immutability of the blockchain

Just like with normal contracts, it´s important to understand the actual content of a
smart contract when interacting with it. But unlike a normal contract, which is written
in legalese and interpreted by the legal system, the content of the smart contract is
written in computer code and interpreted by computers. So what does smart contract
code actually look like.

Below is an example, an extract of a smart contract (don’t worry if you are not a
technical person you’re not expected to understand it):

function payOut(address _recipient, uint _amount) returns (bool) {

if (msg.sender != owner || msg.value > 0 || (payOwnerOnly && _recipient != owner))

throw;

https://abhibvp003.medium.com/smart-contracts-on-the-blockchain-a-deep-dive-in-to-smart-contracts-9616ad26428c#:~:text='Smart contracts'%2C a… 4/13


2/12/23, 12:59 AM Smart Contracts On The Blockchain: A deep dive in to Smart Contracts | by ABHISHEK KUMAR | Medium

if (_recipient.call.value(_amount)()) {

PayOut(_recipient, _amount);

return true;

} else {

return false;

The smart contract code is the terms and conditions that you are signing up for when
interacting with a smart contract. As long as you trust the blockchain that the smart
contract resides on, you know that the code will execute exactly as programmed — so
no breach of agreement can exist. It is important to note however, that working as
programmed does not mean that it will work as intended if there are errors in the
code.

Smart contracts can be used for simple economic transactions like sending money
from A to B. They can also be used for registering any kind of ownership and property
rights like land registries and intellectual property, or managing smart access control
for the sharing economy, just to name a few. Furthermore, smart contracts can be used
for more complex transactions like governing a group of people that share the same
interests and goals. Decentralized Autonomous Organizations (DAOs) , are such an
example for more complex smart contracts.

How to create a Smart Contract?

To create a smart contract you need:

a) Subject of the contract:The program must have access to goods or services under
contract to lock and unlock them automatically.

b) Digital signatures: All the participants initiate an agreement by signing the contract
with their private keys.
https://abhibvp003.medium.com/smart-contracts-on-the-blockchain-a-deep-dive-in-to-smart-contracts-9616ad26428c#:~:text='Smart contracts'%2C a… 5/13
2/12/23, 12:59 AM Smart Contracts On The Blockchain: A deep dive in to Smart Contracts | by ABHISHEK KUMAR | Medium

c) Contract terms: Terms of a smart contract take the form of an exact sequence of
operations. All participants must sign these terms.

d) Decentralized platform: The smart contract is deployed to the Blockchain of this


platform and distributed among the nodes of the platform.

Benefits of a Smart Contract

Smart contracts use all the benefits of Blockchain technology & provide:

a) Security: The smart contract is encrypted and distributed among nodes. This
guarantees that it will not be lost or changed without your permission.

b) Economy and speed:Most processes are automated, and most intermediaries are
eliminated.

c) Standardization: There is a wide range of different types of smart contracts


nowadays. You can choose one and change it according to your needs.

d) Radically reduce transaction costs (bureaucracy) through machine consensus and


auto-enforceable code.

e) Bypass the traditional principal-agent dilemmas of organizations, thus providing an


operating system for what some refer to as “trustless trust”.

This means that you don’t have to trust people and organizations, you trust code, which
is open source and provides transparent processes.

With blockchains and smart contracts we can now imagine a world in which contracts
are embedded in digital code and stored in transparent, shared databases, where they
are protected from deletion, tampering, and revision.

In this world every agreement, every process, task and payment would have a digital
record and signature that could be identified, validated, stored, and shared
Intermediaries like lawyers, brokers, and bankers, and public administrators might no
longer be necessary. Individuals, organizations, machines, and algorithms would
freely transact and interact with one another with little friction and a fraction of
current transaction costs.
https://abhibvp003.medium.com/smart-contracts-on-the-blockchain-a-deep-dive-in-to-smart-contracts-9616ad26428c#:~:text='Smart contracts'%2C a… 6/13
2/12/23, 12:59 AM Smart Contracts On The Blockchain: A deep dive in to Smart Contracts | by ABHISHEK KUMAR | Medium

A smart contract can formalize the relationships between people, institutions and the
assets they own.

The transaction rulesets (agreement) of the smart contract define the conditions —
rights and obligations to which the parties of a protocol or smart contract consent.

Although the concept of smart contracts is not new, blockchain technologies seem to
be the catalyst for smart contract implementation.

Below Diagram explains the working of a SmartContract

Example of a Smart contract Explained Below

If A and B don’t know and don’t trust each other, they usually need a trusted third party
to serve as an intermediary to verify transactions and enforce them. With smart
contracts & blockchains, you don’t need those trusted intermediaries anymore for
clearing or settlement of your transactions. Take the example of buying and selling a
car:

Below Diagram explains the working a Traditional Contract for the Smart Contract
Example

https://abhibvp003.medium.com/smart-contracts-on-the-blockchain-a-deep-dive-in-to-smart-contracts-9616ad26428c#:~:text='Smart contracts'%2C a… 7/13


2/12/23, 12:59 AM Smart Contracts On The Blockchain: A deep dive in to Smart Contracts | by ABHISHEK KUMAR | Medium

On the Blockchain, once all involved authorities and companies are on a blockchain, a
smart contract couldbe used to define all the rules of a valid care sale. If Alice wanted
to buy the car from Bob usinga smart contract on the blockchain, the transaction
would be verified by each node in the BlockchainNetwork to see if Bob is the owner of
the car and if Alice has enough money to pay Bob.

Below Diagram explains the working of the Smart Contract Example

https://abhibvp003.medium.com/smart-contracts-on-the-blockchain-a-deep-dive-in-to-smart-contracts-9616ad26428c#:~:text='Smart contracts'%2C a… 8/13


2/12/23, 12:59 AM Smart Contracts On The Blockchain: A deep dive in to Smart Contracts | by ABHISHEK KUMAR | Medium

If the network agrees that both conditions are true, Alice automatically gets the access
code to the smart lock for the garage. The blockchain registers Alice as the new owner
of the car. Bob has € 20,000 more on his account, and Alice € 20,000 less. No
middlemen required. On the Blockchain, who owns what is transparent and at the
same time anonymous or pseudonymous. This means that every computer running the
blockchain protocol could check whether a certain person is the rightful owner of the
car or not.Stealing cars won’t be as easy as today, especially once we have smart keys
granting access control verified on the blockchain, to unlock our future vehicles. As
the owner of the car, you could authorize other people to drive it (stating the public key
of the respective individual). In such cases opening the car would only be possible with
a smart key on the Blockchain.

https://abhibvp003.medium.com/smart-contracts-on-the-blockchain-a-deep-dive-in-to-smart-contracts-9616ad26428c#:~:text='Smart contracts'%2C a… 9/13


2/12/23, 12:59 AM Smart Contracts On The Blockchain: A deep dive in to Smart Contracts | by ABHISHEK KUMAR | Medium

Usecases of Smartcontracts can be across many industries

Blockchain and smart contracts have the potential to disrupt many industries. Use
cases can be found in banking, insurance, energy, e-government, telecommunication,
music & film industry, art world, mobility, education and many more. Smart contract
use cases range from simple to complex.

Time-stamping services like ascribe (art registry) or governmental and semi-


governmental registries (land titles, birth certificates, birth certificates, school and
university degrees) are examples for simpler technological use cases (the regulatory
aspects might be more complex). Decentralized autonomous organizations, on the
other hand, are the most complex form of a smart contract. TheDAO in 2016 was an
example for such a complex smart contract.

Below are the list of usecases where Blockchain & Smartcontracts can disrupt the the
industries

Types of Smart Contracts

Below diagram explains the various types of Smart contracts

https://abhibvp003.medium.com/smart-contracts-on-the-blockchain-a-deep-dive-in-to-smart-contracts-9616ad26428c#:~:text='Smart contracts'%2C … 10/13


2/12/23, 12:59 AM Smart Contracts On The Blockchain: A deep dive in to Smart Contracts | by ABHISHEK KUMAR | Medium

Given the fact that Blockchain is still a new technology, some industries might adopt
smart contracts later than others, especially if they are subject to heavy government
regulation or if the uses cases require high network effects — like widespread
technology adoption along the supply chain, standardization, etc. In general, it’s
advisable to start out with a small pilot project of a less complex use case to build
expertize and understand the technology better and move on to more complex use
case at a later stage.

Furthe reading

http://internetofagreements.com/files/WorldGovernmentSummit-Dubai2017.pdf

Smart legal Contracts, Florian Glatz

OpenLaw, Consensys

Smart Contract Coding

Solidity is a smart contract programming language. The syntax is similar to that of


JavaScript, and it is designed to compile to code for the Ethereum Virtual Machine, to
create contracts for voting, crowdfunding, blind auctions, multi-signature wallets and
more.

Below are the various links related to Smartcontract coding

1) Official Solidity Documentation, by Ethereum Foundation

https://solidity.readthedocs.io/en/latest/

2) Solidity Tutorial
https://abhibvp003.medium.com/smart-contracts-on-the-blockchain-a-deep-dive-in-to-smart-contracts-9616ad26428c#:~:text='Smart contracts'%2C … 11/13
2/12/23, 12:59 AM Smart Contracts On The Blockchain: A deep dive in to Smart Contracts | by ABHISHEK KUMAR | Medium

https://medium.com/@ConsenSys/solidity-integration-with-visual-studio-8bdab2ff8a74

3) Standardized_Contract_APIs

https://github.com/ethereum/wiki/wiki/Standardized_Contract_APIs

4) Interacting with smart contracts

http://ethdocs.org/en/latest/contracts-and-transactions/accessing-contracts-and-
transactions.html#interacting-with-smart-contracts

5) Remix Ethereum

https://github.com/ethereum/remix

6) The Hitchhiker’s Guide to Smart Contracts in Ethereum

https://blog.zeppelin.solutions/the-hitchhikers-guide-to-smart-contracts-in-ethereum-
848f08001f05

7) trufflesuite/truffle

https://github.com/trufflesuite/truffle

Sources:

1.https://bitcoinmagazine.com/articles/smart-contracts-described-by-nick-szabo-years-
ago-now-becoming-reality-1461693751/

2.https://en.wikipedia.org/wiki/Smart_contract

3.https://blockgeeks.com/guides/smart-contracts/

4.https://www.ethereum.org/token

5) PWC

6) Forbes

7) BlockchainHub
https://abhibvp003.medium.com/smart-contracts-on-the-blockchain-a-deep-dive-in-to-smart-contracts-9616ad26428c#:~:text='Smart contracts'%2C … 12/13
2/12/23, 12:59 AM Smart Contracts On The Blockchain: A deep dive in to Smart Contracts | by ABHISHEK KUMAR | Medium

Please note: The material has been reproduced from various sources & is strictly for
educational ,illustrative purposes & for promotion of Blockchain Technology.

Blockchain Smart Contracts Solidity Ethereum Blockchain Ethereum

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://abhibvp003.medium.com/smart-contracts-on-the-blockchain-a-deep-dive-in-to-smart-contracts-9616ad26428c#:~:text='Smart contracts'%2C … 13/13


2/12/23, 1:01 AM Quick dive into Smart Contracts and Ethereum. | by Eric Lastname | Geek Culture | Medium

Published in Geek Culture

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

Eric Lastname Follow

Jul 4, 2021 · 7 min read · · Listen

Save

Quick dive into Smart Contracts and Ethereum.

Photo by Zoltan Tasi on Unsplash

https://medium.com/geekculture/hands-on-technical-introduction-to-smart-contracts-and-ethereum-10b264cc65f4 1/11
2/12/23, 1:01 AM Quick dive into Smart Contracts and Ethereum. | by Eric Lastname | Geek Culture | Medium

The facts are undeniable, blockchains are here, cryptocurrencies are taking the
financial world by storm, the world is embracing Ethereum and Bitcoin like never
before. More articles than ever before are being published by mainstream news
networks bringing these ideas more mainstream source. Large banks are leading the
charge into crypto assets through multi-billion dollar investments source.

Lets take a dive together and learn more about this new world we are being thrust into!

Ethereum Vs Bitcoin

https://medium.com/geekculture/hands-on-technical-introduction-to-smart-contracts-and-ethereum-10b264cc65f4 2/11
2/12/23, 1:01 AM Quick dive into Smart Contracts and Ethereum. | by Eric Lastname | Geek Culture | Medium

Ethereum, which launched in 2015, is the second-largest cryptocurrency by market


cap ($256B according to coin base as of this articles publication), falling behind the
first place behemoth that is Bitcoin ($644B). But comparing Ethereum to bitcoin like
this is not a fair comparison. Bitcoin was the original cryptocurrency launched in 2009
and is a digital currency that can be traded peer-to-peer securely online without any
central organization.

Ill skip the explanation of bitcoin considering its been done to death at this point, if
you want more info, here is a good explanation. Unlike bitcoin though, Ethereum is not

https://medium.com/geekculture/hands-on-technical-introduction-to-smart-contracts-and-ethereum-10b264cc65f4 3/11
2/12/23, 1:01 AM Quick dive into Smart Contracts and Ethereum. | by Eric Lastname | Geek Culture | Medium

a digital currency, but rather a platform for smart contracts. ETH, the coin associated
with Ethereum, can be traded like bitcoin but it can also be used for so much more!

Smart contracts are a way to allow decentralized networks to securely execute code
without any central authority. This concept is revolutionizing many industries as we
speak, none more than the financial sector.

Another way to compare Bitcoin’s store of wealth vs Ethereum’s ability to do work


through smart contracts is:

If Bitcoin is “digital gold,” Ethereum can be seen as “digital oil.”

Smart Contracts

https://medium.com/geekculture/hands-on-technical-introduction-to-smart-contracts-and-ethereum-10b264cc65f4 4/11
2/12/23, 1:01 AM Quick dive into Smart Contracts and Ethereum. | by Eric Lastname | Geek Culture | Medium

In Ethereum, smart contracts are blocks of code, that can come complete with internal
states, users, and even their own tokens. They are deployed to a blockchain network
and fully managed by the network in a decentralized way.

Put more simply, a smart contract is a decentralized singleton (over simplified, but a
good start). An example we will walk through is below:

pragma solidity ^0.8.0;


contract Parrot {
string speech;
constructor() public {
speech = "Polly want a cracker";
}
function teach(string newSpeech) public returns(bool success) {
speech = newSpeech;
return true;
}
function speak() public view returns(string itSays) {
return speech;
}
}

This is an example of a basic smart contract that can be created and then deployed to
the Ethereum network. When deployed, this contract will be given its own Ethereum
address that can be referenced to talk to the contract.

This is a rather simple example and for those familiar with coding the functionality
above is not too hard to grasp, but since this is a smart contract there are few key
differences.

Internal States
In this example, we declare a contract called Parrot that maintains an internal state of
a string. Smart contracts are validated by the entire blockchain network, so this
contract will have many copies spread across all the nodes of the network, each of
which will calculate and record the internal state separately. Each node on the network

https://medium.com/geekculture/hands-on-technical-introduction-to-smart-contracts-and-ethereum-10b264cc65f4 5/11
2/12/23, 1:01 AM Quick dive into Smart Contracts and Ethereum. | by Eric Lastname | Geek Culture | Medium

will run effectively run every transaction the contract sees and validate it against all
the other nodes on the network for security. Many copies of the same data.

Transactions And Costs


What begins to separate the above code from that of a traditional language comes in
the form of transactions. The teach function will modify the internal state of the
contract and thus the network as a whole, causing data to be written to the blockchain
and a transaction to be logged. This transaction is a record of what has changed on the
blockchain in a given update, in this case, it will be how the internal state of the
contract is has been updated.

function teach(string newSpeech) public returns(bool success) {


speech = newSpeech;
return true;
}

A key thing to note is that transactions are not free! They are run on what is called
“gas”. Miners on the network are solving hashed to create blocks, validating them, and
adding them to the network. As a reward for this process, they are given a small
amount of tokens for each transaction called ‘gas’. Think of it as a tip for processing
and validating a transaction. This price is not fixed, but rather fluctuates with the
market. Miners have free choice in what transactions they want to validate, if you want
your done quickly, or done at all, you have to chip in some gas.

Prices can be tracked in Gewi on sites like this one: here

An request for the above function could look like this: source

params: [{
// From what Ethereum address (your personal wallet)
"from": "0xb60e8dd61c5d32be8058bb8eb970870f07233155",
// To what Ethereum address (the address of the contract)
"to": "0xd46e8dd67c5d32be8058bb8eb970870f07244567",
// The gas (or tip) to the miner that processed this request
"gas": "0x76c0",
// Encoded data representing the function name and parameters to
call
https://medium.com/geekculture/hands-on-technical-introduction-to-smart-contracts-and-ethereum-10b264cc65f4 6/11
2/12/23, 1:01 AM Quick dive into Smart Contracts and Ethereum. | by Eric Lastname | Geek Culture | Medium

"data": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f"
}]

Viewing Contract Data


This internal state can be read at any time with the speak function. This functions has
the keyword view , meaning it will only return data and not edit any internal states,
and thus does not require a transaction to call. Simply asking any node on the network
for this data and they can provide it without any network wide operations. This means
no gas is needed to get this value!

function speak() public view returns(string itSays) {


return speech;
}

Advanced uses of contracts


Contracts like the one above are not particularly useful, but illustrate how blockchains
can be used to run decentralized applications. More sophisticated contracts can keep
track of user wallets, create their own tokens, and call other contracts to create full
decentralized systems.

Imagine a more practical example of an insurance contract for train ticket insurance.
Instead of the internal state being a simple string, we can create structs as well with
solidity.

struct Customer {
bool hasPolicy;
uint256 lastPayment;
}

Then, we can use a feature of solidity that lets us set up a mapping across all Ethereum
wallets. This functions like a hash map where the keys are every Ethereum wallet on

https://medium.com/geekculture/hands-on-technical-introduction-to-smart-contracts-and-ethereum-10b264cc65f4 7/11
2/12/23, 1:01 AM Quick dive into Smart Contracts and Ethereum. | by Eric Lastname | Geek Culture | Medium

the block chain.

mapping(address => Customer) public insured;

Effectively this is setting up a hash table where the keys are every possible Ethereum
wallet and the values are Customer objects as we defined above. It is initially empty. If
you ask for a given key that does not exist, an 0 value is returned ( meaning hasPolicy
will be 0 or false ). When the contract is run and transactions are recorded, any new
additions to this table will be saved, and when looked up their new data can be found.

Then, to sign up for insurance on our smart contract, we can do something like this:

function signUp() payable public {


Customer storage customer = insured[msg.sender];
// Accept initial payment into the contract
require(msg.value == 0.01);
customer.lastPayment = now;
customer.hasPolicy = true;
}
function payPremium(address addr) public payable {
InsuranceTaker storage customer =
insuranceTakers[insuranceTaker];
// Verify they paid and have a policy
require(msg.value == 0.01);
require(customer.hasPolicy);
customer.lastPayment = now;
}

Signing up uses the require keyword to make sure a given value is true before the
contract is allowed to continue. If the validation fails, the contract is not executed. In
this case, lets assume the user did infact transfer 0.01 ETH to the contract with their
call to the signUp function. In that case, the contract keeps the ETH ( the contract itself
is a wallet as well ), and registers that the sender is now insured and just paid.

https://medium.com/geekculture/hands-on-technical-introduction-to-smart-contracts-and-ethereum-10b264cc65f4 8/11
2/12/23, 1:01 AM Quick dive into Smart Contracts and Ethereum. | by Eric Lastname | Geek Culture | Medium

To pay again, the user can call payPremium again and have the same process happen.
This time their lastPayment is updated to be the current time, extending their
insurance period.

Then, to check if a given account is insured, we can check the public record for the
contract to make sure their insurance it listed there

function isInsured(address addr) public pure returns (bool insured) {


Customer storage customer = insured[addr];
return customer.hasPolicy && customer.lastPayment + paymentPeriod
>= now;
}

This function is listed as pure which is very similar to view as neither requires gas.
View simply will return the internal state, pure can do computations against that state
but will not edit that state. Here we check if the last payment was within some
payment period and if so, they are insured.

Finally, to claim insurance its simply a matter of looking up the policy and allocating
funds to anyone who needs it.

function claim() public {


Customer storage customer = insured[addr];
require(isInsured(msg.sender));
msg.sender.transfer(10.0);
}

In total, the problems with the above approach to insurance are vast as it is missing
vital protections for abuse, but those protections can be added securely while staying
within the limits of a smart contract. The goal wasn’t to pitch a new approach to
insurance, but rather to illustrate how simple it can be to do distributed management
of tokens and assets on a blockchain. I hope it is clear how these contracts can be used
to security and publicly setup systems of financial transactions without any central
authority required for validation.

https://medium.com/geekculture/hands-on-technical-introduction-to-smart-contracts-and-ethereum-10b264cc65f4 9/11
2/12/23, 1:01 AM Quick dive into Smart Contracts and Ethereum. | by Eric Lastname | Geek Culture | Medium

The insurance code is loosly basted on this repo, give it some love!

I’m new to medium and would love feedback! Leave a comment! Give a clap! Would
love any help along my journey here!

Ethereum Blockchain Cryptocurrency Smart Contracts Coding Tutorial

Sign up for Geek Culture Hits


By Geek Culture

Subscribe to receive top 10 most read stories of Geek Culture — delivered straight into your inbox, once a week. Take a
look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

Open in app Sign up Sign In


https://medium.com/geekculture/hands-on-technical-introduction-to-smart-contracts-and-ethereum-10b264cc65f4 10/11
2/12/23, 1:01 AM Quick dive into Smart Contracts and Ethereum. | by Eric Lastname | Geek Culture | Medium

Search Medium

https://medium.com/geekculture/hands-on-technical-introduction-to-smart-contracts-and-ethereum-10b264cc65f4 11/11
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

Evin Sellin Follow

Jan 11, 2017 · 23 min read · Listen

Save

What exactly is Turing Completeness?


An armory for the insatiable pedant
I hear the term Turing Completeness thrown around a lot more in software
engineering than I would expect. I think there’s a little confusion about what Turing
Complete means, especially within a software engineering context.

We say that Turing Completeness is a property of a computational system that states


that the system is as computationally powerful as a Turing machine. But what
EXACTLY does that mean? Put your scuba gear and wetsuit on because we’re diving
deep into formalism:

Turing Machines
Turing machines are theoretical computers defined by Alan Turing in his highly
influential paper titled On Computable Numbers, with an application to the
Entscheidungsproblem, published 1936. Turing machines are abstract mathematical
constructs that help us describe in a rigorous fashion what we mean by computation.

There are countless in-depth tutorials on how a Turing machine works, and you can
watch any of them! I can pretty much guarantee that they’re going to be better at
explaining how a Turing machine works than me, but in case you don’t want to watch
any of those, I’ll throw my description in as well.

A Turing machine consists of 2 elements: The computational head and an infinitely


long tape. The head operates roughly as a ‘read-write’ head on a disk drive, and the
tape is divided up into an infinitely long set of squares, for which on each square a
https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 1/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

symbol can be written or erased. The Turing machine recognizes and can write down a
finite set of symbols, called the Turing machine’s alphabet.

The Turing machine is only ‘aware’ of one square on the tape at a time — namely the
square the head of the Turing machine is currently on.

On that tape, a Turing Machine can do any of these 4 actions:

Move the head left by 1 space

Move the head right by 1 space

Write a symbol at the head

Erase a symbol at the head

The machine decides which of these operations to do on any given step through a finite
state machine. Different Turing machines have different state machines that define
their operation.

A finite state machine consists of a finite number of states (which Turing calls m-
configurations) which it switches between on every iteration. The machine can only be
in one state at a time, but transitions between them based on the current state and the
symbol that the machine is currently scanning. The Turing machine takes the current
state and the symbol and looks up what to do in a big table.

A Turing Machine also has a set of accept states that tell the Turing machine to stop
executing. If the Turing machine enters any of these accept states, the machine is said
to halt and suspends execution forever. That’s all there is to Turing Machines!

…well maybe it’s not inherently obvious what exactly that means and how that can be
expressive enough to capture all computation. I almost always see Turing Machines
described with a state diagram, which I’ll provide a description for in later versions of
this article.

Let’s construct a Turing machine that never halts with a state diagram!

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 2/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

We’ll start out with creating a very simple Turing machine with an alphabet of {0, 1}.
We start in state S1, and decide what to do. For any symbol (denoted *) on the tape, the
Turing machine writes the symbol 1, moves one space to the right, and switches to S2.
Now in state S2, for any symbol on the tape, the machine writes 0 and moves one space
to the right, switching to S1. Back in S1, the loop repeats itself, continuing forever. As
you might guess, this writes out 1010101[…] in a never ending loop. The machine has
no accept states so it will never halt.

Well, that was exciting.

Description Numbers
It turns out we can number all Turing machines uniquely. A Turing machine which
doubles a number might be numbered:

31332531173113353111731113322531111731111335317

whereas one that triples numbers might be numbered something else:

3133253117311335311173111332253111173111133531731323253117

As you can tell, they’re huge and weirdly repetitive numbers, but they are still
nonetheless numbers.

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 3/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

We call these the description number for a given Turing machine. We don’t need to
specify exactly how to number the Turing machines, it’s sufficient for our purposes to
simply note that you can fully encode a Turing machine within an integer.

Spoilers: we’ll pass a Turing machine’s description number as the input to another
Turing machine later on, but forget you heard anything…

…as a way of computing functions


Turing machines are fine and all as little toy computers, but what we really want to do
is use them to define functions. Turing was a mathematician, and he cared about
defining a set of numbers called the computable numbers, and to do so he proposed
Turing machines.

In particular, we want to turn Turing machines into partial functions, functions for
which there can be undefined outputs. We’ll want these functions to be ℕ⁽ⁿ⁾→ℕ,
meaning they take any number n natural numbers as input, and output one natural
number (or are undefined for that input, since they are partial).

All we have to do to turn a Turing machine into a partial function is to equip it with an
input and output schema. Turing himself doesn’t provide an unambiguous ‘input’
format, but as we get into programming languages, it’ll be useful to make this step of
defining input vs. output explicit. I’m choosing a monadic notation as given in
Computability and Logic.¹

Precise Formulation
(a) The arguments m1...mk of the function will be represented in
monadic notation by blocks of those numbers of strokes, each separated
from the next by a single blank, on an otherwise blank tape. Thus at
the beginning of the computation of, say, 3 + 2, the tape will look
like this: 111B11
(b) Initially, the machine will be scanning the leftmost 1 on the
tape, and will be in its initial state, state 1. Thus in the
computation of 3 + 2, the initial configuration will be 1₁11B11. A
configuration as described by (a) and (b) is called a standard initial
configuration.
(c) If the function that is to be computed assigns a value n to the
arguments that are represented initially on the tape, then the machine
will eventually halt on a tape containing a block of that number of

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 4/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

strokes, and otherwise blank. Thus in the computation of 3+2, the tape
will look like this: 11111.
(d) In this case, the machine will halt scanning the leftmost 1 on the
tape. Thus in the computation of 3 + 2, the final configuration will
be 1ₐ1111, where the ath state is one for which there is no
instruction what to do if scanning a stroke, so that in this
configuration the machine will be halted. A configuration as described
by (c) and (d) is called a standard final configuration (or position)
(e) If the function that is to be computed assigns no value to the
arguments that are represented initially on the tape, then the machine
will either never halt, or halt in some nonstandard configuration such
as Bₐ11111 or B111ₐ11 or B11111ₐ.

The set of functions that you can express with Turing machines in this manner are
called the computable functions.

The exact definition we choose for input and output isn’t that important: As long as
translation between different input and output formats is computable (which it almost
certainly is for any sane definition), we will get an equivalent set of computable
functions.

This is why the oft-heard description “A Turing-complete language is one that can
simulate a Turing machine” is absolutely correct, but just a tad misleading. If you can
simulate a Turing machine, then you can compute every function that any Turing
machine can compute, but the thing that actually makes the system Turing complete is
that it can compute the whole set of Turing computable functions.

Computable Numbers
Now, given that we have a solid definition for computable functions, we can sort of
‘bootstrap’ off of that to define the computable numbers. But given that a number can
have an infinite number of nonrepeating digits (e.g. something like pi), we have to be
just a tad clever in how we define them. Some smart people came up with this:

A computable number a is a number for which there exists some computable function f such
that f(n) yields the nth digit of a.

Whoops, Wikipedia tells me that’s not quite right. Let’s swap it out:

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 5/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

A computable number a is a number for which there exists some computable function f such
that f(n) satisfies this one weird inequality.

The intuitive sense is the same either way: If you can calculate a number to arbitrary
precision, that number is computable.

It turns out a whole host of numbers are computable. Here’s a quick taste:

All Rational Numbers

Any computable function of any computable number

Almost every number you can think of, really

The point is we can do a heck of a lot of math using only the computable numbers.
Computable numbers make up most numbers we think about on a daily basis —
enough so that it’s actually kind of hard to think of numbers that aren’t computable.

The Universal Turing Machine


The Universal Turing Machine(UTM) takes another Turing machine’s description
number as input, and ‘simulates’ it. That is, the UTM’s output is the same as the Turing
machine corresponding to the description number when that Turing machine is given
a blank tape. Therefore, the UTM has the capability of ‘simulating’ any other Turing
machine.

Turing dedicated a fair number of pages to spelling out the whole state transition table
for such a Turing machine, presumably because it’s not inherently obvious that a
Turing machine should be able to simulate other Turing machines. The duality of a
program as data is likely a lot more comfortable to us today than it was to
mathematicians back then. Today, we have few qualms with treating a program as data
— especially if we’re used to programming languages with first-class functions.

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 6/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

Incomputability
As the term computable functions implies, there are also incomputable functions:
functions we can define for which no Turing machine can possibly exist.

And, despite them being hard to construct, there are a LOT of incomputable functions.
In fact, almost all functions are incomputable. There are just that many more possible
functions than there ever could be Turing machines, so there must be some that
Turing machines miss. In the mathematical language, the set of Turing machines is
countable, whereas the set of real numbers is uncountably large.

The canonical incomputable function posited by Martin Davis (with an analogous


problem in Turing’s original paper) is the Halting Problem. The problem can be stated
very simply:

Halting Problem: Given a computer program and an input for said program, does that
program ever finish execution?

It’s easy to imagine examples of programs where it’s possible to figure out whether or
not the program finishes: If a state repeats itself exactly, or if the program immediately
halts, it’s easy to tell whether or not those programs will halt. But try to come up with
an algorithm to decide for ANY program, and you’ll find that the problem becomes
impossibly hard, quite literally.

Davis proves that this function is incomputable, that no Turing machine can exist that
can compute the correct answer. Because this specific problem yields a yes/no answer,
it is considered a decision problem, and since it’s incomputable, the problem is deemed
undecidable.

You can get more information about incomputability from this charmingly helpful
Buzzfeed community post.

…as originally constructed by Turing


Here’s what I thought when I first read Turing’s paper: “Ooh, this is gonna be totally
easy, isn’t it? We just match up the terminology in the modern definition we just
learned with Turing’s original terminology! It’ll be a straightforward mapping, right?

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 7/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

I mean, just look at the term circle-free! Circle-free’s easy, it reaches it’s final state in a
finite amount of time, like lots of explanations of Turing’s original paper on the
internet suggests! Just look at the defi…

If a computing machine never writes down more than a finite number of [the symbols 1 and
0], it will be called circular. Otherwise it is said to be circle-free.

[…]

A sequence is said to be computable if it can be computed by a circle-free machine. A number


is computable if it differs by an integer from the number computed by a circle-free machine

Wait, that feels backwards. The machine that prints out an infinite number of 1s and
0s, never halting, computes computable numbers? Isn’t that contrary to how we outlined
it before, wherein the only defined output was when the Turing machine halted in a
standard configuration?”

Unfortunately for my past self, the mapping from the modern definitions to Turing’s
original paper isn’t quite so clean, and so requires a fair amount of modification. Let’s
throw away all the definitions for computable functions and computable numbers that we
spent so much time learning, so that we’re left with the just the Turing machine itself.

Computable Sequences
In fact, Turing’s primary focus was on this idea of computable sequences, which we will
use to define computable numbers shortly.

We can look at that non-halting Turing machine we constructed earlier: On a blank


tape, it prints 10101010101…. Because this was made by a Turing machine that ends up
printing out an infinite number of 1s and 0s, Turing would consider this a computable
sequence.

Under Turing’s original construction, these sorts of infinite sequences are exactly what
we’re going for — we want to print out a bunch of 1s and 0s forever and ever. We’d call
Turing machines that end up printing an infinite sequence like this circle-free, and
anything else circular.

From computable sequences to computable numbers

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 8/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

Just like we have decimals in base 10, we can have ‘decimals’ in base 2 as well! They’re
not called ‘decimals’, rather ‘binary fractions’, but they operate pretty much exactly the
same, except in base 2 rather than base 10. For example, the number 0.75 converted to
binary becomes 0.11, or 2.8125 converted to binary becomes 10.1101. The exact
conversion between decimal fractions and binary fractions isn’t really important, but
you can watch a tutorial if you really want.

We can interpret a computable sequence as the fractional part of a binary number. The
sequence 101010… would therefore becomes 0.101010…, giving us a number to work
with. Anything that’s off by an integer from this fractional component is itself
computable.

It turns out, the set of computable numbers defined by the modern construction and
by Turing’s construction are the same!

But… why the modern construction then?


I have no clue what drove the modern construction. I believe it’s clearer and easier to
work with mathematically than its original counterpart, but that’s about it. Perhaps
there’s some incurable ambiguity in the original construction that makes it not
mathematically rigorous enough. If anyone has input on this, I’d love to hear it.

A quick pet peeve


If we’re gonna invoke the language of the original paper when we’re forming
arguments (which we shouldn’t have to do anyways), we might at least do so genuinely
and accurately. It’s cool to say a Turing machine is circle-free if you actually mean this
Turing machine prints out a binary fraction ad infinitum, but try to refrain from doing so
when that’s not exactly what you mean.

If you get nothing else out of this article, get this: Being pedantic about Turing
machines’ definitions doesn’t get you very far. It doesn’t generally make you more
correct mathematically. Most sane definitions of Turing’s initial definition will be
equivalent. Unless we’re solving problems within the specific domain of computability,
we shouldn’t be arguing about this stuff in any meaningful capacity — it’s not worth it.

Equivalence to other computational systems

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 9/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

So, as I mentioned earlier, there are a fair number of equivalent models of Turing
machines. Google these away to your heart’s content.

Post-Turing Machines

Multi-tape Turing Machines

And also equivalent models that aren’t Turing Machines:

μ-recursive functions

the Untyped Lambda Calculus

OISCs, highly minimalistic computers with just one instruction.

Conway’s Game of Life

Most programming languages

Abacuses (with a few simple rules)

Buckets and rocks (with a few simple rules)

Whichever system Randall Munroe was implying with this

We can prove that in each of these cases, these computational systems can compute
the exact same set of functions as any other. And boy, that’s a lot of different Turing
equivalent systems. Abaci, recursive functions, the lambda calculus, a bunch of rocks?
They’re all exactly equivalent? Huh, weird…

Anyways, let’s take a closer look at programming languages.

Programming Languages as Turing Complete


Intuitively, programming languages can be Turing complete. Let’s see if we can
formalize the notion.

Pragmatically, all we have to do to get our programming language into the throes of
beautiful formalism is to equip it with an input and output format, just like we did for
Turing machines above. Like before, we have some play with exactly how we define
our input and outputs, but most reasonable choices should give us all the power we
https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 10/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

need. We’re not trying to make waves with this choice, we’re just trying to bootstrap to
the point where “input” and “output” make sense mathematically.

For a quick example of how dead simple I’m thinking, we’ll do a quick one for
javascript:

If a javascript program exposes a function named run() which, when


executed with a primitive integer as the first argument, returns
either an integer or undefined, the output is the return value.
Otherwise the output is undefined.

I’m gonna return to this particular definition later, but for right now, just note that it is
one of many possible definitions we could choose.

Boundedness
Turing machines can hold an unbounded amount of state, whereas computers cannot.

Any program running on a computer isn’t going to be fully Turing complete; there
exists a limit. No computer ever is going to be able to compute Graham’s Number * 2,
ever — there’s just not enough space in the universe for a computer that large. Yet, to a
Turing machine which doubles numbers, the practical boundedness of the universe
isn’t an issue. A Turing machine is just as capable of computing Graham’s Number * 2
as it is computing the 2 * 2, it just takes a few more steps. This gap implies that real
world computers can’t compute Turing Computable functions for all inputs, and are
therefore not Turing Complete.

So what are they?

We have a separate name for these — they’re not quite equivalent to full-blown Turing
machines but they can do everything that a Turing machine can, up to a certain limit.
These are called Linear Bounded Automations. Linear Bounded Automations are
nearly identical to Turing machines, except they impose a left and right boundary to
the tape.

So if computers aren’t fully Turing complete, how can a programming language, which
runs on a computer, ever hope to be Turing complete?

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 11/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

The trick is that languages don’t necessarily imply limits within their specifications
and instead push this problem to the lower level. A language can either be Turing
complete or Turing incomplete, based solely on its specification, and independently of
any implementation on a real-world computer. The difference might be more subtle
than you think, which I can demonstrate using Brainfuck.²

Let’s compare 2 different common interpretations of the Brainfuck byte pointer:

Original Definition
A Brainfuck program has an implicit byte pointer, called “the
pointer”, which is free to move around within an array of 30000 bytes,
initially all set to zero. The pointer itself is initialized to point
to the beginning of this array.
Modified Definition
A Brainfuck program has an implicit byte pointer, called “the
pointer”, which is free to move around within an infinite array,
initially all set to zero. The pointer itself is initialized to point
to the beginning of this array.

Spot the difference? It’s that bound on the tape length. In the former case, the language
itself has a finite bound, making it equivalent to a linearly bound automata,
independent of any machine it runs on. On a theoretical computer without bounds, the
functions expressible by the original definition is NOT Turing complete.

Compare with the bottom definition.³ On a theoretical computer without bounds, we


can express any Turing computable function using Brainfuck. Thus the language itself,
separate from any implementation or computer it might run on, is Turing complete.

So when someone says “language [x] is Turing complete” and doesn’t prove that the
language itself can theoretically support unbounded memory, you can out-pedant
them and tell them that you won’t believe them until they show it does!

…speaking of which, let’s go back to the definition for input and output we chose for
Javascript. We’ll do a sanity check to see whether or not our input and output allow for
ANY size number, up to and beyond Graham’s Number. Here’s what we laid out before:

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 12/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

If a javascript program exposes a function named run() which, when


executed with a primitive integer as the first argument, returns
either an integer or undefined, the output is the return value.
Otherwise the output is undefined.

So does that work with mind-bogglingly huge numbers like Graham’s number?
Unfortunately, no. In Javascript, primitive integers are only guaranteed exact to 2⁵³, so
it looks like this specific input/output schema wasn’t sufficient.

Establishing an Input/Output schema for Javascript


So what input/output schema would be viable? Can we use strings to represent infinite
data? Not anymore. Can we use very large unary arrays to represent numbers? Sadly,
no.

Let’s move to a different data structure, away from primitives for input, and consider
using instead a linked list of various objects in JS. Remember, we’re just looking for a
viable way to represent natural numbers:

// null wrapped 3 times represents the number 3


{ next: { next: { next: null }}}

This schema should work⁴. The only limit to how deeply this structure can nest are
limits in the interpreter and computer themselves — not within the spec. We can, as
far as the Javascript specification is concerned, represent numbers as large as
Graham’s number using this recursive pattern.⁶

Does this mean Javascript is Turing complete? We should avoid jumping to conclusions
too early: There might be some critical roadblock to handling extremely large
recursive structures, but for JavaScript, I doubt there’s any such roadblock.⁵

Hypercomputation in Programming Languages


The ability to specify non-implementable processes has an interesting implication: A
programming language’s specification need not be bounded by computability. That is,
a programming language itself can be specified to be Super-Turing complete, able to
compute things a Turing machine never could.
https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 13/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

For example, imagine something called JS-Hyper. JS-Hyper is equivalent to JS, with the
addition of a new builtin function willHalt(dn, args), where willHalt is an oracle that
determines whether the Turing machine with description number dn will halt for
arguments args. Since a Turing machine can’t compute that function, JS-Hyper is
Super-Turing complete

This serves to show that even though we expect computers to be able to execute
programming languages, nothing stops us from defining a programming language
unconstrained by such silly notions such as computability. We can do anything we
want! The power is ours! Haha!

The Church-Turing Thesis


Why should we care so much about this weird set of functions called the computable
functions? Why does it even make sense to call this set of functions the computable
functions?

What Turing and Alonzo Church claim is that humans are bound by these rules just
like machines are; that any process a human can use to calculate a number can also be
done by a computer, and vice versa. The Church-Turing thesis, in essence, claims that
human beings are (computationally at least) Turing Equivalent.

Turing calls the numbers that humans can algorithmically compute in finite time the
effectively calculable numbers. In essence, the effectively calculable numbers are all the
numbers we’d ever have hope of computing — any number wherein we can think of a
method to compute that number is considered to be effectively calculable.

We can restate the Church-Turing thesis in this language, yielding:

Church-Turing Thesis: The sets of effectively calculable numbers and computable numbers
are equivalent.

Looks almost formal, doesn’t it?

And away from rigor


As you might have noticed, the Church-Turing thesis isn’t an argument based on strict
formalisms or on rigorous proofs. No, we’ve strayed deep into what is essentially a

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 14/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

philosophical argument about the limits of computability and of minds themselves — a


wonderful example of philosophy and mathematics coexisting and complementing
one other.

Turing’s argument provides three pieces of evidence to make his case for the
equivalence of the effectively calculable numbers and the computable numbers.

The arguments which I shall use are of three kinds.


(a) A direct appeal to intuition.
(b) A proof of the equivalence of two definitions (in case the new definition has a greater
intuitive appeal).
(c) Giving examples of large classes of numbers which are computable.

We’ve already brought up equivalent systems before, and we’ve also brought up large
classes of computable numbers as well (neither of which we’re bothering to prove
here). So that just leaves the direct appeal to intuition to complete Turing’s argument.

In essence, Turing argues that the process a computer (as in the old school human
occupation) executes to compute a number essentially boils down to an infinite tape
paired with a finite state machine. A human can focus on only at a finite number of
symbols at a time, and a human only has a finite number of possible head-states (due
to a finite number of neurons). Given that a certain head-state defines what action you
take next, you can imagine a massive, massive transition table, encompassing every
possible mental transition.

Obviously, this is a very rough sketch argument. But at least you can sort of see how a
combination of infinite paper and finite mental capacity hints towards the Church-
Turing thesis.

Broader implications
What’s so interesting about the Church-Turing thesis philosophically is that it points
towards Turing completeness as being ‘it’, in a sense. It points towards no
deterministic system being able to compute more than what a Turing machine can
compute. In this sense, incomputable means not only incomputable for Turing
machines, but for ANY type of deterministic machine.

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 15/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

Given how many systems are Turing equivalent, how simple a system can be to be
Turing equivalent, and how prevalent Turing equivalence is, does it still make sense to
think of Turing completeness in terms of Turing machines? Maybe pragmatically, but
in my opinion, these machines shouldn’t form the essence of Turing computability,
rather merely the origin of Turing computability.

To me, thinking about Turing equivalence as being inexorably bound to Turing


machines kind of devalues how fundamental computable numbers and computable
functions are. This set of functions has deep mathematical and philosophical
importance separate from how we defined them; Turing machines just happened to be
how we bootstrapped ourselves to understanding what they are. I think that’s really
cool.

Tackling the incomputable


Can we go beyond these restrictions? What tools do we have against the uncountably
many incomputable numbers? You might be tempted to think that there’s no way for a
computer to compute anything uncomputable — I mean, it’s exactly what Turing
claims!

Well, our edge against these problems lies in not solving the general problems that are
proven incomputable, but tackling specific sub-problems that it might be useful to solve
anyways. If we had a program that verified whether a certain program would
terminate or not for most programs (but not all), that’s something we can use to help
us write algorithms and proofs. Pathological cases need not stop us from providing
answers in straightforward cases.

In software engineering, we solve specific subproblems like this all the time. So often,
in fact, we might not realize what we’re doing. For example, does this JS program ever
finish execution?

function run(){
for(let i = 0; i !== -1; i++);
}

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 16/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

The answer is “No, of course not. i will never equal -1, so this program will run
forever.” Well, you just performed a little subproblem of the great and undecidable
halting problem, and it wasn’t even difficult! Yay!

Compilers automate this process heavily, deciding whether code is unreachable,


whether certain subroutines will ever stop, so on and so forth. In essence, compilers
solve the halting problem in specific cases, just like we did above. If we extend this
kind of reasoning, we can cover some pretty complicated examples.⁷

Hypercomputation
There is, however, a field of study called hypercomputation that deals with the
calculation of incomputable numbers. Like actual, real, manifestable incomputable
numbers in the real world. Hypercomputation as a subject requires either:

1. That the Church-Turing thesis is false, such that there exists some mechanical
process that humans can do to compute numbers that can’t be performed by
computers.

2. That the Church-Turing thesis is fundamentally weaker than the common


interpretation, such that there exist functions that machines can compute which
humans cannot (given infinite time and space).

3. That there are physically realizable incomputable numbers, such that there are
instances wherein we can measure incomputable numbers physically rather than
compute them.

Philosophically, if any of these things are true, then that says something very profound
about the nature of the universe: that the universe explicitly does NOT operate like a
Turing machine. This might be really interesting to know.

For potentially unsurprising reasons, studying something that relies on one of those
three unproven assumptions has led to a number of skeptics. Notably, Martin Davis
(the fellow who as mentioned earlier popularized the modern definition of Turing
machines), wrote a paper with the wonderfully sassy title The Myth of
Hypercomputation. Davis argues that 1: many ‘results’ in hypercomputation either
implicitly or explicitly presume having access to incomputable numbers to begin with,

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 17/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

and that 2: if there was a manifestation of an incomputable number physically, it


wouldn’t be useful.

This controversy ended up prompting one of the better lines in academia, written by
Davis in Vol. 178 of Applied Mathematics and Computation:

The editors have kindly invited me to write an introduction to this special issue devoted to
‘‘hypercomputation’’ despite their perfect awareness of my belief that there is no such subject.

I had no other reason to include this mention of hypercomputation except that I find
the above quote hilarious and wanted a reason to share it.

Does this field exist? Tell us what you think in the comment section below. Don’t forget
to rate, comment, and subscribe for more videos like this!

Is Turing computability useful knowledge in software engineering?


There’s a lot of talk about languages being Turing-complete. I don’t think this is a very
useful consideration, for several reasons:

It’s not a high bar. You wouldn’t differentiate a programming language as being
Turing complete, given that practically every other programming language for
which Turing completeness matters is itself Turing complete.

Whether a language is fully Turing complete vs. linearly bounded isn’t a very useful
distinction, because we run our programs on computers of finite size and speed,
not within the boundless logic-sphere of mathematics, and most language-
specified bounds are going to be large enough for any purpose.

Turing completeness doesn’t make a language useful. I mentioned earlier that


Brainfuck is Turing complete, but that doesn’t mean I’m going to consider it for any
serious project. Languages in this category are said to fall into the Turing Tarpit.

Turing incompleteness doesn’t make a language useless, either. If HTML ends up


being Turing incomplete, that doesn’t make HTML any less useful: It’s a tool to
specify document structure. It doesn’t need to be Turing complete.

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 18/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

So if it ever is useful in arguments about software engineering, it’s rarely useful at best.
Any argument in software engineering hinging on Turing completeness either
misunderstands Turing completeness or forms a particularly weak claim.

Fortunately, people don’t care purely about the immediate utility of information. That
would be fairly annoying.

Is this article over?


Yes.

Sources include Computability and Logic, The Annotated Turing, lots of Wikipedia, all
papers mentioned (and a few others now long gone in my browser history), assorted
blog posts, conversations about computability with friends, a few of my own
arguments, and hopefully comments from Viewers Like You. Thank you.

If I’m wrong about ANYTHING, regardless how pedantic, feel free to comment and tell
me about why. I have no formal background in theory of computation, so it’s very
likely I got something wrong here, just hoping it wasn’t anything too major.

Footnotes
(1): The definition I chose to use here differs only minimally from Kleene and Martin’s
description of the partial function, which requires an extra tally for each input, such
that an input of 3 would be encoded 1111, rather than 111. I’m not sure why
Computability and Logic chose to stray from that, but this isn’t a wildly important
difference.

(2): If you haven’t encountered Brainfuck before and you’re a big enough nerd to have
made it this far into an article about Turing completeness, you’re in for a treat: It’s a
hilariously minimalistic and hard to use programming language. Seriously, try it out!)

(3) I believe this is the definition implicitly used in Brainfuck is Turing Complete
https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 19/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

(4) It might have been more convenient to use nested arrays, such as [] to represent 0,
[[]] to represent 1, so on and so forth. I thought objects would capture the nature a bit
better.

(5) In this case, we can paint some strong intuition why we likely don’t have such an
issue. Remember the untyped lambda calculus I mentioned earlier? It uses a recursive
structure to represent unary numbers in a very similar fashion, and one could easily
define a translation between the above linked list representation and the Church
Numerals that the untyped lambda calculus uses. Since the operations on the lambda
calculus are defined recursively, and (I don’t think) there is any spec-defined limit on
recursion depth, this format should be sufficient. Javascript is almost certainly Turing
complete.

(6) To me, it seems like our looser sense of “Is this system Turing Complete” implicitly
asks “Does there exist an input/output strategy such that the resulting system is Turing
Complete?” I’m not going to dig into this problem, because doing so opens up the can
of worms in terms of “well what defines an input/output schema? Could that alone be
Turing-complete?” and I’m not yet equipped to tackle those questions. We’ll just have to
plug our ears and close our eyes and pretend we haven’t thought of this minor
complication.

(7) I believe this is what Microsoft’s Terminator research project was trying to tackle,
but I don’t know what’s up with that or where the current state of the art is.

Programming Computer Science Computation Mathematics

Software Engineering

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 20/21
2/12/23, 1:03 AM What exactly is Turing Completeness? | by Evin Sellin | Medium

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://evinsellin.medium.com/what-exactly-is-turing-completeness-a08cc36b26e2 21/21
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

Published in HackerNoon.com

Niharika Singh Follow

Feb 16, 2019 · 11 min read · Listen

Save

Turing Completeness and the Ethereum


Blockchain
Since about a week, I have been reading about Turing machine and slowly extending
the concept to the world of blockchain. Primarily, the Ethereum blockchain. After
gaining enough insights into the subject, I decided to give voice to my thoughts.

Let me delineate the scope of this article so that you know what you’re in for.

I’ll start off by giving a gentle introduction to the Turing machine followed by a
discussion on the Church-Turing thesis. I’ll touch the Chomsky hierarchy. (Just a bit)
I’ll discuss the fundamentals of an I/O Turing Machine by taking an example,
accompanied with some basic mathematics.

After this, we will see how the Ethereum blockchain is not completely Turing complete
and why it is rudimentary in the present-day. We will see what implications Turing
completeness can have on the Ethereum blockchain with respect to the concept of
Ethereum gas. We will go over the fundamentals of the Vyper language. We will then
see in what scenarios a true Turing machine can transform smart contracts (this
section contains futuristic talk).

I’ll try to keep my language as simple as possible, for obvious reasons.

https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 1/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

This article is best enjoyed with a cup of strong filter coffee. If you don’t know what is filter
coffee then you are missing out on life, my friend.

Alan M. Turing and his Turing Machine


The idea of Turing machine was conceived about 83 years ago, in 1936, by an English
computer-scientist named Alan M. Turing. It was the time when the British empire was
in its prime, so Turing had part of his early education in India. All of Turing’s
contributions were not respected in the UK due to the fact that he was homosexual
even though he broke the ‘unbreakable’ German Enigma code during WW II. He rose
to intellectual fame becoming founder of computer science and artificial intelligence
only after his death. Turing died anonymous, penniless, and impotent. Such is life?

Source: https://simple.wikipedia.org/

https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 2/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

The Turing machine is a theoretical, abstract idea which can simulate any algorithm
that can be logically constructed. This means that a Turing machine can solve any
problem if it can be coded out. There’s special emphasis on the word any. It certainly
doesn’t guarantee how much time it will take to solve the problem, but it is certain that
it will solve the problem. So it can take a second, a minute, a lifetime, or an entire
generation to solve a problem.

But don’t you worry, your problem will be solved


sooner or later!
Construction of a Turing Machine
Take an infinitely long tape (the length of the tape depends upon the length of the
input, expected output, and complexity of the problem to be solved). The tape is
divided into discrete cells. There would be infinite cells on the tape. The machine has a
pointer, or a head which is capable of maneuvering left or right on the tape. A head
also has the ability to erase data on the cell and write new data.

Everything that is to be deleted from the tape and everything that is to be added to the
tape is governed by user-described instructions.

When a Turing machine starts, anything written on the tape is the input. When the
Turing machine halts after completion of the problem, anything written on the tape is
the output.

To compute the solution for a given problem, the Turing machine may read and write
on the tape for infinite amount of time. There is no boundary on any resource like
time, memory whatsoever.

https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 3/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

Each cell has an associated state with it which is governed by user-described


instructions. The state of the cell changes when an event occurs. When state changes,
the value on the cell may be rewritten.

The mappings on the Turing machine are as follows:

Where,

𝛿 is a function.

q is the current state

a is the value on the cell

P is the new state

A is the new value on the cell

R means that the head will move right

L would mean that the head would move left

Church-Turing thesis or Computability thesis


This thesis says that whatever that can be called an effective procedure can be realized
by a Turing machine.

A procedure is slightly different than an algorithm. An algorithm always comes to a


halting state sooner or later. A procedure may or may not halt, it can go on forever.

There are some functions which can’t even be calculated by a Turing machine. For
instance, quantum computers can simulate procedures in less amount of time as
compared to modern computers. In contrast, there exist problems such as halting
problem which an ordinary computer cannot answer. And according to Church-Turing
thesis, no computational device can answer such a question.

https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 4/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

In computability theory, the halting problem is the problem of determining, from a


description of an arbitrary computer program and an input, whether the program will
finish running (i.e., halt) or continue to run forever. Source: Wikipedia.

Chomsky Hierarchy
According to Chomsky, there are 4 types of languages which are differentiated based
on the freedom of usability. Type 0 is the most flexible, free language and Type 3 is the
most restricted language.

The language used in a Turing machine falls under Type 0 classification because the
programmer has all the flexibility in the world to write whatever program they wish to
write. Most of the languages today are Turing complete or Type 0 languages like C++,
Java, JavaScript, Solidty, Pascal etc. Almost all languages today are Turing complete.
The only languages that are not Turing complete are markup languages.

Turing machine as an I/O device


Let’s solve a problem on the Turing machine.

Problem statement: Check if the number of 1s in the string is even or odd.

Let’s take an infinitely long tape with a random string on it. Let the string be

0 1 0 1 1 0. The other cells are blank.

The Turing machine should print ‘o’ if the number of 1s is odd and should print ‘e’ if
the number of 1s is even.

https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 5/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

The rules governing machine behavior are as follows:

The initial state of the machine is q0.

Since the head is on the start of the string, the mapping would be as follows:

The Turing machine will look like this now:

This is because the data on the first cell was 0. The state will change only when the
machine head will encounter 1.
https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 6/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

Next mapping:

The Turing machine will look like this now:

Next mapping:

The Turing machine will look like this now:

Next mapping:

https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 7/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

The Turing machine will look like this now:

Next mapping:

The Turing machine will look like this now:

Next mapping:

The Turing machine will look like this now:


https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 8/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

Next mapping:

H is the halting state. This means the machine has stopped since it encountered a
blank. The head won’t move left or right so there is a — .

The Turing machine will look like this now:

Since the machine halted at q1 state, there are odd number of 1s. If the machine halted
at q0 state, there would be even number of 1s.

Note that ‘o’ is printed on the first encountered blank.

This is how a Turing machine is an I/O device.

I hope this gave you a gist of what a Turing machine really is. In the next section, we
will explore the consequences of Turing machine with respect to the Ethereum
blockchain.

https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 9/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

Let’s see how the Ethereum blockchain is NOT actually


Turing complete.
For those who don’t know the concept of Gas in Ethereum. This will be used a lot in the
article. Here’s a basic definition:

Gas is the unit of measurement used to measure cost


of running an operation on the Ethereum blockchain.
The concept of gas exists to separate computational
cost of running an operation (opcode) from market
value of Ethereum (which is currently highly volatile).
So the cost to add 2 numbers in gas will always be the same even if 1 ETH = 10,000 USD or 1
ETH = 1 USD.
Each block on the Ethereum blockchain has Block gas limit. This is the maximum
amount of gas that can be spent.

On 14th Feb 2019, 3:10 PM, the gas limit was 8000029 gas and the gas price was 5.1
gwei. This information can be easily found at ethstats.net. It’s a really cool site.

Such limits are imposed to protect the blockchain from DDoS attacks.

If you want to translate gas spent per unit time, you can check out ethgasstation.info
for the conversion.

So effectively, there are 2 limits imposed on any I/O on the Ethereum blockchain.
These are gas cost and block gas limit.

And, we know that a true Turing machine works with unlimited resources and the
concept of Gas prevents the Ethereum blockchain to be truly Turing complete.

https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 10/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

And that’s perfectly alright! Because…


Today, we do not really need Turing completeness due to the fact that present day
smart contracts are very mundane. They solve really basic stuff like transferring funds,
changing ownership, maybe adding two numbers. That’s all! Really. Nothing fancy is
being done here.

I’ll tell you what fancy is.

Fancy is:

1. Powering solar panel using electricity purchased from a decentralized grid to power
your water heater.

2. Your smart car interacts with other smart cars on the road and when your car pays
the other smart car in crypto, those cars will clear the way for you.

3. Your smart car will not ignite if you consume too much alcohol. Alcohol
consumption can be recorded using smart sensors.

Let your imagination run wild. The things you would imagine; they are classified as
fancy.

This stuff is fancy because it deals with autonomous intelligence. For such things, we
need very sophisticated smart contracts which will run for a higher gas than the
current block gas limit. This is the future. The future is not P2P, rather it is M2M. This
is where we need Turing completeness.

Although, with great power comes great responsibility!


Solidity, the Turing complete language for Ethereum smart contract, gives a lot of
flexibility to the smart contract developer. A smart contract can only be deployed once
on the blockchain. If anything minor goes wrong, the consequences can be drastically
catastrophic.

A hacker can run any algorithm on EVM written in solidity to create an unauthorized
effect. Most of it will be prevented due to the gas limit, but still, the damage cannot be
undone. Of course, running arbitrary code is dangerous! For instance, there can be a
buffer overflow in a banking application that allows the hacker to change their
https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 11/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

balance. This kind of vulnerability arises due to the fact that Solidity gave the hacker
such freedom.

The current ERC20 token cannot securely and cheaply handle hyper-efficient, high
throughput processing for carrying out sophisticated M2M interactions devoid of
human intervention and oversight.

This is why some folks say that Solidity is not the right choice for the smart contract.
We need something more secure, auditable. This is where Vyper comes in. A basic
example of this would be to store health data on Ethereum blockchain. Solidity may
not be the best language for that. Vyper surely is.

If you want to create super-secure smart contracts, go for Vyper.

Don’t get me wrong, the language Solidity is Turing complete but the “world-
computer” EVM is not.

The language Vyper is NOT Turing complete, Solidity is. At the same time, a program
written in Vyper will always have a predictable output. A program written in Solidity
will not have a predictable output until and unless it is deployed and executed.

In Vyper, simplicity and readability of the language by a lay-man is more important


than freedom and flexibility of Turing complete languages.

Vyper doesn’t support the following features:


1. Modifiers

2. Class inheritance

3. Inline assembly

4. Function overloading

5. Operator overloading

6. Recursive calling

7. Infinite-length loops

https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 12/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

8. Binary fixed point

A fun fact, in Python 0.3 + 0.3 + 0,3 + 0.1 is NOT equal


to 1.

Coming back…
So, there’s a tradeoff between security and freedom here. Fewer features, more
auditability, and more security. More features, less auditability and less security.

Developers of Vyper say it themselves —

Will deliberately forbid things or make things harder if


it deems fit to do so for the goal of increasing security.
Don’t get me wrong. Vyper was NOT created to replace Solidity. It was created to boost
security. A recent study found more than 3000 vulnerable contracts contain security
flaws.

Since we are talking about blockchain, let’s take a while to remember the Bitcoin
blockchain. The Bitcoin scripting language is NOT Turing complete. The script only
performs one function: transfer funds from one account to another. So there is no
need for Turing completeness. So the behavior space of bitcoin script is predictable, as
opposed to Solidity.

https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 13/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

I’d like to take this final opportunity to re-emphasise on the future of smart contracts.
Some of us might call autonomous machines interacting with each other ‘too fancy’.
But I kid you not, probably by the time you are a grandparent, you’d be surprised to see
that this, in fact, will become a reality. Do you want to be one of those old people who
don’t understand technology anymore? I am guessing the answer here is no. So, don’t
tag such ideas as ‘fancy’ and start contributing to these futuristic thoughts! Who cares
if we sound crazy? If crazy people love to ideate, call me crazy!

That’s enough of me ranting there, lol. In the next article, I’d probably show you how to
write smart contracts in Vyper language.

I really hope you enjoyed this. If you did, please applaud and support these ‘crazy’ ideas!

https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 14/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

Hackernoon Newsletter curates


great stories by real tech
professionals
Get solid gold sent to your inbox. Every week!

Email

First Name Last Name

Sign Up

If you are ok with us sending you updates via email, please


tick the box. Unsubscribe whenever you want. 

Terms of Service

Powered by Upscribe
I agree to leave medium.com and submit this information,
which will be collected and used according to Upscribe's

Ethereum Bitcoin Technology Blockchain Computer Science

https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 15/16
2/12/23, 1:05 AM Turing Completeness and the Ethereum Blockchain | by Niharika Singh | HackerNoon.com | Medium

Sign up for Get Better Tech Emails via HackerNoon.com


By HackerNoon.com

how hackers start their afternoons. the real shit is on hackernoon.com. Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

Open in app Sign up Sign In

Search Medium
About Help Terms Privacy

Get the Medium app

https://medium.com/hackernoon/turing-completeness-and-the-ethereum-blockchain-c5a93b865c1a 16/16
2/12/23, 1:07 AM What is Meant By Turing-Complete in Ethereum? - GeeksforGeeks

Data Structures and Algorithms Interview Preparation Data Science Topic-wise Practice C C+

What is Meant By Turing-Complete in


Ethereum?
Last Updated : 28 Jul, 2022

Read Discuss

Turing complete refers to the idea that given infinite time, any program in one language

could be written (albeit perhaps inefficiently) in another. In Ethereum, Turing complete

means using conditional statements and loops to program smar t contracts.

The following topic s will be discussed here :

1. What is Turing’s completeness?

2. Impact of Turing Completeness On Cr yptocurrency.

3. Ethereum as Turing Completeness.

4. Does a System Have To Be Turing Complete To Be Useful?

Let ’s star t discussing each of these topic s in detail.

What is Turing completeness?

Turing-completeness is a word defined by Alan Turing which it describes the idea that

some computing machines are capable of per forming any task a computer can per form. 

The concept of Turing-completeness is one at the hear t of sof tware and application

development, where it allows code to be written without having to check beforehand

if it will work or not. 

In other words, one can write your program without worr ying about what else is

allowed for it to do. 

Start Your Coding Journey Now! Login Register


https://www.geeksforgeeks.org/what-is-meant-by-turing-complete-in-ethereum/ 1/7
2/12/23, 1:07 AM What is Meant By Turing-Complete in Ethereum? - GeeksforGeeks

This is essential in determining usability as well as many other aspects of the

sof tware. It is also impor tant to know what “ Turing-complete” means and how it

relates to Ethereum.

In Turing’s paper, the concept of Turing-complete machines is used to disprove the

possibility of true ar tificial intelligence. 

For instance, whether a machine can eventually imitate the behaviors of a human. In

practical terms, this means that “ Turing-complete” allows programmers to write

code that can be used by any computer to achieve any result. 

It is necessar y for introducing new techniques and ideas into sof tware programming

such as functional programming or even for understanding ideas about universal

computation with regard to general computing.

Impact of Turing Completeness On Cr yptocurrency

One of the main obstacles that cr yptocurrency runs into is reliance on a third par ty,

typically an entity such as a bank. 

These companies are responsible for ensuring that a cr yptocurrency can be used in

ever yday transactions because it must be compatible with traditional banking

ser vices. Turing completeness is a characteristic of a programming language. 

A language is Turing complete if it can be used to simulate a Turing machine, which

means that an appropriately designed program can solve any problem that a

Universal Turing Machine (UTM) can solve. 

In order for this to be feasible, programs must be free from restrictions, such as

Start Your Coding Journey Now!


halting and infinite loops. 

https://www.geeksforgeeks.org/what-is-meant-by-turing-complete-in-ethereum/ 2/7
2/12/23, 1:07 AM What is Meant By Turing-Complete in Ethereum? - GeeksforGeeks

Theoretically, Turing’s completeness enables the development of highly advanced

programs in one language and allows other projects or companies to create highly

advanced applications using the same tools.

Key Points

Ethereum can be built on the blockchain that has been built right now with no need to

upgrade. So, one gets a cheap and scalable Blockchain offering storage and

processing power that is almost limitless and at the same time evolving.

Ethereum will change the whole Blockchain ecosystem by making it possible to do

many more things on it. All thanks to its Turing-complete language Solidity. 

The whole concept of cr yptocurrencies and smar t contracts is based on the idea of

Turing-complete languages.

Smar t contracts are being used for all kinds of applications including common

transactions like payments, buying a car, or even licensing music or sof tware. Smar t

contracts can be used in an efficient way to run state channels between users and to

make payments transparently.

ERC20 is the standard document that provides a structure for tokens (works on

Ethereum) and it is compatible with most tokens projects like City Coin, Request

Network, and others. 

Initial coin offering (ICO) which is a new way to raise money for a project – uses

ERC20 as the monetar y unit without issuing tradable ERC20 tokens before the ICO

launch.

Ethereum as Turing Completeness

Ethereum is a cr yptocurrency built with Turing completeness in mind. 

Since it relies on programmable smar t contracts, Ethereum is not reliant on third-

par ty ser vices to function. 

This means that, theoretically, one could buy a house or make other major purchases

on the Ethereum blockchain through the use of a smar t contract.

However, there are concerns regarding whether or not this is feasible due to the high

costs associated with Turing complete systems and their ability to run continuously

without human inter vention.

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/what-is-meant-by-turing-complete-in-ethereum/ 3/7
2/12/23, 1:07 AM What is Meant By Turing-Complete in Ethereum? - GeeksforGeeks

Theoretically, there are several challenges associated with Turing complete

cr yptocurrencies. A s the cr yptocurrency industr y continues to grow and expand, new

ideas are being brought for th constantly — many of which would not have been possible

without Turing completeness.

Does a System Have To Be Turing Complete To Be Useful in Blockchain?

A system has to be Turing complete in order to be useful in blockchain, but it can have

all the other desirable proper ties of a blockchain, such as decentralization and

trustless transactions.

A system is Turing complete if it can simulate an arbitrar y computer program. Turing

complete systems have to be able to run any possible computation, which includes

the most complex types of computation such as those found in blockchain. This type

of system also of ten has better per formance than other systems because it can use a

set of rules which are more efficient when solving problems with many steps.

In addition to being Turing complete, a system must also be decentralized and allow

trustless transactions according to consensus in order for it to be useful in the

blockchain. These proper ties are necessar y for the security and consistency that a

blockchain needs in order for its data records or “blocks” to have value and meaning.

Ethereum is a ver y new technology with many possibilities that can disrupt our lives in

the future. In shor t, it is a complex network of computers that allows one to create own

currency and it is totally decentralized and free to use. 

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/what-is-meant-by-turing-complete-in-ethereum/ 4/7
2/12/23, 1:07 AM What is Meant By Turing-Complete in Ethereum? - GeeksforGeeks

Like 0

Previous Next

Related Articles

1. Use of Ethereum's RLPx in Ethereum Ecosystem

2. Ethereum (ETH) vs Ethereum Classic (ETC) in Blockchain

3. Ethereum 2.0

4. What is Ethereum?

5. Difference Between Bitcoin and Ethereum

6. ERC20 vs ERC721 in Ethereum

7. Application Binary Interface(ABI) in Ethereum Virtual Machine

8. Interacting With Ethereum Smart Contract Using Web3js

9. What is Ethereum Mempool?

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/what-is-meant-by-turing-complete-in-ethereum/ 5/7
2/12/23, 1:07 AM What is Meant By Turing-Complete in Ethereum? - GeeksforGeeks

10. Components of Ethereum Network

Ar ticle Contributed By :

wanderlustsaxshy
@wanderlustsaxshy

Vote for difficulty

Easy Normal Medium Hard Expert

Article Tags : Ethereum, Picked, Blockchain

Improve Article Report Issue

A-143, 9th Floor, Sovereign Corporate Tower,


Sector-136, Noida, Uttar Pradesh - 201305
[email protected]

Company Learn
About Us DSA
Careers Algorithms
In Media Data Structures
Start Your Coding Journey Now!
https://www.geeksforgeeks.org/what-is-meant-by-turing-complete-in-ethereum/ 6/7
2/12/23, 1:07 AM What is Meant By Turing-Complete in Ethereum? - GeeksforGeeks

Contact Us SDE Cheat Sheet


Privacy Policy Machine learning
Copyright Policy CS Subjects
Advertise with us Video Tutorials
Courses

News Languages
Top News
Python
Technology
Java
Work & Career
CPP
Business
Golang
Finance
C#
Lifestyle
SQL
Knowledge
Kotlin

Web Development Contribute


Web Tutorials Write an Article
Django Tutorial Improve an Article
HTML Pick Topics to Write
JavaScript Write Interview Experience
Bootstrap Internships
ReactJS Video Internship
NodeJS

@geeksforgeeks , Some rights reserved

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/what-is-meant-by-turing-complete-in-ethereum/ 7/7
2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

Published in HackerNoon.com

Mayank Pratap Follow

Aug 31, 2018 · 14 min read · Listen

Save

What are Decentralized Applications, DApps?

What are Decentralized Applications? — Image Source: EngineerBabu

A modern model for creating highly scalable and profit-making applications is making
its way to our regular lives these days. Bitcoin has gained popularity with features like

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the … 1/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

peer-to-peer technology and distributed storage ledger. These features provide the
building blocks for creating new type of applications which are called as decentralized
applications, or DApps.

Being a new concept in the industry, DApps are getting a lot of media coverage.
However, with their increasing implementation and emerging use cases, they are likely
to be adopted and accepted by the people. DApps are known for being distributed,
flexible, transparent along with having a better structure of incentivization than the
current software models.

Decentralized Applications Introduction


DApps (decentralized applications) is one of the most intriguing terms used in the
blockchain space currently. The term DApp is coined by combining two words-
decentralized applications. In simple terms, DApps can be considered as applications,
tools or programs that work on the decentralized Ethereum Blockchain.

According to the definition given by Wikipedia, “A decentralized application (Dapp,


dApp or DApp) is an application that is run by many users on a decentralized network
with trustless protocols. They are designed to avoid any single point of failure. They
typically have tokens to reward users for providing computing power.”

In order to understand the meaning of this definition better, let’s first try to
understand how traditional web applications function and how are DApps any
different? In traditional web apps, two important elements that make the system
usable are the front end and the back end. These elements communicate with each
other in the form of coding messages through the HTTP protocol.

There are multiple issues involved with such applications when compared with DApps.
First of all, such application servers are hosted on a hosting service that uses a
centralized architecture which leads to a single point of failure in case of a malicious
attack. Moreover, taking down an application through a centralized server only
requires the hacker to interrupt with the hosting service. When we rely on centralized
servers, the data is more susceptible to attacks.

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the … 2/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

DApps — Image Source: EngineerBabu

When it comes to DApps, there are again two main elements involved. While the front
end remains the same as traditional applications, the backend is formed in the form of
an Ethereum blockchain. The communication between the frontend and backend
happens in the same form as in the traditional app and the end user won’t be able to
distinguish between both. In the case of using a DApp, it is very difficult to bring any
application down as it requires to take down all the distributed hosting nodes which
are practically not possible.

Taking an example for the same standard popular web applications like Facebook,
Twitter and Instagram currently function on a centralized server model. The data of
these applications is controlled by singular authorities and can be manipulated or
changed according to need. Meaning that though there are millions of front-end users
of these applications, the backend is still controlled by the individual organization.

Contrary to this, a DApp is distributed in nature and involves the participation of all the
elements of the network in order to modify or take control of any information. DApps
can run on both, peer-to-peer as well as blockchain network. When an application like
Twitter takes a DApp based approach, no one has the authority to delete anyone’s tweet
once it is posted on the network after running through the consensus mechanism.

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the … 3/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

The nature of DApps can be summed up as distributed, flexible and transparent as they
have the potential to transform the technological landscape.

In the current times, we put our trust, data and vital information in hands of
centralized applications that function through typical servers, databanks or standalone
computers. This approach allows one single authority to have control over everything
we do on these applications thus, putting our privacy at risk. On the other hand, the
Ethereum network runs on a community-based model which operates in a distributed
model.

Decentralized applications are very useful as they can be used to connect different
people in marketplaces, sharing resources and storing them, maintaining cryptos as
well as executing smart contracts without giving ownership to one central authority.
Currently running DApps include tools for storage, security, and servers etc. Other
than these, some apps are created in the form of digital wallets that allow people to
manage their cryptocurrencies.

DApp Features
Though DApps are recently introduced with these many use cases, they have become
popular and are in demand too. Some common features that make decentralized
applications noticeable are:

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the … 4/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

DApp Features — Image Source: EngineerBabu

Open Source
In closed-source applications, the end users need to trust the developers of the
applications in terms of decentralization as they can’t directly access their data via any
central source. Thus, closed-source applications are always subjected to risks for users
when it comes to adopting them. DApps, on the other hand, is decentralized and open
source applications. A DApp creates a new structure for business practices as it allows
all the network participants to keep track of the happenings rather than one person.
They are governed through autonomy and any changes in the DApp are decided
through the consensus (the majority of users) The code base of a DApp should be
available for scrutiny.

Decentralized Consensus
Before the introduction of Bitcoin, the validity of any transaction would always need
some kind of centralization. In order to make a payment, the transaction was pushed
ahead through a clearinghouse that monitored it. Decentralized applications work on a
peer to peer (P2P) model, meaning that the nodes are able to connect with each other
directly. In a DApp, a transaction is processed through a consensus mechanism. When
the majority of the nodes approve the transaction, it goes ahead and gets processed.
Also, the validators of the network are incentivized by rewarding them in the form of
cryptographic tokens.

No Central Point of Failure


Since DApps are distributed and they don’t rely on one single server, there is no central
point of failure. DApps allow the data stored in them to be decentralized across all its
nodes. These nodes are independent of each other. In case of failure of one node, the
other nodes won’t get affected and will run on the network accordingly. Different
decentralized database systems like IPFS (Interplanetary File System), BitTorrent, and
independent DHTs can be used to create DApps with this feature.

DApps Classification
DApps can be classified into three different types according to the Ethereum white
paper. Let us understand them one-by-one here:

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the … 5/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

Financial Blockchain Applications-


As the name suggests, this category will have Dapps that will provide users with
methods of managing their finances and money. One example of this category is the
Bitcoin which provides users with a distributed and decentralized system of
monetization.

Since there is no centralization to the control of the network, no single authority is


responsible for controlling all your money. The power and regulation of money lying
in the hands of people of the network and the consensus protocol. Users are the owner
of their money in these applications. Other than Bitcoin, various Altcoins have been
created so far. These altcoins fall into this category.

Semi-financial Blockchain Applications-


This category is a mix of money and information that resides outside the blockchain.
An example in this category is the insurance applications that allows money returns
for flights in case of delay in arrival. Another example of this category is the ICO
(Initial Coin Offerings). An ICO is nothing but a fundraising mechanism similar to the
IPO with the only difference being the involvement of cryptocurrencies in place of fiat
money.

ICO DApps are easy to structure as they apply technologies like the ERC20 Token
Standard. Most of the ICOs function by having investors send funds to a smart contract
in the form of bitcoin or ether. This smart contract stores the funds and shares an
equivalent value in the form of a new token at a later point in time.

Fully Functioning Decentralized Applications-


This third category of DApps utilizes all the features of the decentralized and
distributed systems. These kind of applications are the most popular kind of DApps
and they do not need to be financial at any level. For example- Applications for online
voting or decentralized governance. Countries like Dubai have already set their pace
towards utilizing blockchain and building the first blockchain-run government.

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the … 6/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

Types of DApps — Image Source

The Essentials Of DApps


In order to consider an application a DApp, the following criterion needs to be met:

The application should be open-source and should function in an autonomous


manner. No centralized single authority should have access to the majority of the
application tokens. The DApp must adhere to the rules applied in the consensus
mechanism used by it with respect to the proposed future upgrades as well as the
market feedbacks. All the changes to be introduced in the app must be decided
through consensus of the system users.

The data and records of the application’s functioning should be kept on a public
and decentralized blockchain. Also, all the information stored on the blockchain
must be cryptographically encrypted.

The application must use a crypto token such as Bitcoin or any native token of its
own. This token should be used for rewarding miners and farmers according to
their contribution in the system

The DApp must use a standard cryptographic algorithm in order to generate token
and have a fixed consensus mechanism similar to Bitcoin which uses Proof of
Work algorithm for rewarding purposes.

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the … 7/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

Consensus Establishing Mechanisms


DApps use two common mechanisms in order to establish consensus namely, proof-of-
work (PoW) and proof-of-Stake (POS). As the name suggests, the proof-of-work
mechanism is used as a consensus mechanism in blockchain and the reward
distribution in this is done through based on the amount of work that each stakeholder
contributes to the network or the DApp. The PoW mechanism is used in the Bitcoin
blockchain and the consensus through which people are rewarded is termed as
mining.

While on the other hand, the proof-of-stake mechanism allows any decision on the
DApp to be made on the basis of the percentage ownership of the application by the
stakeholders. For example, if a stakeholder of a decentralized application holds 25%
tokens issued by the app, he/she carries 25% weight. The Omni Protocol utilizes the
proof-of-stake mechanism.

It is not necessary to use one single algorithm among these two i.e. any application can
use both of these mechanisms in parallel. An example of such case it the Peercoin.
This kind of combination allows the DApp to consume less energy which is one of the
major drawbacks of using proof-of-work alone and it also allows the application to
become more resistant to 51% attacks.

Token Distribution Mechanisms


In order to distribute their own tokens in the markets, DApps follow three common
mechanisms namely mining, fundraising, and development. The mining mechanism,
as we discussed earlier, works on the PoW principle and it allows the maximum
number of tokens to be distributed to the people who contribute the most of their work
to the operation of the application. For example, Bitcoin allows token distribution in
the form of rewards when miners solve a mathematical problem by using their
computing power to verify a transaction and maintain the Bitcoin blockchain.

The fundraising mechanism is nothing but a method to raise money for the initial
development of the application. This is carried out with the help of ICO, Initial Coin
Offering process. People are presented with the app idea through a white paper,
website, and proof of concepts and if they seem convinced with it, they can contribute
to the application by raising funds for it.

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the … 8/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

In the fundraising mechanism, the tokens are distributed to the people who contribute
to the initial development of the application. Consider the example of the Master
Protocol for understanding this. The app tokens, Mastercoins were initially distributed
to the people who participated in their ICO and sent their Bitcoins to a given address in
exchange for Mastercoins. These Bitcoins were then used to fund the application
development.

Third, comes to the development mechanism in which tokens are generated by


utilizing a predefined mechanism. These tokens are available only for the development
of the DApp. Taking the example of Master Protocol again, the application used a
collaboration mechanism along with the fundraising mechanism to fund the future
development. Around 10% of the mastercoins that were raised via fundraising were
kept aside for development of the protocol. The availability of these tokens was based
on a predetermined schedule and they were distributed through a community-driven
bounty system.

Example — Image Source: Github

How Does A DApp Function?


In order for a DApp to function, the four essentials covered in the previous section
need to to be implemented. This makes the DApp an open-source application which is

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the … 9/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

implemented on decentralized blockchains. These apps are fueled with the tokens that
are generated using a protocol.

The open-source nature of a DApp makes it fully decentralized and allows anyone to
view and make contributions to the code. This also ensures the quality and quantity
factors as it fastens the scalability process of product development.

Once these steps are taken care of, using blockchain to decentralize the application is
the next in line. Blockchain technology allows you to create a permanent ledger for
storing any kind of records. The next step is to add transactions and records to
blockchain ledger with the help of tokens that are mined using different protocols or
algorithms i.e PoW, PoS or both in some cases.

Popular Ethereum-based DApps

Golem
Golem is a DApp project that aims to create a global market for utilizing idle computing
power. The concept of the project is to utilize the power of PCs and data centers to
create a rentable supercomputer that can be used by anyone across the world.

Rather than relying on any central server farm, the project distributes the
computational load to the “Providers” who are willing to rent their machines for
computational work. These providers can share their resources in exchange for GNT
tokens. The project holds a lot of potential and scope as it allows to decentralize the
rendering process and is much faster and cheaper than the centralized options.

Augur

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the… 10/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

Augur — Image Source

Augur is an interesting DApp project which is based on the concept of combining


prediction markets with the power of a decentralized network. It can be thought of as a
decentralized market platform or a forecasting tool that allows you to make
predictions for potential trading gains. It utilizes the “Wisdom of the Crowd” to make
real world event prediction and uses and ERC20 token.

The Augur application has predicted many results that have been proven more
accurate than the prediction of many experts in the real world. Augur is considered to
be a prediction market prediction platform which will incentivize users when they
make correct predictions for world events. Moreover, the market creators the holders
of the platform tokens that report on events will also be paid or incentivized.

Status

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the… 11/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

Status — Image Source

Defining itself as The Mobile Ethereum Client, Status allows mobile devices to act as a
light client node. Based on the Ethereum network, it allows you to chat, browse and
make your payments safely on the decentralized web. The DApp also enables you to
access the entire Ethereum ecosystem from anywhere.

Users can send smart contracts and exchange payments with each other within the
DApps messenger system. Since the app is operated on a peer-to-peer protocol, server
downtime is not an issue.

Gnosis

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the… 12/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

Gnosis — Image Source

Similar to Augur, Gnosis is also a prediction market platform built on the Ethereum
blockchain. The project aims to allow people to make accurate predictions about real-
world events like elections, market prices, etc. Users of the platform are rewarded for
making accurate predictions by Gnosis in the form of GNO token or other
cryptocurrencies as per the project’s preset rules.

Gnosis allows developers to create their own custom prediction market on Gnosis
through the available developer tools on the platform.

Prism
Prism is an Ethereum-hosted project by ShapeShift. It provides a trustless and
decentralized asset portfolio market. It utilizes EDCCs, executable distributed code
contracts, in order to generate custom management tools for market portfolios. With
the aid of Prism, anyone can invest ether in different cryptos and specify the holding
percentage they want.

Prism eliminates the need for third-parties and the complex process of saving and
storing wallets and multiple private keys. Since the project is based on Ethereum
Smart Contracts, the requirement of managing passwords and keys of different

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the… 13/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

exchanges is eliminated. Moreover, it shows a person’s investment portfolio with an


interactive UI and tracks everything automatically in real time.

Aragon

Aragon — Image Source

Another ambitious project in the DApp series is Aragon. The Ethereum based platform
allows people to create and manage a decentralized organization. Aragon is an open
source project and is managed by the Aragon Foundation. The concept of the project is
to eliminate the need for human trade and allows people to manage entire businesses
and organizations using the blockchain.

The platform is created to build and manage DAOs (decentralized autonomous


organizations). Aragon also includes ANT, the platform’s token, which provides voting
rights for making decisions about the future development of the product. The DAO
concept of Aragon can be used for any organization or a company or even any non-
profit or foundation. It is expected to provide transparency and an extra level of
effective governance for such entities.

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the… 14/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

Aragon also assists in curbing unnecessary third parties by replacing them with
ethereum-based smart contracts. By eliminating geographical boundaries and
paperwork, the platform aims to act as an extremely convenient digital jurisdiction for
everyone.

Conclusion
Dapps have evolved with exceptional features which gives them the potential of
becoming self-sustaining resources as they provide their stakeholders with the ability
to invest in Dapp development. Observing their popularity, it can be established that in
the coming days, DApps for multiple purposes such as payments, storage, cloud
computing etc. will soon surpass the currently available traditional applications.

The unavoidable advancement of blockchain adoption will make numerous current


practices obsolete. It might seem like a far-fetched outcome as of now, but services like
banking can definitely adopt blockchain in the coming days and operate with trust-
less, self-sustaining, and decentralized networks. Large corporations working in this
direction to secure their place in the blockchain ecosystem is proof of that.

——————————————————————————

Read My Other Related Articles


1.Blockchain Technology Explained: Introduction, Meaning, and Applications, Also
on Hackernoon
2. How is Blockchain Revolutionizing Banking and Financial Markets, Also on
Hackernoon
3. Blockchain in Healthcare: Opportunities, Challenges, and Applications, Also on
Hackernoon
4. How is Blockchain Disrupting the Supply Chain Industry?, Also on Hackernoon
5. Everything You Need to Know About Smart Contracts: A Beginner’s Guide, Also on
Hackernoon
6. Top 10 Reputable Blockchain Development Companies, Also on Hackernoon

I am Mayank, Cofounder of EngineerBabu. Feel free to reach out to me on LinkedIn |


[email protected] (About EngineerBabu — Medium).

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the… 15/16


2/12/23, 1:10 AM What are Decentralized Applications, DApps? | by Mayank Pratap | HackerNoon.com | Medium

In addition EngineerBabu Help startups, enterprises, and owners to grow their


business by building high class IT solutions. 95% of projects developed by them were
completed on-time. 30+ funded by VCs, Win most innovative Premier Design Award,
selected in Y-Combinator 2016 & 2017.

Blockchain Dapps Decentralized Apps Open Source ICO

Sign up for Get Better Tech Emails via HackerNoon.com


Open in app Sign up Sign In
By HackerNoon.com

how hackers start their afternoons. the real shit is on hackernoon.com. Take a look.
Search Medium

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/hackernoon/what-are-decentralized-applications-dapps-3b63b4d587fe#:~:text=DApps (decentralized applications) is one,on the… 16/16


2/12/23, 1:12 AM DApps: Crypto Basics For All Part 1 | by @pramodAIML | CryptoWise | Medium

Published in CryptoWise

@pramodAIML Follow

May 15, 2021 · 5 min read · Listen

Save

DApps: Crypto Basics For All Part 1


What are DApps?

I Feel:

When technology starts respecting user privacy and is


willing to decentralize the control of the data
https://medium.com/crypto-wisdom/dapps-crypto-basics-for-all-part-1-6fc794e4d765 1/7
2/12/23, 1:12 AM DApps: Crypto Basics For All Part 1 | by @pramodAIML | CryptoWise | Medium

generated by humans securely and with the required


transparency, the whole of humanity is bound to
benefit for good.

DApps are the true technology that harnesses the power of decentralization beautifully
to serve end-users with the required sensitivity and security. DApps are expanded as
Decentralized Applications which are built on the top of Blockchain.

What Are DApps?


A dApp has its backend code running on a decentralized peer-to-peer network.
Contrast this with a normal app where the backend code is running on centralized
servers.

Blockchain-powered decentralized apps are similar to the current mobile or web apps
we use everyday and only differ in how you transact or communicate over the
blockchain network. Here the data being transacted is no longer controlled by big any
single entity, middleman, or enterprises rather it is being distributed over the
decentralized network of millions of nodes keeping user records and identity
immutable and secure.

https://medium.com/crypto-wisdom/dapps-crypto-basics-for-all-part-1-6fc794e4d765 2/7
2/12/23, 1:12 AM DApps: Crypto Basics For All Part 1 | by @pramodAIML | CryptoWise | Medium

The main difference between conventional web or mobile apps and DApps is that DApp’s run
on distributed and immutable blockchain networks rather than a centrally controlled
operating system/server. This power of immutability makes DApps free of any censorship

Special Attributes Of DApps:


Some of the amazing characteristics and properties which DApps hold are what make
them special. Let’s list down some of them and discuss them briefly

Censorship Proof :
If you are using a decentralized app, as a user your profile or account can’t be blocked
by anyone in the blockchain network as it is not controlled by any central authority or
any owner.

Let’s understand it with one more example:

If you are using Facebook-like dApp and publish messages in the app network. Once
posted, no one, including you, cannot delete those messages.

Open Source:
DApps needs to be open sourced and the code base must be available for the developer
community. Having said that, any updates being pushed in the open sourced DApp

https://medium.com/crypto-wisdom/dapps-crypto-basics-for-all-part-1-6fc794e4d765 3/7
2/12/23, 1:12 AM DApps: Crypto Basics For All Part 1 | by @pramodAIML | CryptoWise | Medium

code must be done through a consensus mechanism that amounts to some form of
majority vote rather than by a developer.

Decentralized:
As it is a decentralized app, DApps data which is obviously anonymous must be stored
on an immutable, public blockchain.

Secured Cryptographically :
Dapps offer Complete data integrity. Data stored on the blockchain is immutable and
indisputable, thanks to cryptographic primitives that ensures that hackers/attackers
can’t forge your transaction without your consent. You authorize dapp actions with
your DApp user account usually via your wallet, so that your credentials remain safe .

Stay Anonymous:
As dApps user your real world identity is never revealed and you can stay anonymous
while transaction in the DApp.

Get Incentivised :
Validators in the Blockchain ecosystem are incentivized through tokens generated in
DApp’s.

DApp’s With Zero Downtime:


DApp’s are hosted on the decentralized blockchain platform like ethereum, polygon,
which ensures high level of availability 24x7. The chances of the blockchain platform
like ethereum being hacked or suffering a downtime is an extremely rare event.

How Does DApp’s Work ?


DApps backend code are hosted and run on the decentralized network like Ethereum
blockchain for data storage and smart contracts for their app logic.

Here smart contracts is a set of protocols which lives on the blockchain publicly to be
viewed and executed based on those set protocols. Smart contracts facilitate
agreements and transactions as a trusted mediator. The real reason why DApps are
able to be decentralized in the given blockchain network, is the intelligent smart
contract which holds the logic to control the DApp’s transactions.

https://medium.com/crypto-wisdom/dapps-crypto-basics-for-all-part-1-6fc794e4d765 4/7
2/12/23, 1:12 AM DApps: Crypto Basics For All Part 1 | by @pramodAIML | CryptoWise | Medium

Smart Contract:
As covered above, smart contracts lie at the core of Dapps success. Let’s understand
more about smart contract

What is a Smart Contract?

A “smart contract” is simply a code piece that runs on the Ethereum blockchain. It’s a
collection of functions and data (its state) that resides at a specific address on the blockchain
platform like Ethereum.

Smart contracts are a kind of Ethereum account. This means they have a balance and
they can send transactions over the network. However they’re not controlled by a user,
instead they are deployed to the network and run as programmed

We will learn more about Smart contracts and how it works in our upcoming piece in
this series of Crypto basics, as it is out of scope for this article.

DApps Use Case & Examples :


DApps can run everything from games, NFT, Collectibles and marketplaces to
decentralized finance (DeFi) lending platforms. Some of the popular example of the
same are

DApps Example :
UniSwap : Decentralized Trading Protocol

Aave: Open sourced liquidity protocol

1-Inch: Most Efficient DeFi aggregator

Audius: Giving everyone the freedom to distribute, monetize, and stream audio

Rarible: is both a marketplace for those assets, as well as a distributed network


built on Ethereum that enables their trade without a middleman.

What’s Next?
We will discuss the most fundamental unit of blockchain network called “Nodes”. I feel
it is imperative that one should understand the importance and functionality of nodes

https://medium.com/crypto-wisdom/dapps-crypto-basics-for-all-part-1-6fc794e4d765 5/7
2/12/23, 1:12 AM DApps: Crypto Basics For All Part 1 | by @pramodAIML | CryptoWise | Medium

if one want to learn more about crypto basics. Also we will cover

AMM’s : Automated Market Makers

Smart Contract

MetaMask

Yield Farming

Cloud Mining

Pool Mining

NFT: Non Fungible Tokens and many more crypto concepts.

Meanwhile if you want to learn about one of the promising crypto project called
Elrond, click the given link below

Elrond Crypto Project: What & Why?

Elrond: A NextGen Scalable, Value Transfer Blockchain Protocolmedium.com

Happy Learning ….. More Earning…..

Dapps Blockchain Cryptocurrency Ethereum Decentralization

Enjoy the read? Reward the writer.Beta


Your tip will go to @pramodAIML through a third-party platform of their choice, letting them know you appreciate their
story.

https://medium.com/crypto-wisdom/dapps-crypto-basics-for-all-part-1-6fc794e4d765 6/7
2/12/23, 1:12 AM DApps: Crypto Basics For All Part 1 | by @pramodAIML | CryptoWise | Medium

Give a tip

Get an email whenever @pramodAIML publishes.

Your email

Subscribe

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

Open in app Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/crypto-wisdom/dapps-crypto-basics-for-all-part-1-6fc794e4d765 7/7
2/12/23, 1:16 AM Centralized vs. Decentralized Apps, Part 1: The Difference | by Maxwell Goldbas | Medium

Maxwell Goldbas Follow

Sep 20, 2017 · 2 min read · Listen

Save

Centralized vs. Decentralized Apps, Part 1: The


Difference
Blockchain is the new Big Data. A broad, overarching tech term that is repeated
insufferably. As an engineer, you are probably getting pressure to integrate it
somehow, and in an inconsiderately short timeline so the C-suite can talk about it at
the next conference.

Like Big Data, or teenage sex, everyone is talking about it, yet few know what it
actually is. After my first dive into building a natural gas exchange on Ethereum, I
would like to share my insights, and blunders.

All applications are, fundamentally, logic. If I submit this form, my data is saved. If I
click the thumbs up button, I send my approval. If I swipe left, I send my disproval.

With a centralized application, a single cluster of servers contains all logic to conduct
the necessary steps. The cluster receives your request, processes it, saves what it
needs, and returns the correct response. With a decentralized application (or Dapp) all
nodes in the network receive the logic you have deployed within your contract. Once
the contract is mined, all nodes have the exact same logic, based on the contract, saved
on their copy of the blockchain. Once you interact with this contract, the same signal
must be processed with the deployed logic same way, then save the same data and
return the same signal.

This is a radically different architecture than Node.js, Ruby or Python centralized


applications rely on, but to sum up, the logic in your application and service layer is
https://medium.com/@GoldbasNews/centralized-vs-decentralized-apps-part-1-the-difference-244a66e0b74d 1/3
2/12/23, 1:16 AM Centralized vs. Decentralized Apps, Part 1: The Difference | by Maxwell Goldbas | Medium

within your contract.

The main advantage is you do not need to maintain a cluster nor keep the cluster
secure. That is taken care of by the redundancy of the nodes in the network. The
majority of logically functionality within applications is taken care of by decentralized
Ethereum applications (user authentication, get/post requests, data storage, etc.) .

However much of the existing infrastructure that applications work with is centralized
and an Ethereum contract cannot work with a centralized systems that require
common API calls. If a contract was to make a conventional API call, it would require
every node that it existed on to execute a call, which would cause irregularities in the
API call. (Although, Oraclize is gaining strength)

This major difference of being incompatible with conventional systems required a


shift in thinking while I was building my first Dapp. The next installment will be on
synchronizing the two, while conserving hashing power.

If you would like to discuss Caserta building a distributed application for your
company, please reach out to me at [email protected]

Blockchain Ethereum Decentralization

Open in app Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/@GoldbasNews/centralized-vs-decentralized-apps-part-1-the-difference-244a66e0b74d 2/3
2/12/23, 1:16 AM Centralized vs. Decentralized Apps, Part 1: The Difference | by Maxwell Goldbas | Medium

https://medium.com/@GoldbasNews/centralized-vs-decentralized-apps-part-1-the-difference-244a66e0b74d 3/3
2/12/23, 1:18 AM Centralized vs Decentralized vs Distributed: a quick overview | by Julio Marín | Medium

Julio Marín Follow

Jan 31, 2019 · 2 min read · Listen

Save

Centralized vs Decentralized vs Distributed: a


quick overview

Centralized vs Decentralized vs Distributed

When getting into dApps and blockchain related technologies this concepts sometimes
got confused, so here you have a quick overview,

Centralized Applications

https://medium.com/@juliomacr/centralized-vs-decentralized-vs-distributed-a-quick-overview-1f3bd17b8468 1/3
2/12/23, 1:18 AM Centralized vs Decentralized vs Distributed: a quick overview | by Julio Marín | Medium

Most of the Internet applications we use every day are centralized, they are owned by a
particular company or person that provision and maintain the source code to execute
on a computer, server or maybe even a cluster.

Centralized applications are the majority of applications that engineers are used to
building and users are used to using.

Data resides on a centrally owned database controlled by a company. You ultimately


have to trust that this company is doing things correctly and in your interest.

Decentralized Applications
Distributed means computation is spread across multiple nodes instead of just one.
Decentralized means no node is instructing any other node as to what to do.

The code runs on a peer-to-peer network of nodes and no single node has control over
the dApp. Depending on the functionality of the dApp, different data structures can be
used to store the application data. Bitcoin uses a blockchain decentralized ledger of
transactions.

Distributed Applications
Applications in which computation is distributed across components, communicate
and coordinate their actions by passing messages. The components interact with each
other in order to achieve a common goal.

Some distributed applications examples are:

CDN

AWS

Cloud Instances

Google, Facebook, Netflix, etc

https://medium.com/@juliomacr/centralized-vs-decentralized-vs-distributed-a-quick-overview-1f3bd17b8468 2/3
2/12/23, 1:18 AM Centralized vs Decentralized vs Distributed: a quick overview | by Julio Marín | Medium

Hopefully this will be helpful for you and if you want to know more about the
SalsaMobi education efforts on different technologies you can subscribe here and we
will notified you when we create more articles or tutorials.

SalsaMobi Logo

Julio Marin is an advocate for the research and implementation of new technologies and their
use on day to day life. Research areas include multimedia development and delivery,
cryptocurrencies, mobile development and marketing automation. Currently works in
SalsaMobi as Senior Curriculum Developer and Blockchain Development Team Lead.
Open in app Sign up Sign In

Search Medium
Blockchain Dapps

About Help Terms Privacy

Get the Medium app

https://medium.com/@juliomacr/centralized-vs-decentralized-vs-distributed-a-quick-overview-1f3bd17b8468 3/3
2/12/23, 1:21 AM Centralized vs Decentralized Applications - GeeksforGeeks

Read Discuss

Centralized vs Decentralized Applications


Last Updated : 16 Jun, 2022

With the existence of the dApps, some confusion arises about the Apps and

dApps. Apps are the shor t form of applications and dApps are the shor t form of

decentralized applications. 

Centralized Applications

Like Facebook, and YouTube in these types of applications ever ything is on one ser ver,

and ever y time whenever there is a request from the nodes these ser vers give data to

the nodes. These Centralized applications are made of two things- The back End and

Front end. Any standard application runs on a computer system operated by an

Start Your Coding Journey Now!▲


organization. There may be many users on the node side but the backend is controlled by
Login Register
HIDE AD

https://www.geeksforgeeks.org/centralized-vs-decentralized-applications/ 1/10
2/12/23, 1:21 AM Centralized vs Decentralized Applications - GeeksforGeeks

a single organization. These apps are useful when the developer needs full control over

the apps and how it is used. It is much easier to upgrade a centralized app than a dApps.   

Read Discuss

Decentralized Applications

The application that runs on our P2P network is called a decentralized application. In

this decentralized application, ever ything runs in all the nodes of the network. dApps are

of ten built on the Ethereum platform and can be used for a variety of purposes These

decentralized applications are made with two things smar t contracts and the front end.

They use a Smar t contract to complete the transaction between two anonymous par ties

and the front end to interact with the system. People interested in free speech point out

that apps can be developed as an alternative social media platform. Some concern is

that these dApps are new technology and hence it is not so user-friendly as centralized

apps.

Start Your Coding Journey Now! HIDE AD

https://www.geeksforgeeks.org/centralized-vs-decentralized-applications/ 2/10
2/12/23, 1:21 AM Centralized vs Decentralized Applications - GeeksforGeeks

Read Discuss

Basis of Centralized Applications Decentralized

Comparison Applications

(dApps)

Definition A single firm manages and owns a centralized On a blockchain

program cyber-attacks Raible, which runs on network, a

a single ser ver or cluster of ser vers. decentralized app, or

“dApp,” runs.

Start Your Coding Journey Now! HIDE AD

https://www.geeksforgeeks.org/centralized-vs-decentralized-applications/ 3/10
2/12/23, 1:21 AM Centralized vs Decentralized Applications - GeeksforGeeks

User The user interacts with a traditional program. The User interacts

Interaction with a Smar t

Read Discuss
contract-based

blockchain.

Working The user gets the app from the app store and In the case of DApps,

utilizes it by sending requests/information to there is no such

a centralized ser ver or cluster of ser vers. The requirement of

ser ver processes the request and responds downloading the app

appropriately af ter receiving it. instead the user must

pay a set amount (in

cr yptocurrency) to

the developer to use

these apps. The user

has the facility to

download the

application’s source

code via a “smar t

contract,” which is a

collection of code,

logic, and data that

can be used to

execute the

application.

Backend code The centralized application’s backend code The decentralized

operates on centralized ser vers. application’s backend

code operates on a

peer-to-peer

network.

Examples Examples include- Google, Apple, Facebook, Examples include-

Amazon, Microsof t, Twitter, Instagram, Some of the popular

Start Your Coding Journey Now!


Netflix, WhatsApp  dApps in the market

HIDE AD

https://www.geeksforgeeks.org/centralized-vs-decentralized-applications/ 4/10
2/12/23, 1:21 AM Centralized vs Decentralized Applications - GeeksforGeeks

are Uniswap,

Cr yptoKitties,

Read Discuss Rarible, IDE X,

MakerDAO,

Cr yptoPunks,

BitTorrent, Audius,

and MetaMask

Computing Centralized Applications require lower Decentralized

power computing power. Applications (dApps)

require high

computing power.

Security Centralized Applications are less secure. Decentralized

Applications (dApps)

are highly secure.

Transparency Not Trustwor thy as lack of transparency is Trustwor thy as these

there. are highly

transparent.

Cyber attack These apps are more vulnerable to cyber These apps are less

attacks. vulnerable to cyber

attacks.

System If any ser ver goes down system collapse. If any node goes down

system will run

normally.

Transaction They have low transaction times. They have high

Times transaction times.

End- user These apps are easy to use for end-user. These apps are

Start Your Coding Journey Now!


difficult to use for the

HIDE AD

https://www.geeksforgeeks.org/centralized-vs-decentralized-applications/ 5/10
2/12/23, 1:21 AM Centralized vs Decentralized Applications - GeeksforGeeks

end-user.

Read
Censorship Discuss They provide censorship. They provide

resistance to

Censorship.

Pay You pay for the ser vices of centralized apps. They pay to become

par t of dApps.

Usability and In terms of usability and scalability, they are In terms of usability

Scalability better. and scalability, they

are limited.

Advantages You retain complete control over the If the ser ver goes

application and how it is utilized as the down even then

developer.  the user will be

These apps can handle higher traffic able to access an

Data Structures and Algorithms levels. Interview Preparation Data Science Topic-wise Practice
app. C C+
Easy to update as it is sent automatically Because of

on user ’s device. decentralization

user data is not at

risk in the event of

a data breach or

hacking attempt.

Disadvantages If a system error occurs, an app may shut Difficult to fix the

down and no one may use the app until the bugs and update

issue is repaired, which may cause your the sof tware due

customers to be inconvenienced.  to

You must safeguard the main ser ver, for decentralization.

that you may pay additional cybersecurity Because

expenditures. cr yptocurrencies

and blockchain

aren’t currently

“popular ”

Start Your Coding Journey Now! technology, your


HIDE AD

https://www.geeksforgeeks.org/centralized-vs-decentralized-applications/ 6/10
2/12/23, 1:21 AM Centralized vs Decentralized Applications - GeeksforGeeks

target audience is

limited. 

Read Discuss These apps are not

suitable for shor t

term as dApp

transactions are

typically slower

and more

expensive than

centralized

transactions, you

may find it difficult

to attract users to

your App in the

shor t term.

Which one is  A centralized app works for you if you want a A decentralized app

for you? system that is easier to manage.  works for you if you

want benefits like

redundancy and

security.

Like 1

Previous Next

Start Your Coding Journey Now! HIDE AD

https://www.geeksforgeeks.org/centralized-vs-decentralized-applications/ 7/10
2/12/23, 1:21 AM Centralized vs Decentralized Applications - GeeksforGeeks

Related Articles
Read Discuss
1. Comparison - Centralized, Decentralized and Distributed Systems

2. 5 Best Frameworks For Developing Decentralized Applications

3. Centralized vs Distributed Version Control: Which One Should We Choose?

4. Difference between Centralized Database and Distributed Database

5. Decentralized Voting System using Blockchain

6. What is Decentralized Transactions?

7. What is Decentralized Voting Application (DApps)?

8. What are Decentralized Apps (dApps) in Blockchain?

9. DAO(Decentralized Autonomous Organization) in Blockchain

10. Basics of the Blockchain and its various applications

Ar ticle Contributed By :

guptavivek0503
@guptavivek0503

Vote for difficulty

Easy Normal Medium Hard Expert

Start Your Coding Journey Now! HIDE AD

https://www.geeksforgeeks.org/centralized-vs-decentralized-applications/ 8/10
2/12/23, 1:21 AM Centralized vs Decentralized Applications - GeeksforGeeks

Improved By : annieahujaweb2020, ksam24000


Read Discuss
Article Tags : Picked, Blockchain, Difference Between

Improve Article Report Issue

A-143, 9th Floor, Sovereign Corporate Tower,


Sector-136, Noida, Uttar Pradesh - 201305

[email protected]

Company Learn
About Us DSA
Careers Algorithms
In Media Data Structures
Contact Us SDE Cheat Sheet
Privacy Policy Machine learning
Copyright Policy CS Subjects
Advertise with us Video Tutorials
Courses

News Languages
Top News
Python
Technology
Java
Work & Career
CPP
Business
Golang
Finance
Start Your Coding Journey Now! C#
HIDE AD

https://www.geeksforgeeks.org/centralized-vs-decentralized-applications/ 9/10
2/12/23, 1:21 AM Centralized vs Decentralized Applications - GeeksforGeeks

Lifestyle SQL
Knowledge Kotlin
Read Discuss
Web Development Contribute
Web Tutorials Write an Article
Django Tutorial Improve an Article
HTML Pick Topics to Write
JavaScript Write Interview Experience
Bootstrap Internships
ReactJS Video Internship
NodeJS

@geeksforgeeks , Some rights reserved

Start Your Coding Journey Now! HIDE AD

https://www.geeksforgeeks.org/centralized-vs-decentralized-applications/ 10/10
2/12/23, 1:23 AM Ethereum Virtual Machine (EVM). How does it work? (Part 1) | by Alberto Molina | Coinmonks | Medium

Published in Coinmonks

Alberto Molina Follow

Jun 10, 2022 · 6 min read · Listen

Save

Ethereum Virtual Machine (EVM). How does it


work? (Part 1)
The Ethereum blockchain is very often referred to as “the global computer” as opposed
to the Bitcoin blockchain which is commonly referred to as a “ the distributed ledger”.

The main difference between these two well known blockchains is that Ethererum
offers the possibility to deploy smart contracts which are quasi Turing complete
algorithms, meaning that you can execute practically anything on ethereum, turning
the blockchain into some sort of distributed computer.

Nodes forming the ethereum network are capable of running these smart contracts
independently of their underlying OS. The way this is achieved is very similar to how
they made it for platforms like .Net and Java, using a Virtual Machine (which behaves as
an intermediary between the compiled code and the underlying OS) and some sort of
intermediate language.

New to trading? Try crypto trading bots or copy trading

Smart contracts compile into opcodes (the Ethereum intermediate language) that runs
in the EVM (the Ethereum virtual machine). The EVM is what makes the Ethereum
blockchain a global computer and it is very useful for developers to understand how it
works, at least from a general point of view.

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-1-81f65bedbe8f 1/8
2/12/23, 1:23 AM Ethereum Virtual Machine (EVM). How does it work? (Part 1) | by Alberto Molina | Coinmonks | Medium

Accounts & Transactions


Let’s start with a very short presentation of accounts and transactions on Ethereum.

In Ethereum there are two types of accounts :

Externally owned accounts (EOA): Accounts controlled by actual humans. They


can trigger transactions and they do not contain any code or storage.

Smart contracts: Accounts controlled by no one. They cannot trigger transactions


(they can however invoke other smart contracts when they are triggered by an EOA) but
they contain code and storage.

There are also two types of transactions:

Transactions that do not contain data: Used to transfer ether from account A to
account B. If sent to a smart contract account it will trigger the “receive” function if
implemented, otherwise it will trigger the “fallback” function if implemented, if
none of them exist, the transaction will fail.

Transactions that contain data: If sent to a smart contract account it will run its
code (the method indicated within the data or the “fallback” function if no

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-1-81f65bedbe8f 2/8
2/12/23, 1:23 AM Ethereum Virtual Machine (EVM). How does it work? (Part 1) | by Alberto Molina | Coinmonks | Medium

matching signature is found). If sent to an EOA it will simply behave like a


“Transaction that does not contain data”. It is important to note that smart contracts
can invoke other smart contracts, these are called “messages”, meaning that a
transaction contains one or multiple inner messages.

EOA to EOA transactions (with or without data). Always succeeds.

EOA to Smart contract transactions (with or without data). Might trigger further message calls and might fail.

There is always at least one message per transaction, the message originally submitted by the
EOA).

The only way to “activate” the EVM is to send a transaction containing data to a Smart
contract.
https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-1-81f65bedbe8f 3/8
2/12/23, 1:23 AM Ethereum Virtual Machine (EVM). How does it work? (Part 1) | by Alberto Molina | Coinmonks | Medium

EVM Components

Program Code.

The opcodes (1 byte long commands) from the compiled smart contract that is been
invoked by the transaction.

Smart contract’s program code are stored on the blockchain (persistent) and are
immutable, meaning that opcodes can only be read and never modified (ROM
memory).

Program Storage.

The storage associated to the smart contract. Every SM account has a 2**256 slot space
of 32 bytes words, acting as a Read/Write database where the contract’s state is saved.
The storage is persisted on the blockchain.

Machine State.

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-1-81f65bedbe8f 4/8
2/12/23, 1:23 AM Ethereum Virtual Machine (EVM). How does it work? (Part 1) | by Alberto Molina | Coinmonks | Medium

Ethereum machine persistent state is the list of accounts, their balances and nonces at
a given point in time. The EVM has access to this huge list of accounts, balances and
nonces and can update it.

Balances can be updated be transferring ether from one account to another, EOA
nonces are increased after each transaction and SM nonces can also be updated if new
smart contracts are deployed onto the blockchain (every time a SM deploys another SM
using the “CREATE” opcode, its nonce is increased).

Program Counter.

The EVM keeps track of the latest executed opcode using a “volatile” program counter.
Once the Transaction is finished, the Program counter is removed, it is not persisted
on the blockchain.

Available Gas.

In order to execute smart contract’s functionality, the transaction sender must provide
some Gas. The EVM keeps track of the available gas after each opcode, if at some point
it runs out of Gas, the transaction is reverted (the Gas is not refunded though). If, on
the other hand, there is some Gas left after the transaction finishes, it gets refunded to
the transaction sender.

Gas is how Ethereum solves the “halting problem”, programs cannot run for ever,
transactions cannot consume more gas than the maximum amount of Gas allowed
within a single Block.

Stack.

The EVM is a stack based machine, what this means is that most opcodes will look for
their operands in the stack although the EVM can also read/write data from its volatile
memory and persistent program storage / state machine.

The stack is a 32 bytes word LIFO memory space, that gets deleted once the execution
terminates. The stack has a maximum depth of 1024 and stores method local variables
that are value types (all types other than arrays, mappings, structs and strings)
although it can only access the top 16 items (in order to access items beyond the 16th

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-1-81f65bedbe8f 5/8
2/12/23, 1:23 AM Ethereum Virtual Machine (EVM). How does it work? (Part 1) | by Alberto Molina | Coinmonks | Medium

slot it has to remove other items from the top), which means that if you declare, within
the same function 16 local variables or more, you will get an exception at compile time
“stack too deep”.

Memory.

The EVM has another storage location (besides the Stack, the Program Storage and the
calldata), the “memory”, which has a 2**256 slot space and words are 1 byte long (as
opposed to the stack and storage which are 32 bytes long). Despite been “byte-
addressable” the memory normally hold 32 bytes words.

The first four 32 bytes slots (128 bytes in total) in memory are reserved for the
following purposes:

0x00 - 0x3f (64 bytes): scratch space for hashing methods

0x40 - 0x5f (32 bytes): currently allocated memory size (aka. free memory pointer)

0x60 - 0x7f (32 bytes): zero slot

When assigning a memory variable to another memory variable, the EVM will not
create a copy but just a reference. When assigning a memory variable to a storage
variable, the EVM will create a copy.

The memory is volatile, at the end of the execution nothing will be persisted on the
blockchain (as opposed to the storage).

Global Variables.

Last but not least, the EVM has access to several global variables when running.

BLOCK Variables, like “block number”, “block difficulty”, … These variables are the same
for every single transaction within the same block.

TRANSACTION Variables, like “Tx origin”, “Tx gasPrice”, … These variables are the same
for every single message within the same transaction.

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-1-81f65bedbe8f 6/8
2/12/23, 1:23 AM Ethereum Virtual Machine (EVM). How does it work? (Part 1) | by Alberto Molina | Coinmonks | Medium

MESSAGE Variables, like “msg.sender”, “msg.value”, … These variables are unique to the
message. If a smart contract invokes another smart contracts, these variables will be
updated.

EVM Execution Process


Once a transaction to a smart contract is sent by an EOA, nodes executing it will create
an instance of the EVM by doing the following:

Loading the smart contract opcode & storage from the Ethereum blockchain.

Instantiating a new and empty Stack and Memory.

Retrieving the global variables

They will then proceed to execute the opcodes in order, update the stack, memory,
storage and machine state if necessary, reduce the amount of Gas after each opcode
execution and, if no exceptions are found (run out of Gas or stumble upon a revert
command for example), the EVM terminates, the stack and memory are wiped out, the
storage and machine state are persisted on the blockchain and the remaining gas is
refunded to the transaction sender.

If, on the contrary, an exception is found, the transaction will revert, the stack and
memory will be wiped out, the storage and machine state will NOT be persisted on the
blockchain (except for the amount of Gas already used), and the remaining gas is
refunded to the transaction sender.

Please check the second part of this blog series to see some other EVM particularities :

Ethereum Virtual Machine (EVM). How does it work? (Part 2) | by Alberto Molina | Jun,
2022 | Medium

Evm Ethereum Blockchain Ethereum Virtual Machine Opcodes

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-1-81f65bedbe8f 7/8
2/12/23, 1:23 AM Ethereum Virtual Machine (EVM). How does it work? (Part 1) | by Alberto Molina | Coinmonks | Medium

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

We couldn't process your request. Try again, or contact our


support team.

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

Open in app Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-1-81f65bedbe8f 8/8
2/12/23, 1:25 AM Ethereum Virtual Machine (EVM). How does it work? (Part 2) | by Alberto Molina | Coinmonks | Medium

Published in Coinmonks

Alberto Molina Follow

Jun 10, 2022 · 4 min read · Listen

Save

Ethereum Virtual Machine (EVM). How does it


work? (Part 2)
this blog is the second and last part of the blog series “Ethereum Virtual Machine
(EVM) How does it work?”. If you want to read Part 1 check this link:

Ethereum Virtual Machine (EVM). How does it work? (Part 1) | by Alberto Molina | Jun,
2022 | Medium

Internal Call
The volatile Stack and Memory remain the same if a contract’s function invokes
another function within the same contract since the EVM instance will remain
unchanged.

The invoked function can define new memory variables, which will never overlap the
previous function’s memory variable, but since memory is the same, it is perfectly
possible, using assembly, for the invoked function to access the previous function
memory variables and manipulate them.

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-2-4198401d2a11 1/9
2/12/23, 1:25 AM Ethereum Virtual Machine (EVM). How does it work? (Part 2) | by Alberto Molina | Coinmonks | Medium

In the above example, function1 will return “0x7b” instead of “0x05” since function2
changed the memory slot that function1 was returning.

New to trading? Try crypto trading bots or copy trading

External Call
Smart Contracts can call other (external) smart contracts. There are three types of
calls:

Call.

Regular call. The first smart contract invokes functionality in the second smart
contract and wait for a response that might contain data or not.

Delegate Call.

When a smart contract delegates a call to another smart contract, the second smart
contract’s code is executed within the first smart contract context.

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-2-4198401d2a11 2/9
2/12/23, 1:25 AM Ethereum Virtual Machine (EVM). How does it work? (Part 2) | by Alberto Molina | Coinmonks | Medium

Static Call.

Just like a regular call but contracts storage cannot be changed. If contract A static calls
contract B, and contract B tries to update its own storage (or invokes contract C that
tries to update its own storage), the call will fail.

How does the EVM manages these different types of call?

Call
When contract A calls contract B using a “regular call” nothing is shared, this is how
the EVM manages it:

1- A new EVM instance is created for contract B, with its own code, storage, a brand
new and empty stack, memory, program counter, with the remaining amount of Gas
and updated Message variables.

2- Once the new EVM instance finishes its tasks, it terminates (deletes the stack and
memory) and the original EVM instance continues (the one with contract A code and
storage) picking up where it left (retrieves the status of the Program counter, stack and
memory).

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-2-4198401d2a11 3/9
2/12/23, 1:25 AM Ethereum Virtual Machine (EVM). How does it work? (Part 2) | by Alberto Molina | Coinmonks | Medium

REGULAR CALL

Contract A stack, memory, program counter and message variables will be the same
when the call returns, however it is important to note that the machine state and
program storage might have been changed by contract B (or any other smart contract
that contract B might have invoked down the line).

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-2-4198401d2a11 4/9
2/12/23, 1:25 AM Ethereum Virtual Machine (EVM). How does it work? (Part 2) | by Alberto Molina | Coinmonks | Medium

Delegate Call
Delegate calls are special. If contract A delegates to contract B, then contract B code
will run on contract’s A context, meaning that contract B’s program storage and
message global variables will actually be contract A’s.

Contract B will have full read/write access to contract’s A state (storage) which can be
extremely dangerous.

On the other hand, contract B will have its own memory and stack, this is how the
EVM manages it:

1- A new EVM instance is created for the contract B, with its own code, but not its own
storage (keeps contract’s A storage), a brand new and empty stack, memory, program
counter, with the remaining amount of Gas and contract A’s Message variables.

2- Once the new EVM instance finishes its tasks, it terminates (deletes the stack and
memory) and the original EVM instance continues (the one with contract A code)
picking up where it left (retrieves the status of the Program counter, stack and
memory). Contract A’s storage might have been changed by the terminated EVM.

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-2-4198401d2a11 5/9
2/12/23, 1:25 AM Ethereum Virtual Machine (EVM). How does it work? (Part 2) | by Alberto Molina | Coinmonks | Medium

DELEGATE CALL

Static Call
Static Calls are identical to Regular calls, the only difference is that the message will
have its “static” flag activated, disallowing any modification to the Program Storage
and Machine State.

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-2-4198401d2a11 6/9
2/12/23, 1:25 AM Ethereum Virtual Machine (EVM). How does it work? (Part 2) | by Alberto Molina | Coinmonks | Medium

New Contract Creation


There is a special type of transaction which is used to deploy new contracts on the
blockchain. This “contract creation transaction” can come from an EOA or from a smart
contract.

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-2-4198401d2a11 7/9
2/12/23, 1:25 AM Ethereum Virtual Machine (EVM). How does it work? (Part 2) | by Alberto Molina | Coinmonks | Medium

In both cases the transaction data will contain the contract deployment code, which
contains the contract run code (the opcodes that will be stored on the blockchain and
retrieved as “program code” every time the smart contract is executed) and the contract
constructor code (which is code that will run only once, during deployment, to
initialize the contract’s state).

Contract creation transactions are special for the EVM because they run code that is
not technically deployed on the blockchain yet. It is also the only type of transaction
that can add “program code” to the machine state.

Once the contract is created it will be assigned a unique address based on the creator
address and nonce, if the creator was using the “Create” command, or based on a salt
value if the creator was using the “CreateTo” command (only possible if the creator is
another smart contract).

Contract creation transactions can fail just like any other transaction, in which case the
contract address will not be assigned and the program code will not be stored on the
blockchain.

Open in app Sign up Sign In


It is important to note that external contracts can be invoked from the contract
constructor, even if the original contract does not exist yet…
Search Medium

Evm Ethereum Blockchain Ethereum Virtual Machine Opcodes

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-2-4198401d2a11 8/9
2/12/23, 1:25 AM Ethereum Virtual Machine (EVM). How does it work? (Part 2) | by Alberto Molina | Coinmonks | Medium

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/ethereum-virtual-machine-evm-how-does-it-work-part-2-4198401d2a11 9/9
2/12/23, 1:28 AM What is Ethereum Virtual Machine (EVM)? | by Tiny Crypto Labs | Coinmonks | Medium

Published in Coinmonks

Tiny Crypto Labs Follow

Nov 28, 2022 · 4 min read · Listen

Save

What is Ethereum Virtual Machine (EVM)?

One way to think of the Ethereum blockchain is as a blockchain with a built-in


programming language. A consensus-based, globally executed virtual machine is
another way to describe it. The Ethereum Virtual Machine is the component of the
Ethereum protocol responsible for all computing (EVM).

What is the Ethereum Virtual Machine? (EVM)


https://medium.com/coinmonks/what-is-the-ethereum-virtual-machine-evm-34e55b1c410 1/5
2/12/23, 1:28 AM What is Ethereum Virtual Machine (EVM)? | by Tiny Crypto Labs | Coinmonks | Medium

Ethereum’s ability to execute smart contracts depends on the EVM. Ethereum’s smart
contracts allow for decentralized applications (dapps). Additionally, businesses can
organize so-called ICOs, or initial coin offerings, on the Ethereum blockchain to
introduce their tokens thanks to smart contracts.

ETHEREUM VIRTUAL MACHINE ESSENTIALS

The Ethereum Virtual Machine (EVM) is a runtime environment for smart


contracts used to develop and test smart contracts.

The EVM is quasi-Turing complete, meaning it can perform any calculation as long
as the user initiating the calculation has enough ether to pay the fee required for
that calculation.

The EVM is a sandboxed and isolated environment, meaning that the code it runs
has no access to the network, filesystem, or other processes.

Additionally, the EVM cannot access real-world data, e.g. the current date, time or
weather. To acquire such data, it relies on so-called oracles.

All full nodes of the Ethereum network run the EVM.

Environment for developing smart contracts

The EVM is sandboxed and isolated from the real world. It means that the code
running in the EVM has no access to a network, file system, or other processes. It
makes the EVM perfect for developing and testing smart contracts without interfering
with the blockchain’s operations.

You might be asking yourself why it is a good idea to test smart contracts in a
sandboxed environment. The thing is that flawed code can be detrimental to any smart
contract, so making sure that there are no flaws in the smart contract code is a must.

Moreover, a sandboxed environment such as the EVM provides infinite opportunities


to learn, iterate, improve and eventually complete robust smart contracts ready for
deployment to the blockchain.

What does the EVM do?


https://medium.com/coinmonks/what-is-the-ethereum-virtual-machine-evm-34e55b1c410 2/5
2/12/23, 1:28 AM What is Ethereum Virtual Machine (EVM)? | by Tiny Crypto Labs | Coinmonks | Medium

Whenever a transaction is initiated on the Ethereum blockchain — and it does not


matter whether it is a simple transfer of value or a smart contract deployment — the
EVM must perform the following three checks:

It confirms whether a transaction has the correct number of values, whether the
signature is valid, and whether the transaction nonce matches the nonce of that
particular transaction account. In case of a mismatch, the transaction prompts an
error.

It calculates the fee required for the transaction and initializes the gas payment.

It executes the transfer of the ether or tokens to the assigned address.

The transaction will fail if the EVM notices that the sender did not allocate enough gas
to the initiated transaction. The transaction charge is not reimbursed to the initiator in
this instance. Instead, the miner receives payment.

However, if a transaction is unsuccessful due to an error on the recipient’s address, the


EVM will return the amount sent and the associated fee to the sender.

EVM is where the magic of Ethereum happens, bringing added value to blockchain
technology and the world of cryptocurrencies. Because of features such as the EVM,
the Ethereum platform has enjoyed great popularity, with ether, its native crypto,
remaining one of the largest cryptos by market cap.

Limitations of the EVM


Turing complete is the term used to characterize the Ethereum Virtual Machine. The
ability of a computer to perform every computation given to it is known as “Turing
completeness.” Any acceptable analysis can be solved by programs or decentralized
apps created in Ethereum.

But there is a limitation to the EVM, and it is a kind of safety precaution. Smart
contracts can call other contracts, potentially allowing for infinite looping.

The EVM demands a gas fee for each on-network transaction, which means infinite
computational loops are prevented by exhausting their ether. The EVM cannot be
Turing-complete; instead, it is to be quasi-Turing-complete.
https://medium.com/coinmonks/what-is-the-ethereum-virtual-machine-evm-34e55b1c410 3/5
2/12/23, 1:28 AM What is Ethereum Virtual Machine (EVM)? | by Tiny Crypto Labs | Coinmonks | Medium

Another thing worth mentioning is that the EVM cannot access even the most basic
real-world data. For example, the EVM cannot know on its own what day it is or tell the
current temperature.

The EVM relies on real-world data providers known as oracles to acquire such data,
which is required to execute smart contracts properly. An oracle can gather data from
a website, an app or elsewhere and feed it to the smart contract.

Bottomline
The EVM makes Ethereum a platform and not just a blockchain. However, the EVM
could be a better system. There are many challenges around transaction speed and
network throughput.

It is an area of focus for the development community and the roadmap for Ethereum.
If Ethereum is to fulfil its promises of revolutionizing how we transact amongst each
other, it will be on the back of improvements to the EVM.

New to trading? Try crypto trading bots or copy


trading

Evm Ethereum Evm Compatibility Crypto

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

https://medium.com/coinmonks/what-is-the-ethereum-virtual-machine-evm-34e55b1c410 4/5
2/12/23, 1:28 AM What is Ethereum Virtual Machine (EVM)? | by Tiny Crypto Labs | Coinmonks | Medium

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.com/coinmonks/what-is-the-ethereum-virtual-machine-evm-34e55b1c410 5/5
2/12/23, 1:30 AM What is Ethereum Gas? Simple Explanation | by eiki | Medium

eiki Follow

May 31, 2019 · 3 min read · Listen

Save

What is Ethereum Gas? Simple Explanation

What this article write about?


This article simply explains Gas in Ethereum and its mechanism. As Gas is a core
system in Ethereum blockchain, you can quickly understand what it is and mechanism

https://medium.com/@eiki1212/what-is-ethereum-gas-simple-explanation-2f0ae62ed69c#:~:text=Gas is fuel in Ethereum,complex operation%2C more… 1/4


2/12/23, 1:30 AM What is Ethereum Gas? Simple Explanation | by eiki | Medium

behind the scene. A reader is expected to have basic knowledge about Ethereum such
as smart contract, Proof-of-Work, and what Ethereum is. The contents are below.

- What is Gas?
- Why do we need to the Gas system?
- How the Gas price is determined?
- Mechanism of rising of Gas price.
- How to get Gas?

What is Gas?
Gas is fuel in Ethereum blockchain and is consumed when a smart contract is
executed. Gas is a unit to measure the amount of computational effort for certain
operation. The more complex operation, more gas consumes. The gas method is
equivalent to the application of kilowatts(kW) to estimate electricity of property; the
electricity used by people is not estimated in fiat-money but kWH. Whenever user
transfers ETH or runs smart contract, they need to pay Gas as a fee.

Why do we need to the Gas system?


The main purpose of Gas is to mitigate the volatility of ETH. ETH is listed on exchanges
and publicly tradable. Therefore, it is directly exposed to market volatility. Contrary,
Gas is not listed on any exchange so it is not directly affected by market volatility.
Ethereum smart contract needs more computational power than a simple transfer.
Thus, the fee needs to be carefully designed to avoid instability.

How the Gas price is determined


The price of Gas is determined by two factors: Gas limit and Gas Price. Gas limit is the
maximum amount of gas the sender is willing to pay for the transaction. Gas price is
determined by the market supply and demand. Final price of Gas for the transaction is
determined by multiplying both two prices.

Gas Limit * Gas Price = Gas Fee

- Gas Limit
Gas Limit is a limit of the amount of ETH the sender is willing to pay for the
transaction. Usually, when one is talking about Gas in Ethereum, they are referring to

https://medium.com/@eiki1212/what-is-ethereum-gas-simple-explanation-2f0ae62ed69c#:~:text=Gas is fuel in Ethereum,complex operation%2C more… 2/4


2/12/23, 1:30 AM What is Ethereum Gas? Simple Explanation | by eiki | Medium

Gas Limit. When transferring ETH, the sender needs to set Gas Limit. If Gas Limit is
not enough to transfer, the transfer will be canceled and Gas will be refunded to the
sender. On the other hand, if the sender sets excess Gas Limit, Gas left over will be
refunded to the sender.

- Gas Price
Gas Price represents the price of Gas in Gwei. For example, 1 Gas = 10 Gwei. It is
basically determined by market supply and demand. Gas Price is used to multiply Gas
Limit to determine the final price of Gas.

Mechanism of rising of Gas price.


The more transactions on the Ethereum blockchain, The higher transaction fees the
sender needs to pay. An incentive for miners is to earn Gas by validating the
transaction with their computational resource. In order to earn Gas efficiently, miners
try to mine high fee transaction preferentially.

1. Number of transaction increases


2. Miners try to mine the transaction which has the most expensive transaction fee.
3. If you pay a cheap transaction fee, you need to wait for a while.
4. If you want the transaction to be executed fast, you need to pay more transaction
fee.

The high price of Gas is a big problem in Ethereum and called “Scalability Problem”. It
happens when a lot of users started to transfer money or run a smart contract at the
same time. CryptoKitty, one of the most famous and popular games on Ethereum,
launched in late 2017, users have reached in excess of 1.5 million(25% of total Ethereal
traffic in peak times). At this time, users needed to pay the exorbitant transaction fee
and badly influenced all Ethereum users. In order to solve the scalability problem,
several off-chain/side-chain projects are underway such as Plasma and Loom.

References

HOW THE SWITCH FROM POW TO POS COULD AFFECT ETHEREUM MINING

Ethereum Explained: Gas, Payment, and Mining

https://medium.com/@eiki1212/what-is-ethereum-gas-simple-explanation-2f0ae62ed69c#:~:text=Gas is fuel in Ethereum,complex operation%2C more… 3/4


2/12/23, 1:30 AM What is Ethereum Gas? Simple Explanation | by eiki | Medium

What is Ethereum Gas? [The Most Comprehensive Step-By-Step Guide Ever!]

Blockchain Ethereum Bitcoin Gas

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.com/@eiki1212/what-is-ethereum-gas-simple-explanation-2f0ae62ed69c#:~:text=Gas is fuel in Ethereum,complex operation%2C more… 4/4


2/12/23, 1:32 AM Simply Explained: Ethereum Gas. Just like the gas you put in your car… | by Yakko Majuri | Medium

Yakko Majuri Follow

Aug 29, 2018 · 7 min read · Listen

Save

Simply Explained: Ethereum Gas


Just like the gas you put in your car, almost.

<article>

<definition>

For those of you already familiar with Ether transactions, you’ve probably heard of gas.
It pops up in your MetaMask when you make a transaction, saying the “gas limit” is
something like 21000 and the “gas price” is 1. So what does that all mean?

https://yakkomajuri.medium.com/blockchain-definition-of-the-week-ethereum-gas-2f976af774ed 1/8
2/12/23, 1:32 AM Simply Explained: Ethereum Gas. Just like the gas you put in your car… | by Yakko Majuri | Medium

Well, gas is a unit that measures the use of computational power in the Ethereum
network. That is, how much effort computers processing a certain operation will need
to put in to successfully execute the operation. Operations in Ethereum are, for
example, sending Ether to another address, publishing a contract, calling a function
on a contract, among others. When these happen, miners process that information in
the EVM (Ethereum Virtual Machine) to reach the proper outcomes, such as executing
a function and returning the right data or sending the ETH to the right address. In
doing this, these miners are using their computational power, and the more complex a
transaction is, the more power it will consume, hence using more gas.

Gas acts as the fuel of the Ethereum platform

Gas limit
Gas limit defines the maximum amount of gas an operation can use. For example,
when sending some Ether from Alice to Bob, the gas limit is usually set at a standard of
21000, assuming no more data is included in the transaction. 21000 is the minimum
amount of gas an operation on Ethereum will use. This limit is used to guarantee that
the transaction will be executed. The limit is usually provided by the clients/wallets,
https://yakkomajuri.medium.com/blockchain-definition-of-the-week-ethereum-gas-2f976af774ed 2/8
2/12/23, 1:32 AM Simply Explained: Ethereum Gas. Just like the gas you put in your car… | by Yakko Majuri | Medium

which estimate the maximum boundary for gas use of an operation, to assure that it
will be executed properly without the user having to worry. In this case, the unused
Ether used to pay for the extra gas will be returned to your account if the operation
uses less gas than the limit. While many times the limit is set for you, it can also be set
manually, in which case the user runs the risk of the operation failing, if the limit is
not enough.

More complex operations will use up more gas. See the example list below, ordered
from lowest to highest gas requirements.

1. Sending Ether to another address

2. Sending Ether to another address with some added metadata

3. Calling a function on a smart contract

4. Publishing a simple smart contract

5. Publishing a complex smart contract

Lastly, if you want to know how the gas limit of an operation is calculated, the formula
provided by the Ethereum Yellow Paper is as follows:

gasLimit = G(transaction) + G(txdatanonzero) × dataByteLength

Gas price
Gas price is the comparative equivalent of the miner fee in Bitcoin. In Bitcoin, you
choose how much you want to pay the miner to process your transaction, being so that
the higher the fee, the faster the transaction will be included in a block (in general,
assuming participants rationally follow the financial incentive structure).

In Ethereum, things work similarly. Once the gas limit for a transaction is set, you can
choose how much you wish to pay for each unit of gas. The more you pay, the faster
you expect your operation to execute. Gas price is most often calculated in Gwei, a
subunit/denomination of Ether, equal to 1/10⁹ ETH. Usually, when operating in the
mainnet, users will pay between 1–60 Gwei per unit of gas, depending on how
overloaded the network is.

https://yakkomajuri.medium.com/blockchain-definition-of-the-week-ethereum-gas-2f976af774ed 3/8
2/12/23, 1:32 AM Simply Explained: Ethereum Gas. Just like the gas you put in your car… | by Yakko Majuri | Medium

Hence, the equation for how much in Ether you will pay in “network fees” is:

cost (ETH) = gasLimit × gasPrice × (1/10⁹)

Example — Alice sends 2ETH to Bob, choosing a gas price of 2 Gwei:

21000 × 2 × (1/10⁹) = 0.000042 ETH

Important note: The gas price is not selected by the network. It is chosen by the user,
or sometimes, by the client, which shields the user from this information and sets a
standard gas price, for the sake of usability (yet often at a higher cost for the end user).

For future reference, you should check the following website:

ETH Gas Station


ETH gasprice recommendations
ethgasstation.info

The website tells you what it calls the “SafeLow Cost for Transfer”, which is the minimum
gas price you should set to have a high chance of your transaction being included in
one of the next blocks (usually over 90% chance of it being included in the next 10
blocks).

As a rule of thumb, you should set higher gas prices for urgent transactions, and lower
prices for transactions you don’t mind taking a while to confirm.

It is also worth noting that if your gas limit is set at, for example, 300000, you choose to
pay 40 Gwei for each unit of gas, and ultimately, the transaction only uses 21000 gas,
you will be refunded:

[(300000–21000) × 40 × (1/10⁹)] = 0.01116ETH

The takeaway here is: you are refunded for unused gas, accounted for the price you
paid for it, but you are not refunded for setting the gas price too high.

</definition>

<questions>
https://yakkomajuri.medium.com/blockchain-definition-of-the-week-ethereum-gas-2f976af774ed 4/8
2/12/23, 1:32 AM Simply Explained: Ethereum Gas. Just like the gas you put in your car… | by Yakko Majuri | Medium

Why not set enormous gas limits for every transaction?


So to guarantee my transaction will not run out of gas, I can set the gas limit extremely
high, right?

Yes, you can. The problem with doing so is that you will have to pay a lot of Ether up-
front, which you may not have or that you might need while your transaction is being
processed. It is also a question of optimization.

However, you can, and should, put the gas limit slightly higher than the amount of gas
you expect the transaction to consume when dealing with gas limits manually.

Common errors
“Transaction underpriced” or “transaction fee too low”

Means that your gas price is set too low and your transaction may not confirm, or will
take too long too confirm, since it will always be at the end of the list of transactions to
be included in the next block. Wallets will often offer you the option to increase your
gas price to change this, or refuse to send the transaction.

“Transaction ran out of gas”

Means that the gas limit was set too low, and the transaction ended up using more gas
than you paid for. Transactions with a lower gas limit than the gas used will never
execute. In this case, you will not be refunded the Ethers spent. That is because the
miner used valuable computational power to attempt to execute the transaction, but

https://yakkomajuri.medium.com/blockchain-definition-of-the-week-ethereum-gas-2f976af774ed 5/8
2/12/23, 1:32 AM Simply Explained: Ethereum Gas. Just like the gas you put in your car… | by Yakko Majuri | Medium

was unable to. Regardless of the transaction confirming or not, computational power
was used, and it was paid for.

Gas limit of blocks


Instead of implementing a hard memory limit on blocks, like Bitcoin’s 1MB, Ethereum
sets its block limits with gas. The current limit is set at 8000000 units of gas per block,
but it is in fact not a hard limit, but a parameter the network follows as a mean limit
for blocks. Blocks can be over the limit, but ultimately, the network aims to keep the
average below 8000000. There is discussion regarding setting this limit in the actual
protocol, with the benefit of preventing blocks from being too large and hard to
compute, especially for nodes with less computational power available. The
counterargument is that this limit may prevent complex dApps which consume a lot of
gas from running.

More on that here and here.

Gas and smart contracts


Smart contracts require gas to run and execute its functions. The more complex a
contract or function are, the more gas they will use. Because of this, optimization of
smart contracts is extremely important, to prevent excess use of gas, which is costly,
and overloads the network for no reason.

Commonly, Remix’s static analysis of contracts will return a warning regarding the
high gas requirements of a function. It is also important to watch out for loops, which
can consume excessive gas.

Publishing complex contracts will use more gas than publishing simpler contracts, and
the same applies to the execution of these contracts.

Why are these fees important?


These fees are important because they provide a fair incentive scheme for keeping the
network running properly, since the more you utilize the network, the more you pay
for it. But perhaps most importantly, it helps protect the network against attacks
(namely DDoS attacks), since malefactors will have to pay a high price to harm the
network.

https://yakkomajuri.medium.com/blockchain-definition-of-the-week-ethereum-gas-2f976af774ed 6/8
2/12/23, 1:32 AM Simply Explained: Ethereum Gas. Just like the gas you put in your car… | by Yakko Majuri | Medium

</questions>

</article>

Thank you for reading. Comment below if you still have any questions about Ethereum
Gas and what definition you would like to hear about next.

Additional reading:

Account Types, Gas, and Transactions - Ethereum Homestead 0.1 documentation


All action on the Ethereum block chain is set in motion by transactions fired from externally
owned accounts. Every…
ethdocs.org

A Guide to Gas
A guide to gas, its purpose, its nuances, and its utility on the Ethereum
blockchain.
media.consensys.net

Blockchain

About Help Terms Privacy

Open in app Sign up Sign In

https://yakkomajuri.medium.com/blockchain-definition-of-the-week-ethereum-gas-2f976af774ed 7/8
2/12/23, 1:32 AM Simply Explained: Ethereum Gas. Just like the gas you put in your car… | by Yakko Majuri | Medium

Get the Medium app


Search Medium

https://yakkomajuri.medium.com/blockchain-definition-of-the-week-ethereum-gas-2f976af774ed 8/8
2/12/23, 1:35 AM Ethereum - Gas and Fees - GeeksforGeeks

Data Structures and Algorithms Interview Preparation Data Science Topic-wise Practice C C+

Ethereum – Gas and Fees


Last Updated : 23 Jun, 2022

Read Discuss

Ethereum Gas is a section that calculates the quantity of calculation action that it takes

to per form specific functions. Ever y function that carries position in Ethereum like

transactions and smar t contracts etc. per formance needs some par t of gas. It is

essential to the blockchain P2P network because it is the power that authorizes it to

accomplish exactly what an automobile needs fuel to drive. Gas refers to the cost

required to complete a deal on the Ethereum network.

Facts about Ethereum Gas

Gas prices are delivered in the form of Ethereum’s born money, the currency of

Ethereum is E TH. 

Gas costs are indicated in “gwei” which is a movement of Ethereum, ever y single

“gwei” is equivalent to 0.000000001 E TH. 

For sample, rather than stating that the gas costs 0.000000001 ether, say, the gas

costs 1 “gwei”. 

The term “gwei” means “Giga-wei”, which is equivalent to 1,000,000,000 “wei”. 

“ Wei” is called af ter “ Wei Dai” that is the creator of b-money (least unit of E TH).

GWEI

Gwei is a combination of “giga” and “wei”. It is a sect of the blockchain technology E TH,

this coin is operated on the Ethereum P2P network. E TH is a blockchain medium, like

Start Your Coding Journey Now!


Bitcoin and Binance, where users can make transactions with respect to buying and

Login Register
selling interests and benefits without the involvement of an intermediator.

https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 1/10
2/12/23, 1:35 AM Ethereum - Gas and Fees - GeeksforGeeks

Example

For example, Rahul needs to give 1 E TH to Shubham. During the transaction, the gas

boundar y is 21000 units, and the gas price is 200 gwei.

Total fee costs = Gas units (limit) * Gas price per unit 

QuickNode -
Learn.Build.Scale
A Full Suite of Blockchain APIs. Build the
Future of Web3 with the Ease of Web2

                      = 21000 * 200 

                      = 4,200,000 gwei (0.0042 E TH)

When Rahul dispatched the funds, 1.0042 E TH would be subtracted from Rahul’s

account. 

Shubham would be credited 1.0000 E TH only as 0.0042 is the fess of Miner.

Now after upgradation, increased advantages presented by the difference contain more

profitable trade fee computation, typically more rapid trade inclusion, and canceling the

E TH distribution by burning a por tion of trade fees.

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 2/10
2/12/23, 1:35 AM Ethereum - Gas and Fees - GeeksforGeeks

Beginning with the peer-to-peer network upgrade, each block unit has a ground fee,

the lowest price per unit of gas for inclusion in this block unit, estimated by the

network founded on request. 

Because the ground fee of the trade fee is burnt, users are also hoped to put a tip in

their dealings. 

The information pays miners for managing and breeding user trades in blocks and is

hoped to be set automatically by most wallets.

Total fee after upgradation = Gas units (limit) * (Base fee + Tip)

For example, Shubham has to pay 1 E TH to Rahul. This process has a gas limit of 21000

units and a base fee of 100 gwei. Shubham includes a tip of 10 gwei.

Total fee after upgradation = Gas units (limit) * (Base fee + Tip)

                                          = 21000 * (100 + 10) 

                                         = 2,310,000 gwei (0.00231 E TH).

When Shubham sends the funds, 1.00231 E TH will be subtracted from Shubham’s

account. 

Start Your Coding Journey Now!


Rahul will be credited 1.0000 E TH and 0.00021   E TH will be received by the miner as

the tip. 

https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 3/10
2/12/23, 1:35 AM Ethereum - Gas and Fees - GeeksforGeeks

A ground fee of 0.0021 E TH is ignited.

Gas Fees

The gas fees include Base, Priority, Max, and calculating fees. Let ’s discuss these terms

in detail.

1. Base fees :

Each alliance has a ground fee which ser ves as a fund price. 

The ground fee is figured alone of the existing alliance and is rather specified by the

alliances before it pushes trade prices better for users. 

When the block is excavated the base fee is “burned”, dragging it from regulation.

The ground fee is evaluated by instructions that compare the length of the earlier

block with the marked size. 

The base fee intention rise by a max of 12.5% per block if the marked block size is

surpassed.

2. Priority fee :

Apar t from the base fee obtained, the advancement presented a priority fee i.e. tip to

miners to contain a trade in the alliance. 

Without tips, miners can see it financially possible to drill cleared blocks because

they can obtain the exact alliance prize. 

Under normal circumstances, a little tip provides miners with the slightest

encouragement to maintain a transaction.

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 4/10
2/12/23, 1:35 AM Ethereum - Gas and Fees - GeeksforGeeks

For dealings that require getting preferentially conducted ahead of different trades in

the same block, a more elevated tip will be essential to endeavor to outbid

contending trades.

3. Max fee :

To conduct trade on the P2P network, users can select the greatest limit they are

inclined to spend for their dealing to be completed. 

This additional circumference is called the max fee/Gas.

For a trade to be completed, the max fee must surpass the aggregate of the base and

priority fees.

The trade sender is repaid the contrast between the max fee and the total of the

ground(base) fee and tip.

4. Calculating fees :

The main benefit of the upgrade is enhancing the user ’s knowledge when charging

trade fees. 

In the wallets that sustain the upgrade rather than explicitly commenting to pay the

transaction from a wallet, providers will automatically set a suggested transaction

fee (base fee + suggested priority fee) to decrease the quantity of complexness

loaded on their users.

Impor tance of Gas Fees

Below are some of the reasons why gas fess is impor tant:

Gas fees help suppor t the Ethereum peer-to-peer network security. 

By demanding a price for ever y analysis per formed on the web grid, it prevents evil

per formers from spamming the web grid. 

To evade unexpected or malicious endless circles or different computational wastage

in principle, ever y trade is needed to set a boundar y to how multiple computational

effor ts of code implementation can operate. 

The basic division of accounting is “gas”.

A trade organizes a boundar y and any unit of gas not utilized in trade is replaced (i.e.

max fee – (base fee + tip)).

Start Your Coding Journey Now!


Why gas fees can go high?

https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 5/10
2/12/23, 1:35 AM Ethereum - Gas and Fees - GeeksforGeeks

Increased gas prices exist because of the fame of Ethereum. 

Conducting any function on Ethereum needs depleting gas, and the gas area is

determined per alliance. 

Prices contain measures, holding or exploiting data, and swallowing various par ts of

“gas” units. 

As app functionality produces additional complexity, the digit of functions a wise

contract achieves also develops, representing each trade brings up more additional

area of a fixed measure block. 

If the demand is quite high, users must present a more elevated tip payment to tr y

and outbid other users’ dealings. 

A more increased tip can construct it additional possible that your trade will convey

into the subsequent block.

Initiative to reduce gas costs :

The E TH efficiency advancements should eventually manage some of the gas cost

points, allowing the medium to process thousands of trades globally per moment.

Second layer scaling is a direct ambition to significantly enhance gas prices, user

knowledge, and scalability.

The recent proof-of-stake(POS) sample based on the Beacon Chain, should decrease

heightened control consumption and dependence on technological hardware. 

This chain resolve permits decentralized E TH P2P networks to compromise and

suppor t network security while restricting gas consumption by rather demanding an

economic responsibility.

Strategies to reduce gas costs :

Strategies to decrease gas costs for E TH, Users can select a direction to display the

impor tant status of the user ’s transaction.

Miners intention per form trades that suggest a more increased tip per gas, as they

hold the tips that users spend and resolve be slightly tilted to conduct transactions

with more down tips specified.

If users like to obser ve gas costs, then they can send E TH for smaller, user can utilize

multiple other tools given below: 

Start Your Coding Journey Now!


” Etherscan Transaction gas price estimator “, and ” Blocknative E TH Gas E stimator

Gas ” for evaluating Chrome attachment backing both Class 0 inheritance trades and

https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 6/10
2/12/23, 1:35 AM Ethereum - Gas and Fees - GeeksforGeeks

Class 2 EIP-1559 trades, and” E TH Gas Station ” which is client instructed metric s for

the Ethereum gas demand, ” Cr yptoneur Gas Fees Calculator ” is used for calculating

gas prices in the local currency for various trade.

Why do gas fees exist?

Gas prices assist maintain the Ethereum grid safe. By demanding a price for ever y

analysis per formed on the grid, it controls harmful attackers from spamming the

grid. 

To bypass unexpected code, ever y trade needs to set a limitation to the multiple

computational effor ts of regulation per formance. 

The absolute unit of analysis is “gas”.

Moreover, a trade contains a limitation, any gas not operated in a transaction is

produced to the user (i.e. max fee – (base fee + tip) is produced).

How does block size affect the base fees?

The base fee is computed by a procedure that resembles the dimensions of the last block

(the par t of gas utilized for all the trades) with the target size. The base fee will rise by a

most of 12.5% per alliance if the target block size is overextended.

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 7/10
2/12/23, 1:35 AM Ethereum - Gas and Fees - GeeksforGeeks

Like 0

Previous Next

Related Articles

1. Use of Ethereum's RLPx in Ethereum Ecosystem

2. Ethereum (ETH) vs Ethereum Classic (ETC) in Blockchain

3. Difference Between Bitcoin and Ethereum

4. What are Nodes and Clients in Ethereum?

5. Difference Between Ethereum and Solana

6. What is Ethereum Virtual Machine and How it Works?

7. Deploy a Smart Contract on Ethereum with Python, Truffle and web3py

8. Ethereum 2.0

Start Youris Coding


9. What Ethereum? Journey Now!

https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 8/10
2/12/23, 1:35 AM Ethereum - Gas and Fees - GeeksforGeeks

10. ERC20 vs ERC721 in Ethereum

Ar ticle Contributed By :

shubhambhugra234
@shubhambhugra234

Vote for difficulty

Easy Normal Medium Hard Expert

Article Tags : Ethereum, Picked, Blockchain

Improve Article Report Issue

A-143, 9th Floor, Sovereign Corporate Tower,


Sector-136, Noida, Uttar Pradesh - 201305
[email protected]

Company Learn
About Us DSA
Careers Algorithms
In Media Data Structures
Start Your Coding Journey Now!
https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 9/10
2/12/23, 1:35 AM Ethereum - Gas and Fees - GeeksforGeeks

Contact Us SDE Cheat Sheet


Privacy Policy Machine learning
Copyright Policy CS Subjects
Advertise with us Video Tutorials
Courses

News Languages
Top News
Python
Technology
Java
Work & Career
CPP
Business
Golang
Finance
C#
Lifestyle
SQL
Knowledge
Kotlin

Web Development Contribute


Web Tutorials Write an Article
Django Tutorial Improve an Article
HTML Pick Topics to Write
JavaScript Write Interview Experience
Bootstrap Internships
ReactJS Video Internship
NodeJS

@geeksforgeeks , Some rights reserved

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 10/10
2/12/23, 1:38 AM A short guide to Ethereum gas fees | by Crypto Badger | Coinmonks | Medium

Published in Coinmonks

Crypto Badger Follow

Sep 8, 2021 · 8 min read · Listen

Save

A short guide to Ethereum gas fees

In this article, I will cover Ethereum gas fees in detail. For those of you who are new to
crypto, I’ve also included a practical example of how to adjust gas fees in MetaMask.

What is Gas?
(Ethereum) Gas is the fee paid for executing transactions on the Ethereum blockchain.
Want to move ETH between different addresses? That transaction requires gas. Want to
https://medium.com/coinmonks/a-short-guide-to-ethereum-gas-fees-5c4c53a05feb 1/9
2/12/23, 1:38 AM A short guide to Ethereum gas fees | by Crypto Badger | Coinmonks | Medium

mint some NFTs? That requires gas too. What about exchanging ETH for different
tokens? You guessed it, more gas!

Anything involving ERC-20 tokens (Ethereum-based tokens) requires spending small


amounts of ETH for gas. In other words, even if you don’t want to hold any ETH, for
example, because you only want to trade smaller-cap altcoins, you still need to have
ETH in your wallet at all times to cover future gas fees. Forgetting about it can cost you
a lot of money! I remember when I was selling my UMX tokens (the price had gone up
nicely), I went to my wallet only to find that I didn’t have any ETH to ‘fuel’ the
transaction. By the time I got some ETH, the price of UMX already dipped quite
noticeably. It wasn’t a huge amount but enough to cost me a few hundred dollars.

Why is There a Gas Fee?


Processing transactions on Ethereum network requires computational power and gas
is the fee paid to miners for providing that computational power.

Gas fees also help keep the Ethereum network secure. Attaching cost to every
transaction prevents spamming or accidental infinity loops.

How is gas calculated?


Below is the old method of calculating gas fees. Since the London hard fork and
implementation of EIP-1559 in early August 2021, there is a new method, which I will
describe later, but apparently only 1% of all transactions on the Ethereum network
currently use it.

The price of gas is denoted in gwei (giga wei). Wei is the smallest fraction of an ether,
i.e. 1 ether equals 1,000,000,000,000,000,000 wei, so 1 gwei is 1,000,000,000 (1 billion)
wei or 0.000000001 ETH. This doesn’t sound too bad right? So why are people
complaining about the cost of gas fees?

There are two elements that impact the cost of any given transaction:

gas price at the time of the transaction

and gas required for a particular transaction.

https://medium.com/coinmonks/a-short-guide-to-ethereum-gas-fees-5c4c53a05feb 2/9
2/12/23, 1:38 AM A short guide to Ethereum gas fees | by Crypto Badger | Coinmonks | Medium

Etherum gas prices change constantly and there are a number of websites where you
can check the current price. CoinGecko is one of them, but the price isn’t always
accurate, so I prefer to use ETH Gas Station or Gas Now (my favourite), which you can
also install as a browser extension.

At various points in time, I’ve seen gas prices as low as 6 gwei and as high as 2,000
gwei. Why can they change so much? It simply depends on how busy the Ethereum
network is at a particular moment in time. The busier the network, the higher the
prices.

When checking the price of gas, you’ll often see 3 or 4 different prices based on
transaction speed: rapid, fast, standard, and slow (or other similar names).
Unsurprisingly, the faster the transaction, the more you will pay and the price
difference can be quite substantial. Generally speaking, when buying or selling tokens
you want to use the fastest option, especially when their price is moving quickly. On
the other hand, if you’re only moving tokens between wallets, or buying tokens when
the market is quiet, you can go for standard or slow speed as it doesn’t really matter if
the transaction takes a bit longer to go through.

The second factor is the amount of gas required for any given transaction. The
minimum amount needed for the simplest transaction on the Ethereum network, for
example moving ETH between two addresses, is 21,000 units. More complex
transactions involving smart contracts such as buying other tokens or staking your
tokens require a lot more gas.

It’s also worth mentioning that some transactions require multiple steps and each of
those steps will require a certain amount of gas. For example: exchanging Tether
(USDT) for Chainlink (LINK), actually requires two transactions: USDT > ETH and ETH
> LINK. If you want to process a transaction like this on (say) Uniswap, you will only
see an estimated gas fee for the first ‘step’ (USDT to ETH in this example), so don’t be
surprised by the added cost of the second ‘step’.

Gas Limit
Gas limit is the maximum amount of gas you are willing to use on any given
transaction. If the actual amount of gas used turns out to be lower than the limit you
specified, the remaining gas will be returned to you. But if your limit is too low, you
https://medium.com/coinmonks/a-short-guide-to-ethereum-gas-fees-5c4c53a05feb 3/9
2/12/23, 1:38 AM A short guide to Ethereum gas fees | by Crypto Badger | Coinmonks | Medium

either won’t be able to process the transaction or the transaction will fail and you will
lose that gas. This is especially dangerous when you’re trying to purchase a token at the
time the network is busy and the price is changing rapidly (e.g. when the price is
pumping immediately after an influencer posted a video about the token you’re trying
to buy).

Examples
The explanation above may be a bit confusing so let’s look at how this works through
an example of a simple transaction of moving ETH between two addresses.

We know that this transaction requires 21,000 units.


The gas fee for standard speed at the moment of writing is 40 gwei.
Gas units (limit) * Gas price per unit (in gwei) = Gas fee
21,000 * 40 = 840,000 gwei
840,000 gwei is 0.00084 ETH, which is at the current prices 2.67 USD (1 ETH = $3179).

That’s not bad, right? So why are people freaking out about gas prices? Well, let’s have a
look at the same simple transaction but this time let’s imagine we’re trying to do it
when the network is completely congested. There was a large flash crash on 19th May
2021 and I remember gas prices hovering around 1,500–2,000 gwei. So….

21,000 * 2,000 = 42,000,000 gwei

That’s 0.042 ETH, which at this moment in time is 133.5 USD… all that just to move
your ETH, we’re not doing anything fancy here.

Now imagine a more complex transaction, which requires say 100,000 units of gas…
suddenly we’re looking at around 500 USD. This is a fair chunk of money to burn in
fees.

Do the London Hard Fork and EIP-1559 Solve the High Gas Fees Issue?
Well, not really. I will not go into the details of the EIP-1559 update in this article (I
recommend watching this video or visiting the Ethereum website) but here are a few
things to be aware of.

In the old system, gas fees are essentially using a blind auction model — if you want to
make sure your transaction goes through quickly when the network is busy, you have
https://medium.com/coinmonks/a-short-guide-to-ethereum-gas-fees-5c4c53a05feb 4/9
2/12/23, 1:38 AM A short guide to Ethereum gas fees | by Crypto Badger | Coinmonks | Medium

to pay much more than you would during the quiet time, because you simply don’t
know how much gas other people are paying.

The new model is more complex but it aims to be more transparent and fair.

The first element of the new model is the base fee, which can go up or down
depending on how busy the network is at a particular point in time. This base fee is
always burned, which can make ETH a deflationary asset as time passes on. Although
ETH has infinite supply, when the network is busy, more tokens are burned than
mined and therefore the amount of ETH in circulation can decrease. You can check out
this website or this one to see how much ETH is being burned.

The second part of the fee is a tip that goes to the miner. It can be adjusted if the
sender wants to process the transaction faster, so in a way, it works similar to the
sender choosing the transaction speed in the old system.

EIP-1559 also allows doubling the block size when the network is getting congested to
make fees more predictable.

The most important takeaway is this: the new gas fee system is NOT designed to lower gas
fees but to make them more transparent and predictable.

The gas prices will be less volatile and there should be less sudden spikes than before,
but they will not necessarily be lower. For gas fees to go down, we will have to wait for
Ethereum 2.0 or Layer 2 scaling solutions (e.g. Polygon).

Practical example using a MetaMask wallet


In this example, I’m swapping some ETH for SuperFarm token SUPER. Although I’m
using a MetaMask wallet, the same principle will apply for other wallets.

Now I can see the quote, which shows the Estimated Network Fee ($27.35) and Max
Network Fee ($30.08). I then click Edit (in blue text next to the Max Network Fee).

https://medium.com/coinmonks/a-short-guide-to-ethereum-gas-fees-5c4c53a05feb 5/9
2/12/23, 1:38 AM A short guide to Ethereum gas fees | by Crypto Badger | Coinmonks | Medium

This takes me to a new window with Average and Fast transaction options. I can select
one of these options or go to the Advanced tab at the top.

In the Advanced tab, I can see Gas Price in GWEI and Gas Limit. The latter is auto-
populated based on the type of transaction. To check the exact current gas prices I can
go to a website such as Gas Now and adjust my gas price accordingly. I then click Save
and process the transaction.

https://medium.com/coinmonks/a-short-guide-to-ethereum-gas-fees-5c4c53a05feb 6/9
2/12/23, 1:38 AM A short guide to Ethereum gas fees | by Crypto Badger | Coinmonks | Medium

I hope you found this article useful. If you’re interested in crypto tutorials and more
crypto market commentaries, please check out my YouTube channel and follow me on
Twitter.

Disclaimer

The content covered in this article is NOT to be considered investment advice.

I’m NOT a financial adviser. These are only my own speculative opinions, ideas, and theories.

Do NOT trade or invest based purely upon the information presented in this article.

https://medium.com/coinmonks/a-short-guide-to-ethereum-gas-fees-5c4c53a05feb 7/9
2/12/23, 1:38 AM A short guide to Ethereum gas fees | by Crypto Badger | Coinmonks | Medium

Always do your own research and due diligence before investing or trading. I’ll never tell you
what to do with your capital, trades or investments. I’ll also never recommend for you to buy,
sell, long or short any asset, commodity, security, derivative or cryptocurrency related
instrument as it’s extremely HIGH RISK!

You should always consult with a professional/licensed financial adviser before trading or
investing in any cryptocurrency related product.

Join Coinmonks Telegram Channel and Youtube


Channel get daily Crypto News
Also, Read
Crypto Telegram Signals | Crypto Trading Bot

Copy Trading | Crypto Tax Software

Grid Trading | Crypto Hardware Wallet

Best Crypto Exchange | Best Crypto Exchange in India

Best Crypto APIs for Developers

Best Crypto Lending Platform

An ultimate guide to Leveraged Token

Best VPNs for Crypto Trading

Best Crypto Analytics or On-Chain Data | Bexplus Review

10 Biggest NFT MarketPlaces to Mint a Collection

AscendEx Staking | Bot Ocean Review | Best Bitcoin Wallets

Bitget Review | Gemini vs BlockFi | OKEx Futures Trading

Ethereum Gas Fees Blockchain Cryptocurrency Ethereum Blockchain

https://medium.com/coinmonks/a-short-guide-to-ethereum-gas-fees-5c4c53a05feb 8/9
2/12/23, 1:38 AM A short guide to Ethereum gas fees | by Crypto Badger | Coinmonks | Medium

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.
Open in app Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/a-short-guide-to-ethereum-gas-fees-5c4c53a05feb 9/9
2/12/23, 1:41 AM Ethereum - Gas and Fees - GeeksforGeeks

Data Structures and Algorithms Interview Preparation Data Science Topic-wise Practice C C+

Ethereum – Gas and Fees


Last Updated : 23 Jun, 2022

Read Discuss

Ethereum Gas is a section that calculates the quantity of calculation action that it takes

to per form specific functions. Ever y function that carries position in Ethereum like

transactions and smar t contracts etc. per formance needs some par t of gas. It is

essential to the blockchain P2P network because it is the power that authorizes it to

accomplish exactly what an automobile needs fuel to drive. Gas refers to the cost

required to complete a deal on the Ethereum network.

Facts about Ethereum Gas

Gas prices are delivered in the form of Ethereum’s born money, the currency of

Ethereum is E TH. 

Gas costs are indicated in “gwei” which is a movement of Ethereum, ever y single

“gwei” is equivalent to 0.000000001 E TH. 

For sample, rather than stating that the gas costs 0.000000001 ether, say, the gas

costs 1 “gwei”. 

The term “gwei” means “Giga-wei”, which is equivalent to 1,000,000,000 “wei”. 

“ Wei” is called af ter “ Wei Dai” that is the creator of b-money (least unit of E TH).

GWEI

Gwei is a combination of “giga” and “wei”. It is a sect of the blockchain technology E TH,

this coin is operated on the Ethereum P2P network. E TH is a blockchain medium, like

Bitcoin and Binance, where users can make transactions with respect to buying and

Start Your Coding Journey Now!


selling interests and benefits without the involvement of an intermediator.
Login Register
https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 1/10
2/12/23, 1:41 AM Ethereum - Gas and Fees - GeeksforGeeks

Example

For example, Rahul needs to give 1 E TH to Shubham. During the transaction, the gas

boundar y is 21000 units, and the gas price is 200 gwei.

Total fee costs = Gas units (limit) * Gas price per unit 

                      = 21000 * 200 

                      = 4,200,000 gwei (0.0042 E TH)

When Rahul dispatched the funds, 1.0042 E TH would be subtracted from Rahul’s

account. 

Shubham would be credited 1.0000 E TH only as 0.0042 is the fess of Miner.

Now after upgradation, increased advantages presented by the difference contain more

profitable trade fee computation, typically more rapid trade inclusion, and canceling the

E TH distribution by burning a por tion of trade fees.

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 2/10
2/12/23, 1:41 AM Ethereum - Gas and Fees - GeeksforGeeks

Beginning with the peer-to-peer network upgrade, each block unit has a ground fee,

the lowest price per unit of gas for inclusion in this block unit, estimated by the

network founded on request. 

Because the ground fee of the trade fee is burnt, users are also hoped to put a tip in

their dealings. 

The information pays miners for managing and breeding user trades in blocks and is

hoped to be set automatically by most wallets.

Total fee after upgradation = Gas units (limit) * (Base fee + Tip)

For example, Shubham has to pay 1 E TH to Rahul. This process has a gas limit of 21000

units and a base fee of 100 gwei. Shubham includes a tip of 10 gwei.

Total fee after upgradation = Gas units (limit) * (Base fee + Tip)

                                          = 21000 * (100 + 10) 

                                         = 2,310,000 gwei (0.00231 E TH).

When Shubham sends the funds, 1.00231 E TH will be subtracted from Shubham’s

account. 

Start Your Coding Journey Now!


Rahul will be credited 1.0000 E TH and 0.00021   E TH will be received by the miner as

the tip. 

https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 3/10
2/12/23, 1:41 AM Ethereum - Gas and Fees - GeeksforGeeks

A ground fee of 0.0021 E TH is ignited.

Gas Fees

The gas fees include Base, Priority, Max, and calculating fees. Let ’s discuss these terms

in detail.

1. Base fees :

Each alliance has a ground fee which ser ves as a fund price. 

The ground fee is figured alone of the existing alliance and is rather specified by the

alliances before it pushes trade prices better for users. 

When the block is excavated the base fee is “burned”, dragging it from regulation.

The ground fee is evaluated by instructions that compare the length of the earlier

block with the marked size. 

The base fee intention rise by a max of 12.5% per block if the marked block size is

surpassed.

2. Priority fee :

Apar t from the base fee obtained, the advancement presented a priority fee i.e. tip to

miners to contain a trade in the alliance. 

Without tips, miners can see it financially possible to drill cleared blocks because

they can obtain the exact alliance prize. 

Under normal circumstances, a little tip provides miners with the slightest

encouragement to maintain a transaction.

For dealings that require getting preferentially conducted ahead of different trades in

the same block, a more elevated tip will be essential to endeavor to outbid

contending trades.

3. Max fee :

To conduct trade on the P2P network, users can select the greatest limit they are

inclined to spend for their dealing to be completed. 

This additional circumference is called the max fee/Gas.

For a trade to be completed, the max fee must surpass the aggregate of the base and

Start Your Coding Journey Now!


priority fees.

https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 4/10
2/12/23, 1:41 AM Ethereum - Gas and Fees - GeeksforGeeks

The trade sender is repaid the contrast between the max fee and the total of the

ground(base) fee and tip.

4. Calculating fees :

The main benefit of the upgrade is enhancing the user ’s knowledge when charging

trade fees. 

In the wallets that sustain the upgrade rather than explicitly commenting to pay the

transaction from a wallet, providers will automatically set a suggested transaction

fee (base fee + suggested priority fee) to decrease the quantity of complexness

loaded on their users.

Impor tance of Gas Fees

Below are some of the reasons why gas fess is impor tant:

Gas fees help suppor t the Ethereum peer-to-peer network security. 

By demanding a price for ever y analysis per formed on the web grid, it prevents evil

per formers from spamming the web grid. 

To evade unexpected or malicious endless circles or different computational wastage

in principle, ever y trade is needed to set a boundar y to how multiple computational

effor ts of code implementation can operate. 

The basic division of accounting is “gas”.

A trade organizes a boundar y and any unit of gas not utilized in trade is replaced (i.e.

max fee – (base fee + tip)).

Why gas fees can go high?

Increased gas prices exist because of the fame of Ethereum. 

Conducting any function on Ethereum needs depleting gas, and the gas area is

determined per alliance. 

Prices contain measures, holding or exploiting data, and swallowing various par ts of

“gas” units. 

As app functionality produces additional complexity, the digit of functions a wise

contract achieves also develops, representing each trade brings up more additional

area of a fixed measure block. 

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 5/10
2/12/23, 1:41 AM Ethereum - Gas and Fees - GeeksforGeeks

If the demand is quite high, users must present a more elevated tip payment to tr y

and outbid other users’ dealings. 

A more increased tip can construct it additional possible that your trade will convey

into the subsequent block.

Initiative to reduce gas costs :

The E TH efficiency advancements should eventually manage some of the gas cost

points, allowing the medium to process thousands of trades globally per moment.

Second layer scaling is a direct ambition to significantly enhance gas prices, user

knowledge, and scalability.

The recent proof-of-stake(POS) sample based on the Beacon Chain, should decrease

heightened control consumption and dependence on technological hardware. 

This chain resolve permits decentralized E TH P2P networks to compromise and

suppor t network security while restricting gas consumption by rather demanding an

economic responsibility.

Strategies to reduce gas costs :

Strategies to decrease gas costs for E TH, Users can select a direction to display the

impor tant status of the user ’s transaction.

Miners intention per form trades that suggest a more increased tip per gas, as they

hold the tips that users spend and resolve be slightly tilted to conduct transactions

with more down tips specified.

If users like to obser ve gas costs, then they can send E TH for smaller, user can utilize

multiple other tools given below: 

” Etherscan Transaction gas price estimator “, and ” Blocknative E TH Gas E stimator

Gas ” for evaluating Chrome attachment backing both Class 0 inheritance trades and

Class 2 EIP-1559 trades, and” E TH Gas Station ” which is client instructed metric s for

the Ethereum gas demand, ” Cr yptoneur Gas Fees Calculator ” is used for calculating

gas prices in the local currency for various trade.

Why do gas fees exist?

Gas prices assist maintain the Ethereum grid safe. By demanding a price for ever y

Start Your Coding Journey Now!


analysis per formed on the grid, it controls harmful attackers from spamming the

https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 6/10
2/12/23, 1:41 AM Ethereum - Gas and Fees - GeeksforGeeks

grid. 

To bypass unexpected code, ever y trade needs to set a limitation to the multiple

computational effor ts of regulation per formance. 

The absolute unit of analysis is “gas”.

Moreover, a trade contains a limitation, any gas not operated in a transaction is

produced to the user (i.e. max fee – (base fee + tip) is produced).

How does block size affect the base fees?

The base fee is computed by a procedure that resembles the dimensions of the last block

(the par t of gas utilized for all the trades) with the target size. The base fee will rise by a

most of 12.5% per alliance if the target block size is overextended.

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 7/10
2/12/23, 1:41 AM Ethereum - Gas and Fees - GeeksforGeeks

Like 0

Previous Next

Related Articles

1. Use of Ethereum's RLPx in Ethereum Ecosystem

2. Ethereum (ETH) vs Ethereum Classic (ETC) in Blockchain

3. Difference Between Bitcoin and Ethereum

4. What are Nodes and Clients in Ethereum?

5. Difference Between Ethereum and Solana

6. What is Ethereum Virtual Machine and How it Works?

7. Deploy a Smart Contract on Ethereum with Python, Truffle and web3py

8. Ethereum 2.0

9. What is Ethereum?

10. ERC20 vs ERC721 in Ethereum

Start Your Coding Journey Now!


Ar ticle Contributed By :

https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 8/10
2/12/23, 1:41 AM Ethereum - Gas and Fees - GeeksforGeeks

shubhambhugra234
@shubhambhugra234

Vote for difficulty

Easy Normal Medium Hard Expert

Article Tags : Ethereum, Picked, Blockchain

Improve Article Report Issue

A-143, 9th Floor, Sovereign Corporate Tower,


Sector-136, Noida, Uttar Pradesh - 201305
[email protected]

Company Learn
About Us DSA
Careers Algorithms
In Media Data Structures
Contact Us SDE Cheat Sheet
Privacy Policy Machine learning
Copyright Policy CS Subjects
Advertise with us Video Tutorials
Courses
Start Your Coding Journey Now!
https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 9/10
2/12/23, 1:41 AM Ethereum - Gas and Fees - GeeksforGeeks

News Languages
Top News
Python
Technology
Java
Work & Career
CPP
Business
Golang
Finance
C#
Lifestyle
SQL
Knowledge
Kotlin

Web Development Contribute


Web Tutorials Write an Article
Django Tutorial Improve an Article
HTML Pick Topics to Write
JavaScript Write Interview Experience
Bootstrap Internships
ReactJS Video Internship
NodeJS

@geeksforgeeks , Some rights reserved

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/ethereum-gas-and-fees/ 10/10
2/12/23, 1:43 AM What is Ethereum Gas? Simple Explanation | by eiki | Medium

eiki Follow

May 31, 2019 · 3 min read · Listen

Save

What is Ethereum Gas? Simple Explanation

What this article write about?


This article simply explains Gas in Ethereum and its mechanism. As Gas is a core
system in Ethereum blockchain, you can quickly understand what it is and mechanism

https://medium.com/@eiki1212/what-is-ethereum-gas-simple-explanation-2f0ae62ed69c 1/4
2/12/23, 1:43 AM What is Ethereum Gas? Simple Explanation | by eiki | Medium

behind the scene. A reader is expected to have basic knowledge about Ethereum such
as smart contract, Proof-of-Work, and what Ethereum is. The contents are below.

- What is Gas?
- Why do we need to the Gas system?
- How the Gas price is determined?
- Mechanism of rising of Gas price.
- How to get Gas?

What is Gas?
Gas is fuel in Ethereum blockchain and is consumed when a smart contract is
executed. Gas is a unit to measure the amount of computational effort for certain
operation. The more complex operation, more gas consumes. The gas method is
equivalent to the application of kilowatts(kW) to estimate electricity of property; the
electricity used by people is not estimated in fiat-money but kWH. Whenever user
transfers ETH or runs smart contract, they need to pay Gas as a fee.

Why do we need to the Gas system?


The main purpose of Gas is to mitigate the volatility of ETH. ETH is listed on exchanges
and publicly tradable. Therefore, it is directly exposed to market volatility. Contrary,
Gas is not listed on any exchange so it is not directly affected by market volatility.
Ethereum smart contract needs more computational power than a simple transfer.
Thus, the fee needs to be carefully designed to avoid instability.

How the Gas price is determined


The price of Gas is determined by two factors: Gas limit and Gas Price. Gas limit is the
maximum amount of gas the sender is willing to pay for the transaction. Gas price is
determined by the market supply and demand. Final price of Gas for the transaction is
determined by multiplying both two prices.

Gas Limit * Gas Price = Gas Fee

- Gas Limit
Gas Limit is a limit of the amount of ETH the sender is willing to pay for the
transaction. Usually, when one is talking about Gas in Ethereum, they are referring to

https://medium.com/@eiki1212/what-is-ethereum-gas-simple-explanation-2f0ae62ed69c 2/4
2/12/23, 1:43 AM What is Ethereum Gas? Simple Explanation | by eiki | Medium

Gas Limit. When transferring ETH, the sender needs to set Gas Limit. If Gas Limit is
not enough to transfer, the transfer will be canceled and Gas will be refunded to the
sender. On the other hand, if the sender sets excess Gas Limit, Gas left over will be
refunded to the sender.

- Gas Price
Gas Price represents the price of Gas in Gwei. For example, 1 Gas = 10 Gwei. It is
basically determined by market supply and demand. Gas Price is used to multiply Gas
Limit to determine the final price of Gas.

Mechanism of rising of Gas price.


The more transactions on the Ethereum blockchain, The higher transaction fees the
sender needs to pay. An incentive for miners is to earn Gas by validating the
transaction with their computational resource. In order to earn Gas efficiently, miners
try to mine high fee transaction preferentially.

1. Number of transaction increases


2. Miners try to mine the transaction which has the most expensive transaction fee.
3. If you pay a cheap transaction fee, you need to wait for a while.
4. If you want the transaction to be executed fast, you need to pay more transaction
fee.

The high price of Gas is a big problem in Ethereum and called “Scalability Problem”. It
happens when a lot of users started to transfer money or run a smart contract at the
same time. CryptoKitty, one of the most famous and popular games on Ethereum,
launched in late 2017, users have reached in excess of 1.5 million(25% of total Ethereal
traffic in peak times). At this time, users needed to pay the exorbitant transaction fee
and badly influenced all Ethereum users. In order to solve the scalability problem,
several off-chain/side-chain projects are underway such as Plasma and Loom.

References

HOW THE SWITCH FROM POW TO POS COULD AFFECT ETHEREUM MINING

Ethereum Explained: Gas, Payment, and Mining

https://medium.com/@eiki1212/what-is-ethereum-gas-simple-explanation-2f0ae62ed69c 3/4
2/12/23, 1:43 AM What is Ethereum Gas? Simple Explanation | by eiki | Medium

What is Ethereum Gas? [The Most Comprehensive Step-By-Step Guide Ever!]

Blockchain Ethereum Bitcoin Gas

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.com/@eiki1212/what-is-ethereum-gas-simple-explanation-2f0ae62ed69c 4/4
2/12/23, 1:46 AM Ethereum block structure explained | by eiki | Medium

eiki Follow

Jul 19, 2019 · 4 min read · Listen

Save

Ethereum block structure explained


The article explains inside of block in Ethereum which constitute a fundamental
system in Ethereum platform

Introduction
This article explains the Ethereum block structure and its related terminologies. As the
block is the heart of the Ethereum platform, It is necessary to understand what block
is. Block stores some fundamental data that constitute of a blockchain network to
ensure immutability and security.

What you can get from the article are:

understanding what block is and its role

Structure(fields) of block

Uncle block

What you cannot get are:

trie mechanism such as Merkle Patricia Trie and world state trie.

Consensus algorithms such as Proof-of-Work and Proof-of-Stake.

I put some useful resources end of this article for a deeper understanding of other
components.

https://medium.com/@eiki1212/ethereum-block-structure-explained-1893bb226bd6#:~:text=nonce) by calculating.-,Block in Ethereum,has%2C and fa… 1/5


2/12/23, 1:46 AM Ethereum block structure explained | by eiki | Medium

What is Block in Blockchain?


In the blockchain, a block is a core concept that can be thought of as a page in a ledger.
Blocks contain transactions and some important data such as previous hash that
ensures immutability and security in the blockchain network. Each block stores a
previous hash sequentially so it is almost infeasible to reverse and tamper data. Block
will be created when a miner finds a specific value(nonce) by calculating.

Block in Ethereum
Currently, Ethereum uses Proof-of-Work as its consensus algorithm and is gradually
shifting to Proof-of-Stake. As Proof-of-Work is not eco-friendly due to its too much
electricity consuming. Proof-of-Stake can mine blocks based on the amount of money
miner has, and faster than PoW.

Ethereum block stores several important data such as previous block hash, Merkle trie
based root hash, timestamp, difficulty, and more.

Ethereum block structure

■ Previous Block Hash


Block hash stored in previous block.
■ Transaction Hash Root
Root node of transaction hash.
■ Receipt Root Hash
Root node of receipt hash.
■ State Root Hash
Root node of world state.
■ Timestamp
Unix timestamp that represents the time when mining ends.
■ Difficulty
Difficulty is a value that shows how difficult to find a hash.
■ Nonce
A nonce is a number that can only be used once. In cryptography, a
nonce is a one-time code chosen randomly to transmit password securely
and prevent replay attacks.
■ Gas Limit
Gas limit set for the block.

https://medium.com/@eiki1212/ethereum-block-structure-explained-1893bb226bd6#:~:text=nonce) by calculating.-,Block in Ethereum,has%2C and fa… 2/5


2/12/23, 1:46 AM Ethereum block structure explained | by eiki | Medium

■ Gas Used
Sum of all the gas used by all transaction in the block.
■ Extra Data
An optional and free field to store extra data.
■ number
Counting number of the block. The number increments sequentially. 0 is
a genesis block.

Hash Root
As you can see, Block has three types of hash root: transaction hash root, receipt hash
root, and world state hash root. Each type of hash root is generated by “Merkle Patricia
Trie” which is Etheream original trie invented with Merkle and Patricia trie. If you
want to know more details about Merkel Patricia Trie, please refer to “Ethereum State
Trie Architecture Explained”.

Nonce
In cryptography, a nonce is a one-time code chosen randomly to transmit password
securely and prevent replay attacks. Ethereum has two types of nonce: Proof-of-
Work(block) nonce and account(transaction) nonce. Nonce in the block is Proof-of-
Work nonce that is used as a meaningless number when mining. On the other hand,
the nonce in the transaction is an account nonce that represents an order of
transaction that an account creates.

Block Gas Limit


Block gas limit is a maximum amount of gas allowed in a block. It determines how
many transactions can be stored in a block based on the sum of gas. For example,
when block gas limit is 100 and we have transactions which gas limits are 50, 50, and
10. Block can store only the first two transactions(the 50s) but not the last one(10).
When miner tries to append the last transaction, Ethereum emits “Transaction
exceeds block gas limit” error.

note: Ethereum has two types of Gas limit: transaction gas limit and
block gas limit. Transaction gas limit is one of the data in a
transaction that a limit of the amount of ETH the sender is willing to
pay for the transaction. If you want to see more details of

https://medium.com/@eiki1212/ethereum-block-structure-explained-1893bb226bd6#:~:text=nonce) by calculating.-,Block in Ethereum,has%2C and fa… 3/5


2/12/23, 1:46 AM Ethereum block structure explained | by eiki | Medium

transaction gas, please refer to "Ethereum Transaction Structure


Explained".

Uncle Block
Uncle block in Ethereum is equivalent to orphan block in Bitcoin. Uncle block is a
block which is mined correctly but not accepted because of network time lag. In
mining, it occasionally happens two different miners generate the same block
simultaneously and only one of them is adopted in the blockchain. Unlike orphan
block in Bitcoin, Ethereum rewards for uncle block to neutralize the effect of network
lag and decrease centralization by large miners.

Conclusion
In the article, Inside of Ethereum block is explained. As Ethereum is a blockchain
platform, it is necessary to understand what block is and its every field. The article
explained Block fields and some of them are described more deeply. If you want to
know more details of some specific fields, please refer to the “references” which I used
when writing the article. If you have any comments and question, always welcome.
Thank you.

References
What is nonce in Ethereum? How does it prevent double-spending?

Ethereum State Trie Architecture Explained

Orphan Block (Cryptocurrency)

Uncle Block (Cryptocurrency)

Accounts, Transactions, Gas, and Block Gas Limits in Ethereum

Ethereum Transaction Structure Explained

Blockchain Ethereum Ethereum Blockchain Block Nonce

https://medium.com/@eiki1212/ethereum-block-structure-explained-1893bb226bd6#:~:text=nonce) by calculating.-,Block in Ethereum,has%2C and fa… 4/5


2/12/23, 1:46 AM Ethereum block structure explained | by eiki | Medium

About Help Terms Privacy

Get the Medium app


Open in app Sign up Sign In

Search Medium

https://medium.com/@eiki1212/ethereum-block-structure-explained-1893bb226bd6#:~:text=nonce) by calculating.-,Block in Ethereum,has%2C and fa… 5/5


2/12/23, 1:48 AM Ethereum under the hood- Part 7( Blocks ) | by Derao | Coinmonks | Medium

Published in Coinmonks

Derao Follow

Mar 2, 2021 · 5 min read · Listen

Save

Ethereum under the hood- Part 7( Blocks )


Welcome back and a happy new year. Glad you are still with me as we dig venture into
the internals of Ethereum. In chapter 6, we discussed Hashing; in this section, we dive
into Blocks. Block is a big topic to cover in one single medium post, so I intend to split
Blocks into 2 Parts and Part-1 of Blocks short, so in Block Part 1 we cover:

1. Quick review

2. Blocks

3. Block Header

4. Summary

5. Onwards.

Quick Review:
We are dipping a little deeper into our journey of exploring Ethereum, but it’s good to
pause and recap what we have learned so far, I have created a public gist to refresh our
collective memories, for this overview, let us focus on Part 3 through 6.

https://medium.com/coinmonks/ethereum-under-the-hood-part-7-blocks-c8a5f57cc356 1/9
2/12/23, 1:48 AM Ethereum under the hood- Part 7( Blocks ) | by Derao | Coinmonks | Medium

Recap[ 3–6 ]

Blocks:
The block is the core of the concept of a BlockChain; a Block is a historical
recordkeeper of the list of transactions. There is a lot of information packed into that
statement. Ethereum, like it’s predecessor Bitcoin, has the concept of a Blockchain,
and to understand a Block, we will approach a Block as a Data structure.

The Ethereum Yellow paper, which defines a Block as a collection of three entities 1.
Block Header 2.Transaction(s) List 3.Ommers List, formally defined as:

Section 4.3(Block)

A block is a data structure similar to that has a set of validated transactions.

https://medium.com/coinmonks/ethereum-under-the-hood-part-7-blocks-c8a5f57cc356 2/9
2/12/23, 1:48 AM Ethereum under the hood- Part 7( Blocks ) | by Derao | Coinmonks | Medium

Block Header:
Block header, as the name suggests is the header of a Block, Blockheader is composed
of 15 distinct fields as per the yellow paper, I tried capturing them in a spreadsheet,
similar to the one below:

Block Header-15 fields

Each one of those fields needs a separate chapter by itself, we will not go into the
details of each one of those 15 fields but will focus on a few. I would recommend
having a look at Part-4( The trie ) as a refresher. Now back to the Block Header fields

ParentHash: This field, as the name refers to the Parent’s Keccak hash of this block. The
field size would be 256-bit Keccak hash function, primarily the hash value indicates the
immediate parent of this block, using this technique is how Ethereum links one block
to another, forming a chain of blocks.

StateRoot: This refers to the Keccak hash root of a collection of the state trie (post-
execution), which has occurred since the creation of this block, a { key, value }
collection. There is only one global state and is updated continuously, and each block
will have the root hash of the state trie DB.

https://medium.com/coinmonks/ethereum-under-the-hood-part-7-blocks-c8a5f57cc356 3/9
2/12/23, 1:48 AM Ethereum under the hood- Part 7( Blocks ) | by Derao | Coinmonks | Medium

Ethereum Global state

Keys -> { Ethereum Address 160 bit }


Values -> { Nonce,Balance,StorageRoot,CodeHash }

TransactionRoot: Keccak Hash of the root node of Transaction Trie: This field refers to
the Keccak hash root of a collection of all the Transaction trie, which has occurred
since the creation of this block.

ReceiptsRoot: Keccak Hash of the root node of Transaction Trie: This field refers to the
Keccak hash root of a collection of all the Transaction trie, which has occurred since
the creation of this block. The Receipt (R) is a Tuple comprised of 4 fields. Ethereum
yellow paper has, in some detail, mentions about the receipts root field. The receipts
field is a collection of

https://medium.com/coinmonks/ethereum-under-the-hood-part-7-blocks-c8a5f57cc356 4/9
2/12/23, 1:48 AM Ethereum under the hood- Part 7( Blocks ) | by Derao | Coinmonks | Medium

| Description | Symbol |
| :— — — — — - - -:|: — — — — -:|
| Total Gas Spent | Ru |
| Bloom Filter Root| Rb |
| Logs of the Tran | Rl |
| Status Code | Rz |

The logs (Rl) and Bloom filter root (Rb) fields described in detail in the yellow paper;
Bloom Filters do need a separate section, and I am planning to discuss them in Part-8
but for now, let us think of Bloom filters as an algorithm that can help speed up search
time results.

Relationship between Transaction Trie and Receipts Trie


Thanks for contributing an answer to Ethereum Stack Exchange! Please
be sure to answer the question. Provide details…
ethereum.stackexchange.com

Below is a codified structure of the Ethereum Block header in Elixir, I have also
provided a link to the go codebase.

https://medium.com/coinmonks/ethereum-under-the-hood-part-7-blocks-c8a5f57cc356 5/9
2/12/23, 1:48 AM Ethereum under the hood- Part 7( Blocks ) | by Derao | Coinmonks | Medium

Ethereum Block header fields

Block Header Structure:


Have a look at this excellent visual representation from Lucas Saldanha of the
Ethereum Block structure, and it’s various links to tries.

https://medium.com/coinmonks/ethereum-under-the-hood-part-7-blocks-c8a5f57cc356 6/9
2/12/23, 1:48 AM Ethereum under the hood- Part 7( Blocks ) | by Derao | Coinmonks | Medium

Source: Block Structure

Summary:
A Block comprises of Block Header and transactions.

Block Header comprises of 15 fields.

State, Transactions, Receipts header fields have pointers to the root hash.

Onto:
In the next section-8, we will continue exploring Blocks, Genesis Block, and Block
verification, until then learn on.

References:

Block header format


Does anyone understand what each element of a block header
represents? I have an example block header represented here…
ethereum.stackexchange.com

https://medium.com/coinmonks/ethereum-under-the-hood-part-7-blocks-c8a5f57cc356 7/9
2/12/23, 1:48 AM Ethereum under the hood- Part 7( Blocks ) | by Derao | Coinmonks | Medium

ethereum/go-ethereum
You can’t perform that action at this time. You signed in with another tab
or window. You signed out in another tab or…
Open in app Sign up Sign In
github.com

Search Medium

What exactly does the “m” function in the formal Bloom filter
specifications do?
Thanks for contributing an answer to Ethereum Stack Exchange! Please
be sure to answer the question. Provide details…
ethereum.stackexchange.com

how to include transations in genesis block


Thanks for contributing an answer to Ethereum Stack Exchange! Please
be sure to answer the question. Provide details…
ethereum.stackexchange.com

Ethereum Cryptocurrency Blockchain

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

https://medium.com/coinmonks/ethereum-under-the-hood-part-7-blocks-c8a5f57cc356 8/9
2/12/23, 1:48 AM Ethereum under the hood- Part 7( Blocks ) | by Derao | Coinmonks | Medium

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/ethereum-under-the-hood-part-7-blocks-c8a5f57cc356 9/9
2/12/23, 1:51 AM Try our blockchain demo project on Ethereum | by Louis Li | RedSo | Medium

Published in RedSo

Louis Li Follow

Feb 1, 2018 · 4 min read · Listen

Save

Try our blockchain demo project on Ethereum


You are reading this because you want to try our smart contract demo. If you do not
have MetaMask installed, please refer here before going on.

We have built a demo Decentralized App (DApps) on watches trading. You can buy
watches or post watches to sell on the website. The transactions are all made in Ether.
ALL the trading records of a particular watch are listed on the Ethereum network so
you can know how many previous owners are there and what are the previous prices.
By the transparent nature of blockchain, everybody can trust the watch actually comes
from a legitimate source by tracing the source of origin.

The demo site: https://redso-blockchain-demo.redso.com.hk/

Set your network to the Rinkeby Test Network


Our demo website is running on the Rinkeby Test Network, please set your wallet to
the Rinkeby Test Network.

https://medium.com/redso/try-our-blockchain-demo-project-on-ethereum-cff8c2737ab1 1/9
2/12/23, 1:51 AM Try our blockchain demo project on Ethereum | by Louis Li | RedSo | Medium

Purchasing a watch

Let’s buy a watch with ETH!

https://medium.com/redso/try-our-blockchain-demo-project-on-ethereum-cff8c2737ab1 2/9
2/12/23, 1:51 AM Try our blockchain demo project on Ethereum | by Louis Li | RedSo | Medium

If you are in the Rinkeby test network, you can see a list of watches (1 entry is 1
particular watch). There should be some watches showing with the “Buy” button. Click
on the button, and your wallet will prompt you with a notification window.

Set the fees


In your wallet, you can see all the information of this transaction, on the top, you will
see (a) your account, your address, (b) your balance and (c)the account address you are
paying to. In the middle, you will see (d) the amount of the product you purchase. Gas
limit and Gas price (e) are the details of your transaction fees. The Gas limit is the
maximum unit of gas you are willing to pay and the gas price is the unit price of gas
you are paying in order to write your transaction record to the blockchain.

https://medium.com/redso/try-our-blockchain-demo-project-on-ethereum-cff8c2737ab1 3/9
2/12/23, 1:51 AM Try our blockchain demo project on Ethereum | by Louis Li | RedSo | Medium

https://medium.com/redso/try-our-blockchain-demo-project-on-ethereum-cff8c2737ab1 4/9
2/12/23, 1:51 AM Try our blockchain demo project on Ethereum | by Louis Li | RedSo | Medium

For detailed settings on Gas limit and Gas price, we will cover in other blog posts. Let’s
stick to the default at the moment.

Submit the transaction


You can review the total amount you have to pay for this transaction. If you have
sufficient balance in your account (f), you can simply click submit to finish the
transaction, otherwise, you will have to get some ETH first.

You can always check out the status of your transaction on etherscan.io.

Selling your watches


After you bought the watch, you can see it showing as ‘owned by me’. You can then try
to resell it by just setting a resell price.

https://medium.com/redso/try-our-blockchain-demo-project-on-ethereum-cff8c2737ab1 5/9
2/12/23, 1:51 AM Try our blockchain demo project on Ethereum | by Louis Li | RedSo | Medium

The demo website also allows you sell a new watch. By click on the button on the
upper right corner and you can fill in the form about the item you are going to sell. As
this action also writes a record to the blockchain, a receiver of you are paying for the
gas same as before.

https://medium.com/redso/try-our-blockchain-demo-project-on-ethereum-cff8c2737ab1 6/9
2/12/23, 1:51 AM Try our blockchain demo project on Ethereum | by Louis Li | RedSo | Medium

Open in app Sign up Sign In

Search Medium

This pretty much ends the demo functionality. We will talk about more on the details
of smart contracts in the next post here.

Email us at [email protected] if you want to know more about what we can do for
you in smart contracts!
9
https://medium.com/redso/try-our-blockchain-demo-project-on-ethereum-cff8c2737ab1 7/9
2/12/23, 1:51 AM Try our blockchain demo project on Ethereum | by Louis Li | RedSo | Medium

Sign up for RedSo newsletter!


The best way for you to know more about us.

Email

Sign up

I agree to leave medium.com and submit this information, which will be


collected and used according to Upscribe's privacy policy.

Powered by Upscribe

Ethereum Blockchain Decentralized Apps

About Help Terms Privacy

Get the Medium app

https://medium.com/redso/try-our-blockchain-demo-project-on-ethereum-cff8c2737ab1 8/9
2/12/23, 1:51 AM Try our blockchain demo project on Ethereum | by Louis Li | RedSo | Medium

https://medium.com/redso/try-our-blockchain-demo-project-on-ethereum-cff8c2737ab1 9/9
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Published in Coinmonks

Jackson Ng Follow

Aug 23, 2021 · 8 min read · Listen

Save

Introducing the Ethereum Development


Environment: Part 1
My Ethereum Development Toolchain
Like all other software development processes, building Decentralized Applications in
Ethereum comes with its suite of development tools. In fact, there are many options.

In this 2-part tutorial I will walk through my Ethereum Development toolchain using
the example of building the Freelancer Decentralized Application:

1. Writing and Testing the Solidity Smart Contract

2. Building and Deploying the DApp

The scripts and config files that I use for this tutorial can be found in my GitHub
repository here

There are many ways to build a DApp, and here’s mine.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 1/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Photo by Alexandru Acea on Unsplash

Ganache
Ganache is a desktop-based personal Ethereum Blockchain. A local, self-contained
Ethereum Blockchain network is the fastest way to test your codes since transactions
get executed instantaneously.

Visit Ganache, download, install and fire it up on your computer.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 2/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Add a new workspace. Call it “Freelancer Contract” as we will be testing our Freelancer
contract in this self-contained local Ethereum Blockchain network. Save the workspace
and start it up.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 3/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Notice that a handful of accounts, well-loaded with 100 ETH each had been generated.
Click Show Keys to reveal the private key for the first account.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 4/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Copy the private key. We will be using this key in the next step.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 5/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

MetaMask
MetaMask is an Ethereum Wallet. Like a physical wallet where you keep your dollar
bills, MetaMask lets you save, spend and transfer ETHs between accounts. MetaMask
also allows lets you execute Ethereum transactions and run Decentralized Apps.

Download and set up MetaMask on your Chrome or Firefox browser.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 6/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

By default, your new MetaMask wallet is connected to the main Ethereum network. We
will reconnect it to our local Ganache Ethereum Blockchain. To do this, visit the
settings on MetaMask. Add a network with the following settings:

Network Name: Local (you can call it Ganache, or any other names you prefer)

New RPC URL: HTTP://127.0.0.1:7545 (you can find this on Ganache under RPC
Server

Chain ID: 1337 (this is the default for Ganache)

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 7/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Import an account. Paste the private key that you have copied earlier into the private
key text field. This will import the corresponding Ganache account into your
MetaMask wallet. If you have done this correctly, you will see 100 ETH in this account.
You may import more accounts from Ganache to MetaMask if you wish.

Visual Studio Code


I use Visual Studio Code as my Integrated Development Environment (IDE). I like it
because it comes with extensions for Solidity development that I enjoy using. It doesn’t
really matter which IDE you use. Download and install yours here.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 8/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Search for “Solidity Visual Developer” extension and install it. This will provide Solidity
language support when you code. I love its funky colored code highlights!

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 9/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Truffle Box
The folks who built Ganache also built “Truffle Boxes” which are boilerplates that
come with the Solidity, Web3, and other libraries that developers need to compile and
test their smart contracts and to build the front-end for your Decentralized Apps.
There are Truffle Boxes for React Apps, React Native and project samples.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 10/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

In this tutorial, we are building the Freelancer DApp, a simple


HTML/JavaScript/Bootstrap-based Web Application. So we will use the webpack box.

Install Truffle

npm install -g truffle

We are now ready to develop our Freelancer DApp project. Create a new folder
“freelancer” on your computer. Enter the following command to unbox the webpack
boilerplate into the folder:

npx truffle unbox webpack

Open the folder in VS Code. We are ready to start building.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 11/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Edit truffle-config.js .

Change the develop settings under network to point to Ganache, since this is where we
will be testing our contract:

develop: {
host: "127.0.0.1", // Localhost (default: none)
port: 7545, // Standard Ethereum port (default: none)
network_id: "*", // Any network (default: none)
},

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 12/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Change the Solidity compiler version to 0.8.0 because the freelancer smart contract is
written in Solidity 0.8.0:

solc: {
version: "0.8.0", // Fetch exact version from solc-bin
(default: truffle's version)
}

Visit /contracts/Migrations.sol. This is the webpack boilerplate’s migration Smart


Contract. Change the Solidity version of the migration Smart Contract to 0.8.0 as well
so that it compiles with the correct version of Solidity compiler that we indicated at
truffle-config.js.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Migrations {
address public owner;
uint public last_completed_migration;
constructor() public {
owner = msg.sender;
}
modifier restricted() {
if (msg.sender == owner) _;
}
function setCompleted(uint completed) public restricted {
last_completed_migration = completed;
}
}

Compiling & Deploying freelancer.sol


Copy freelancer.sol into the /contract folder.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 13/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Then run the following command to compile freelancer.sol and migration.sol:

truffle compile

We are now ready to migrate the deploy the freelancer.sol smart contract.

In my migration script, I have coded a basic scenario to execute an end-to-end process,


from contract initiation to final payments.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 14/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

The migration script serves 2 purposes — as a deployment script for the freelancer
Smart Contract, and as a test script to backtest the smart contract whenever I make
code changes so that I am sure that I haven’t broken anything each time I tweak
something.

Here are some code snippets:

Connects to the first and second addresses on the local Ganache Blockchain. The first account
belongs to the freelancer and the second account belongs to the client:

//get address for programmer and client wallet


await web3.eth.getAccounts().then(function(result){
programmerWallet = result[0];
clientWallet = result[1];
});

Freelancer deploys the freelancer contract:

//deploy freelancer contract


await deployer.deploy(freelancer, {from:
programmerWallet}).then(()=> {
console.log("Freelance Contract:" + freelancer.address);
}
);

Freelancer adds a “Design Phase” to the contract:

//add design phase to freelancer contract


await freelancer.deployed().then(
async function(contractInstance) {
await contractInstance.addSchedule('DSP','Design Phase',
web3.utils.toWei('1.25', 'ether'), {from: programmerWallet}).then(
function(v) {
console.log("Schedule
Added:"+v.receipt.logs[0].args.shortCode);
}
)

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 15/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

}
);

Client accepts the contract and funds the design phase:

//client accept freelancer contract


await freelancer.deployed().then(
async function(contractInstance) {
await contractInstance.acceptProject({from:
clientWallet}).then(
function(v) {
console.log("Contract Accepted
By:"+v.receipt.logs[0].args.clientAddress);
}
)
}
);

//client funds design phase


await freelancer.deployed().then(
async function(contractInstance) {
await contractInstance.fundTask(0, {from: clientWallet,
value: web3.utils.toWei("1.25", "ether")}).then(
function(v) {
console.log("Task
Funded:"+v.receipt.logs[0].args.scheduleID);
}
)
}
);

Freelancer releases funds from the project to himself and then ends the project:

//programmer releases funds to himself


await freelancer.deployed().then(
async function(contractInstance) {
await contractInstance.releaseFunds(2, {from:
programmerWallet}).then(
function(v) {
console.log("Funds
Released:"+v.receipt.logs[0].args.scheduleID);
}
)

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 16/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

}
);
//programmer ends project
await freelancer.deployed().then(
async function(contractInstance) {
await contractInstance.endProject({from:
programmerWallet}).then(
function(v) {
console.log("Project Ended");
}
)
}
);

To run the migration script, copy 2_deploy_contracts.js to /migrations.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 17/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Now run the following command to migrate, deploy and test the freelancer smart
contract:

truffle migrate

Observe Ganache. When run successfully, ETHs from your first wallet would be
transferred to the second wallet.
https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 18/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Open in app Sign up Sign In

Search Medium

What’s Next?
Now that the freelancer smart contract has been developed, tested, and migrated, the
next step is to build the front-end of this Decentralized Application. We will explore
this in the 2nd part of the tutorial.

If you enjoyed this tutorial, perhaps you may also wish to read:

NFT-Based Luxury Watch Certificate: A demonstration of how it may be possible to


replace paper-based certs with Non-Fungible Tokens (NFTs) on the Ethereum
Blockchain.

Freelancer Smart Contract: A payment system between a freelancer and his client
to ensure both delivery and payment.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 19/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Ropsten Ethereum Faucet: I built an Ethereum faucet to give out ETH on the
Ropsten network.

Voting on a Blockchain: An implementation of a Voting DApp on Ethereum.

Deploy a Private Ethereum Blockchain in 10 Minutes with Kaleido: Getting a


private Ethereum Blockchain up and running in a jiffy.

Smart Contract Explained by Demonstration: A demo of an Escrow Service Smart


Contract DApp — in my opinion, the fastest way to explain to a layman, what
Blockchain is.

Ethereum IOT Kid Grounding Device: My attempt to incorporate Blockchain with


Internet of Things.

Lottery as a Smart Contract: Decentralized Lottery, an attempt to build a lottery


system on the Ethereum Blockchain.

Join Coinmonks Telegram Channel and learn about


crypto trading and investing
Also, Read

Best crypto exchange | Top 10 cryptocurrency exchanges in 2021


Crypto trading on the cryptocurrency exchanges requires knowledge
about the market, which can help you gain profit…
blog.coincodecap.com

9 Best Crypto Lending Platforms in 2021


When it comes to cryptocurrency lending, tons of factors equate to a
good earning profile. Also, the borrowing part of…
blog.coincodecap.com

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 20/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Best Crypto Trading Bots (FREE and Paid) in 2021


Best crypto trading bots for Binance, Coinbase, Kucoin, and other
crypto exchanges in 2021. Quadency, Bitsgap…
medium.com

Best 4 Crypto Trading Signals Telegram Channels


It is tedious to find the right crypto trading signals provider. So, in this
article, we will be talking about the best…
medium.com

BlockFi Review 2021: Pros, Cons and Interest Rates


Today, we came up with a comprehensive BlockFi review, a crypto
lending platform founded in 2017 and has its…
blog.coincodecap.com

How to Buy Bitcoin in India? 7 Best Apps to Buy Bitcoin 2021 [Mobile
Version]
How to buy Bitcoin India using a Mobile App
medium.com

Crypto Tax Software — Top 5 Best Bitcoin Tax Calculators [2021]


Whether you’re new to crypto or if you have been in the space for a
while, you’ll need to pay taxes.
medium.com

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 21/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

Pionex Review - Simple trading bots for passive traders


In this article, we will review Pionex, which provides crypto trading bot
automation tools integrated with an…
blog.coincodecap.com

Best Crypto Hardware Wallets to Store Bitcoin [2021]


HODLing your digital asset is easy but finding the right way to store it is
a tedious task. Online wallets have a risk…
blog.coincodecap.com

Ethereum Blockchain Solidity Cryptocurrency Dapps

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 22/23
2/12/23, 1:54 AM Introducing the Ethereum Development Environment: Part 1 | by Jackson Ng | Coinmonks | Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/introducing-the-ethereum-development-environment-part-1-bed0a273e55 23/23
2/12/23, 1:57 AM Understanding DAOs: Decentralised Autonomous Organisations explained | by Monolith | Monolith | Medium

Published in Monolith

Monolith Follow

Nov 25, 2021 · 6 min read · Listen

Save

Understanding DAOs: Decentralised


Autonomous Organisations explained
Ethereum has grown at a staggering pace over the last six years. Since emerging onto
the cryptocurrency scene as a groundbreaking smart contracts platform, the network
has given rise to powerful new innovations like DeFi and NFTs. Ethereum is currently
best known as the home of both niches today, but many of the network’s biggest
https://medium.com/monolith/understanding-daos-decentralised-autonomous-organisations-explained-23793570540f#:~:text=A Decentralised Autono… 1/7
2/12/23, 1:57 AM Understanding DAOs: Decentralised Autonomous Organisations explained | by Monolith | Monolith | Medium

enthusiasts believe that DAOs will be the next area of the space to explode. DAO stands
for “Decentralised Autonomous Organisation”. In this guide, we’ll explain how DAOs
are evolving on the blockchain, and what the development could mean for the future
of organisations around the world.

DAOs explained
A Decentralised Autonomous Organisation is an Internet-native community that
governs itself through smart contracts. Unlike organisations in the traditional world,
the rules and principles of a DAO are embedded on the blockchain, so they are not
prone to manipulation or attack.

As DAOs use smart contracts, they are mostly found in Ethereum, the world’s leading
smart contracts platform. Similar to Ethereum’s DeFi ecosystem, DAOs rely on code
rather than the trust of a third party such as a CEO.

In the traditional world today, most organisations or companies follow a hierarchical


structure, often with a small minority claiming ownership. DAOs differ in that they are
owned by the entire community, with management left to members. The flat structure
of a DAO can allow for human coordination in a way that’s never been possible before
as there is no leader or central party, which is partly why many crypto believers are
excited about their potential.

DAO members are often rewarded based on the contributions they make to the
organisation. Rewards are determined by the smart contract code, which is open and
transparent on the blockchain.

The rules for a DAO are always open for anyone to view. Any change to the rules
requires a majority vote among the members of the DAO. Voting is recorded on-chain
so it is also public.

In the 2014 article “DAOs, DACs, DAs, and More: An Incomplete Terminology Guide”,
Vitalik Buterin described DAOs as follows:

“The idea of a decentralised autonomous organisation is easy to describe: it is an entity that


lives on the Internet and exists autonomously, but also heavily relies on hiring individuals to
perform certain tasks that the automation itself cannot do.”

https://medium.com/monolith/understanding-daos-decentralised-autonomous-organisations-explained-23793570540f#:~:text=A Decentralised Autono… 2/7


2/12/23, 1:57 AM Understanding DAOs: Decentralised Autonomous Organisations explained | by Monolith | Monolith | Medium

Buterin’s description highlights two key points: DAOs are Internet-native, similar to the
rest of the blockchain and cryptocurrency space. Moreover, they require contributions
from members to fulfill their potential. Contributions to a DAO may include writing
notes for the website, offering social media support, researching in relevant topic
areas, or producing merchandise.

DAO members can make a proposal for their contribution, and they typically earn
remuneration in the form of the DAO’s governance token. If members pass vote on the
proposal, the contributor receives the remuneration from the DAO.

While smart contracts offer a way to automate and execute transactions, DAOs
complete tasks that can not be executed by code alone. Key decisions in DAOs are
made through a voting process; members can use their tokens for voting power. This
means that any updates or developments within the DAO are only made after members
of the organisation reach consensus. Where blockchains like Bitcoin and Ethereum
aim to achieve consensus for every transaction through nodes, DAOs rely on their
members to vote on updates.

DAOs are global and permissionless, which means that anyone can join from anywhere
in the world. While companies are usually closed off to only a limited number of
candidates living within a certain catchment area, DAOs do not present the same
limitations. As they are decentralised and global, they can grow at a faster rate than
traditional companies.

While DAOs are open and permissionless, they often have certain requirements for
becoming a member. SquiggleDAO, for example, is a DAO for owners of the popular
Chromie Squiggle NFT. Many other NFT projects have similar DAOs of their own.

https://medium.com/monolith/understanding-daos-decentralised-autonomous-organisations-explained-23793570540f#:~:text=A Decentralised Autono… 3/7


2/12/23, 1:57 AM Understanding DAOs: Decentralised Autonomous Organisations explained | by Monolith | Monolith | Medium

Chromie Squiggle by Snowfro (Source: Art Blocks)

DAOs and DeFi


Bitcoin is frequently described as the first DAO because it is based on an immutable set
of rules. It rewards Bitcoin miners for securing the network via Proof-of-Work
consensus, and those rewards change over time as issuance reduces by 50% every four
years.

The advent of smart contracts has greatly expanded the possibilities for DAOs. Smart
contracts paved the way for the growth of DeFi on Ethereum, which has been
foundational to the evolution of DAOs. DeFi eliminates the need for trust in
intermediaries, using cryptocurrencies to exchange value between users.

Cryptocurrencies are also key to DAOs: many of them reward users through their own
governance tokens. Ownership of tokens can be used to vote in key decisions affecting
the protocol, which is a model many DeFi projects have adopted.

https://medium.com/monolith/understanding-daos-decentralised-autonomous-organisations-explained-23793570540f#:~:text=A Decentralised Autono… 4/7


2/12/23, 1:57 AM Understanding DAOs: Decentralised Autonomous Organisations explained | by Monolith | Monolith | Medium

DeFi projects often launch tokens as a way of attracting liquidity and bootstrapping the
network, while also decentralising the governance so that it is managed by a
community rather than a team. In many cases, tokens can also be earned for
participation in the protocol.

The risks of DAOs


While DAOs have huge promise, they also present potential risks. DAOs decentralise
governance so that no one party holds control, but it’s possible that some members can
have more power over others. When voting power is determined by token ownership,
for instance, wealthy groups such as venture capital firms owning a large supply of the
tokens can end up having major influence over key decisions.

While one member alone may not have enough of a stake alone to sway decisions, they
could potentially collude with other members for their own financial gain.

Moreover, as DAOs have economic growth baked in through their incentive


mechanisms, they may end up placing too much focus on financial interests. A group
dedicated to supporting emerging musicians using NFTs, for example, may select
those with a bigger community following in the hope that they reap rewards for the
group in the future.

DAOs ultimately depend on the community to drive the direction in a way that matches
the group’s ethos. As much as rules can be embedded into code, ideological values are
harder to record on the blockchain. DAOs need communities to evolve in fitting with
the organisation’s mission without being influenced by the potential financial rewards.

The future of DAOs


Like DeFi, NFTs, and the Ethereum ecosystem itself, DAOs are still in their infancy. In
fact, they arguably occupy the least explored niche in Ethereum today. However, it is
already clear that DAOs could form a key part of the future of Web3.

DAOs highlight the power of community, something that’s integral to the blockchain
movement. They create a way for online groups to gather and coordinate in a way that
didn’t exist pre-Bitcoin.

https://medium.com/monolith/understanding-daos-decentralised-autonomous-organisations-explained-23793570540f#:~:text=A Decentralised Autono… 5/7


2/12/23, 1:57 AM Understanding DAOs: Decentralised Autonomous Organisations explained | by Monolith | Monolith | Medium

Some notable DAOs have already emerged in the Ethereum ecosystem in recent
months. PleasrDAO, a group formed to acquire an NFT by pplpleasr, has made waves in
the NFT space and even acquired a one-of-a-kind album by Wu Tang Clan.
ConstitutionDAO, meanwhile, recently raised over $45 million to buy a copy of the US
Constitution, but narrowly lost out in the Sotheby’s auction for the item. Nonetheless,
the DAO’s efforts highlighted the possibilities of human coordination at scale.

Members of PleasrDAO pictured with Wu Tang Clan’s “Once Upon a Time in Shaolin” (Source: Griffin Lotz for
Rolling Stone)

As the world moves towards an open, Internet-based financial system, DAOs will
create a way for communities to cooperate via rules that live immutably on a public
blockchain.

While Bitcoin can be described as the first DAO, smart contracts have created new
possibilities for organisations to function in a decentralised manner. Today this is
particularly true of DeFi protocols such as Maker, which have decentralised their
governance in favour of the community of token holders. Moreover, the NFT space has

https://medium.com/monolith/understanding-daos-decentralised-autonomous-organisations-explained-23793570540f#:~:text=A Decentralised Autono… 6/7


2/12/23, 1:57 AM Understanding DAOs: Decentralised Autonomous Organisations explained | by Monolith | Monolith | Medium

spawned many groups such as PleasrDAO, which focuses on buying high quality
tokenized art. In the future, it is likely that DeFi, NFTs and DAOs will further collide as
Ethereum evolves.

However, DAOs in their current iteration are only at the beginning of a long journey.
DAOs have shown their promise within the context of decentralised crypto-native
protocols. Soon, it could be time for traditional groups and companies to see the power
of decentralised governance. In the future world of Web3, it may not be standard
practice for someone to take up a job in a company — they’ll be contributing to a DAO
instead.

Sign up to Monolith here


Learn more about token.com here

Monolith Ethereum Defi Web 3 Dao


Open in app Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/monolith/understanding-daos-decentralised-autonomous-organisations-explained-23793570540f#:~:text=A Decentralised Autono… 7/7


2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

Published in IOSG Ventures

IOSG Follow

Jun 2, 2020 · 16 min read · Listen

Save

Overview of Decentralized Autonomous


Organization (DAO)

Source: Sohu

1. What is a Decentralized Autonomous Organization

1.1 Introduction: to catch bandits first catch the ringleader

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 1/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

We often see such a plot in war movies, the defending army lead by our main character
is under the attack from crushing enemy forces. Some of their own soldiers have
surrendered or fled, the wall is about to fall. But in the Nick of time, the main
character somehow managed to cross the enemy crowd, successfully kill the enemy
leader. Even with a huge leading edge, the enemy’s soldiers immediately collapse and
retreat (in some fantasy scenarios, enemy even vanishes into ashes). Although it is
exciting and cheerful to watch, but I can’t help myself thinking, this kind of failure is
truly stupid.

In every corner of modern society, the disadvantages of a single leader also exist in
enterprises or organizations. In the recent Luckin Coffee fraud incident, the stock
price plummeted from $24 to $2.40 and was forced out of the NASDAQ; Musk pumped
one of the most expensive marijuana in history (Tesla’s market value evaporated by $4
billion) on a radio show; the Liu Qiangdong incident, despite suspected of being
framed by competitor, wiped $7.2 billion off the market value of the well-run JD.com.
From this series of events we can see that for a traditional company, the ability of
leadership, credit and even personal life of their leaders are sometimes like a time
bomb.

So what’s the solution for the future?

1.2 Decentralized Autonomous Organization(DAO)


We envision a world in which all systems, management, charters, and performance
bonus are written into smart contracts and stored in the blockchain in an enterprise.
Connect all the individuals and organizations in the house through smart contracts. We
no longer need roles such as CEO, CFO, CTO, and our members are all over the world,
we don’t even need offices, we don’t have utilities, nor going to pay for water and
electricity. All choices and governance will be adopted through rules and incentives,
we can avoid relying on the central authority or person, which can also greatly reduce
the risk of fraud.

First of all, here, the double-entry accounting method becomes a distributed ledger
technology;

Second, the law to protect private property becomes a smart contract;

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 2/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

Finally, the enterprise becomes a decentralized autonomous organization.

Decentralized autonomous organization (DAO), we can understand it as an


autonomous company or organization that builds on a blockchain in which
governance and rules are encoded in the form of smart contracts. The most important
and basic characteristics of DAO are “decentralized” and “autonomous”.

1. “Decentralized ” is reflected in a complete “code is the king” ” organization, with


all day-to-day operations based on decentralized infrastructure — blockchain. So
it’s not built around executives or shareholders, it’s not controlled by an individual
or organization

2. “Autonomy” is reflected in the fact that its daily operations are programmed and
automatically enforced when meeting a specific condition. So the “xxx has the
final interpretation” ” clause naturally ceases to exist.

Figure 1::The difference between DAO and traditional companies, Source: BlockchainHub

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 3/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

Vitalik defines DAO as “an entity that lives on a network and exists independently, but
also relies heavily on the human person to perform certain tasks that it cannot. “
Richard Burton even made it more clear: “DAO is a strange way, it’s a digital system
that lives on top of Ethereum.” Decentralized autonomous organizations blend
“decentralization”, “autonomy” and economic incentives, tokenized blockchain
elements, in order to maximize organizational effectiveness and value flow. If the
above-mentioned scandal-plagued organizations and enterprises adopt a decentralized
and autonomous organizational structure that is open, democratic and transparent
enough, we believe that we can avoid such unnecessary losses.

2. Blockchain community from IOSG

Figure 2: Blockchain Community, Source: IOSG Ventures

We believe the community is really a place where users come together and interact.
According to Figure 2,we broadly divide the blockchain community into three broad
categories:

1. Information Community : Mainly a platform to provide industry information and


in-depth analysis for investors and developers.

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 4/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

2. Forum Community: Mainly a platform for industry technology discussion. Medias


and developers can freely exchange technology and experience in regards to
blockchain.

3. DAO: Various types of decentralized autonomous organizations (segmentation and


comparison of key players will be made in the next section).

3. Decentralized Autonomous Organization(DAO) Overview


2019 is the year of DAO, with a variety of new concepts emerges, especially this year we
saw the rise of new funding with legal compliance and asset management DAOs, and
we have divided the existing DAOs into two broad categories — financing and
management , and divided Moloch and its forks into four stages, with introduction and
comparison of features, size, areas, governance models and other dimensions (Figure
3).

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 5/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 6/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

Figure 3: DAO Comparison table, Source: IOSG Ventures

3.1 DAO Builders and Infrastructure


Although this category is the underlying service provider, it is not strictly DAO. But
these service providers are designed to provide tools and platforms to build a
decentralized organization and so are critical to the development of DAO. The most
well-known DAO builders and infrastructure platforms that support decentralized
governance are:

A ragon: is a Dapp on the Ethereum blockchain that allows anyone to create and
manage any organization (companies, open source projects, NGO, hedge funds,
and so on). Aragon focuses on providing a secure and common backbone for the
formation of a general organization, rather than building products around specific
decision-making mechanisms. The biggest bright spot about Aragon’s governance
mechanism is that all of its ANT Token holders have the right to oversee all decision-
making proposals, including (the highest to lowest order): the upgradeability of smart
contracts, the court (grade, structure, trial fees),the ANT Token policy, Treasury’s fiscal
policy. In addition, Aragon is building a very complete ecosystem, including
arbitration, and recently established the Aragon Court. All Aragon-based companies,
organizations, or individuals can be reconciled through the Aragon court if a dispute
arises.

D AOstack: Focuses on building a larger coordination platform for DAOs, using


so-called holographic consensus and forecasting markets to find out what
members of their organization should focus on (as a scarce resource). DAOstack
clearly attaches importance to decentralized decision-making mechanisms, and the
project focuses more on solving the inherent problems of large-scale decentralized
decision-making. Daostack’s governance model is to adopt a Token named GEN, which
allows owners of GEN to “promote” ” a proposal they consider important. Since the
influence of GEN is added to Daostack’s algorithm, which will prioritize those proposal
“promoted” by GEN, thus attracting more effective attention from DAO members.

C olony:: A digital company platform with plug-in-like collaboration and


payment tools that can be used by companies to take advantage of community-

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 7/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

led DAO. Colony is based on web, therefore is more open and borderless than Aragon
which is organization based.

3.2 Financing type DAO


The most iconic feature of this type of DAO is that the primary voting decision is to
allocate funds for a project or proposal.

The most famous of all is The DAO, which is an investment fund, except that its
investment decisions are made by a collective vote, rather than entrusted to a
dedicated investment manager. It was hacked in 2016, which led to a hard fork in
Ethereum, and later announced its closure. Although The DAO is a failed project, its
innovation is unprecedented, laying the foundation for the rise of various types of
DAOs in the future. Here we focus on the Moloch project and the various forks it
derives from.

Figure 4: Moloch DAO, Source: ETHFANS

3.2.1 Moloch
Moloch is an Ethereum fund program designed to fund infrastructure projects in
Ethereum (crowdfunding).

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 8/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

Moloch DAO operates as a mechanism where interested parties can send (donate) a
certain amount of ETH to the system, and existing members vote to decide whether to
accept them as members. Members may submit funding proposals to the platform and
vote on other funding proposals. After the vote, Moloch DAO will fund certain projects.
It is worth mentioning that Moloch DAO members are anonymous; voting and
donating ETHs are all done on-chain, and voting rights are determined by the number
of donated ETHs. If one member has a large number of voting rights and makes a
wrong grant decision, the other member may opt out (Ragequit). What is new about
Moloch is that unlike traditional organizations, equity does not mean that you can
continuously control and manage the organization’s capital. Conversely, there is only
one way to gain access to the right to use capital, which is to destroy their own equity
and the corresponding right to vote to issue additional shares, which effectively
undermines the traditional separation of corporate sectors to stimulate collaboration.

3.2.2 Moloch v1 Fork (total number: 89)

Representative project: Metacartel, Marketing DAO

Moloch v1 Forks are generally not-for-profit and are characterized by:

1. Support only one asset — ETH.

2. After the proposal is passed, the assignee receives some “share”, which could be
exchanged to ETH available in the guild bank. The assignee then exchange these
shares with wETH through the “ragequit ” mechanism.

3. Only DAO members can initiate a proposal.

4. Queue directly into the voting session after the proposal is initiated.

5. It takes about two weeks to process the proposal, which means the value of “share”
will vary with the fluctuation of ETH.

M etacartel is a fork of Moloch v1, that provides funds to Ethereum’s


development teams, aiming to explore smart contracts and new forms of
community governance. The main difference from Moloch is that Metacartel is

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 9/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

providing fund to application-layer development teams, primarily based on the


performance and completion of the development team’s products.

M arketing DAO focuses on the promotion of Ethereum. Grants have been given
to 10 proposals, each of which is 80 DAI. In the future, they will continue to
make efforts to promote Ethereum, make it reach more audiences.

3.2.3 Moloch v2 Fork (total number: 24)

Representative Project: Daosquare, Metafactory

Generally for profit. Enhanced collaboration at the technical level.

1. Support more than 200 different assets

2. After proposal has passed, any assets obtained do not need to initiate the
“ragequit” mechaism, therefore avoid being affected by volatility.

3. Added GuildKick, which can be initiated by any member and force a member to
quit.

4. Any person may submit a proposal.

5. A transaction proposal may be initiated for DAO members to trade its underlying
assets.

6. The proposal requires a member to choose “funding” option to enter the voting
stage.

Moloch v2 is designed to extend the operation of MolochDAO from a purely single


public donation to an unlimited portfolio of assets. It allows DAO projects to hold
many different assets — optimizing their ability to invest and getting different types of
tokens as a gain.

D AOSquare is a commercial start-up project run through DAO, which issues a


token called RICE that maps the company’s equity. The aim is to create a global
network due to 1) the establishment of communities can increase the motivation of
participants. 2) Realize the interconnection of value with the presentation of map-

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 10/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

based visualization. Members receive the DAO equivalent share by staking RICE, which
has the right to govern and receive dividends. Members can exit through “Ragequit” at
any time.

M etafactory is a business-oriented DAO, a incubator focused on fashion brands.


It is a type of organization that is more like a company, primarily for the
purpose of a business, such as making a product and providing services. The auction
participants on the platform actually purchased a portion of the brand’s voting rights
(and receive profits in proportion), and users can participate in brand management
and vote on the future direction of the brand label.

Figure 5: Metafactory, Source: Defi Rate

3.2.4 Moloch v2 Fork with legal compliance

Representative project: Metacartel Ventures, The LAO

Prior to the start of this type of project, DAO model was flawed, and under current law,
DAOs that are only subject to smart contracts are limited in terms of member
fundraising and profitability. If the DAO is for profit, then you will be bound by

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 11/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

securities law like SEC. Even if the DAO is non-profit, it still touches the gray area of
the law. This type of DAO is legally commercialized, providing a bridge between the
traditional business world and the blockchain world.

M etaCartel Ventures is a for-profit investment DAO project in conjunction with


a legal entity. MCV has all the features of a traditional venture capital fund,
but lowers the entry threshold for those who want to participate. From legal
documents, MetaCartel Ventures is a limited liability venture founded in the United
States, consisting of 33 certified investors and builders and maintaining decision-
making partnerships. From the essence, it is a decentralized organization utilizing
Moloch V2 to manage the organization’s funds, distribute shares, and manage voting
among members of the organization.

T he LAO, or “ Legal Autonomy Organization”, is an investment vehicle based on


blockchain and smart contracts designed to redefine joint-stock companies,
aiming to build an experimental venture capital of $2.5 million for investors. It uses
OpenLaw tools that can be used to create binding legal agreements and bind them to
the execution of one or more smart contracts. In this way, any token and any smart
contract that runs on Ethereum have legal effect. The LAO established a legal entity (in
this case, a Delaware-based limited liability company), but with primary management
done through an online application (DApp) and related smart contracts. The LAO will
provide a legal structure that allows members not only to provide grants, but also to
invest in blockchain-based projects in exchange for tokenized stock or utility tokens.
Financing of projects can be obtained within days once submitted to LAO.

3.3 Management Type


This type of DAO’s main voting decision is not to fund a project or donate, but to make
decisions about protocols or blockchain governance. Another difference is that,
unlike financing DAOs, which are primarily intended primarily to contribute to the
development of an ecosystem, management DAOs tend to focus only on themselves.

3.3.1 Protocol-specific DAO

Representative projects: MakerDAO, Kyber

Governance decisions are mainly made for exchange or lending protocols.


https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 12/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

M akerDAO is an autonomous lending platform on Ethereum and a provider of


stable coin DAI. Maker also used the DAO framework to make protocol
governance decisions, so that the entire decentralized lending system can be
operated. MKR voters participate in Governance Poll and Executive Vote to make
changes to the Maker protocol and governance mechanisms. The main function of
Governance Poll is to research whether the stabilization fee and DSR need to be
adjusted. If the voting decision is different from the existing interest rate differential,
the governance system initiates executive vote and MKR holders will vote again on
whether to incorporate the previous Governance Poll’s interest rate differential
adjustment result into the Maker.

K yber is a decentralized token exchange protocol that can be executed on any


blockchain that supports smart contracts. KNC holders will vote on network fee
rates, how fee benefits are distributed, and value creation options. Members can
delegate their voting rights to a third-party “pool” to vote on their behalf. At the end of
each voting cycle, reserved ETH will be granted as a voting reward.

3.3.2 Layer 1 Chain Management DAO

Representative project: Dash

Token holders vote directly on the corresponding blockchain measures using the
network’s tokens. Protocol will then calculate vote and execute subsequent results
automatically.

D ash is the first public chain that use DAO for governance, with its code
allocating a portion of the block reward (usually used to pay for financial
rewards for validation) (10 percent) to network members. Rewarding useful technical
development and promotion activity. To date, hundreds of proposals have been
approved in DashDAO, covering areas such as funding development, marketing, and
community awareness efforts.

3.3.3 Financial Asset Management DAO


Representative projects: StakerDAO, Stake DAO

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 13/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

S takerDAO is a community of investors, based on the Tezos blockchain, to create a


governance process with a new investor model to launch a new decentralized
financial application. It utilizes STKR as a shared token and rely on the Tezos
blockchain to manage the allocation and exchange of tokens. STKR token holders are
responsible for the election of five Staker council members, and working with the
operations team to submit monthly Staker proposals. Proposal examples could include
initiating synthetic tokens, index funds, or stable tokens. Five Staker council members
voted on the proposal. The project profit sits eventually back to the STKR token holder.
It’s a bit like MakerDAO but with wider decision range. StakerDAO recently released the
first Blend token product, backed by a basket of POS public chain tokens.

Figure 6: StakerDAO Governance Cycle, Source: StakerDAO

S take DAO serves Stake Capital, a Stake service provider, and distributes the value
generated by a package of DeFi services to Stake Capital representatives or
participants through Stake Capital token (SCT).

Users can put SCTs into the DAO and receive regular stake rewards. SCT tokens can
also be used to govern voting for key decisions, including the type of stake service,
modifying the earnings duration cycle, and the SCT spending rate (which will be
https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 14/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

reduced after each cycle to reward early investors). At the same time, each staked asset
will generate a Liquid Token (LToken) at a ratio 1:1, which can be traded as a derivative
on the secondary market.

3.4 Summary
Of the above-mentioned DAO, the largest and most successful are DASH and
MakerDAO. I personally think the most innovative one is StakerDAO, which follows the
Maker’s dual-token model of governance, but is not limited to stable coin, with
unlimited possibilities. Funding with legal compliance DAOs like the LAO are those
most coincide to future trends. We did not go deep into every DAO to feel the
community atmosphere, so there’s no way to judge which DAO is the best. However, we
believe that a successful decentralized autonomous organization must have the
following four characteristic: (1)Diversity and inclusion; (2) Excellent code and
incentives design; (3) high levels of community consensus and (4) A strong
development team.

The best way to get to know an organization is to join it.

4. Advantages and Problems of DAO

4.1 Advantages
1. Decentralization of governance

It provides every investor with an equal opportunity to shape the future success of
their organization and to have a say in the decision-making process. Since the
organizational structure is not limited by traditional hierarchical lines of management,
every innovative idea and suggestion can be fully considered by the entire
organization.

2. High efficiency:

Bureaucracy has been a challenge within hierarchical organizations, greatly slowing


down the process. In a fully decentralized organization, transaction processing times
are faster and more efficient. In addition, since submitting proposals and participating
in the vote requires a certain number of tokens for each stakeholder, this encourages
them not to waste time on invalid solutions.
https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 15/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

3. Transparency

As a DAO built on the blockchain, every financial transaction, rule, and decision is
uploaded on a public ledger for everyone to view. Adopting a consensus system also
means that each stakeholder is involved in helping to decide how to spend the
organization’s funds and tracking the amount spent.

4.2 Possible problems


1. Security issues

The immutability of smart contracts is both an advantage and a disadvantage for DAO
due to the immaturity of the technology itself and the existence of security risks. Once
the contract rules are encoded, the system will be up and running, making it difficult
to change them. In addition, any known security issues can be exploited because the
code is visible to everyone and difficult to repair. Other known smart contract security
issues include transaction ordering dependence (TOD), timestamp trading, mishandle
exceptions, and so on.

2. Legal status

While some countries have legalized the use of cryptocurrencies and blockchain
technologies, the exact legal status of using DAO as a generic structure remains
unclear. Start-ups with DAO business structures require a legal framework to operate
legally in certain jurisdictions and interact with the traditional financial system and
the intellectual property world. Otherwise, DAO participants may be held legally
responsible.

3. Decision-making level

Because DAO’s decision-making power is democratic, technical knowledge is complex


and profound. Many voters do not have the relevant decision-making skills and
knowledges, and some do not even know anything about the issues they vote for. It
uses a minority majority mechanism, so the results of the vote are not necessarily
optimal and are likely to be dominated by majority voting rights.

5. IOSG Ventures’ Future Vision for DAO


https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 16/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

IOSG believes that DAO is the ultimate form of the crypto economy, but still in its early
days. Many issues including protocol technology security, compliance, endogenous
problems in governance decisions still exist. At the beginning of its existence, it had
been a combination of hope and controversy. On one hand, the fall of The DAO has
called into question of its safety. On the other hand, the success of MakerDAO and
DASH has raised hopes. With more and more technological breakthroughs and the
advent of DAO service providers, we are able to predict future trends of DAO:

1. The emergence of more theoretical research regarding the characteristics of DAO.


And continually learn from economics, biology, historical anthropology and other
dimensions to conduct in-depth research, laying the foundation for future
development and technological breakthroughs.

2. More innovations emerge to reform and upgrade all shapes of form in physical
world. Imagine if Wuhan’s incident was based on DAO to make decisions. We have
consistent goals, all information is uploaded to the blockchain, all participants
bind by smart contracts can quickly collect materials, and vote to distribute
materials in accordance to the chain information, and at the same time quickly
transported materials to the hospital. Would this be a better way of resolving the
issue?

3. More compliance. Local government will issue various laws and regulations to
restrict the legal liability of DAO. More DAOs similar to the legal form of the LAO
appear.

4. As Defi grows strong after 2019, as the best governance tool for DeFi, DAO will
receive more attention.

5. To find the balance between freedom and efficiency, relevant rules and the
incentive design would be further strengthen. Because too much decentralization
will reduce the participation rate and therefore lacks unity of goals, resulting in
low efficiency. Over-centralization will lead to the lack of listening to the opinions
of members and lost of original intention.

Finally, we believe that the concept of digital democracy not only protects the
principles of a democratic society, but also improves corruption and system
breakdown through technological development, model innovation and reasonable
https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 17/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

incentive mechanism. With the emergence and upgrading of different types of DAOs in
2020, we have reason to believe that the application of DAO in the future will develop
from the bottom up, and continue to improve from the current form of governance
and financing on the chain, until it is strong enough to be adopted by the national level
or large-scale enterprises

6. Bibliography
1. Daohaus [EB/OL].https://daohaus.club/.

2. Marketing DAO [EB/OL].https://marketingdao.org/.

3. Moloch [EB/OL].https://molo.ch/.

4. Metacartel [EB/OL]. https://www.metacartel.org/

5. DAOsquare [EB/OL]. http://dao2.io/

6. 初析 MolochDAO:颠覆公司制度的一种全新的组织. [EB/OL].
http://www.lianchaguan.com/archives/6223

7. Blockchainhub. Tokenized Networks: What is a DAO.


[EB/OL].https://blockchainhub.net/dao-decentralized-autonomous-organization/

8. 区块佣兵:浅谈区块链自治社区的理想模式
[EB/OL].https://www.tuoluocaijing.cn/article/detail-27296.html

9. Lane Retting. The key ingredient to be a better blockchain. [EB/OL].


https://www.etherean.org/blockchain/community/2019/09/19/key-ingredients-
better-blockchain-part-iii-community.html

10. 去中心化自治组织:发展现状、分析框架与未来趋势.
[EB/OL].http://blog.sciencenet.cn/blog-951291-1198720.html

11. 数字民主和治理2.0:从比特币到DAO,区块链的创新是如何影响的?[EB/OL].
https://www.hulianmaibo.com/posts/info/35663

12. Entering Moloch DAO. [EB/OL]. https://ethfans.org/posts/36791

13. Staker DAO. [EB/OL]. https://www.stakerdao.com/

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 18/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

14. MetaFactory Launches Genesis Bomber Jacket Auction. [EB/OL].


https://defirate.com/metafactory-genesis-auction/

Dao Decentralization Blockchain

About Help Terms Privacy

Open in app Sign up Sign In


https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 19/20
2/12/23, 2:00 AM Overview of Decentralized Autonomous Organization (DAO) | by IOSG | IOSG Ventures | Medium

Get the Medium app


Search Medium

https://medium.com/iosg-ventures/overview-of-decentralized-autonomous-organization-dao-f9ac47051d07 20/20
2/12/23, 2:03 AM The Story of the DAO — Its History and Consequences | by Samuel Falkon | The Startup | Medium

Published in The Startup

Samuel Falkon Follow

Dec 24, 2017 · 5 min read · Listen

Save

The Story of the DAO — Its History and


Consequences

One of the most incredible concepts to be successfully implemented through


blockchain technology is the DAO, a decentralized autonomous organization.
Decentralized autonomous organizations are entities that operate through smart
contracts. Its financial transactions and rules are encoded on a blockchain, effectively
removing the need for a central governing authority — hence the descriptors
“decentralized” and “autonomous.”

https://medium.com/swlh/the-story-of-the-dao-its-history-and-consequences-71e6a8a551ee 1/7
2/12/23, 2:03 AM The Story of the DAO — Its History and Consequences | by Samuel Falkon | The Startup | Medium

The Decentralized Autonomous Organization (known as The DAO) was meant to


operate like a venture capital fund for the crypto and decentralized space. The lack of a
centralized authority reduced costs and in theory provides more control and access to
the investors.

At the beginning of May 2016, a few members of the Ethereum community announced
the inception of The DAO, which was also known as Genesis DAO. It was built as a
smart contract on the Ethereum blockchain. The coding framework was developed
open source by the Slock.It team but it was deployed under “The DAO” name by
members of the Ethereum community. The DAO had a creation period during which
anyone was allowed to send Ether to a unique wallet address in exchange for DAO
tokens on a 1–100 scale. The creation period was an unexpected success as it managed
to gather 12.7M Ether (worth around $150M at the time), making it the biggest
crowdfund ever. At some point, when Ether was trading at $20, the total Ether from
The DAO was worth over $250 million.

In essence, the platform would allow anyone with a project to pitch their idea to the
community and potentially receive funding from The DAO. Anyone with DAO tokens
could vote on plans, and would then receive rewards if the projects turned a profit.
With the financing in place, things were looking up.

The DAO’s Great Start Gone Wrong

https://medium.com/swlh/the-story-of-the-dao-its-history-and-consequences-71e6a8a551ee 2/7
2/12/23, 2:03 AM The Story of the DAO — Its History and Consequences | by Samuel Falkon | The Startup | Medium

However, on June 17, 2016, a hacker found a loophole in the coding that allowed him to
drain funds from The DAO. In the first few hours of the attack, 3.6 million ETH were
stolen, the equivalent of $70 million at the time. Once the hacker had done the damage
he intended, he withdrew the attack.

In this exploit, the attacker was able to “ask” the smart contract (DAO) to give the Ether
back multiple times before the smart contract could update its balance. Two main
issues made this possible: the fact that when the DAO smart contract was created the
coders did not take into account the possibility of a recursive call and the fact that the
smart contract first sent the ETH funds and then updated the internal token balance.

It’s important to understand that this bug did not come from Ethereum itself, but from
this one application that was built on Ethereum. The code written for The DAO had
multiple flaws, and the recursive call exploit was one of them. Another way to look at
this situation is to compare

Ethereum to the Internet and any application based on Ethereum to a website — If a


site is not working, it doesn’t mean that the Internet is not working, it merely says that
one website has a problem. The hacker stopped draining The DAO for unknown
reasons, even though he could have continued to do so. The Ethereum community and
team quickly took control of the situation and presented multiple proposals to deal
with the exploit.

However, the funds were placed into an account subject to a 28 day holding period so
the hacker couldn’t complete his getaway. To refund the lost money, Ethereum hard
forked to send the hacked funds to an account available to the original owners. The
token owners were given an exchange rate of 1 ETH to 100 DAO tokens, the same rate
as the initial offering.

https://medium.com/swlh/the-story-of-the-dao-its-history-and-consequences-71e6a8a551ee 3/7
2/12/23, 2:03 AM The Story of the DAO — Its History and Consequences | by Samuel Falkon | The Startup | Medium

Unsurprisingly, the hack was the beginning of the end for the DAO. The hack itself was
contested by many Ethereum users, who argued that the hard fork violated the basic
tenets of blockchain technology. To make matters worse, on September 5, 2016, the
cryptocurrency exchange Poloniex delisted DAO tokens, with Kraken doing the same
in December 2016.

All of these issues pale in comparison to the United States Securities and Exchange
Commision (SEC) ruling that was released on July 25, 2017. This report stated:

“Tokens offered and sold by a “virtual” organization known as “The DAO” were
securities and therefore subject to the federal securities laws. The Report confirms
that issuers of the distributed ledger or blockchain technology-based securities must
register offers and sales of such securities unless a valid exemption applies. Those
participating in unregistered offerings also may be liable for violations of the
securities laws.”

In other words, The DAO’s offering was subject to the same regulatory principles of
companies undergoing the initial public offering process. According to the SEC, The
DAO violated federal securities laws, along with all of its investors.

https://medium.com/swlh/the-story-of-the-dao-its-history-and-consequences-71e6a8a551ee 4/7
2/12/23, 2:03 AM The Story of the DAO — Its History and Consequences | by Samuel Falkon | The Startup | Medium

The Ongoing Impact of The DAO’s Rise and Fall


Though The DAO project has since folded, its impact is ongoing. Current blockchain
development teams continually looked to The DAO’s example for guidance — for what
not to do.

First, The DAO teaches a valuable lesson about the importance of establishing secure
blockchain platforms. The DAO’s hack was not due to a problem inherent on the
Ethereum blockchain; it came from a coding loophole exploited by an intelligent
hacker. Had the code been written correctly, the hack could have been avoided.

Second, the SEC’s ruling on The DAO has encouraged blockchain startups to come up
with ways of avoiding security registration and federal regulation. One of the ways
companies do this is by using the SAFT method. If tokens have legitimate utilitarian
value on a blockchain platform,

they violate a component of the Howey case, and therefore cannot be listed as
securities or regulated by the SEC.

https://medium.com/swlh/the-story-of-the-dao-its-history-and-consequences-71e6a8a551ee 5/7
2/12/23, 2:03 AM The Story of the DAO — Its History and Consequences | by Samuel Falkon | The Startup | Medium

Without the DAO, who knows what lessons would still need to be taught.

This story is published in The Startup, Medium’s largest entrepreneurship publication followed
by 298,432+ people.

Subscribe to receive our top stories here.

Ethereum Bitcoin Tech Technology Cybersecurity

https://medium.com/swlh/the-story-of-the-dao-its-history-and-consequences-71e6a8a551ee 6/7
2/12/23, 2:03 AM The Story of the DAO — Its History and Consequences | by Samuel Falkon | The Startup | Medium

Sign up for Top 5 Stories


By The Startup

Get smarter at building your thing. Join 176,621+ others who receive The Startup's top 5 stories, tools, ideas, books —
delivered straight into your inbox, once a week. Take a look.

Open in app Sign up Sign In


Your email

Search
We couldn't process Medium
your request. Try again, or contact our
support team.

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/swlh/the-story-of-the-dao-its-history-and-consequences-71e6a8a551ee 7/7
2/12/23, 2:05 AM What were the consequences of the DAO attack? How were these issues handled? | by Asame Zamyak | Coinmonks | Medium

Published in Coinmonks

Asame Zamyak Follow

Jul 21, 2022 · 3 min read · Listen

Save

What were the consequences of the DAO attack?


How were these issues handled?

The DAO hack is one of the most important hack in Blockchain history. In this text we
will focus on its consequences and how these issues are handled.

A DAO is a Decentralized Autonomous Organization. People use it for making rules and
decisions without decentralized control. That was an organization which sits on
Ethereum Network and runs with smart contracts. People realised a bug on that smart
contract and they expressed their concerns about the vulnerability of the code to a

https://medium.com/coinmonks/what-were-the-consequences-of-the-dao-attack-how-were-these-issues-handled-6da0c60827a2 1/4
2/12/23, 2:05 AM What were the consequences of the DAO attack? How were these issues handled? | by Asame Zamyak | Coinmonks | Medium

possible attack. It is important to not confuse Ethereum Network and Smart Contracts,
the Ethereum Network has no such bugs and has been working perfectly the entire
time.The bug was about smart contract on it.

Gavin Wood expressed this bug in a Blockchain conference “it’s a classic software engineering
bug where the records updated after and not before the money was gone”

Gavin Wood on how $60M hack of DAO happened and what to do next | Dutch B

While programmers were working on fixing this and other problems, an unknown
attacker began using this approach to start draining the DAO of Ether. He / She drained
more than 3.6 million Ether.

The price of Ether dropped from over $20 to under $13. The DAO itself had 14%
percent of all Ether so a failure of the DAO had a negative impact on the Ethereum
network. The Ethereum Foundation tried to solve this problem with such proposals:

The Soft-Fork Proposal:


Firstly, Vitalik proposed a soft fork which would effectively blacklist the attacker and
prevent them from moving the stolen funds. For some reasons the Ethereum
Community failed to reach consensus.

https://medium.com/coinmonks/what-were-the-consequences-of-the-dao-attack-how-were-these-issues-handled-6da0c60827a2 2/4
2/12/23, 2:05 AM What were the consequences of the DAO attack? How were these issues handled? | by Asame Zamyak | Coinmonks | Medium

Then a second solution was proposed.

The Hard-Fork Proposal:


The Hard-Fork rolled back the Ethereum network’s history to before the attack and
reallocated The DAO’s ether to a different smart contract so that investors could
withdraw their funds.

Not all of the members of the community accepted this fork. So, Those who refused to
accept the hard fork supported the pre-forked version, Ethereum Classic (ETC).

Though the funds stolen from The DAO were restored to its investors, the attacker did
not lose out entirely. The pilfered tokens still remained in their possession on the
Ethereum Classic chain and were worth around $8.5 million in ETC in the months
following the attack.

The DAO hack and subsequent Ethereum hard fork shook the Ethereum community to
its core and highlighted major questions about the emerging technology. In retrospect,
it’s clear that the decisions made by Vitalik Buterin, Etheruem developers, and the
global community ensured the survival of the blockchain in its earliest days. Since The
DAO hack, Ethereum has gone on to become an essential pillar of blockchain,
cryptocurrency, and decentralized finance.

gemini.com/cryptopedia/the-dao-hack-makerdao#section-the-dao-hack-remedy-forks-
ethereum

pullnews.medium.com/understanding-the-dao-hack-for-journalists-
2312dd43e993#.kw0ufw25q

youtu.be/KaOGtH7J0WE

youtu.be/JzCGRtGyxvY

New to trading? Try crypto trading bots or copy


trading

https://medium.com/coinmonks/what-were-the-consequences-of-the-dao-attack-how-were-these-issues-handled-6da0c60827a2 3/4
2/12/23, 2:05 AM What were the consequences of the DAO attack? How were these issues handled? | by Asame Zamyak | Coinmonks | Medium

Software
Open in app Engineering Blockchain Ethereum Technology Dao Sign up Sign In

Search Medium

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/what-were-the-consequences-of-the-dao-attack-how-were-these-issues-handled-6da0c60827a2 4/4
2/12/23, 2:08 AM “Ethereum’s Blockchain Just Split in Two” — What does that mean? | by Akshay Anand | Medium

Akshay Anand Follow

Oct 9, 2021 · 3 min read · Listen

Save

“Ethereum’s Blockchain Just Split in Two” —


What does that mean?
Recently Ethereum was in news for being split in to two and there were a lot of
speculations around the impact. Some of the news articles were —

Ethereum's Blockchain Just Split in Two


https://medium.com/@akshay.anand12/ethereums-blockchain-just-split-in-two-what-does-that-mean-9342b283003f 1/6
2/12/23, 2:08 AM “Ethereum’s Blockchain Just Split in Two” — What does that mean? | by Akshay Anand | Medium

Ethereum's blockchain has split in two from a bug in a previous version


of the chain's main node software. The…
www.thestreet.com

Ethereum Network Splits Into Two Chains; Upgrade Is Urged


A network patch designed to fix a bug on the Geth network has led to
the world's second-largest blockchain splitting in…
forkast.news

Ethereum Faces Chain Split as Node Operators Fail to Update Geth


Hotfix
"I knew that someone would eventually find the bug," he said. "I just
hoped that more people would have updated in…
www.coindesk.com

Although, there were a lot of news floating here and there, still it was quite hard for
someone not from hardcore blockchain fraternity to understand what does that
actually mean and what’s the reason for worry. In this post I’ll try explaining this in
detail and probably it’ll help everyone to understand the reason of the problem behind
this. But before doing so we will have to first do a quick blockchain refresher.

Any blockchain ecosystem comprises of multiple nodes. Each node has multiple
blocks, and each block has multiple transactions. This looks something like —

https://medium.com/@akshay.anand12/ethereums-blockchain-just-split-in-two-what-does-that-mean-9342b283003f 2/6
2/12/23, 2:08 AM “Ethereum’s Blockchain Just Split in Two” — What does that mean? | by Akshay Anand | Medium

It’s important to note that —

The nodes are nothing but those machines who are trying to either transact (like
the wallets) or mine (like the miners).

All the nodes share the common state.

A block containing transactions mined by a node has to get certain number of


confirmations from other nodes before the transaction in it is considered fully
complete (like say your money is actually transferred to the receiver’s account).

Mining is a process where a miner solves a certain cryptographic problem to be eligible to add
a new block to blockchain.

Now, since we have this background setup, let’s try answering the original question of
what it means when we say “Ethereum’s Blockchain Just Split in Two”?

https://medium.com/@akshay.anand12/ethereums-blockchain-just-split-in-two-what-does-that-mean-9342b283003f 3/6
2/12/23, 2:08 AM “Ethereum’s Blockchain Just Split in Two” — What does that mean? | by Akshay Anand | Medium

Anyone who wants to participate in Ethereum’s network as a miner or wallet has to


make use of some sort of a software to connect to the network. One of the most
popular softwares used for this purpose is “Geth”. More that 70% of machines running
Ethereum make use of Geth. So it’s a powerful tool used by the majoring in the
network.

Recently, a public announcement was made saying that Geth v 1.10.7 and previous
versions had some vulnerability, the details were not shared but everyone was asked to
update to newer version urgently. As a result of this announcement two things
happened —

1. Not everyone updated to the latest version, so we had people/nodes on old version
with vulnerability and on the new one without vulnerability.

2. Some set of people with malicious intend started identifying the vulnerability so as
to exploit it till the time everyone migrates to the new version without
vulnerability. Since Ethereum/Geth is an open source platform. It’s never
impossible to reverse engineer the changes done in a new version and find out the
vulnerability it addresses.

https://medium.com/@akshay.anand12/ethereums-blockchain-just-split-in-two-what-does-that-mean-9342b283003f 4/6
2/12/23, 2:08 AM “Ethereum’s Blockchain Just Split in Two” — What does that mean? | by Akshay Anand | Medium

Open in app Sign up Sign In

Search Medium

https://icons8.com/icon/25356/hacker

Due to the Point#1, the blockchain ecosystem got split into two (what we are calling got
forked) with some nodes being on old version of Geth and some on new. Thankfully
majority of miner nodes were updated to new version but say if they weren’t then due
to Point#2 there was a possibility of them utilising the vulnerability, mining and
getting the levels of confirmation needed for a successful transaction, which could
have been a major risk.

Hope that would have helped you in understanding the news better.

Ethereum Blockchain Cryptocurrency Blockchain Development

Blockchain Technology

https://medium.com/@akshay.anand12/ethereums-blockchain-just-split-in-two-what-does-that-mean-9342b283003f 5/6
2/12/23, 2:08 AM “Ethereum’s Blockchain Just Split in Two” — What does that mean? | by Akshay Anand | Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/@akshay.anand12/ethereums-blockchain-just-split-in-two-what-does-that-mean-9342b283003f 6/6
2/12/23, 2:10 AM The Ethereum Merge: Everything You Must Know | by Renato Zamagna | Ankr | Medium

Published in Ankr

Renato Zamagna Follow

Sep 14, 2022 · 11 min read · Listen

Save

The Ethereum Merge: Everything You Must Know

For quite some time, the term ‘Merge’ has piqued the interest of many in the crypto
community. The Ethereum Merge has been a subject on the lips of important players in the
crypto sector, and many have given their thoughts and viewpoints on one of the most
significant moves in the short history of blockchain technology.

What Exactly Is The Ethereum Merge?


https://medium.com/ankr-network/everything-you-need-to-know-about-the-ethereum-merge-2e1e1431b77 1/10
2/12/23, 2:10 AM The Ethereum Merge: Everything You Must Know | by Renato Zamagna | Ankr | Medium

On September 14, 2022, the Ethereum blockchain will move from proof-of-work (PoW)
to proof-of-stake as its consensus method (PoS). Vitalik Buterin, the inventor of
Ethereum, pondered this upgrade in public blogs during Ethereum’s ICO in 2014, far
before the network’s debut in July 2015. The testnet for the upgrade went live at the
beginning of May 2019, and the new 2.0 chain began operating in parallel in December
2020. Since then, frequent delays have dimmed enthusiasm, despite the fact that
Ethereum has successfully surmounted more testing obstacles.

PoS works when validators “stake” the native cryptocurrency of the blockchain
network by depositing it into a private smart contract. Then, random validators are
chosen to verify each new block and receive the delegated reward.

From ETH 2.0 → The Merge


The Merge is part of what was formerly known as “ETH 2.0,” a series of improvements
that restructure the fundamental aspects of the blockchain. And it’s considered phase
two of Ethereum’s multi-part upgrade, to improve scalability, security and energy
efficiency. It will accomplish this through sharding and rollup updates to improve
scalability.

Since late 2020, when a testing configuration of the Ethereum PoS blockchain called
the Beacon Chain was introduced, Ethereum has been continuously developing. Since
ETH2 is the next version of Ethereum, the transition from ETH PoW to ETH PoS was
given the term “The Merge.” with The Merge, the PoW chain and Beacon Chain will
merge to create a single blockchain.

The PoS consensus method is more eco-friendly than the PoW consensus mechanism,
in which miners fight to verify new blocks by wasting enormous computational power
and energy. In addition to the environmental effect, many feel that the conversion to
PoS will lessen the danger of over-centralization by making the validator function
accessible to everyone with Ether to stake, instead of just those with costly mining
equipment.

What Will Change Post-Merge?


More people and businesses who aren’t already active in the cryptocurrency industry
will be able to enter the Ethereum market, especially institutional investors. The DeFi

https://medium.com/ankr-network/everything-you-need-to-know-about-the-ethereum-merge-2e1e1431b77 2/10
2/12/23, 2:10 AM The Ethereum Merge: Everything You Must Know | by Renato Zamagna | Ankr | Medium

protocols, NFTs, and Web3 ecosystem are now accessible to millions (and eventually
billions) of users. For the Ether price, this is almost certainly good news.

It will revolutionize Ethereum and make it the industry-leading Proof-of-Stake (PoS)


blockchain, but it hasn’t been without its lengthy and costly period of development.

Below, we will examine a few potential impacts of The Merge and the on-chain
indicators that observers might use to monitor these consequences.

How Does Staking Secure the Network? And Why Is It So Expensive?


Billions of dollars are being spent to protect the Ethereum PoS network to make it
secure, stable, and scalable. The total value of Ether invested so far exceeds 13 million
ETH. In other words, before the Merge, users (also known as Validators) already staked
their Ethereum and contributed over $29 billion to the network’s security.

The amount of Ethereum staked even topped the market value of the largest PoS
network at this time — Solana. However, not all of these validators are genuinely
decentralized since some are held by centralized exchanges, custodians, and staking
pools such as Lido and Rocket. The Validators’ payout may not seem appealing as of
right now, but it will climb from 4% to 10%.

However, it is not all a walk in the park for validators considering possible technical
issues with such a significant transition. A Validator’s stake may be decreased for bad
behavior. Validators, for example, may be penalized for dishonest work. They can also
potentially be expelled from the network due to duplicate proposals, competing
proposals, or double voting are examples of slashable offenses, as is downtime (offline
penalty when more than 1/3 of the nodes are offline).

The Rise of Ultrasound Money


The removal of miners from the Ethereum ecosystem is also something to consider
since the necessity to pay huge block rewards will no longer be a problem,
substantially lowering the production of new ETH. During the process, user fees are
partly burned and partially distributed to the validators. This is the Ether burn
technique used in the London hard fork — EIP 1559 — which burnt over 2.25 million
ETH, or more than $5.6 billion.

https://medium.com/ankr-network/everything-you-need-to-know-about-the-ethereum-merge-2e1e1431b77 3/10
2/12/23, 2:10 AM The Ethereum Merge: Everything You Must Know | by Renato Zamagna | Ankr | Medium

It will reduce the inflation rate from 4% to -1%, thereby making Ether deflationary
everywhere network activity grows. This leads to the term “Ultrasound money,” which
some in the community have already nicknamed Ethereum.

To address scalability difficulties, the initial plan intended for sharding operations to
be undertaken prior to The Merge. However, with the introduction of layer 2 scaling
solutions, the focus has shifted from proof-of-work to proof-of-stake through The
Merge.

Sharding strategies are constantly changing. However, layer 2 technologies are


becoming more popular for scaling transaction processing; thus, this may not be
necessary. Today, sharding methods are more concerned with determining how to split
the task of storing compressed call data from rollup contracts equally. The
implementation of proof-of-stake is a necessity for exponentially expanding network
capacity.

What About the Ethereum Merge Myths?


Not everything you hear about the merge is true. Here are a few of the common myths
debunked.

“Staking 32 ETH is required for node operation.” This is not the case. There is no
restriction on who may sync their own verified copy of Ethereum (i.e., run a node).

“Gas fees will be significantly more affordable after the merge” is also untrue. The
Merge is a change in the consensus method, not an augmentation of network capacity,
and it won’t lead to cheaper gas prices.

“Transactions will be substantially quicker following The Merge” is also incorrect.


Despite some minor adjustments, the transaction speed on layer 1 will stay the same.

“You may withdraw staked ETH after The Merge happens.” This is still incorrect. The
Merge does not currently support staking withdrawals. Staking withdrawals will be
permitted in the forthcoming Shanghai update.

“Until the Shanghai upgrade, validators will not get any ETH rewards when
withdrawals will be authorized.” False. Fee tips/MEV will be credited to a validator-

https://medium.com/ankr-network/everything-you-need-to-know-about-the-ethereum-merge-2e1e1431b77 4/10
2/12/23, 2:10 AM The Ethereum Merge: Everything You Must Know | by Renato Zamagna | Ankr | Medium

controlled Mainnet account and will be accessible instantly.

“When withdrawals are authorized, stakers will all leave at once.” Also incorrect.
Validator exits are rate controlled for security reasons.

“There will be a threefold increase in the staked APR after The Merge.” False. More
recent estimates expect a 50% rise in APR after the Merge, rather than a 200% increase.

“The Merge will cause chain downtime.” This is false. The Merge update is intended to
allow for a seamless transition to proof-of-stake.

Staking and the Future of Ethereum Network Upgrades


One of the first issues is whether The Merge will increase Ethereum blockchain staking
activity.

More than $30 billion in Ether has been staked on the PoS Beacon Chain, making it the
biggest PoS blockchain by value staked, even before it replaces the Ethereum PoW
Network. Staking requires installing specialized software and hardware, which may be
purchased from other parties. Many others have staked by adding ETH to a staking
pool. Staking pools function similarly to mining pools in that several users may pool
their resources to increase their chances of being selected to propose a new block and
divide the rewards.

After The Merge, staking will become an even more appealing option for a number of
reasons. Once PoS is formally implemented, and PoW is relegated to the past, users
will likely feel more comfortable staking. The fact that Ethereum PoS will be more
environmentally friendly might reassure investors with a dedication to sustainability.
This is particularly true for institutional investors.

The Merge also lays the groundwork for future Ethereum enhancements. ETH placed
directly on the beacon chain cannot be withdrawn from the contract. Some staking
platforms offer liquid, synthetic assets that act like a receipt to users’ staked ETH,
although these synthetics may not necessarily retain a 1:1 peg with ETH. While The
Merge will not instantly alter this, a future update called the Shanghai upgrade will let
users withdraw staked Ether, offering greater liquidity for stakers and making staking
a more appealing proposition overall. Other scalability improvements like sharding,

https://medium.com/ankr-network/everything-you-need-to-know-about-the-ethereum-merge-2e1e1431b77 5/10
2/12/23, 2:10 AM The Ethereum Merge: Everything You Must Know | by Renato Zamagna | Ankr | Medium

which aim to decrease gas costs and speed up transactions, are also on the horizon
after The Merge.

Collectively, these modifications, beginning with The Merge, should make ETH a more
desirable asset to have and, by extension, to stake.

Ethereum Positioning Itself As A Viable Institutional Investment


In addition to a general rise in staking, we will be on the lookout for institutional
investors like JP Morgan to start or boost their Ethereum staking activities.

We have previously discussed how the values of crypto assets such as Bitcoin have
grown more connected with those of tech stocks and other high-risk, high-reward
assets. ETH’s price may decouple from other cryptocurrencies after The Merge since its
staking incentives will make it comparable to instruments that carry a premium, like
bonds and commodities. It has been speculated that validators may anticipate yearly
yields of 10–15% in ETH from staking incentives and transaction fees without even
factoring in the possibility that the price of ETH could climb, which would raise profits
in terms of fiat currency.

These returns might make staking Ethereum an attractive alternative to bonds for
institutional investors. Although it has risen over the last 12 months, the one-year
U.S.Treasury bonds yield is 3.5% as of September 2022.

The data indicates that the number of wallets staking at least $1 million worth of ETH,
which can be referred to as institutional stakers, has been rising significantly.

It would be fascinating to watch whether the number of institutional-sized stakers


grows at a quicker pace after The Merge, as Ethereum proves itself as a viable PoS
yield-generating opportunity.

Ethereum Miners Will Have To Move, but Bitcoin Is Unlikely To Be an


Alternative
The transition from PoW to PoS will entail adjustments in mining activities. Currently,
a large number of miners and mining pools mine assets across many blockchains,
dynamically dividing their hash rate depending on market patterns. The majority of
mining, however, is concentrated on Bitcoin and Ethereum.
https://medium.com/ankr-network/everything-you-need-to-know-about-the-ethereum-merge-2e1e1431b77 6/10
2/12/23, 2:10 AM The Ethereum Merge: Everything You Must Know | by Renato Zamagna | Ankr | Medium

Several Ethereum blockchain-based services use the power of distributed GPUs to


perform specific computational tasks in a decentralized way, rewarding GPU owners
with ETH or ERC-20 tokens in exchange. So, does this imply that millions of once-
productive GPUs will suddenly stop processing transactions, depriving their owners of
the opportunity to profit from cryptocurrency? Perhaps not necessarily. Consider the
two situations below:

Livepeer is a decentralized video streaming service that compensates GPU owners


with money for transcoding content.

Render network offers a similar service for generating 3D graphics and lets GPU
owners make money by sharing their hardware with others.

GPUs have several non-cryptographic applications, including processing for data


centers, gaming computers, and other heavy-duty equipment. Despite the recent fall in
on-chain activity, it will be worthwhile to see if these and comparable networks
experience an uptick due to an inflow of GPU owners seeking yield options after The
Merge. There is a possibility that some miners may sell their GPUs to industry players.

Meanwhile, as application industries flourished during the bull market of 2020–1, the
Ethereum network grew overloaded with a large transaction volume, and transaction
costs skyrocketed. This enabled other protocols, such as Binance Chain, Solana, and
Avalanche, to steal Ethereum’s market share.

Announcing the anticipated launch date for the update eliminated ambiguity and
increased anticipation that Ethereum would regain market dominance. Since then, the
price of Ether has doubled, and the volume of Ether options has overtaken that of
Bitcoin options for the first time, with the ratio of calls (bullish posture) being around 4
to 5 times that of Bitcoin.

What Are The Benefits?


Here are the main advantages a successful merge will unlock:

Improve the efficiency of the Ethereum network

Reducing energy usage by more than 99%

https://medium.com/ankr-network/everything-you-need-to-know-about-the-ethereum-merge-2e1e1431b77 7/10
2/12/23, 2:10 AM The Ethereum Merge: Everything You Must Know | by Renato Zamagna | Ankr | Medium

Less expensive to operate since validators will not be required to make significant
hardware investments.

Issuance of Ether will decrease by nearly 90% since a percentage of transaction


fees are burned (destroyed).

Becomes easier to engage in network security

All you have to do is stake your assets and earn transactions fees

In light of these benefits, it’s reasonable to assume that Ether will outperform Bitcoin
in the near future. Ether’s price in BTC is now just 45% behind its all-time high and
10% below its yearly high reached in December.

If the second largest blockchain system can successfully switch to proof-of-stake, it will
have an impact on the ongoing debate over the relative merits of proof-of-stake vs.
proof-of-work methodologies. This might sway public opinion even further against
proof-of-work blockchains (including Bitcoin) due to their high energy consumption. If
Ether can “flip” Bitcoin and become the dominant cryptocurrency, Bitcoin’s
dominance will inevitably decline.

And although Ethereum’s careful approach to the update has created major delays, it
also gives confidence that the technical risks will have been substantially addressed by
the time the upgrade goes live.

What Are The Dangers?


Despite Ethereum’s development team’s careful approach to deploying the proof-of-
stake update, new technologies always carry the possibility of flaws and problems.

Ether’s price performance may be most susceptible to a broad misunderstanding of


what The Merge would achieve. The transition to a proof-of-stake network is only the
first stage on Ethereum’s road map. And although the date is definite and the
possibility of future delays is minimal, an unexpected delay would have a negative
impact on the price of Ether.

After the update, there is a tiny chance that regulators may see Ether as a security.
This is improbable, considering the majority of blockchain systems are now proof-of-
https://medium.com/ankr-network/everything-you-need-to-know-about-the-ethereum-merge-2e1e1431b77 8/10
2/12/23, 2:10 AM The Ethereum Merge: Everything You Must Know | by Renato Zamagna | Ankr | Medium

stake. Therefore Ethereum is not the first to provide this functionality. Furthermore,
such a damaging regulatory action would be inconsistent with Western regulators’
generally accommodating and supportive stance. However, the legal justifications are
somewhat hazy, leaving the door open for arbitrary regulatory action.

The most considerable risk in the immediate future is the possibility that The Merge
will not make transactions quicker, cheaper and that this improvement will not take
full effect for at least a year. On the other hand, the medium-term potential presented
by a well-considered, complete upgrading of the (by a significant margin) most
extensively used smart contract platform is enormous.

Market Trends Surrounding The Merge


Ethereum futures with expiration beyond the scheduled Merge go-live date have been
trading at a discount to the market price — the most significant deficit since the March
2020 meltdown. This may be regarded as market players positioning themselves for
“buy the rumor, sell the news” type deals, indicating that the favorable news has
already been priced in.

However, it is more likely that the downtrend of Ether futures is the outcome of an
arbitrage transaction (long spot/short futures) aimed at profiting from an anticipated
fork of Ethereum’s proof-of-work version. Prominent miners want to keep the original
system and give out a new currency to Ether holders for free.

Conclusion
Finally, the Merge is equivalent to replacing the engines of a flying aircraft, which
sounds inconceivable to the human mind. However, the Merge success would be a
victory for every person, institution, and organization in the blockchain ecosystem
since it would open up even more opportunities for the good of humanity in
unimaginable ways for most people.

This Merge is regarded as one of the most meaningful and awaited occurrences in the
cryptocurrency sector. It is scheduled for September 14th. The countdown has begun,
and the anticipation is palpable. The question remains, “Are we ready for it?

https://medium.com/ankr-network/everything-you-need-to-know-about-the-ethereum-merge-2e1e1431b77 9/10
2/12/23, 2:10 AM The Ethereum Merge: Everything You Must Know | by Renato Zamagna | Ankr | Medium

The effect of The Merge on crypto markets begins with on-chain data. The Merge
might have significant effects on ETH’s price and general desirability as an asset,
which in turn affects staking, mining, and institutional adoption of cryptocurrencies.
Although it’s hard to forecast the precise market responses or how pronounced they’ll
be, the on-chain measures outlined above may assist in tracking them after The Merge.

Join the Conversation on Our Social Channels!


Website | Twitter | Telegram Announcements | Telegram English Chat | Discord |
YouTube | Hashnode | LinkedIn | Instagram | Ankr Staking

Thought Leadership The Merge Ethereum Merge

Open in app Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/ankr-network/everything-you-need-to-know-about-the-ethereum-merge-2e1e1431b77 10/10
2/12/23, 2:12 AM Ethereum Hard Fork — Constantinople | by Gaurav Agrawal | QuickNode | Medium

Published in QuickNode

Gaurav Agrawal Follow

Jan 12, 2019 · 6 min read · Listen

Save

Ethereum Hard Fork — Constantinople


A step toward Ethereum Scalability: optimized Gas usage, state
channels, and reduced block rewards

Image source

Update 18 Jan: Constantinople is scheduled for block height 7,280,000.

https://medium.com/quiknode/ethereum-hard-fork-constantinople-cb6aa263ebc9 1/11
2/12/23, 2:12 AM Ethereum Hard Fork — Constantinople | by Gaurav Agrawal | QuickNode | Medium

Update 15 January 2019: Constantinople Hard Fork Postponed —


The Constantinople hard fork is temporarily postponed in the light of issues identified
by ChainSecurity on January 15, 2019. Please read the details here. We are following
the latest updates and working on updating our nodes. Follow our twitter for more
updates.

https://medium.com/quiknode/ethereum-hard-fork-constantinople-cb6aa263ebc9 2/11
2/12/23, 2:12 AM Ethereum Hard Fork — Constantinople | by Gaurav Agrawal | QuickNode | Medium

Constantinople Hard Fork Postponed

For a Non-Reader 😶

If you own Ether, you don’t need to do anything

Everyone is upgrading this time, so no split; you don’t get “free” coins

This is not a Proof-of-Stake fork

Fork is happening on 16 January around 7AM UTC at block 7,080,000

What is the Constantinople Hard Fork?


Constantinople is an Ethereum hard fork, the second phase of the ‘Metropolis’
upgrade, and is part of Ethereum’s move towards a Proof-of-Stake consensus
algorithm. It’s the 4th fork in the history of the decentralized platform, following
Frontier, Homestead, and Byzantium (phase 1 of Metropolis upgrade).

What is a Hard Fork? 😕

In simple words, a hard fork is when a blockchain software upgrades to a version


which is not compatible with the current or previous versions. Remember BTC & BCH
… or ETH & ETC?

But Constantinople is a non-contentious hard-fork, which means the community


agrees with software upgrades and are ready to adopt them. In this case, the old chain
dies soon after the fork. (Don’t worry your Ether is safe).

Ethereum Forks (Past, Present, Future)

https://medium.com/quiknode/ethereum-hard-fork-constantinople-cb6aa263ebc9 3/11
2/12/23, 2:12 AM Ethereum Hard Fork — Constantinople | by Gaurav Agrawal | QuickNode | Medium

When will the Constantinople Fork happen?


The fork will happen at Block height 7,080,000 which is estimated on the 16th of
January 2019, around 7 AM UTC. You can monitor the status of the fork here and
network adoption here.

Upgrades in Constantinople

https://medium.com/quiknode/ethereum-hard-fork-constantinople-cb6aa263ebc9 4/11
2/12/23, 2:12 AM Ethereum Hard Fork — Constantinople | by Gaurav Agrawal | QuickNode | Medium

Constantinople changes, an image from ‘simply explained’ youtube channel

Tl;dr There are mostly opcode changes which will optimize gas usage and enable
second layer solutions like state channels, delaying difficulty bomb and reducing the
block reward from 3 to 2 ETH per block. No other significant changes to the network
are planned.

There are 5 Ethereum improvements proposals (EIPs) which are accepted in this fork:

EIP 145: New bitwise shift instructions

This proposal will introduce three shift instruction — Shift Left (SHL), Logical Shift
Right(SHR), Arithmetic Shift Right(SAR). These instructions will be used for shifting
bits on EVM level, which until now has been done using arithmetic instructions.
Arithmetic instructions for shifting cost 35 gas which will be reduced to 3 gas using
new shift instructions… Read More

EIP 1052: New opcode to get hash of smart contracts

This EIP will introduce a new opcode EXTCODEHASH which will return keccak256 hash of
a contract’s code. Before this code, if any smart contract wanted to perform some
checks on another smart contact, it had to get whole bytecode of that smart contract

https://medium.com/quiknode/ethereum-hard-fork-constantinople-cb6aa263ebc9 5/11
2/12/23, 2:12 AM Ethereum Hard Fork — Constantinople | by Gaurav Agrawal | QuickNode | Medium

(using EXTCODECOPY opcode). Now, with EXTCODEHASH opcode, a smart contract can
perform these checks using a simple hash.

You can understand this as “before you needed to download the whole pdf to confirm
its contents vs. now it can be confirmed with a single hash”… Read More

EIP 1014: New Opcode for State channels

Allows interactions to (actually or counterfactually in channels) be made with addresses that


do not exist yet on-chain but can be relied on to only possibly eventually contain code that
has been created by a particular piece of init code. Important for state-channel use cases that
involve counterfactual interactions with contracts.

State channels are similar to Bitcoin Lighting Network. This EIP introduces a new
Opcode CREATE2 . The update will allow for the main chain to reference off-chain
transactions that have not been broadcast to the main chain yet... Read More

EIP 1283: Optimizing storage, change in SSTORE opcode

This EIP introduces changes in SSTORE opcode. This will optimize the gas cost for
smart contract storage. This will reduce the cost of writing on the blockchain.

EIP 1283 implements a better cost analysis for contracts, by breaking down what
contract changes have been written in Ethereum’s short term storage, rather than the
blockchain itself. Read More

EIP 1234: Delaying difficulty bomb & reducing block reward

This EIP will affect the miners mostly, as it will reduce block reward from 3 ETH to 2
ETH, and uncle & nephew rewards also adjusted accordingly.

It also delays the difficulty bomb, which is basically the exponential increase in mining
difficulty (which makes Ethereum mining impossible and unprofitable).

The difficulty bomb is Ethereum’s internal feature introduced in 2015 as it planned to


switch to Proof-of-Stake in 2016; since then, it has been delayed several times… Read
More

https://medium.com/quiknode/ethereum-hard-fork-constantinople-cb6aa263ebc9 6/11
2/12/23, 2:12 AM Ethereum Hard Fork — Constantinople | by Gaurav Agrawal | QuickNode | Medium

Impact of Constantinople to different network participants


No one will get free coins this time like ETH and ETC hard fork.

Miners — Need to update their Ethereum clients.

Node Runners — Need to update their Ethereum clients.

Developers — Update your private client, or if you are using Infura or QuikNode, you
don’t need to worry as nodes will be updated by the service provider.

Bob with Wallets — If you have created wallets with any of the wallet providers
Metamask, MEW, MyCrypto, Coinbase, Hardware (e.g. Ledger/Trezor), paper wallet
etc… you don’t need to do anything.

Alice with ETH on the Exchange — If you own Ether on an exchange, you don’t need to
do anything as exchanges will automatically update to support Constantinople.

Node Service Providers — Services like QuikNode or Infura will need to update their
Ethereum clients.

Normal Joey — Normal Joey doesn’t need to care about all this. He’s keeping all of his
fiat money in the Bank. How lucky? 😃

Beware of Scammers (Grr…… 😠 )!!!


Like always, we have our first responders, our beloved scammers trying to get people’s
money whenever they get a chance. There are two more forks happening: Classic
Vision and Ethereum Nowa — looking to scam people.

DO NOT SHARE YOUR PRIVATE KEY or SEED PHRASE WITH ANYONE.

Read this report for further details.

What’s next after Constantinople?


Constantinople is not Proof-of-Stake on Ethereum yet, but rather a step towards it. To
understand the roadmap of Ethereum Proof-of-Stake, check this. The Constantinople

https://medium.com/quiknode/ethereum-hard-fork-constantinople-cb6aa263ebc9 7/11
2/12/23, 2:12 AM Ethereum Hard Fork — Constantinople | by Gaurav Agrawal | QuickNode | Medium

upgrade brings Gasoptimization and enables second-layer solutions by introducing


new opcodes. This will surely help a lot of smart contract developers moving forward.

How Constantinople fork will affect QuikNode users?


The cool thing about using QuikNode is that updates like this are done automatically
and transparently. QuikNode has stated that it has deployed node client upgrades in a
staging environment. Following successful testing, the update will be pushed out to all
users.

Official statements (and instructions, if any) regarding the upcoming fork and client
updates will be published on Twitter, Facebook, and in Slack. QuikNode users
shouldn’t need to do anything, and the development team will keep everyone posted
through its communication channels.

Further questions and Readings


Constantinople Hard Fork — ELI5 Edition

Here’s a summary of the Constantinople update

Constantinople Progress Tracker

Client Adoption Overview

User On-boarding and CREATE2

Please take 5 minutes to fill below Ethereum Node Survey 🙏 👇

https://medium.com/quiknode/ethereum-hard-fork-constantinople-cb6aa263ebc9 8/11
2/12/23, 2:12 AM Ethereum Hard Fork — Constantinople | by Gaurav Agrawal | QuickNode | Medium

Ethereum Roadmap Update [2018]: Casper & Sharding Release Date -


Mango Research
Ethereum Roadmap Update 2018: Two independent projects by
Ethereum, Casper (PoS) & Sharding, may now be unified under…
www.mangoresearch.co

Ethereum Casper V2: Beacon Chain & Sharding Explained Simply -


Mango Research
Ethereum Roadmap Update 2018: Two independent projects by
Ethereum, Casper (PoS) & Sharding, may now be unified under…
www.mangoresearch.co

https://medium.com/quiknode/ethereum-hard-fork-constantinople-cb6aa263ebc9 9/11
2/12/23, 2:12 AM Ethereum Hard Fork — Constantinople | by Gaurav Agrawal | QuickNode | Medium

Get the latest QuickNode updates


We promise not to spam you !!

Email

Sign up

If you are ok with us sending you updates via email, please


tick the box. Unsubscribe whenever you want!

I agree to leave medium.com and submit this information,


which will be collected and used according to Upscribe's
privacy policy.

Open in app Sign up Sign In

Blockchain Ethereum Cryptocurrency Web 3 Technology


Search Medium

Get my articles about Cryptocurrency and blockchain

Your email

Subscribe

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

https://medium.com/quiknode/ethereum-hard-fork-constantinople-cb6aa263ebc9 10/11
2/12/23, 2:12 AM Ethereum Hard Fork — Constantinople | by Gaurav Agrawal | QuickNode | Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/quiknode/ethereum-hard-fork-constantinople-cb6aa263ebc9 11/11
2/12/23, 2:15 AM Let’s talk Hard Forks: The Exciting Area of Cryptocurrency | by Katherine | Medium

Katherine Follow

Oct 15, 2019 · 4 min read · Listen

Save

Let’s talk Hard Forks: The Exciting Area of


Cryptocurrency

Occasionally, cryptocurrency users experience wide fluctuations in the price of coins.


This phenomenon is termed as a fork. Let us have a look at the main causes of a fork
and occurrence of its event.

Cryptocurrency is a digital currency generated using a computer. It employs a


decentralized payment network. The peer-to-peer technology indeed eliminates much
of the confusion related to centralized banking.
https://medium.com/@katherine.amt2/lets-talk-hard-forks-the-exciting-area-of-cryptocurrency-4cb2ca0ec368 1/5
2/12/23, 2:15 AM Let’s talk Hard Forks: The Exciting Area of Cryptocurrency | by Katherine | Medium

Cryptocurrency coins are encrypted versions of the public ledger “blockchain”. Coins
will flourish only when the code of a specific coin is upgraded and altered. These
constant changes regulate the compatibility of new coins with the older ones.

What is a Project Fork?


A Fork refers to the event of an individual project deviating from a specified software
project. Forks sometimes occur in the open source sphere, within a project’s
community, leading to a split within the community and result in two distinct projects
thereafter.

There are two types of forks: Soft forks and hard forks.

Softfork and Hardfork in Bitcoin terminology


The terms softfork and hardfork describe breaking changes within the protocol of a
Bitcoin:

Softforks

If a cryptocurrency network experiences a softwork, a new set of rules is implemented


in the most recent release. All nodes of miners (or witnesses) running the latest
version add one or more “words” (i.e. rules) to their “alphabet” (i.e. the current set of
rules). Softforks have the following properties:

1. They are forward-compatible. That means that nodes running an older version of
the software will accept blocks created by new nodes.

2. After a softfork, only miners have to update their software. Normal users can keep
running older nodes, which will accept the newer blocks. However, users wanting
to use new rules which haven’t been implemented before would still have to shift to
the new version.

In order for a softfork to be successful minimum 51% of the mining power has to shift
to the new version. Once that happens, transactions from older clients incompatible
with the new set of rules will simply be ignored by the network and become invalid.

Hardforks

https://medium.com/@katherine.amt2/lets-talk-hard-forks-the-exciting-area-of-cryptocurrency-4cb2ca0ec368 2/5
2/12/23, 2:15 AM Let’s talk Hard Forks: The Exciting Area of Cryptocurrency | by Katherine | Medium

Hard forks are not forward-compatible. The nodes running follows the old consensus
rules and doesn’t consider the new rules. This results in a permanent divergence in the
block chain.
If a cryptocurrency network experiences a hardfork, a new set of rules is implemented
in the most recent release. All nodes of miners (or witnesses) running the latest
version add one or more “words” (i.e. rules) to their “alphabet” (i.e. the current set of
rules). Hardforks have the following properties:

1. They are not forwards-compatible. That means that nodes running an older
version of the software will not accept blocks created by new nodes.

2. After a hardfork, every single user (normal users and miners alike) has to use the
new software version. If someone decides not to do that, he or she will be excluded
from the network.

Not all hard forks are born equal.

Anybody who owned coins at the time of hard fork, will have authority on these coins
on both the blockchains. Initially, during the hard fork, the value of the coins
diminishes. But, after the split, the value of each set of coins reflects both the mining
and community support.

Why are forks bad?


Forks turn painful to companies who depend on a specific type of coin.

A hard fork undermines the entire project, which is why the majority of the
community opposes it strongly.

Business transactions are lost during a fork.

Results in a tremendous amount of work within a coin’s community as all the existing
software must be updated to the latest version to prevent the loss of coin.

Regular software updates and extra work results in businesses shift towards the more
stable coin type.

The least popular coin is less valuable.

https://medium.com/@katherine.amt2/lets-talk-hard-forks-the-exciting-area-of-cryptocurrency-4cb2ca0ec368 3/5
2/12/23, 2:15 AM Let’s talk Hard Forks: The Exciting Area of Cryptocurrency | by Katherine | Medium

Just say, a fork is not fixed, this cause an incompatibility and results in two distinct
versions of the coin.

In the incredibly competitive market of cryptocurrency, the community is least


interested in tolerating this.

Currently, there is a lot of talk in the cryptocurrency scene going on about hardforks
and softforks. There is a chance Bitcoin might soon experience either a hardfork or a
softfork. Etherium experienced a hardfork last year and a planned Steemit hardfork
recently failed due to the fact that the witnesses didn’t reach consensus.

BitCoin is resistant to Polemic Hard Fork

Example of Hard Fork in Real Time…


Ethereum experienced hard-fork multiple times. One of the primary Ethereum hard
forks was an ad-hoc fork, hacked by exploiting a vulnerability in its code. Ethereum’s
community was prone to an attack where a huge number of tokens were stolen from a
DAO (a smart contract). Protocol owns no fault, but rather a badly coded contract.

Bitcoin hasn’t had one of these yet, whereas in the case of Ethereum it was pre-decided
from the starting that the protocol would hard fork 3 times, introducing new features
each time. These involve improvements to the protocol. People using Ethereum must

https://medium.com/@katherine.amt2/lets-talk-hard-forks-the-exciting-area-of-cryptocurrency-4cb2ca0ec368 4/5
2/12/23, 2:15 AM Let’s talk Hard Forks: The Exciting Area of Cryptocurrency | by Katherine | Medium

make an upgrade of software a regular routine in order to stay on the main blockchain,
and adapt the new improvements each time.

After the occurrence of the hard fork, people still want to remain on the original chain
fearing the possibility that the community will dump their coins diminishing its value
and making mining unprofitable.

Blockchain Bitcoin Crypto Cryptocurrency Cryptocurrencyeducation

Open in app Sign up Sign In

Search Medium
About Help Terms Privacy

Get the Medium app

https://medium.com/@katherine.amt2/lets-talk-hard-forks-the-exciting-area-of-cryptocurrency-4cb2ca0ec368 5/5
2/12/23, 2:18 AM I asked ChatGPT: Ethereum classic vs Ethereum. Which have more potential? | by Vremaroiu Alin | Coinmonks | Jan, 2023 | Medi…

Published in Coinmonks

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

Vremaroiu Alin Follow

Jan 28 · 3 min read · · Listen

Save

I asked ChatGPT: Ethereum classic vs Ethereum.


Which have more potential?
Ethereum Classic (ETC) and Ethereum (ETH) are both blockchain platforms, but they
have different origins and development paths. Ethereum Classic is a fork of the
original Ethereum blockchain, while Ethereum is the continuation of the original
Ethereum blockchain. Both have their own unique features and use cases, and the
decision of which one has more potential depends on the specific needs and goals of
the user.

https://medium.com/coinmonks/i-asked-chatgpt-ethereum-classic-vs-ethereum-which-have-more-potential-aa981a8662f6 1/5
2/12/23, 2:18 AM I asked ChatGPT: Ethereum classic vs Ethereum. Which have more potential? | by Vremaroiu Alin | Coinmonks | Jan, 2023 | Medi…

Source photo Free Litecoin Image on Unsplash

Ethereum Classic is a decentralized, open-source platform that enables the creation of


smart contracts and decentralized applications (dApps). It is based on the original
Ethereum blockchain and retains the same consensus mechanism (proof-of-work) and
the same programming language (Solidity) as the original Ethereum. Ethereum Classic
is also a separate blockchain with its own native token, ETC, which is used to pay for
transactions and computational services on the network.

https://medium.com/coinmonks/i-asked-chatgpt-ethereum-classic-vs-ethereum-which-have-more-potential-aa981a8662f6 2/5
2/12/23, 2:18 AM I asked ChatGPT: Ethereum classic vs Ethereum. Which have more potential? | by Vremaroiu Alin | Coinmonks | Jan, 2023 | Medi…

Source photo black and brown nivea cream container photo — Free Cryptocurrency Image on Unsplash

Ethereum, on the other hand, is the continuation of the original Ethereum blockchain
and has undergone several upgrades and changes since its launch. Ethereum is also a
decentralized, open-source platform that enables the creation of smart contracts and
dApps. Ethereum’s native token, Ether (ETH), is used to pay for transactions and
computational services on the network. Ethereum’s current version, Ethereum 2.0,
aims to address the scalability issues of the previous version by implementing a proof-
of-stake consensus mechanism.

In terms of potential, Ethereum has a clear advantage over Ethereum Classic.


Ethereum has a larger developer community, more decentralized applications and a
much larger market capitalization, which can make it more attractive to investors.
Ethereum is also supported by more exchanges and has more liquidity. Ethereum also
has a clear roadmap for future upgrades, which includes the implementation of proof-
of-stake and the scaling solution called shard chains, which could help the network
scale to handle more transactions per second.

https://medium.com/coinmonks/i-asked-chatgpt-ethereum-classic-vs-ethereum-which-have-more-potential-aa981a8662f6 3/5
2/12/23, 2:18 AM I asked ChatGPT: Ethereum classic vs Ethereum. Which have more potential? | by Vremaroiu Alin | Coinmonks | Jan, 2023 | Medi…

Ethereum Classic, on the other hand, is a smaller and less active ecosystem with a
smaller developer community and a smaller market capitalization. It’s not as widely
supported by exchanges and doesn’t have as much liquidity as Ethereum. However,
Ethereum Classic has a strong community of supporters and is considered by some as
a more decentralized version of Ethereum, as it has not undergone any controversial
changes and has kept the same codebase as the original Ethereum blockchain.

In conclusion, both Ethereum Classic and Ethereum have their own strengths and
weaknesses, and the choice of which one has more potential depends on the specific
use case and the user’s goals. It’s important to research and understand the differences
and similarities between the two platforms before making a decision.

Source used https://chat.openai.com/

Disclaimer

This Medium account strives to provide accurate and up-to-date information, but it
will not be responsible for any missing facts or inaccurate information. You comply
Open in app Sign up Sign In
and understand that you should use any of this information at your own risk.
Cryptocurrencies and
Search Stocks are volatile financial assets, so research and make your
Medium
own financial decisions.

New to trading? Try crypto trading bots or copy


trading on best crypto exchanges

Ethereum Ethereum Classic Cryptocurrency Eth Crypto

Enjoy the read? Reward the writer.Beta

https://medium.com/coinmonks/i-asked-chatgpt-ethereum-classic-vs-ethereum-which-have-more-potential-aa981a8662f6 4/5
2/12/23, 2:18 AM I asked ChatGPT: Ethereum classic vs Ethereum. Which have more potential? | by Vremaroiu Alin | Coinmonks | Jan, 2023 | Medi…

Your tip will go to Vremaroiu Alin through a third-party platform of their choice, letting them know you appreciate their
story.

Give a tip

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/i-asked-chatgpt-ethereum-classic-vs-ethereum-which-have-more-potential-aa981a8662f6 5/5
2/12/23, 2:21 AM Is Ethereum Classic ETC Better Than Ethereum ETH ? | by Vremaroiu Alin | Coinmonks | Medium

Published in Coinmonks

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

Vremaroiu Alin Follow

Apr 16, 2022 · 7 min read · · Listen

Save

Is Ethereum Classic ETC Better Than Ethereum


ETH ?

Source photo Unsplash.com

https://medium.com/coinmonks/is-ethereum-classic-etcbetter-than-ethereum-eth-e85505f37e75 1/7
2/12/23, 2:21 AM Is Ethereum Classic ETC Better Than Ethereum ETH ? | by Vremaroiu Alin | Coinmonks | Medium

Ethereum, rather than Bitcoin, continues to be the most popular cryptocurrency on


the market. As part of a robust network and platform, the most valuable
cryptocurrency is at the top of the heap. DApps and DEXs that are part of the DeFi
ecosystem are hosted on Ethereum, a decentralized network. When the network was
first launched in 2015, it was critical to the development and survival of the bitcoin
landscape. Users and developers alike benefit from the network’s high speeds and
cheap gas costs. Its coin, Ether, has grown at a rate of roughly 4,000 percent since its
inception. As a result, it’s impossible to tell the whole narrative of Ethereum without
discussing its 2016 split, Ethereum Classic.

What Is Ethereum Classic, and Why Would You Want It?


Using smart contracts to operate decentralized apps, Ethereum Classic is a
decentralized network. The DAO, an Ethereum-based smart contract, was breached in
2016 and the network went live. It’s a distributed cryptocurrency based on smart
contracts that’s open source and built on the blockchain, much like Ethereum. It has a
shared genesis and source with Ethereum, making it quite comparable. Unlike other
blockchain networks, this one’s primary use case is to record financial transactions. Its
novelty, on the other hand, is that it may be utilized as a distributed computer to
perform smart contracts that execute themselves. There is no need for third-party
intervention or enforcement for these contracts. According to the network’s creators, it
is a continuation of the original Ethereum chain’s unmodified history. It also allows
DApps to create their own tokens, including NFTs, on the network. ETC is the
company’s native and utility token.

Ethereum Classic’s past


In the wake of a debate amongst several Ethereum developers, the network was born.
The DAO (Decentralized Autonomous Organization)” was a group of Ethereum
engineers that set up a venture capital firm. This VC generated $100 million by
enabling individuals to contribute ETH and promised them profit sharing as a return
on their investment. Additionally, investors had control over the distribution of their
assets. Unfortunately, a flaw in the fund’s coding allowed for unauthorized access to
the network. Millions of dollars’ worth of ETH were stolen in the incident.

Pissed off investors gave engineers one month to come up with a solution before the
hackers cashed out on their stolen tokens. Developers had to make a hard fork in order

https://medium.com/coinmonks/is-ethereum-classic-etcbetter-than-ethereum-eth-e85505f37e75 2/7
2/12/23, 2:21 AM Is Ethereum Classic ETC Better Than Ethereum ETH ? | by Vremaroiu Alin | Coinmonks | Medium

to reverse the hack and return investors’ funds. Vitalik Buterin and several of the
network’s significant investors were in favor of this option, but others were against. For
the most part, they rejected it because they thought it immoral to alter the Blockchain’s
ledger. Because of this, they sought to keep the network running despite the theft.
They did not leave the network, however, and renamed it Ethereum Classic in the
process.. Vitalik Buterin, the majority of miners, developers, and users, migrated to the
forked network. “ Today, we refer to the split network as Ethereum.

What Is ETC’s Mechanism?


If the two networks are compared side-by-side, the impression that they function in a
comparable manner will be created. However, despite the fact that their frameworks
are identical, they function somewhat differently in several areas. Similar to
Ethereum, it depends on a consensus process known as proof-of-work. By using
hardware and software to verify the transactions, its users throughout the world
ensure the network’s security. In return for their efforts, individuals are rewarded with
ETC incentivizes.

As Ethereum moves toward proof-of-stake consensus, it is worth noting. Users may


also use ETC to communicate with one other and with the DApps in the ETC
ecosystem. ETC holders may send, receive, and trade the coin, just as Ethereum
holders can. A lack of interest among developers means that little time is spent on this
network. This has resulted in the network being a little redundant and susceptible. For
security reasons, blockchains must be operated by a dispersed group of users. As a
result, the network becomes vulnerable to fraudsters and hackers.

What Is So Special About Ethereum Classic?


Ethereum Classic’s novelty is that it is presently keeping the Ethereum network’s
original architecture. The new network has lost part of Ethereum’s initial traces as a
result of the DAO breach and the fork splitting. As a result, Ethereum Classis is still
preserving its DNA. Since its creation, it has attracted large crypto investors and
important industry players despite the fact that it was developed by the minority. It is
now a non-profit organization, thus its owners and creators are not making any money
from it. Proof-of-work consensus algorithms allow miners to receive fees produced by
the network. Additionally, the network does not want to shift away from PoW and is
working to enhance the current implementations.

https://medium.com/coinmonks/is-ethereum-classic-etcbetter-than-ethereum-eth-e85505f37e75 3/7
2/12/23, 2:21 AM Is Ethereum Classic ETC Better Than Ethereum ETH ? | by Vremaroiu Alin | Coinmonks | Medium

What’s the difference between ETC and ETH?


When it comes to cryptocurrency, Ethereum Classic does not measure up to the most
popular altcoin network. The properties of both networks are outlined below, and how
they vary when compared.

Although both networks are now offering smart contracts, it is important noting that
they are catering to the same market. Ethereum, on the other hand, is now the most
popular cryptocurrency. Most Defi projects are hosted on Ethereum, which provides
cryptocurrency users with a wide range of customized services. Investors’ favorite
altcoin is Ether, which continues to challenge Bitcoin in value.

Ethereum also wins the battle in terms of scalability. With just 15 transactions per
second, Ethereum Classic is one of the slowest blockchain networks. Ethereum, on the
other side, is capable of 30 transactions per second at the moment. The Ethereum 2.0
update will allow the network to process up to 100,000 transactions per second when it
is completed.

There were many “51 percent assaults” on Ethereum Classic during 2019 and 2020,
which is a restriction of the network’s security. The hacker was able to steal millions of
dollars’ worth of computer power from the network as a result of this assault. Because
Ethereum’s network is so well-protected, there have been few or no assaults on it.

In terms of market capitalization and popularity, Ether outperforms ETC. The market
valuation of Ether likewise exceeds that of ETC by almost 4,000%. At the time of this
writing, the price of Ether is about 1,000 percent more than the price of ETC. Despite
their apparent similarities, the vastness of the distance between the two networks is
evident. Unlike Ether, the total quantity of ETC tokens is capped at 210 million.

What is the ETC Token?


The Ethereum Classic network is powered by ETC, which is the network’s native coin.
The strong utility token is also used to compensate the network’s miners. For verifying
the blockchain, miners compete against each other for incentives. There will be a dip
in the block reward at block 15,000,000. Block payouts have dropped from 3.2 ETC to
2.56 ETC after April 2022. A total of 210,700,000 ETC coins are available in the total
supply of 134,184,128 circulating ETC coins. Many exchanges, including Binance,

https://medium.com/coinmonks/is-ethereum-classic-etcbetter-than-ethereum-eth-e85505f37e75 4/7
2/12/23, 2:21 AM Is Ethereum Classic ETC Better Than Ethereum ETH ? | by Vremaroiu Alin | Coinmonks | Medium

Coinbase, and Kraken, offer it for purchase and trade. In addition to stablecoins, other
cryptocurrencies, and fiat currencies, there are other pair options.

What Does the Future Hold for ETC?


ETC’s performance has been adequate, despite the fact that ETH now has the upper
hand. The token’s domination is still among the top 30 best in the crypto industry,
according to CoinMarketCap. It has a market capitalization of $8,056,116,198.51 and a
daily trading volume of $631,219,249.91 million. ETC’s market capitalization is little, yet
it isn’t one of the most sought-after assets. Investors’ apprehensions about the
network’s security are one reason the coin isn’t attracting a lot of interest. A year ago, it
was trading at $176.16, and its current price of $38.2 is still a long way off.

However, given the existing measurements and indexes, the coin may have a terrific
year. The Ethereum Classic network is constantly being improved by its creators in
order to increase its security, speed, and scalability. As long as the upgrades are
favorable, crypto experts feel that they may expect to see an increase in their fortunes.
In the opinion of WalletInvestor, the token is on the rise and will finish the year with a
value of $67.293 at the most. Investors may expect a return on their investment of at
least 100% if this occurs. According to WalletInvestor, it will take five years for ETC to
reach its current all-time high.

Even though Digital Coin is bullish on ETC’s future, the company doesn’t expect it to hit
$100 before 2022. However, no more than $64.48 is predicted by the crypto experts for
the token in 2022. According to Digital Coin’s long-term ETC forecast, the coin will
reach $95.25 in 2025 and $219.25 in 2030.. ETC is expected to outperform forecasts in
2022 according to Gov Capital, one of the most enthusiastic experts. According to Gov
Capital, ETC will reach a high of $79 by December 2022 as a long-term investment. ETC
is expected to hit a high of $246 in 2027, according to crypto researchers. Predictions
may be accurate, but the volatility of crypto assets means that anything can happen.
Cryptocurrency investments should only be made with money that you’re willing to
lose.

Conclusion
To operate decentralized apps, smart contracts are used on the Ethereum Classic
network. In response to a dispute among certain Ethereum developers, a new network

https://medium.com/coinmonks/is-ethereum-classic-etcbetter-than-ethereum-eth-e85505f37e75 5/7
2/12/23, 2:21 AM Is Ethereum Classic ETC Better Than Ethereum ETH ? | by Vremaroiu Alin | Coinmonks | Medium

was created. Ethereum, on the other hand, is more robust than the network as a whole.
Many exchanges, including Binance and Coinbase, sell ETC, the company’s native coin.
Cryptocurrency specialists are enthusiastic about its future, but the prospects of it
hitting $100 in 2022 are limited.

Join Coinmonks Telegram Channel and Youtube


Channel learn about crypto trading and investing
Also, Read
What are the Trading Signals? | Bitstamp vs Coinbase | Buy Solana

ProfitFarmers Review | How to use Cornix Trading Bot

10 Best Cryptocurrency Blogs | YouHodler Review

MyConstant Review | 8 Best Swing Trading Bots

MXC Exchange Review | Pionex vs Binance | Pionex Arbitrage Bot

Ethereum Eth Etc Ethereum Classic Ethereum Blockchain

Enjoy the read? Reward the writer.Beta


Your tip will go to Vremaroiu Alin through a third-party platform of their choice, letting them know you appreciate their
story.

Give a tip

Sign up for Coinmonks


https://medium.com/coinmonks/is-ethereum-classic-etcbetter-than-ethereum-eth-e85505f37e75 6/7
2/12/23, 2:21 AM Is Ethereum Classic ETC Better Than Ethereum ETH ? | by Vremaroiu Alin | Coinmonks | Medium

By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy


Open in app Sign up Sign In

Search Medium
Get the Medium app

https://medium.com/coinmonks/is-ethereum-classic-etcbetter-than-ethereum-eth-e85505f37e75 7/7
2/12/23, 2:24 AM Ethereum (ETH) vs Ethereum Classic (ETC) in Blockchain - GeeksforGeeks

Data Structures and Algorithms Interview Preparation Data Science Topic-wise Practice C C+

Ethereum (ETH) vs Ethereum Classic (ETC) in


Blockchain
Difficulty Level : Expert ● Last Updated : 02 Feb, 2023

Read Discuss

Ethereum is an open-source, decentralized blockchain platform with smar t contract

functionality. Ether (E TH) is a native cr yptocurrency of the Ethereum blockchain

platform. Ether is used to pay transaction fees and computational ser vices. Developers

can write smar t contracts that receive, hold, and send Ether.

It is a transactional token that facilitates operations on the Ethereum Network.

It is the second-largest vir tual currency by market capitalization.

It holds market value and is exchangeable for fiat currency on cr yptocurrency

exchanges. 

Ether is given to network par ticipants randomly chosen as validators through proof-

of-stake consensus. 

Ether is needed to pay for the transaction and secure the blockchain.

Approximately 5 ethers are created ever y 12 seconds.

What is ETC?

Smar t contracts are executed on the Ethereum Classic platform, which is a blockchain-

based, open-source, decentralized, distributed cr yptocurrency. With Ethereum Classic

being the oldest of the two and Ethereum being the newest, it divided the original

Ethereum blockchain into two pieces. E TC is a cr yptocurrency that was launched in 2016

as a hard fork from Ethereum (E TH).

Start Your Coding Journey Now! Login Register


https://www.geeksforgeeks.org/ethereum-eth-vs-ethereum-classic-etc-in-blockchain/ 1/5
2/12/23, 2:24 AM Ethereum (ETH) vs Ethereum Classic (ETC) in Blockchain - GeeksforGeeks

E TC’s main function is as a smar t contract network, with the ability to host and

suppor t DApps.

E TC uses PoW mining algorithm.

E TC block reward decreases with time, with the next drop due at block 15,000,000 in

April 2022, from 3.2 E TC to 2.56 E TC per block.  

ETH vs ETC

Below are the differences between E TH and E TC:

Parameters ETH ETC

Created On 2014 2016

Founder Vitalik Buterin and Gavin Vitalik Buterin and Gavin Wood

Wood

Blockchain Ethereum Ethereum Classic

Technology

Total Supply It has an uncapped total The policy is changed, reducing the

supply with a fixed supply per block reward by 20% at the 5 millionth

year. block number and 20% ever y 5

millionths.

Hard Fork Before the hard fork, E TC was born af ter the hard fork.

Ethereum existed, but it has

become more power ful af ter

the hard fork.

Mining Proof of Stake Proof of Work

Algorithm

Start Your Coding Journey Now!


Max Supply NA 210,700,000

https://www.geeksforgeeks.org/ethereum-eth-vs-ethereum-classic-etc-in-blockchain/ 2/5
2/12/23, 2:24 AM Ethereum (ETH) vs Ethereum Classic (ETC) in Blockchain - GeeksforGeeks

Like 11

Previous Next

Related Articles

1. What are ETH Internal Transactions?

2. Use of Ethereum's RLPx in Ethereum Ecosystem

3. Ethereum Blockchain - Getting Free Test Ethers For Rinkeby Test Network

4. Blockchain - Hyperledger vs Ethereum

5. How to Add Another Miner to Existing Private Ethereum Blockchain?

6. Ethereum Enterprise Alliance (EEA) in Blockchain

7. Ethereum 2.0

8. What is Ethereum?

9. Difference Between Bitcoin and Ethereum

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/ethereum-eth-vs-ethereum-classic-etc-in-blockchain/ 3/5
2/12/23, 2:24 AM Ethereum (ETH) vs Ethereum Classic (ETC) in Blockchain - GeeksforGeeks

10. ERC20 vs ERC721 in Ethereum

Ar ticle Contributed By :

kmrityunjay360
@kmrityunjay360

Vote for difficulty

Current difficulty : Exper t

Easy Normal Medium Hard Expert

Article Tags : Ethereum, Blockchain, Difference Between

Improve Article Report Issue

A-143, 9th Floor, Sovereign Corporate Tower,


Sector-136, Noida, Uttar Pradesh - 201305
[email protected]

Company Learn
About Us DSA
Careers Algorithms
Start Your Coding Journey Now!
https://www.geeksforgeeks.org/ethereum-eth-vs-ethereum-classic-etc-in-blockchain/ 4/5
2/12/23, 2:24 AM Ethereum (ETH) vs Ethereum Classic (ETC) in Blockchain - GeeksforGeeks

In Media Data Structures


Contact Us SDE Cheat Sheet
Privacy Policy Machine learning
Copyright Policy CS Subjects
Advertise with us Video Tutorials
Courses

News Languages
Top News
Python
Technology
Java
Work & Career
CPP
Business
Golang
Finance
C#
Lifestyle
SQL
Knowledge
Kotlin

Web Development Contribute


Web Tutorials Write an Article
Django Tutorial Improve an Article
HTML Pick Topics to Write
JavaScript Write Interview Experience
Bootstrap Internships
ReactJS Video Internship
NodeJS

@geeksforgeeks , Some rights reserved

Start Your Coding Journey Now!


https://www.geeksforgeeks.org/ethereum-eth-vs-ethereum-classic-etc-in-blockchain/ 5/5
2/12/23, 2:29 AM Hard Forks and Soft Forks. What are they and what’s their difference? | by Ettore Murabito | The Startup | Medium

Published in The Startup

Ettore Murabito Follow

Sep 27, 2019 · 6 min read · Listen

Save

Hard Forks and Soft Forks. What are they and what’s
their difference?
In the world of cryptocurrencies, the prospects of hard forks and soft
works are always the subject of intense debates among the experts, as
well as a source of concern and uncertainty among traders and
speculators. But what do these terms really mean?

Simply put, hard forks and soft forks are for cryptocurrencies what updates are for
common computer programs.

The software that implements a blockchain consensus protocol (for example the
software that runs the Bitcoin network) is usually curated by a community of
developers who incessantly work to define, propose and implement best practice
https://medium.com/swlh/hard-forks-and-soft-forks-what-are-they-and-whats-their-difference-91163ac77095 1/8
2/12/23, 2:29 AM Hard Forks and Soft Forks. What are they and what’s their difference? | by Ettore Murabito | The Startup | Medium

solutions and improvements to the code. When this community introduces an update
on the software, the blockchain is said to “fork”.

When it comes to updates of common computer programs, we are all familiar with the
notion of backward compatibility (or incompatibility). If the update is such that the
files created with the new version of the program can be still opened and worked on
using the old version , then we have a backward compatible update, otherwise the
update is said to be backward incompatible. For blockchain consensus protocols it works
pretty much the same way. A soft fork is an update on the blockchain protocol that is
backward compatible, i.e. it introduces some changes in the code that do not severe the
functional continuity with its previous version. On the contrary, a hard fork consists of
changing the blockchain protocol in a way that is not backward compatible, hence
introducing a discontinuity with the previous version.

Now, what does all this mean in practice? Let’s try to answer this question through
some examples.

An example of soft fork. The adoption of SegWit.


Firs of all, let’s clarify one point. Contrary to what our intuition may suggest,

A hard fork consists of loosing up some of the rules implemented in the non updated
version of the protocol, while a soft fork consists on tightening up some of those rules.

Let’s consider a famous example of a soft fork, the adoption of SegWit. The bitcoin
community had long debated on what was the best way to increase the bitcoin
transaction speed. Since a new block of transactions is mined every 10 minutes in
average (and this point was not up for debate), the idea was to increase the number of
transactions that could be included in each block. To do so, the community proposed a
solution called Segregated Witness (in short SegWit). The basic idea was to free up some
space in each block that could be used to include a bigger number of transactions. This
was achieved by removing from the block the public key and the signature associated
with each transaction and sending them through a different messaging channel.
Because the public key and the signature occupy about 60% of the whole transaction
size, by sending them separately it was possible to double the number of transactions
in each block. The reason why this approach was called Segregated Witness is that the

https://medium.com/swlh/hard-forks-and-soft-forks-what-are-they-and-whats-their-difference-91163ac77095 2/8
2/12/23, 2:29 AM Hard Forks and Soft Forks. What are they and what’s their difference? | by Ettore Murabito | The Startup | Medium

“witness” (another name for signature) of the transaction was segregated (i.e. sent
separately) from the transaction itself.

This change in the protocol was implemented in a way that allowed blocks forged in
the old fashion to be also correctly recognised and processed (in this sense the new
protocol is more permissive as it allows for both the new and the old block formats). In
other words the protocol update was backward compatible.

An example of hard fork. The birth of Bitcoin Cash.


A notable example of hard fork is provided by the split between Bitcoin (BTC) and
Bitcoin Cash (BCH) occurred the 1st of August 2017. The split was due to a fundamental
disagreement on whether SegWit was the best approach to increase the number of
transactions processed per block. Those who were unhappy with SegWit decided to
implement a different solution consisting of increasing the maximum block size from
1 to 8 MB. This solution was not backward compatible as we will see shortly, and
because there was not unanimous consensus about its adoption it resulted in the split
of the blockchain into two branches. The branch that implemented the change re-
branded their blockchain as Bitcoin Cash, while the branch that did not implement the
change maintained the original name of Bitcoin.

The reason why the change proposed by the Bitcoin Cash supporters is not backward
compatible is easy to understand. On the one hand any block with a size smaller or
equal to 1MB is considered valid by both the BCH updated protocol and the BTC
protocol. On the other hand any block with a size greater than 1MB is considered valid
only by the BCH protocol. This backward incompatibility is the result of loosening up
the constraint on the maximum block size in the BCH protocol. As a consequence,
from the time of implementing this change, the history of the two blockchains started
to diverge.

https://medium.com/swlh/hard-forks-and-soft-forks-what-are-they-and-whats-their-difference-91163ac77095 3/8
2/12/23, 2:29 AM Hard Forks and Soft Forks. What are they and what’s their difference? | by Ettore Murabito | The Startup | Medium

Figure 1 — A hard fork occurred on the 1st of August 2017 leading to the split between Bitcoin (BTC) and Bitcoin
Cash (BCH). The updated version of the protocol implemented by BCH allowed for a bigger size limits of the
blocks.

At this point it is important to point out that when a blockchain splits, so does its
underlying currency. If that was not the case, then any block with a size compatible
with both protocols, would be processed by both blockchains resulting in a double
spending problem. The issue is avoided by creating a new currency that shares the
same history as the old one up until the time of the split, and then becomes
independently managed and transacted. This means that at the time of the split, any
holder of bitcoins was granted the same amount of coins in BCH, which then could
(and had) be transacted independently from the original coins.

Some final remarks

Is Hard Fork synonymous with Split?


No. A hard fork does not have to result in a split. If a general consensus is reached to
implement a change on the blockchain protocol that is not backward compatible, then
the new protocol will replace the old one without the blockchain being split into two
branches nor a new currency being created.

Can a soft fork result in a split if no consensus is reached?


There is no reason for a split in the case of a soft fork. The key aspect to keep in mind
is that a soft fork is initiated only when the vast majority of the community agrees on
the new rules.

Let’s recall that a soft fork consists on tightening up some of the rules of the existing
protocol. This means that all the blocks compliant with the new protocol are also
compliant with the old one. On the contrary some of the blocks mined following the
https://medium.com/swlh/hard-forks-and-soft-forks-what-are-they-and-whats-their-difference-91163ac77095 4/8
2/12/23, 2:29 AM Hard Forks and Soft Forks. What are they and what’s their difference? | by Ettore Murabito | The Startup | Medium

old protocol won’t be valid based on the new set of rules. Now, because the majority of
the nodes in the network agreed to run on the new protocol, the blockchain created
with the tighter set of rules will elongate faster than the other one. As we know from
my article on PoF-based consensus protocols, the longest chain replaces the shorter
one whenever two different versions of the ledger are detected by the network. This
results in a number of orphaned blocks originally mined following the old protocol.
This situation forces the minority of the nodes still running the old protocol to adopt
the new one. If they don’t, they will lose money by keeping mining less blocks that will
be eventually orphaned (and for which they won’t receive any remuneration). The
picture below shows what happens in a fictitious soft fork where the protocol update
consists of reducing the block size limit from 1 MB to 0.5 MB.

https://medium.com/swlh/hard-forks-and-soft-forks-what-are-they-and-whats-their-difference-91163ac77095 5/8
2/12/23, 2:29 AM Hard Forks and Soft Forks. What are they and what’s their difference? | by Ettore Murabito | The Startup | Medium

Figure 2 — A soft fork is initiated only when the majority of the community agrees on the protocol update. This
gives the new protocol an advantage over the old one in terms of hashing power. The miners who did not update
the protocol will be able to mine less blocks — some of which will also be orphaned (like the block with the red
cross in the picture) — due to the hashing power disadvantage. This will push those miners to adopt the new
protocol so as to avoid being remunerated less for mining a fewer number of valid blocks.

Other notable forks


The introduction of SegWit and the birth of Bitcoin Cash are among the most notable
examples of soft and hard fork respectively. There are others, however, worth noticing;
some involving again the bitcoin blockchain, some involving other cryptocurrencies or

https://medium.com/swlh/hard-forks-and-soft-forks-what-are-they-and-whats-their-difference-91163ac77095 6/8
2/12/23, 2:29 AM Hard Forks and Soft Forks. What are they and what’s their difference? | by Ettore Murabito | The Startup | Medium

even smart contracts. For a list of these forks, just query the web. There is an
overwhelming amount of resources you can tap into. Here are some:

The Story of the DAO — Its History and Consequences

A History of Bitcoin Forks: Top 5 Bitcoin Forks, Rated and Reviewed

Explore the visualized history of the cryptocurrencies

Bitcoin Cryptocurrency Bitcoin Mining Soft Fork Hard Fork

Sign up for Top 5 Stories


By The Startup

Get smarter at building your thing. Join 176,621+ others who receive The Startup's top 5 stories, tools, ideas, books —
delivered straight into your inbox, once a week. Take a look.

Your email
Open in app Sign up Sign In

Search Medium
Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/swlh/hard-forks-and-soft-forks-what-are-they-and-whats-their-difference-91163ac77095 7/8
2/12/23, 2:29 AM Hard Forks and Soft Forks. What are they and what’s their difference? | by Ettore Murabito | The Startup | Medium

https://medium.com/swlh/hard-forks-and-soft-forks-what-are-they-and-whats-their-difference-91163ac77095 8/8
2/12/23, 2:32 AM What are Soft Forks and Hard Forks? | Coinmonks

Published in Coinmonks

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

TheLuWizz Follow

Mar 28, 2021 · 5 min read · · Listen

Save

What are Soft Forks and Hard Forks?

Like any software, the blockchain is updated. These updates are called forks in the
cryptographic world. The word fork comes from English and means fork. As will
become clear in the course of the article, this is an apt term for it.

https://medium.com/coinmonks/what-are-soft-forks-hard-forks-ffc676e98b1 1/5
2/12/23, 2:32 AM What are Soft Forks and Hard Forks? | Coinmonks

Because the blockchain is decentralized, there is no central authority that decides to


perform a fork. In some cases, forks are implemented by the cryptocurrency
programmers themselves, as is currently the case with the conversion from Ethereum
to Ethereum 2.0, for example. However, it is sometimes desired in open source
projects that users with programming skills modify and improve the software
according to their own ideas.

A distinction is made between the two types of forks. The Soft Fork and the Hard Fork.
As the pair of opposites already indicates, there are clear differences between these
two forks.

Soft fork
A soft fork is a change to the protocol that is backward compatible. This means that the
new rules do not exclude the protocol rules that already existed up to the time of the
soft fork. As a result, all nodes and are still capable of generating blocks and joining
the blockchain.

Since this all sounds very abstract, let’s explain the situation again with an example.
The protocol's already existing rules dictate that a block must reach 5MB, and then it is
attached to the blockchain. However, now the protocol is updated, and the blocks are
supposed to be only 3MB until they are pinned to the blockchain. Since the older nodes
can append blocks with a storage capacity of 5MB, they are now also able to append
blocks with 3MB to the blockchain. Thus, both old and new nodes can append blocks to
the blockchain.

However, if old nodes try to append a block with 5MB to the blockchain, the new nodes
will be rejected because this block does not comply with the new rules of the protocol.
Over time, the old nodes now also only follow the rules of the new protocol.

Hard Fork?
On the other hand, a hard fork is a change to the protocol that is not backward
compatible. It is the opposite of a soft fork. In a hard fork, the protocol rules are
changed so that the old nodes can no longer pack transactions into blocks of the new
regulation since the old rules contradict the new ones. Thus, miners must decide

https://medium.com/coinmonks/what-are-soft-forks-hard-forks-ffc676e98b1 2/5
2/12/23, 2:32 AM What are Soft Forks and Hard Forks? | Coinmonks

whether to update their nodes to the new protocol or keep the old protocol's nodes
running.

Up to this step, every hard fork runs the same. From here on, however, there are no
differences.

The first case is that a fork is implemented. Most users perceive that as an
improvement to the old protocol. If this is the case, most users will join the new
blockchain and continue to transact there. Hardly any participants will still follow the
old protocol, and so it will die out over time.

However, there is also a second case. Here, many users disagree on whether the update
will lead to an advantage and, therefore, whether they want to join the new protocol. If
the protocol is now updated, two blockchains will form from the previous blockchain. -
> One cryptocurrency will become two!

All blocks registered on the blockchain up to that point can now be viewed on the old
blockchain and the new blockchain. After this kind of hard fork, you have the number
of your coins of the old blockchain stored on both the old and the new blockchain.
However, from the time of the fork, transactions will only be published on the
blockchain on which they are made.

Let’s describe the situation again with an example. Suppose the protocol's pre-existing
rules prescribe 5 MB as the block size, as in the above example. However, the new
protocol specifies that a data size of 7MB per block must be reached for it to be
attached to the blockchain. In this case, the old nodes are not compatible with the new
protocol. The miner must now decide whether to continue running his node on the old
protocol or update it to the new one.

To create a hard fork, a sufficiently large community is always necessary, which also
accepts it. If there are only a few participants, transactions will hardly be confirmed.

Uniswap v3 coming soon — capital efficiency with 4,000x


improvement
The decentralized exchange Uniswap experienced a lot of hype in the
past year. During the peak periods, the…
medium.com
https://medium.com/coinmonks/what-are-soft-forks-hard-forks-ffc676e98b1 3/5
2/12/23, 2:32 AM What are Soft Forks and Hard Forks? | Coinmonks

Examples Hard Fork


There have been quite a few hard forks in the crypto world so far. However, the best
known are those of Bitcoin and Ethereum.

Hard Fork Bitcoin — Bitcoin Cash


On August 01, 2017, the hard fork of Bitcoin took place. On this day, the Bitcoin
Blockchain split into two parts at block 478558. The Bitcoin Blockchain remained, and
the Bitcoin Cash Blockchain was created. Every user who held Bitcoins on the
blockchain now has the same amount of coins in Bitcoin Cash.

The basic goal of this fork was to increase the block size from 1MB to 8MB. This fork
was seen as much overdue by developers as it allows more transactions to be
processed simultaneously. Due to the lower transaction time, transaction costs have
also decreased. Since as already known: The higher the transaction fee, the faster the
transaction is processed.

Hard Fork Ethereum — Ethereum Classic


There have already been several hard forks in the history of Ethereum. Probably the
most discussed hard fork of Ethereum was performed on July 20, 2016. The fork
resulted from a series of hack attacks against a smart contract.

This smart contract (DAO) allowed all users who invested in it to decide which dApps
on the Ethereum Blockchain would be co-funded and which would not. However, there
was also the option to exchange one’s DAO tokens back into Ether. And it was precisely
in this system that there was a vulnerability, which hackers made their own. In this
way, they captured a total of 50 million US dollars.

To ensure that the blockchain's security could be guaranteed again for everyone, a
large part of the community spoke out in favor of a hard fork. This is how the new
blockchain (Ethereum) was created, and the old blockchain (Ethereum Classic)
remained.

I share more intimate thoughts in a monthly newsletter that you can check out here.
Please let me know in a comment, and let’s build your crypto universe via Patreon. Join
https://medium.com/coinmonks/what-are-soft-forks-hard-forks-ffc676e98b1 4/5
2/12/23, 2:32 AM What are Soft Forks and Hard Forks? | Coinmonks

me on various social media platforms:

Twitter ● Instagram ● Patreon ● Facebook ● Snapchat ● LinkedIn

Bitcoin Cryptocurrency Ethereum Technology Blockchain

Sign up for Coinmonks


By Coinmonks
Open in app that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly
A newsletter Sign upin your
Sign In
inbox, by CoinCodeCap.com Take a look.
Search Medium
Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/what-are-soft-forks-hard-forks-ffc676e98b1 5/5
2/12/23, 2:34 AM A Brief Introduction to ICO Initial Coin Offering | by Blockchain Simplified | Medium

Blockchain Simplified Follow

Jan 13, 2020 · 6 min read · Listen

Save

A Brief Introduction to ICO Initial Coin Offering

Img source : moneycrashers.com

Finance is an integral part of our day to day lives; money is a bare essential for any
exchange in the real world. Be it hard cash or physical checks that were the mode of
exchange earlier, or digital cash and currencies that is trending off late, money as a

https://medium.com/@blockchain_simplified/a-brief-introduction-to-ico-initial-coin-offering-7bd39a02e0ce#:~:text=An ICO Initial Coin Offering whitepap… 1/8


2/12/23, 2:34 AM A Brief Introduction to ICO Initial Coin Offering | by Blockchain Simplified | Medium

medium for exchange is an absolute must. There is a whole new world of


cryptocurrencies like Bitcoin, to which, people slowly and gradually have warmed up
to. Cryptocurrencies are seeing a steady growth with more and more number of
people acknowledging it as a worthy investment.

ICO Initial Coin Offering is the latest big thing in the field of finance which has
grabbed everybody’s attention. Let us understand what exactly is an ICO, what are ICO
tokens or ICO coins, how does ICO work and what is its purpose?

See our blogs on Blockchain, Bitcoin, Ethereum to get a basic idea before we proceed
to know more about ICO Initial Coin Offering.

https://blockchainsimplified.com is a top blockchain development company that offers


complete ICO launch and development services in Pune, India.

What is ICO Initial Coin Offering?

https://medium.com/@blockchain_simplified/a-brief-introduction-to-ico-initial-coin-offering-7bd39a02e0ce#:~:text=An ICO Initial Coin Offering whitepap… 2/8


2/12/23, 2:34 AM A Brief Introduction to ICO Initial Coin Offering | by Blockchain Simplified | Medium

Img Source : medium.com

An analogy between IPO Initial Public Offering and ICO Initial Coin Offering can help
understand how both are completely different from each other but have slight
similarity. An IPO is released by a company to sell a portion of its stock/share to the
public. People interested, can purchase the shares at a certain price and later sell them
(if they want to) whenever the share price increases, as the company makes a profit. It
is a profitable engagement for both, as the company raises capital and attracts
investors whereas the general public earns more money.

ICO Initial Coin offering is a crowd-funding method in the world of cryptocurrencies.


In an ICO, there is an exchange of ICO tokens or ICO coins. Whenever a new company
wishes to launch its own ICO coin or any new project (dApp), it releases an ICO in
exchange of any other cryptocurrencies like Bitcoin or Ether, in order to raise funds
for its own venture.

ICO Initial Coin Offering, unlike IPO, does not provide any authority or ownership of
the project to the investors investing in it. Rather it is a token sale, where ICO tokens
are offered in lieu of investor crypto tokens. These ICO tokens or ICO coins don’t
necessarily have to be ICO cryptocurrencies, but can be anything like a voting right, a
stake(utility tokens) etc. If the token is, indeed, an ICO cryptocurrency (security
tokens), it can be sold later at a price higher than the buying price, if the project
succeeds and makes a profit.

Please visit https://blockchainsimplified.com for hiring the best ICO developers.

How does an ICO Initial Coin Offering work?

https://medium.com/@blockchain_simplified/a-brief-introduction-to-ico-initial-coin-offering-7bd39a02e0ce#:~:text=An ICO Initial Coin Offering whitepap… 3/8


2/12/23, 2:34 AM A Brief Introduction to ICO Initial Coin Offering | by Blockchain Simplified | Medium

Img source : unifiedinfotech.net

-An ICO Initial Coin Offering can use a platform like Ethereum that allows
decentralized apps (dApps) to be built on its platform with the help of smart contracts.

-A company looking to raise funds for its new venture, builds a new dApp (project) on
the Ethereum platform.

-It releases an ICO with a stipulated amount of ICO tokens (in this case could be
Ether/any new token created by a dApp/utility tokens).

-Interested investors interact with the dApp to send their cryptocurrencies to the dApp
and receive ICO tokens, thereby raising funds for the project.

https://medium.com/@blockchain_simplified/a-brief-introduction-to-ico-initial-coin-offering-7bd39a02e0ce#:~:text=An ICO Initial Coin Offering whitepap… 4/8


2/12/23, 2:34 AM A Brief Introduction to ICO Initial Coin Offering | by Blockchain Simplified | Medium

Ofcourse, a lot of marketing strategies have to be designed to advertise about an ICO, to


create an awareness about it to the general public and invite them for investment. With
numerous frauds and scams happening around, it becomes the responsibility of the
investor/public to study the ICO Initial Coin Offering whitepaper thoroughly and invest
wisely.

ICO Initial Coin Offering Whitepaper


An ICO Initial Coin Offering whitepaper is a document which provides complete
information about the ICO project. Details like what is the purpose of the project, for
what does it require capital, what are the funds used for etc are defined in the
whitepaper.

It also contains details of the creators of the project, already existing investors, and so
on. The whitepaper can help potential investors take an informed decision whether to
invest or not based on the history, brand status and other important considerations.

Please visit https://blockchainsimplified.com for end to end ICO launch and


development, pre and post ICO services

ICO Initial Coin Offering — Advantages and Disadvantages

https://medium.com/@blockchain_simplified/a-brief-introduction-to-ico-initial-coin-offering-7bd39a02e0ce#:~:text=An ICO Initial Coin Offering whitepap… 5/8


2/12/23, 2:34 AM A Brief Introduction to ICO Initial Coin Offering | by Blockchain Simplified | Medium

Img source : blockgeeks.com

As the above image suggests, ICO Initial Coin Offerings have managed to raise funds in
millions in a very short span of time which is why more and more people are
expressing interest in ICO investments. Because there is a great deal of paperwork
involved in releasing an IPO, companies have started shifting their attention to ICOs
which involve only submitting a whitepaper for any new project to start crowdfunding.
In short, it is a beneficial agreement for both parties.

Albeit an excess of deskwork is a hassle, IPO provides a higher level of security. As ICO
lacks paperwork, it invites fraudsters and hackers to create inauthentic and counterfeit
whitepapers in order to make some quick money. Therefore, it is very important to do
thorough research on the project, outside the whitepaper, before investing, and choose
the ICO Initial Coin Offering wisely.

About Blockchain Simplified


Blockchain Simplified is a Top blockchain development company in Pune — India
which works on all major Blockchain requirements. We specialise in Blockchain, Web
and Mobile development (One Stop Shop for all technology development needs).
Our clientele includes Multiple Funded Start — Ups, SMBs and few MNCs few of which
are NASDAQ and NSE listed.

Some of our work includes,

Blockchain based-

hubrisone.com — is a Live app with 100,000+ downloads, All-in-One Cryptocurrency


current account. The entire development from scratch carried out by Blockchain
Simplified.

All in one Platform — Complete responsibility of entire software development of the


platform ,for a $1m funded blockchain start up, led by a team of serial entrepreneurs
and tech veterans in Silicon Valley.

Well funded Blockchain startup — Blockchain Simplified helped a $6m funded


American Blockchain startup to build the first blockchain protocol to leverage on-
chain smart contracts to manage distributed storage of application data off-chain.
https://medium.com/@blockchain_simplified/a-brief-introduction-to-ico-initial-coin-offering-7bd39a02e0ce#:~:text=An ICO Initial Coin Offering whitepap… 6/8
2/12/23, 2:34 AM A Brief Introduction to ICO Initial Coin Offering | by Blockchain Simplified | Medium

Multinational Bank — The company helped one of the top 3 ranking Multinational
Banks to integrate various cryptocurrencies into their banking application.

and more…

Non-Blockchain-

SHC — Built entire platform and app from scratch for a $1m funded startup led by a
team of Americans including PhD degree holders.

VMW — Developed app for a multi-national company providing mass factory-to-


factory shipment services. App is being used by 53 of the Fortune 500 companies such
as John Deere, Coca-Cola, Nissan.

and more…

Expertise

Blockchain Development : Bitcoin, Ethereum, Hyperledger, Corda, and more.


Mobile App Development : Android Native, iOS Native, React Native, Flutter, Xamarin.
UI/UX Design : Strategy, Planning, UI/UX Design, Wireframing, Visual Designs.
Web App Development : Node.JS, Angular, React.JS, PHP.
Backend Development : MongoDB, MySQL, AWS, Firebase.

Visit our official website https://blockchainsimplified.com/ for more information.

Blockchain ICO Ico Initial Coin Offering Icocoin Ico Token

About Help Terms Privacy

https://medium.com/@blockchain_simplified/a-brief-introduction-to-ico-initial-coin-offering-7bd39a02e0ce#:~:text=An ICO Initial Coin Offering whitepap… 7/8


2/12/23, 2:34 AM A Brief Introduction to ICO Initial Coin Offering | by Blockchain Simplified | Medium

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.com/@blockchain_simplified/a-brief-introduction-to-ico-initial-coin-offering-7bd39a02e0ce#:~:text=An ICO Initial Coin Offering whitepap… 8/8


2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

Chris McCann Follow

Oct 12, 2017 · 16 min read · Listen

Save

Guide to launching an Initial Coin Offering (ICO)


There has been a lot of confusion on what an initial coin offering is (ICO — also
sometimes called a token generation event or token sale), what kinds of companies an
ICO can be used for, and what goes into launching an ICO — from a project’s
perspective.

Disclaimer: This is not to be construed as investment or legal advice, but rather meant
as a template to show the process behind an ICO, and what a project’s stakeholders
(team, board, stakeholders) should think about when conducting an ICO.

Given the blockchain industry is relatively new, there isn’t a whole lot of information
on the topic (from a project’s perspective), and with each new ICO, teams are learning
best practices on what to do and what not to do. Below is a guide of all of the
information we collected about the ICO process, with input from people who
experienced the process first hand.

A big thank you to Linda Xie, Ankur Nandwani, and Kim Cellere for contributing and
reviewing this post.

Contents
1. Pre-Planning

2. Planning (Token, Whitepaper, Website, Communication, etc)

3. Before the ICO

https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 1/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

4. After the ICO

5. Running the project post-ICO.

Pre-planning
The biggest two questions you need to think about first are:

1. What is the purpose of the token?

2. Are you sure you want to do an ICO?

Token

What is the purpose of the token?

What function or utility does it perform?

Is the token absolutely necessary?

Why does your project need to be on the blockchain?

Can you describe a viable economic model behind it?

If your application doesn’t need to be built on top of a blockchain protocol, you should
think hard before moving forward. For example, the computational costs of building
an application on top of Ethereum is much more expensive than something like AWS.
You need to have a strong reason for why you are building a decentralized application
vs. a centralized application.

If you are unsure whether your application should be built on the blockchain or not,
you should do more research and spend more time learning about Bitcoin and
Ethereum. Building a decentralized application is fundamentally different than an
application using client-server architecture, and you’ll need to fully understand the
components of a blockchain and what can be built on top of this new architecture.

ICO

An ICO is fundamentally different than raising money through VC’s or other traditional
means.
https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 2/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

On one-hand, you are selling future usage of your platform (not giving up equity). On
the other-hand, you are becoming a public company on day one. You’ll have a huge
community you’ll need to manage post-ICO, and you need to make sure you want to
deal with this burden beforehand.

Here are a few things to keep in mind while thinking through whether your project
should do an ICO in the first place:

Everything you do and all the actions you take will be reflected in the price of the
token.

Your team will get bombarded non-stop, multiple times a day, with questions about
the price of your token.

You’ll need to be a international company from day one.

All of your internal team discussions will likely be pushed publicly.

There will be great stress in trying to build things that are long-term valuable vs.
short-term valuable.

If your product isn’t open sourced already, there will be a huge backlash to become
completely open sourced. There is a strong expectation that many blockchain
projects are open-sourced projects.

In general, cryptocurrency projects are way more public/transparent than typical


startups, or even traditional public companies.

In general, good blockchain projects look and function much more like open-
sourced software projects vs. traditional tech businesses. You and your team will
have to decide both whether your application makes sense to be built on a
blockchain + you want to operate as a transparent and open company.

Planning
Once you are ready and committed to doing an ICO, the core components in planning
are deciding on the offering, whitepaper, token design, legal, precautions against the
inevitable hackers, and being prepared for communication (website, slack, social,
press, interviews, etc).

https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 3/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

Offering

1. The most important question is: How much do you want to raise? & Why?

2. The second most important question is: What do you want to accomplish with the
particular distribution method you are choosing?

Considerations:

For your ICO — Are you trying to raise the most amount of money? Are you trying
to build a broad base of supporters? Are you trying to target a specific profile of
potential users? Are you trying to incentivize developers to build on top of your
platform? etc.

Other questions to think about

Allocation — What % are you giving to your team, investors, partners, reserving for
the ecosystem, reserving for the company/foundation?

Where will the money that you raise go to? You should have an annual budget for
the next 5 years.

Do you want a cap? If so what cap will you set? This depends on the amount you are
targeting to raise (see the first question).

Do you want to do a pre-sale?

Depending on the goals of your raise, a pre-sale can be used as both social proof +
getting tokens to the people who you most want to align in your ecosystem. The
downside of a pre-sale is it does favor certain people/groups over the participants
in the general crowdsale.

If you are doing a pre-sale, you should look into building a specific reservation
contract for the pre-sale to reserve a specific amount of allocation for each of the
pre-sale buyers and being transparent about who participated in the pre-sale and at
what price.

If you do decide to do a pre-sale, you’ll also need to think about what % of


allocation is distributed in the pre-sale in relation to the % you are selling in the

https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 4/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

crowdsale.

For the ICO itself

What currencies will you accept? (BTC, ETH, anything else?)

Do you want to do a pre-registration? (It’s becoming more common for crowdsales


to do some form of “Know your Customer” (KYC) for people who want to
participate)

Do you want to do the KYC process yourself or use a service like Civic?

Depending on your goals, do you want to split an even number of tokens for all
registrants or via first come first serve? With first come first serve, you run the risk
of having a small number of people buying up the majority of your tokens.

Will you be offering rewards for getting in early? Tiered pricing?

How long will your offering be for? (1 day, 3 days, a week, etc).

Will you be geo-fencing? (excluding specific countries from participating e.g.


sanctioned countries — seeing more projects exclude both US and Chinese
investors)

Will the tokens be released right after the token sale is complete? If not, when?

Will you allow funds/institutional investors to invest or only individuals?

In general, you want to have a well thought out and crafted offer in which all of the
information is presented to the person looking to participate in your ICO. The worst
offenders are projects which obfuscate key information (for ex. Hidden hard caps, or
not being transparent about the token allocation), and projects that change terms mid-
fundraise.

Doing either of these things might give you more funding in the short-term but will
seriously deteriorate your reputational capital in the long-term.

Whitepaper

https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 5/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

The whitepaper is where everything above comes together and is synthesized in


one key document. The whitepaper should cover all of the inner workings of your
application, how the whole system works, and how the token will be used within
the system.

Ideally your whitepaper would include all of the technical information about your
project, all of the token related information, and all of the relevant information
about your team.

This one document should give a prospective contributor a full picture of your
application and give them enough information to make an informed decision.

Technical whitepapers are hard and can easily take 200+ hours of work from the
whole team in a very short period of time. This is also the one document where
your team has to take ownership in creating this document, and the bulk of it
cannot be outsourced — editors can help clean it up, but your team needs to write
the bulk of the document.

Once you complete your whitepaper, I would highly encourage you to get detailed
feedback from respected figures in the crypto space and field you are working in, as
well as the core demographic you are targeting for your ICO — and incorporate
relevant changes before proceeding.

Legal

You’ll need a reputable law firm who has experience with incorporating blockchain
companies/foundations and running an ICO process — to advise you on your
process.

The biggest legal question you’ll need to answer is: Is the token you are offering
during the ICO a security or not?

What do you need to do to alleviate the concerns that the token may be a security?

Other legal considerations:

Will you be using a SAFT?

https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 6/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

Are you geo-fencing the offering?

Are you setting up a foundation to be a steward of the token?

This guide doesn’t contain any legal advice so be sure to talk to a lawyer who has been
through this process before.

Communication
In general, the communication strategy for your team will encompass of all of the
channels you will use to communicate about your project (website, whitepaper, slack,
social, etc). All of your channels need to be in sync, your whole team needs to be on
deck, and you need to respond to people on time.

It’s a huge task, and here are some of the key components:

Website, which includes:

Landing page for the crowdsale (separate from your main product page if you have
one already)

In general well designed pages do better in ICOs

Examples of landing pages to look at: http://filecoin.io/ https://district0x.io/ &


https://0xproject.com/

Whitepaper (See the whitepaper section above)

Team — Each team member needs a clear and updated LinkedIn profile because
potential contributors will be doing due diligence on each member of the team.

Advisors — Each advisor needs a clear and updated LinkedIn profile because
potential contributors will be doing due diligence on each member of the team.

A potential red flag to contributors is when there are more advisors than team
members.

Previous investors (If any)

Budget — Can include in whitepaper or as a separate section on the website. Need


to have clarity on where the funding is going towards, and how long it will be
https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 7/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

projected to last.
*Based on feedback — the budget can be included in the “business whitepaper” (some
teams elect to do two whitepapers one technical and one business oriented) or the website.
In general the budget should be clearly and transparently laid out somewhere with a
record of any changes made to it.

Roadmap — Can include in whitepaper or as a separate section on the website.


Example roadmap: https://blog.0xproject.com/0x-development-roadmap-
e82a2974efcc
*Based on feedback — the roadmap can be included in the “business whitepaper” (some
teams elect to do two whitepapers one technical and one business oriented) or the website.
In general the roadmap should be clearly and transparently laid out somewhere with a
record of any changes made to it.

Token allocation — Can include in whitepaper or as a separate section on the


website. Need to be transparent about what you are selling, terms of the ICO, and
terms of the pre-sale (if applicable). At a minimum, potential contributors need to
be able to calculate their effective market cap and understand what the circulating
& total supply will be.
*Based on feedback — the token allocation and sale information can be included in the
“business whitepaper” (some teams elect to do two whitepapers one technical and one
business oriented) or the website. In general the token allocation & sale information
should be clearly and transparently laid out somewhere (ideally both the pre-sale terms
and crowdsale terms) with a record of any changes made to it. Teams should be
transparent about this kind of info with no hidden surprises (ex. early pre-sale investors
got ridiculous bonuses etc)

Contribution details — To be released when the ICO/pre-ICO is ready. (Be careful as


this section could be hacked and the contribution address could be changed to a
hacker’s address. See the “security” section below.)

Links to social accounts (see social media section below)

Translations (see translation section below)

Github

https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 8/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

Need to have a clean, updated Github repository.

Example: https://github.com/0xProject.

Anything that has been built should be in a public repository so potential


contributors can review everything themselves beforehand.

Internal communication channel (Slack, Rocket Chat, Riot, etc)

Need to have a main communication channel and the team needs to be active
there.

Strongly consider hiring a community manager full-time to moderate the


communication channel you choose. This community manager can also act as the
bridge between the larger community and your internal team.

Need to setup the channels properly and moderate heavily. Examples channels:
Announcements, Developers, General, Random, Support, and Scam Alerts (to be
able to notify all users of potential scams)

The main channel that teams use right now is Slack but there are a few major cons
about Slack for crypto projects including: 1) Slack isn’t meant for large group
communication 2) It’s easy to hack the Slackbot and scam users 3) It’s easy to direct
message users and send out false announcements and contribution messages.
Read more about the downsides of slack for cryptocurrency projects here.

BitcoinTalk

Create a bitcointalk announcement of the token.

Example: https://bitcointalk.org/index.php?topic=2009966.0

Reddit

Own your own subreddit, brand it, and put in a few posts.

Example: https://www.reddit.com/r/district0x/

Newsletter
https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 9/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

Setup a newsletter on your website.

Email is the best way to directly share important info with potential contributors
on the day of the ICO.

Blog

Need to have a clean, updated blog ideally with a history of posts already.

Example: https://blog.district0x.io/ & https://blog.0xproject.com

Twitter

Need to have a clean updated Twitter account.

Example: https://twitter.com/0xproject

Advertising

Will you do paid advertising?

This is a personal decision your team needs to make. In general, the teams that
advertise look weaker.

Public relations

Press — Getting into both crypto publications + general news.

Interviews — Q&A, speaking engagements, tech talks, etc.

Events — Conferences, meetups, technical talks, dinners, online Q&A sessions, etc.

Podcasts — Epicenter, Unchained, Ether Review, etc.

Translation

Foreign language translations require real commitment.

Not only do you need to translate your whitepaper and website, but you’ll need to
translate all of the changes and announcements going forward. You might even
https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 10/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

need to hire someone to manage the translations for Q&A and inquiries on various
social channels.

If you do decide to translate — what languages will you be targeting?


(Chinese/English seem to be the most common.)

Community Management

Need to have extra people on staff ready to answer questions. On all channels, all
of the time.

The more successful your ICO is, the more community support you will need.

In general, you want to have a sustained presence on the web well before your ICO,
during your ICO, and well after your ICO. Potential contributors need to know that
your team is serious and in it for the long-term.

Smart contract / Blockchain / Wallets

What blockchain will you be using? ERC20 token?

Need to create the smart contract well in advance.

If you do a pre-sale and ICO, you’ll need two smart contracts plus additional
considerations if you are planning to do a reservation contract.

Security audit on the smart contract — You need to do this well ahead of time and
publish the results. Your entire fundraise is predicated on this smart contract so it
needs to be 100% correct. If it’s only 99% correct, you leave yourself open to
potential hackers.

To be extra safe, some projects now have multiple parties do their own
independent audits and publish all of the individual results.

Setup a bug bounty. Example: https://blog.0xproject.com/announcing-the-0x-


protocol-bug-bounty-b0559d2738c

Need to setup the wallet you will receive the ICO payments. The safest options are
hardware wallets or even multi-sig hardware options.

https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 11/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

Depending on what currency you accept, you might need more than one setup.

General security tips

This is not an exhaustive list by any means. If you are worried you should consult with
a security engineer who has been through the ICO process before.

Buy all of the website domains that look like yours, and all of the various TLD
variations of your name.

Hackers will try to re-create your landing page with a domain name that is similar
to yours, using their own address instead of yours. You need to be on the lookout
for any potential scam leading up the ICO and even after the ICO.

Register all of the social media accounts of all of the names that look like yours.

Similar to a website, hackers will also try to copy and spoof your social media
accounts and point them to a different landing page than yours. You’d need to be on
the lookout for this even after your crowdsale is over. One move scammers try to
do is “extending your crowdsale” and tricking potential supporters.

Setup cloudflare on your landing page.

Your website is a huge vulnerability. Be sure to internally setup two-factor


authentication to make changes to your website and monitor your site extensively.

Restrict the ability to change/commit to your page/github/social media/everything.


Have two factor auth setup on everything — even for your own internal team.

Turn off the Slack API. Slack isn’t set up for public groups that are raising funds.
There are so many scam attempts involving direct Slackbot messages which
admins can’t turn off and a lot of people fall for — despite all of the warnings. Even
though Slack is the default communication channel, I would consider using
another method of public communication or at least heavily control the inflow
leading up to the token sale.

Tell people to bookmark your site, don’t click on links.

https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 12/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

Don’t release your wallet public address until the day of the ICO (Release
simultaneously on all of your communication channels at once).

Remind people NOT to send in their contributions from exchanges like Coinbase.
Needs to be from a wallet they control (e.g. Metamask).

Before the ICO


Registration — If you are doing a registration system based ICO, release all of the
details and have people register beforehand. Example:
https://blog.0xproject.com/0x-token-sale-and-registration-details-75d84af11c60

Create a tutorial for the registration. Example: https://blog.0xproject.com/tutorials-


for-the-0x-token-sale-registration-766064955d12

Release a tutorial video and tutorial blog post on how to participate.

Create explainer videos to show how to purchase tokens. You need at least a semi-
professional 2–3 minute video with professional voice talent. Set this to private and
don’t release it till the day of the ICO. Example: https://blog.0xproject.com/zrx-
token-sale-purchase-tutorial-612c2ffe1e0d

Watch out for all potential hackers. Example: https://blog.0xproject.com/a-note-on-


scams-and-phishing-attempts-e2d72577a470

Write blog posts about every step of the process.

Livestream video Q&A

Community management x100, be ready — you will get an enormous amount of


questions leading up to the ICO.

Day of the ICO


Community management x1000, be ready. On the day of and the days leading up to
your ICO, the whole team is basically going to need to be on call 24/7.

Watch out for all attack vectors — shut down Slack if you need to.

https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 13/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

Remind people to NOT send in their contributions from an exchange, they need to
send it in from a wallet in which they control the private keys.

Keep sharing the tutorial videos you have created for how to participate. Limit the
sources of truth to one place where people find the information they need to
contribute.

Livestream at the completion of the ICO.

After the ICO


After the ICO the top two questions you will get are:

1. Where are my tokens?

2. What exchange are you going to be listed on?

Where are my tokens?

This is easily the number one question. Create a tutorial video (for all
combinations of wallets) and post it to all of your channels.

For the people who sent their contribution from an exchange, you’ll need to
respond back to them. Unfortunately their contribution is most likely gone
because they needed to send their contribution from a wallet that they controlled.

What exchange are you going to be listed on? When?

Most exchanges have an application page, if you wish to be listed on them, start
building out these relationships early.

At the same time, various exchanges will list your token for sale regardless of
whether you want to or not. For example: EtherDelta is a peer-to-peer exchange,
where anyone can offer any tokens or currencies for sale without your permission.

Write a blog post afterwards. Example: https://blog.0xproject.com/analyzing-the-


zrx-token-sale-a94b8642c78e

Give an update shortly after your ICO is completed. The worst case is to not
communicate at all and look like you took the ICO money and ran, don’t do this.
https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 14/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

Running the project


Constant communication — Now that you have a community of 1,000’s of people (if
not more) with their own money invested in your project, you will be bombarded
daily with questions. The blessing and curse of a community that really cares, is
now you have very high expectations to live up to.

Fiscal policy

Fiscal policy is the buying, spending, freezing, discounting, and burning of tokens.
If you retain a lot of tokens in the treasury, people will wonder when those will
flood the market. If you pay people in tokens with no vesting, they can dump them.
If you pay in locked-up tokens, you will also have to supplement those with some
cash. All of this requires clear communication, so people know what’s coming.

In addition, how the tokens are taxed for the team, advisors, investors, etc. need to
be communicated early on. You need to think about compensation plans for
employees and advisors early on.

Moreover, if large institutional buyers participated in your pre-sale, there is a large


risk they will dump a large portion of their holdings depending on how well the
ICO goes. If you do allow institutional investors, you need to decide if you will
enforce lockup periods for them or not. Above all, the most important thing is you
need to be transparent on what is going on.

Monetary policy

Monetary policy is: How many tokens there are, how divisible they are, and the
inflation/deflation policy you have set. Need to be clear and transparent with the
policy you set, and if you ever make any changes to it.

Money management.

Once you raise your funding through an ICO, you’ll need to decide how much of
your contributions cash out into fiat, and how much to stay in crypto (if any). You
should decide this before you complete the ICO.

You should also start the conversations with banks early on so you don’t run into
issues when converting funds from the token sale to fiat or wiring funds for
https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 15/16
2/12/23, 2:36 AM Guide to launching an Initial Coin Offering (ICO) | by Chris McCann | Medium

company expenses, taxes, etc.

Following all of these won’t make an ICO successful, but hopefully it shares better
insight on the process as a whole from the perspective of the project team owners.

Fundraising through an ICO vs. fundraising through equity isn’t any easier, it’s just
different. As a team you really want to make sure that a token sale is the best thing for
your company because if you do an ICO for the wrong reasons, you’ll be stuck with the
consequences for a very long time.

Blockchain ICO Cryptocurrency Ethereum Bitcoin

Open in app Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/@mccannatron/guide-to-launching-an-initial-coin-offering-ico-94587af2c8d5 16/16
2/12/23, 2:39 AM What are the differences between an IPO and an ICO? | by Napoleon Group™ | NapoleonX.ai | Medium

Published in NapoleonX.ai

Napoleon Group™ Follow

Jan 16, 2018 · 3 min read · Listen

Save

What are the differences between an IPO and an


ICO?
You heard a lot about ICO these last weeks ? Take a look into these new financing
strategies that startups around the world are adapting to finance related blockchain
projects.

An ICO (Initial Coin Offering) is distinctive from an IPO (Initial Public Offering), far
from Wall Street, ICO’s tokens are now what stocks are for the exchange market.

What is behind an ICO ?


ICO are related to the blockchain technology, it’s a new way for companies to raise
capital and develop projects around decentralized applications. Early investors are
thanks with bounty programs, free tokens with referral programs and gifts for every
inscriptions.

This makes ICOs viral, shareable and funded. Behind money that is put into every new
project, ICO’s makers release a share of their total supply in order to reward
contributors for helping them getting funded.

Usually contributions can be done with Bitcoin (BTC), Ethereum (ETH) or fiat money
and there are minimums in order to maintain a substantial amount of participants for
the soft cap and hard cap that are freely set by the companies.

https://medium.com/napoleonx-ai/what-are-the-differences-between-an-ipo-and-an-ico-4bd5ca89215a 1/4
2/12/23, 2:39 AM What are the differences between an IPO and an ICO? | by Napoleon Group™ | NapoleonX.ai | Medium

Since Ethereum is rising to the moon, the ecosystem of blockchain technology is


gravitating around new payment methods and so many people are now considering
ETH before Bitcoin and other coins.

What major differences between ICO and IPO ?


As we underlined it before, ICO is the creation of digital tokens on a blockchain that is
distributed through public ledger. An IPO, is the distribution of shareholdings to the
public through investment banks that are known as underwriters.

Making an IPO isn’t given to every businesses, only established private companies that
I’ve been operating for a while are allowed to carry out IPOs. Therefore, even projects
with great ambitions can’t access to IPOs, it’s a path that need years of activity,
resources and well-established entities.

Most of the companies that are doing ICOs don’t even have a product to present to the
public, some of them have proof of concept, others have proof-of-stake. Minimum
Viable Product (MVP) is reduced to documents like whitepapers — goldpapers and
blackpapers — , partnerships and media relations.

https://medium.com/napoleonx-ai/what-are-the-differences-between-an-ipo-and-an-ico-4bd5ca89215a 2/4
2/12/23, 2:39 AM What are the differences between an IPO and an ICO? | by Napoleon Group™ | NapoleonX.ai | Medium

In terms of returns, IPOs offer dividends from company profit. ICOs offer tokens at a
price that will rise thanks to the trust put into the project by the public. It’s a promise
that is done by the team, it’s difficult to secure and predict the future.

The regulatory environment is definitely different. Indeed, before a private company


runs an IPO, it’s an obligation to make applications to relevant authorities and get
authorization. On the other hand, ICOs are out of the line, decentralized platforms are
above international borders, this makes it harder to create a clear regulatory system.

The true difference between IPO and ICO is that, IPOs work well when it’s centralized
and fully control by a corporation. ICOs work well when it’s open-source and there is
no central authority.

Blockchain ICO Cryptocurrency Investing IPO

Open in app Sign up Sign In

Sign up for NPX Communication end of december


By NapoleonX.ai Search Medium

(Compliance mark up) Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

https://medium.com/napoleonx-ai/what-are-the-differences-between-an-ipo-and-an-ico-4bd5ca89215a 3/4
2/12/23, 2:39 AM What are the differences between an IPO and an ICO? | by Napoleon Group™ | NapoleonX.ai | Medium

Get the Medium app

https://medium.com/napoleonx-ai/what-are-the-differences-between-an-ipo-and-an-ico-4bd5ca89215a 4/4
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

BangBit Technologies Follow

Dec 28, 2018 · 26 min read · Listen

Save

ICO vs IPO? How ICO and STO powered by


Blockchain platform is transforming modern day
start-ups for crowdfunding — A Very Extensive
Look

We all know the magic behind the revolutionary Bitcoin is the blockchain technology.
But there are scores of other benefits that this disruptive technology offers. In our
previous blogs, we discussed how blockchain enables transaction of cryptocurrencies
through a decentralized environment. As there are no governing body or third parties
involved, the technology is highly transparent and trustworthy. In the past couple of

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 1/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

years, the technology has evolved significantly and today, blockchain is much more
than just cryptocurrencies.

In this blog, we are going to discuss perhaps the most persuasive offering of the
blockchain platform, which is ICO. If you are a fan of blockchain technology and
following the industry trends, you must have heard about ICO. Before we dig into it for
details, let’s first tell you about ICO.

What is ICO?

“It’s like penny stocks but with less regulation.” — Jeff Garzik

Companies raise funds for various business purposes like acquisitions, expansion,
resource hiring, etc. This is usually done via Initial Public Offering (IPO), where a
company offer its shares for the public to purchase. This was an expensive affair as you
have to utilize capital markets, which small and medium scale companies couldn’t
afford. Powered by blockchain technology, ICO (Initial Coin Offering) was introduced
as a fund-raising mechanism in which new projects offer their underlying crypto
tokens in exchange for Bitcoin and Ether. ICO promise quick liquidity, immutable
contract guarantees and most of all — they democratize access to investment capital.

After getting a lot of success, ICO witnessed increasing adoption among various
companies who started developing ICO and use it instead of utilizing their capital
markets. Notable companies like Telegram and Kakao have raised funds offering ICO
instead of IPO. With a substantial piece of their cumulative money being raised in 2017
alone, ICOs have been able to raise more than $2.3 billion in funds since their
inception. Rather than offering shares to the market, ICOs offer ‘tokens’ for the public
to buy. Few of these tokens can be bought using fiat, while others accept payment via
cryptocurrency. Before learning more about tokens, let’s first discuss the
characteristics of ICO and how it is different from IPO.

Strategy

The strategy behind developing ICO is to raise funds for a project to enter the market.
ICO is usually performed by start-ups. On the other side, IPO is performed at a bigger
scale when a firm is finally stable and wants to expand with the help of the public.

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 2/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

Legal Aspect

ICOs are not limited to any legal document. They have a resource paper (usually white
paper) where all the project information, it’s purpose, execution plan and possible
results are explained. However, ICOs are not bound to create a white paper. On the
other hand, IPOs are heavily legal bound. They must create a legal document called a
prospectus. This is kind of a legal declaration which has to include various key
information regarding the company.

Eligibility

To offer an IPO, a company require certain eligibility criteria which involve highly
stable financial track records. But in the case of ICO, companies do not require any
regulatory framework.

Duration

IPOs need to undergo a long legal process before being offered (usually take up to 6
months time). But the ICO process is much shorter and less complicated. A company
can start with the crowdsale after issuing white paper and a smart contract. (take up to
1 month). The length of the crowdsale can be dependent on reaching the maximum
hard cap, or a fixed sale duration, which usually lasts a month.

Target

IPOs usually target institutional investors such as banks. There is a small part of the
entire process which is for retail investors. But ICOs are open for anyone. All you need
is a currency in the form of Bitcoin or Ether which you can convert into a token of the
particular ICO.

Purpose

IPOs purpose is to collect dividends while ICO’s promote adoption of the company and
its associated services/platform, meaning the investors will receive the project’s utility
token, stored in their personal crypto-wallet to avail the products or services of the
company.

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 3/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

Ownership

IPO holders have a decent volume of ownership and control over the company. While
owning ICO tokens does not mean you have ownership or control over the project or
the company. However, it offers owners governing rights on the platform as well as
access to that token’s utility. An ICO investor can reap future benefits in a number of
ways. This depends on the design and utility strategy of the coin with a blend of the
project goal.

ICO and IPO sound similar, but they are completely different in nature. Both have their
own set of pros and cons, but in the modern business era where companies want to
keep more control on their business while attracting more investors, they are more
inclined towards ICOs because of it’s significant benefits.

Let’s run through the key advantages of ICO for which it is attracting many potential
investors.

1. Lesser transaction costs

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 4/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

As transactions in an ICO happens in cryptocurrencies, the cost is always lesser. While


trading directly in between individuals it is free, and when trading on a centralized
crypto exchange, the cost will be merely around 0.1 to 0.3%. Smart contracts eliminate
intermediaries, which in turn cuts down costs of service delivery. And the
administrative costs of buying and selling are zero. On the other hand, transacting in
stocks are highly expensive including a hefty intermediary charges.

2. 24*7 trading options

Cryptocurrency trading exchanges operate 24*7. This means you can purchase ICOs
whenever you want. While stock exchanges opened for a limited period of time.

3. Transparency

The transaction in cryptocurrency is highly transparent and can be seen by anyone.


This reduces the error percentage and eliminates any kind of dispute. Transparency is
one of the most compelling benefits of an ICO.

4. Easy to kick-start funding

A small company or a start-up firm can use ICO to kick-start funding quickly without
much hassle. As the process is less complicated and doesn’t require any legal
document, this is easier for small companies. Anyone can get funding using ICOs.

5. Fungible

ICOs are highly fungible, movable and sellable assets. You can sell your ICO to
whomsoever you want.

6. Quicker settlement

Cryptocurrency transfers settle in minutes. In contrast, stock exchanges typically


settle in a few days. This allows both ICO issuers and investors quickly settle their
transactions.

7. Zero regulation

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 5/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

As cryptocurrencies don’t have any regulatory bodies, ICO transactions and exchange
process is not bound by any governing body. This drives more empowerment and
accessibility.

8. Cross-border transactions

ICOs are cross-border transactions — subject to local regulatory restrictions.


Blockchain technologies can be accessed by any investor irrespective of their
geographical presence. This doesn’t include any additional cost. However, in the case
of a stock exchange an overseas exchange costs higher.

9. Flexibility

ICO tokens like Ethereum ERC-20 are based on standard protocols and can be listed on
a number of crypto exchanges seamlessly. This can be transferred between different
exchanges and personal crypto wallets without any additional costs.

Earlier in this blog, we mentioned that ICOs offer tokens instead of shares to the
market. Now let’s learn little more about token and how it is being used in ICO.

What is a Token?

A token is an asset (unit of value) issued by a company after launching an ICO. An


investor gets tokens in exchange for his investment in an ICO, just like we get stocks in
exchange in IPO. There are usually two types of tokens in ICO;

Utility Tokens

Utility tokens are basically user tokens or app coins. We can use utility tokens to avail
the products or services of the company. So, utility tokens are not built to be an
investment. Any start-up can create utility tokens and sell digital coupons for their
services or products. Utility tokens are not intended to give their holders the ability to
control how decisions are made in a company. They merely enable users to interact
with a company’s services.

A perfect example of a utility token would be the underlying POE token. Po.et is a
platform that aims to decentralize the creative sector by providing a way for content

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 6/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

creators to maintain ownership of their content (through Ethereum-based smart


contracts) throughout the duration of its digital life and monetizing content in a safe,
controlled way. This Ethereum ERC-20 token, aims to bootstrap the network by
attracting early users and contributors of content to the platform, to raise funds for the
continued scaling and development of the platform, as well as to provide a mechanism
that incentives and rewards early adopters of the platform. Other examples for popular
utility tokens are Sia token which enables trust-less decentralized storage, Status
Network Token (SNT), etc.

Security Tokens / STO

On the other hand, security tokens offering (STO) are like shares, selling participation
in the fund through a liquid digital currency offering. The value of a security token can
be derived from an external asset which can be traded. These tokens are subject to
federal laws that govern securities. If you fail to comply with these regulations, this
could result in unwanted consequences including financial penalties and also
derailment of the development of a project. However, if a startup abides all the
regulatory requirements, security tokens can offer a huge array of advantages. You can
offer tokens as a digital representation of shares and provide investors with an array of
financial rights, which include; equity, voting rights, dividends, buy-back rights and
many others that utility tokens could not offer.

As above stated, companies issuing securities have to abide by essential anti-money


laundering (AML) and know-your-customer (KYC) requirements, which are not only
costly but also time-consuming. Most upcoming blockchain startups have now realized
the importance of complying with the regulations, and several SEC (U.S. Securities and
Exchange Commission-compliant) security tokens have been issued. Examples of such
tokens include; Polymath, Corl, and tZERO.

While regulation on these types of securities remains beneficial for participants, but
on the other hand more such regulations could limit the capabilities of these projects.
It removes decentralization — when you file paperwork with any authority, you are
removing your decentralization. The authority has control over everything you do, as a
company, as an individual and as a project. It has to be done in line with the laws and
rules of that country.

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 7/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

This eventually breaks the spirit of DAO (Decentralized


Autonomous Organization) and token economics.
Thus, readers must understand that there is difference
between tokenized assets of a decentralized
application and STO. The merge between the IPO and
the ICO is the birth of STO.
Security tokens bridge the gap between the traditional financial sector and the
blockchain framework; it’s one of the reasons banks have initiated the integrated
Blockchain frameworks in their system. Issuing security tokens allows investors to
raise funds through a thoroughly regulated digital share of its equity, asset or part of
the revenue. This way STO targets the institutional investors as well such as banks,
venture capital firms, etc. If you are creating a security token, you must know the
importance of the Howey Test. The Howey Test was a precedent from a 1946 Supreme
Court case. The ruling gave the SEC guidelines as to what could be considered a
security. So, make sure your coin resemble one.

Security tokens also represent shares in physical assets such as gold or oil. In these
situations, the purpose of the blockchain platform is to provide simple trading
environment for all participants. For example, Dubai based OneGram uses blockchain
technology to create ICO, where each coin is backed by one gram of gold at launch.

To bring all under the roof of cryptocurrencies and token world, it’s not bad to add the
below classifications too to educate the readers.

Equity Token

The key difference between Security Token and Equity Token is that in the security
token, an asset like real estate, gold, etc. are used as collateral. However, in the case of
Equity tokens, the shares of the company are diluted into tokens.

Consensus Token

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 8/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

The first type to appear, and used by Bitcoin and Ethereum is the “consensus token”.
This token is given out as a reward for ensuring the network consensus either via PoW
(Cryptomining) or PoS voting. But, we refer to these types of tokens as
cryptocurrencies in general. Also every other cryptocurrency that followed the first
cryptocurrency Bitcoin is called an altcoin (alternative coin). Thus altcoins refers to all
the tokens and all cryptocurrencies other than Bitcoin.

Stablecoins

Stablecoins are cryptocurrencies designed to minimize the effects of price volatility,


thus they seek to function as a store of value and a unit of account. To minimize
volatility the value of a stablecoin can be pegged to a currency, or to exchange traded
commodities. There are Fiat backed stablecoins and Cryptocurrency backed
stablecoins. Cryptocurrency backed stablecoins are issued with cryptocurrencies as
collateral, which is conceptually similar to fiat backed stablecoins. However, the
significant difference between the two designs is that while fiat collateralization
typically happens off the blockchain, the cryptocurrency or crypto asset used to back
this type of stablecoins is done on the blockchain, using smart contracts in a more
decentralized fashion. MakerDAO is the first fully-decentralized stablecoin on
Ethereum.

How to create an ICO?

“We need tokens to use, not just to keep in wallets. If we do not dive fully into Crypto and use
the Blockchain as a way to enhance our lives and the world around us, instead of just
collecting coins hoping for a Bull market, then our greed will have killed the greatest
opportunity yet offered to mankind.” — John McAfee

As you now know what an ICO is and the types of ICO tokens, you need to check if this
is applicable to your startup. You must be able to answer these questions before
creating your ICO;

Why do you need blockchain tokens in your startup?

What advantages does blockchain technology give your project?

What is the link your product with the blockchain technology?

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 9/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

Once you have figured out how to bring a token / blockchain system into your start-up
and able to present your product with a white paper and a website, you can start
looking at creating your ICO, the wallet and launching into the cryptocurrency
exchanges. Let’s look into the various ICO platforms that helps creating your ICO
tokens.

ICO Development Platforms

According to ICOWatchList’s data, more than 82% of projects choose to issue their
tokens on Ethereum. This figure is not going to change in the coming future, as the
platform currently offers the most convenient and easy to use service. Though
Ethereum is the most popular platform for conducting an ICO, but there are many
other options worth considering, depending on the type of project that is being built.
Let us look at these various platforms in blockchain those have many successful ICOs
held on them.

Ethereum

Ethereum is an open-source, public, blockchain-based distributed computing platform


and operating system featuring smart contract functionality. Ethereum provides a
decentralized virtual machine, the Ethereum Virtual Machine (EVM), which can
execute scripts using an international network of public nodes.

Ethereum’s ICO success credits to the ERC-20 token standard. These tokens are open
source and can represent any fungible tradable good: coins, loyalty points, gold
certificates, IOUs, in-game items, etc. They are universal that any exchange or wallet
service that supports Ethereum can very easily integrate any other ERC-20 tokens. Over
99% ICO tokens issued on top of the Ethereum implements this standard. ERC-223 is a
new proposal to solve issues with the current ERC-20 standard. This new standard
prevents token to be transferred to a contract that does not allow token to be
withdrawn. In ERC-20, if someone sends token into a contract that has not allowed
anyone to use it, the token will simply be locked and can never leave that contract.
Because of this, hundreds of thousands of dollars’ worth of ERC-20 token has been
locked up. ERC-223 merges the transfer functions between wallets and contracts into
one single function ‘transfer’, which can also save transaction fees in terms of gas.

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 10/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

ERC-223 is backwards compatible with ERC-20. ERC-223 is a proposal right now, not a
standard yet.

ERC-721 is a popular specification other than ERC-20. The goal of this proposal is to
create a non-fungible token. The biggest difference between ERC-721 and ERC-20 is
that, ERC-721 defines non-interchangeable tokens, which means that each token has
an independent ID, so the independence of ERC-721 can be used in the transaction of
assets and tracking. That is, in some cases we need to have unidentical tokens within
the same platform, and add some extra parameters and price them differently. Popular
blockchain games like CryptoKitties make use of non-fungible tokens on the Ethereum
blockchain. Each CryptoKitty is represented in the form of a non-fungible ERC-721
token. Other example like WePower platform which is supporting green energy
producers, and it’s tokens represent a certain amount of electricity. Each token has a
number of parameters, including even the type of the energy produced (for example,
solar or wind power). ERC-721 standard makes it easy to create marketplaces for
multiple non-fungible token types.

Other popular Ethereum token standard proposals to look are ERC-621, ERC-827, ERC-
1155. ERC is not a technology or program, It’s Ethereum General Request for
Comments (RFC). ERC provides developers with technical guidance for construction.
Developers can submit new ERC standard proposals to the Ethereum community by
submitting EIP (Ethereum Improvement Proposal). EIPs describe standards for the
Ethereum platform, including core protocol specifications, client APIs, and contract
standards.

Ethereum can process between 10 to 30 transaction per second (tps). They already
have many solutions in the works to upgrade the transaction speed like Plasma,
sharding and Truebit solutions to bring Ethereum to Visa-scale transaction capacity.
Ethereum also plans to switch from Proof-of-Work to Proof-of-Stake with the
introduction of Casper, a partial consensus mechanism combining proof-of-stake
algorithm research and Byzantine fault-tolerant consensus theory.

Ethereum has its own programming language, Solidity — similar to Javascript for
writing smart contract. Serpent, one of Ethereum’s earlier smart contracting languages
is no longer safe to use. While issuing tokens on Ethereum is relatively easy, you will
need to be proficient in Solidity to be able to fine-tune your ICO to specific purposes.
https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 11/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

web3.js is a collection of Javascript libraries which allow you to interact with a local or
remote Ethereum node, using a HTTP or IPC connection. MetaMask tool allows you to
run Ethereum dApps right in your browser. Truffle is a development environment,
testing framework and asset pipeline for Ethereum, aiming to make life as an
Ethereum developer easier. It is one of the most widely used IDEs in the Ethereum
community other than Remix — Solidity IDE. Thousands of ICOs held on Ethereum
blockchain. State of the ÐApps website have an extensive details about the ICOs held
on Ethereum.

Waves

Waves is an open blockchain platform that aims to make the process of launching,
distributing, and using tokens easier. Waves is a decentralized financial trading
platform written in Scala and built on its own blockchain with custom tokens being its
main feature. They enable decentralized crowdfunding as well as transferring, trading
and storing of fiat and digital currencies. Waves missions is to enable any business
with development prospects, regardless of its size and geographical location, to run the
ICO and raise funds for growth and development. The Waves blockchain can process
up to 190 tps.

Waves Platform encourages blockchain developers and businesses, to create their


project on top of the Waves blockchain through its public API and cutting-edge
technology programmed in Scala. Waves has almost 14000 ICOs registered. Top ICOs
that have already been held on Waves are Primalbase, Wagerr, PeerBanks, MobileGo,
and ZrCoin

NEO

NEO is a decentralized and distributed ledger protocol that digitalizes real-world assets
into digital ones, enabling registration, depository, transfer, trading, clearing and
settlement via a peer-to-peer network.

NEO uses a new consensus protocol called dBFT — Delegated Byzantine Fault
Tolerance. It’s a modification of the classic Proof-of-Stake (PoS) protocol where NEO
tokens holders can vote for delegates, known as bookkeepers, who maintain the
network for everyone. This way network can process around 1000 tps, as you don’t

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 12/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

need to wait for a large number of nodes to confirm a transaction. NEO is used like a
share of the company that can be used to vote and mine. Holding NEO gives dividend
paid in GAS. GAS is a coin that is used to run all smart economy platforms created on
NEO. NEO can transact at 1000 tps with a maximum of 10000 tps.

NEO uses e-contracts to keep record transfers of digital assets. Digital tokens generated
by e-contracts function as a general underlying data that could be used for recording
titles and assets like equities, creditor’s claims, securities, financial contracts, credit
points, bills and currencies, and can be applied for equity crowdfunding, equity
trading, employee stock ownership plans, peer-to-peer financing, loyalty programs,
private equity funds, supply-chain financing, etc. NEO supports multiple well-known
programming languages like C# , Java , Javascript and Python. NEO will never be a
truly decentralized network, as the majority of bookkeeping nodes are operated by the
NEO team.

NEO has more than 30 ICOs on its platform. Notable ICOs that were held on NEO
includes QLink ($19 millions), Red Pulse ($14.5 millions), Trinity ($20 millions), etc.

Stellar

Stellar is open-source, distributed payments infrastructure that connects banks,


payments systems, and people. Integrate to move money quickly, reliably, and at
almost no cost. The platform has its own decentralized exchange, so the tokens sold
during an ICO can start trading on day one. It is being marketed as cheaper and faster
than other platforms, with a 5 seconds median settlement time (compared to
Ethereum’s 3.5 minutes) and the cost of 100K transactions on the platform being a
mere 1 cent.

Stellar is an excellent choice for any ICO that does not require Turing-complete smart
contracts (unlike Ethereum, has the most expressive programming capabilities) and
can benefit from immediate creation of a secondary market. Developers can use
programming languages such as C++, Java , C#, Javascript, Go and Python. The
platform utilises the Stellar Consensus Protocol (SCP), which works through the use of
quorums, which are a set of nodes used to reach an agreement. Their extremely low
fees and fast transaction times makes them an ideal choice for any ICO project with a

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 13/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

lot of microtransactions. Mobius, the first ICO project on Stellar, has reported that they
are already capable of doing 1000 tps and scale to 2000 tps.

NEM

NEM’s blockchain platform was designed and coded from the ground up for scale and
speed. NEM’s permissioned private blockchain delivers industry-leading transaction
rates for internal ledgers. And its revolutionary consensus mechanismand the
Supernode program ensure that NEM’s open, public blockchain can grow without ever
compromising throughput or stability.

NEM Smart asset system helps you building a fintech system, tracking logistics, ICO,
document notarization, decentralized authentication, and much more. NEM platform
is capable of processing 4000 tps, which is one of the highest figures on the market.

NEM’s blockchain exposes its functionality through an API interface that can be used
with any programming language. The most notable ICOs held on the NEM platform
includes Dimcoin ($14 millions raised) and Loyalcoin ($10.9 millions).

Nxt

The Nxt blockchain provides a simple, robust and secure private blockchain solution to
tokenize any kind of assets an enterprise desires (e.g. shares, bonds, vouchers), which
do not require the implementation of complex smart contracts or complex web site
back-end and considerably reduces the security risks.

Nxt is coded in Java. Like NEM, Nxt offer a wide range of pre-built blockchain solutions
that anyone with little prior knowledge can implement. The Nxt blockchain can handle
up to 4.25 tps.

BitShares

BitShares 2.0 is an industrial-grade decentralized (DPoS) eco-system built for high-


performance financial smart contracts. BitShares is responsible for the crypto trading
pair concept. It’s also the first delegated Proof of Stake blockchain and uses
community-elected delegates for governance.

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 14/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

BitShares is a smart contract network that can host tokenized apps. Tokens are
exchangeable for BTS, which is then exchangeable for bitAssets, which are stablecoins
pegged to real-world markets. BitShares 2.0 is coded in C++. It’s a part of the Microsoft
Azure BaaS — Blockchain as a Service Package. It transacts at 3400 tps to theoretical
maximum of over 100000 tps. Its unmatched transaction speed and the use of
stablecoins allow for high transaction throughput decentralized exchanges,
remittance, POS systems to thrive within its ecosystem. OpenLedger — Decentralized
asset exchange built on BitShares platform.

Stratis

Stratis is a Blockchain-as-a-Service (BaaS) platform that allows companies to create


permission blockchain inside the enterprise in order to tokenize elements of their
business processes.

Blockchain platforms built on Stratis creates a sidechain that will act as its own
blockchain, while still being attached to the Stratis mainchain network. This relieves a
lot of congestion from the mainchain and allows each sidechain to act independently.
The contracts are written in C# language. The Stratis blockchain can process up to
20000 tps.

QTUM

Qtum is an open sourced public blockchain platform, leveraging the security of UTXO
while enabling multiple virtual machines including EVM and the revolutionary x86
VM. Qtum is PoS based and boasts a Decentralized Governance Protocol (DGP) which
allows specific blockchain settings to be modified by making use of smart contracts.
Currently, QTUM smart contracts have to be programmed in Ethereum’s Solidity.

Designed with stability, modularity and interoperability in mind, Qtum is the foremost
toolkit for building trusted decentralized applications, suited for real-world, business-
oriented use cases. Its hybrid nature, in combination with a first-of-its-kind PoS
consensus protocol, allow Qtum applications to be compatible with major blockchain
ecosystems, while providing native support for mobile devices and IoT appliances. The
Qtum network currently can process up to 60 tps.

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 15/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 16/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

ICO Platforms Comparison

Most of these above mentioned platforms are not just limited to create ICOs only,
rather they help to create your Blockchain dApps — Decentralized application that run
on a P2P network of computers rather than a single computer with trustless protocols
and where the application data are cryptographically stored in a decentralized open
ledger popularly called as Blockchain or Distributed Ledger. They also provide Smart
Contracts protocols that stores rules for negotiating the terms of an agreement,
automatically verifies fulfillment, and then executes the agreed terms. While
Ethereum still governs the market; EOS, Cardano, Tezos and many others are emerging
platforms for decentralized applications and smart contracts development.

As earlier mentioned, your ICO project should embrace at least one of the blockchain
technology features like decentralized application, P2P lending, micropayment, digital
identity, remittance, POS system, etc., And it should be using smart contracts to bring
transparent, and hassle-free way of digital asset movements by avoiding a middleman.
Thus, to make your token popular and encourage the investors to buy it during the ICO,
you need to use the token that is fully integrated into the company structure. The best
option is to use a token sold at the ICO as an integral part of your system or app
(dApps). ICOs developed using ERC-20 can use crypto wallets like Eidoo, imToken —
Ethereum & ERC-20 mobile light-wallet to avoid custom development and integration
of crypto wallets in their dApps when they are not required.

Auditing plays an important role in any business, but no more so perhaps than in
ICO/STO. Once your ICO and dDapp is ready, you should think of ICO/STO auditing.
You should bring reputable auditing companies with lawyers to audit and validate your
project to bring smartcontracts assurance, regulation compliance assurance, off-chain
components assurance using auditor nodes, KYC / AML assurance, pre and post ICO
regulatory support, etc., which lends your ICO an added element of legitimacy. For
example, Quantstamp audits, secures and drives the mainstream adoption of smart
contracts providing a permanent, publicly verifiable security record that lives forever
on Ethereum. And Zeppelin builds key infrastructure to develop and operate Ethereum
smart contract systems and helps conducting security audits of decentralized
applications.

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 17/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

Now that you have an idea of how ICOs and dApps are created with the help of these
development platforms available today, it’s time for to discuss about the ICO stages —
its launching strategies and methodologies, to the market and various easy-to-go
ICO/STO issuance and campaign platforms.

How To Launch An ICO?

ICO Stages

Pre-announcement

The first step is a so-called “pre-announcement”, in which the information of an ICO


project will be released in order to gain traction and create awareness in the
cryptocurrency community, forums, web boards, and so on. This will thus also be the
point at which the ICO’s website will be launched; usually, a one-page structure with
different elements all represented on the homepage is sufficient. Potential investors
will then look at the project’s whitepaper to assess the viability of a project. The
whitepaper should be a lengthy document that goes in proper depth about the problem
that the project is looking to solve, the solution to that problem as well as a detailed
description of their product, its architecture and its interaction with users. To add
credibility, the team’s background, token allocation and use of funds are also found in
the document.

Offering

It is important that the whitepaper provides a roadmap that has a clear at least five-
year vision for the business. The roadmap is typically presented as a chart, with a
https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 18/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

timeline showing various ICO’s activities from project development to launch, as well
as project future milestones. The roadmap should express a confident vision for future
development, without being overambitious. A roadmap without a long-term objective
could be inimical to the development of the project and thus, turns potential investors
away. It is also important for ICOs to explain their token’s utility, token lock-up period
for certain investors and any bounty or airdrop campaigns. Also the economics of the
project such as how much value want to raise, how many blockchain tokens to issue
are decided in this stage.

During the offering state, the following token sale details are provided:

Soft cap

Hard cap

Total Supply

Token Price

Accepted Payments

Restricted Countries/Age

PR & Marketing Campaign

One of the key success factors of any ICO is a proper marketing strategy. A good project
without a solid marketing campaign cannot gain the backing it deserves. Through a
good marketing campaign, an ICO project can attract attention from the community,
helping to put the project on the radar of potential investors. Successful marketing
campaigns for ICOs are based on a combination of traditional marketing and PR. It is
important to spread the news of your upcoming ICO far and wide: this can be done
through posts on cryptocurrency forums, but it can also take the form of a subscriber
button on your website, through social media channels (blogs, Telegram, Twitter,
Facebook, Reddit, BitcoinTalk, Github, Slack, etc). A project should hire an ICO
manager who knows which crypto community meetings and occasions you should be
present at.

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 19/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

ICO Airdrops are being widely used by most of the ICO projects these days. Airdrop
distributes free tokens to the entire crypto community. By executing airdrops, the team
behind an ICO project will attract people who may be interested in it or may not have
heard about it. In order to be eligible to receive airdropped tokens, you need to own
some coins that are based on the same blockchain on which the project is built. For
example, OmiseGo(OMG) Airdrop happened back in July 2017 for all Ethereum
holders. OMG is an Ethereum ERC-20 token. People who had held Ethereum then
would have seen OMG tokens deposited newly in their Ethereum wallet addresses. By
this way, airdrops helps ICO reaching the investors and attract them to look into your
project.

Token Sale

There can be many different stages of the token sale, including but not limited to a
private sale, pre-sale, the actual ICO and a general sale.

Some project owners choose to run a preliminary fundraising effort, called Token pre-
sale or pre-ICO. This is a sale event that takes place before the official token sales on
the exchanges. Usually the fundraising targets will be lower in this stage and most ICO
projects offer an early bird bonus, usually around 25% to 30%. Some even offer up to
100% bonus to encourage more investors on board. They are a good way to offset some
of the costs involved in organizing the actual ICO sale, which then follows relatively
soon after.

ICO projects should post information about the upcoming sale of tokens on special
calendars called Token Calenders. There are many resources on which the schedule of
an ICO is published: Coinschedule, TokenMarket.net, Cyber.fund, Icocountdown,
Coinist, etc.

ICO and STO Issuance and Campaign Platforms

There are various ICO end-to-end issuance platform available in the market that allows
anyone to build, audit, deploy and monetize ICOs easily. A one stop solution for your
ICO. These platforms focuses on three groups of cryptocurrency users including ICO
creators, funders, and promoters.

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 20/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

CoinFactory: ICO and STO launch platform with a post-token issuance community
and company management. It supports token issuance in four different
blockchains — Ethereum, Stellar, EOS and Tezos. CoinFactory comes will all
required marketing features to launch a successful ICO.

ICOBox: ICO/STO Service Provider. A Blockchain Growth Promoter and Business


Facilitator for companies seeking to sell their products via ICO/STO crowdsales.
Supports Ethereum ERC-20 protocol.

Coinlaunch: Free End-to-End ICO Platform based on Ethereum ERC-20 protocol.

KICKICO: is a blockchain-powered crowdfunding 2.0 platform. The KICKICO


supports three kinds of fundraising campaigns: ICO, crowdinvesting, and
crowdfunding.

Polymath: The securities token (STO) platform that facilitates the issuance and
distribution of legally compliant token-based securities. The Polymath platform
provides means to trade security tokens, authenticate investors, connect with legal
delegates, and access a developers’ marketplace. Poly, an Ethereum ERC-20 token,
powers the system and acts as the underlying economic unit that facilitates
authentication, legal, and developer services.

Securitize: A compliance platform for the primary issuance and lifecycle


management of digitized securities STO on the blockchain. Securitize is a full stack
technology & services platform with powerful features and specialized tools for
both investors and issuers. The Securitize platform allows users to manage their
digital securities from one convenient dashboard.

Harbor: Harbor is an all-in-one platform for tokenized (STO) commercial real


estate, investment funds, and more. It is an open-source platform that enables
traditional investment classes to migrate seamlessly onto the blockchain.

tZero: It is blockchain-focused subsidiary and trading platform that supports equity


tokens. The tZero product offering consists of brokerage services, electronic
private market place, digital brokerage, and Blockchain project development. The
platform integrates cryptographically secure distributed ledgers with existing

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 21/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

market processes to reduce settlement time and costs, increase transparency,


efficiency, and auditability.

Swarm Fund: Builds open infrastructure for digital securities. A fully decentralized
capital marketplace that democratizes investing.

Securrency: A global financial services technology infrastructure and product


company delivering access , compliance and security.

Getting ICO On An Exchange

Your token needs to be in demand, it has to be valuable and, most importantly, it needs
to get listed on at least one cryptocurrency exchange. Different exchanges will have
different requirements for tokens to be listed , but if your project offers something
unique and truly valuable to the cryptocurrency community, you shouldn’t have any
problems getting it in.

One of the easiest ways to get your token listed on exchanges like Poloniex, Binance,
etc., is to use the ICO listing service providers like Coinist — have a huge database of
exchange partners they work with to help get your token listed quickly. Platinum is one
another STO Listing service provider. With the help of such exchange listing service
providers you can get your token listed on the exchanges.

Risks Of Investing In ICOs

We now know that ICO’s function like a crowdsale, where people can offer support for
a company by purchasing their “token”, one that is required for the platform to
function or simply to be used within the platform by the end user. Every investment
holds some risk, that’s why they have potential to earn you money. ICOs are
particularly volatile in nature and you need to perform due diligence before you invest
a dime into an ICO. For example, there have been many ICOs that have failed because
the token being offered did not offer utility or security, and the company was unable to
achieve a growth in price. Most newly created tokens are utility tokens. All these
various startups, which don’t have a proper use case for utility tokens, decide to make
utility tokens instead of security token to avoid unwanted consequences for not
complying with the regulations and eventually fails.

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 22/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

ICO Regulations by Countries

IPOs are heavily regulated, where ICOs are not as they bypass the centralized,
regulated fundraising process required by banks or venture capitalists altogether.
There are many startups have taken the funds raised during their ICO, and
disappeared. Their projects get abandoned, and the investors have nothing to show for
their money but worthless tokens. That is the reason in China, ICOs are banned for all
businesses and individuals. And these Chinese ICOs that have completed their funding
cycles have been requested to refund any altcoins raised.

But with the birth of blockchain powered SEC regulated tokenized securities, the
smartest people in finance are waving goodbye to Wall Street’s security in search of
tokenized securities. Soon, STO will become so popular that traditional stock
exchanges and over-the-counter markets will be completely replaced over the next
decade.

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 23/24
2/12/23, 2:40 AM ICO vs IPO? How ICO and STO powered by Blockchain platform is transforming modern day start-ups for crowdfunding — A Very…

Final word

Although ICOs aren’t currently regulated, many governments are taking a closer look.
Still debates are going on whether cryptos to act as a security, commodity, or currency.
It’s only a matter of time before regulatory constraints are set-up to supervise the
industry. If 2017 was the year of ICO utility tokens, 2018 will be remembered for
blockchain powered SEC regulated tokenized securities (STO) to capitalize on the
trillion-dollar opportunity and looking to hedge ICOs increasingly volatile portfolios.
As a blockchain consulting and platform development company, BangBit can develop
tokens for your company to offer ICO (both utility and security tokens) and dApps. Our
blockchain experts have got the highest experience and expertise in developing
various tokens using multiple platforms for varied industries to issue ICO. Contact us
now for a free consulting session on blockchain and how to start your ICO journey.

Blockchain ICO Bitcoin Ethereum Cryptocurrency


Open in app Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/@BangBitTech/ico-vs-ipo-44e1da262459 24/24
2/12/23, 2:44 AM ETH 2.0, What is it?. Ethereum 2.0, also known as Serenity… | by pNetwork Team | pNetwork | Medium

Published in pNetwork

pNetwork Team Follow

Aug 4, 2022 · 5 min read · Listen

Save

ETH 2.0, What is it?

ETH 2.0

Ethereum 2.0, also known as Serenity, is a massive upgrade to the Ethereum


blockchain that will bring about many changes. These changes include sharding,
proof-of-stake, and moving EVM to eWASM. These upgrades are essential because they
will make Ethereum faster, more scalable, and more secure. This post will discuss why
Ethereum 2.0 is important and why it may affect you.

https://medium.com/pnetwork/eth-2-0-what-is-it-6104a86ff634#:~:text=Ethereum 2.0%2C also known as Serenity%2C is a massive upgrade,more scal… 1/6


2/12/23, 2:44 AM ETH 2.0, What is it?. Ethereum 2.0, also known as Serenity… | by pNetwork Team | pNetwork | Medium

Current Model

Ethereum’s current blockchain is based on the proof-of-work (PoW) consensus


algorithm. This means that miners compete against each other to validate blocks of
transactions and are rewarded with ETH for their efforts. While PoW is a secure and
tried-and-true consensus algorithm, it has some drawbacks. For one, it is very energy
intensive, as miners need to use powerful computers to solve complex mathematical
problems. Additionally, PoW is not very scalable, as the more transactions there are on
the blockchain, the slower it becomes.

Ethereum 2.0 and its features

Eth 2.0 will be launched in 3 phases:

Phase 0: Beacon Chain & PoS Framework

Phase 1: Sharding

Phase 2:The Merge

The upgrade will implement a new consensus algorithm called proof-of-stake (PoS).
With PoS, instead of miners competing against each other, they will stake their ETH to
validate blocks. This means that it will be less energy intensive. Additionally, Ethereum
plans to implement sharding, a way of partitioning the blockchain so that each node
only needs to process a portion of the transactions. This will further improve
scalability. Finally, Ethereum plans to upgrade its virtual machine (EVM) to eWASM.
This will allow for more efficient smart-contract execution and could potentially make
Ethereum’s blockchain even more secure.

Phase 0

Beacon Chain & PoS Framework

In December 2020, Phase 0 trial went live, touching on three main technological
advancements to the Ethereum Ecosystem. These are; the Beacon Chain, the PoS
consensus mechanism (aka Casper), and the rework of validator nodes.

So what is Beacon Chain?


https://medium.com/pnetwork/eth-2-0-what-is-it-6104a86ff634#:~:text=Ethereum 2.0%2C also known as Serenity%2C is a massive upgrade,more scal… 2/6
2/12/23, 2:44 AM ETH 2.0, What is it?. Ethereum 2.0, also known as Serenity… | by pNetwork Team | pNetwork | Medium

Think of the Beacon Chain as the Eye of Sauron, a tower built on top of a sea of data.
Instead of looking for hobbits, it is constantly validating, scanning, collecting votes,
penalizing malicious actors, and rewarding validators that correctly attest to blocks.

Beacon Chain is the constructor and coordinator of the new network. It is responsible
for creating new blocks, validating them, and handing our rewards to validators to
ensure that the network is secure, making it a core structure for ETH 2.0.

PoS Framework

Ethereum plans to move from a proof-of-work (POW) consensus algorithm to a proof-


of-stake (POS) algorithm. POW algorithms require miners to solve complex
mathematical puzzles to add new blocks of transactions to the blockchain. In contrast,
POS algorithms allow users to validate blocks of transactions in proportion to their
stake in the network. There are several advantages to moving to a POS algorithm:

1. It would be more energy-efficient, as POW algorithms require a lot of electricity to


run.

2. It would be more secure, as it would be harder for 51% of attacks (where one group
of miners try to control most of the network) to succeed.

3. It would be faster, as POS algorithms can confirm transactions faster than POW
algorithms.

4. It would be more decentralized, as POS algorithms do not give an advantage to


large mining pools.

Hurray for faster, more secure, and cheaper transactions!

Phase 1

Sharding

Sharding is a new feature that Ethereum 2.0 will introduce. It is an important part of
the Ethereum 2.0 roadmap as it will revolutionize the industry. Sharding is a technique
for splitting data into shards so that a different machine can process each shard. This

https://medium.com/pnetwork/eth-2-0-what-is-it-6104a86ff634#:~:text=Ethereum 2.0%2C also known as Serenity%2C is a massive upgrade,more scal… 3/6


2/12/23, 2:44 AM ETH 2.0, What is it?. Ethereum 2.0, also known as Serenity… | by pNetwork Team | pNetwork | Medium

allows for scalability by increasing the number of transactions processed at any given
time.

Sharding is important because it will allow Ethereum to scale to meet mainstream


users’ needs. The Ethereum network is currently limited to processing around 15
transactions per second. This is far too low to support mainstream applications.
Sharding will increase the number of transactions processed per second to hundreds
or even thousands. This will make Ethereum more competitive with traditional
payment processors such as Visa and Mastercard.

Sharding is also crucial because it enables more efficient data storage on the
blockchain. Today, the Ethereum blockchain stores all data on every node in the
network. This can lead to scalability problems as the blockchain grows. With sharding,
only a subset of data is stored on each node, which reduces the storage requirements
for nodes and allows for faster processing of transactions.

With this upgrade, Ethereum 2.0 will be able to spread the network load across 64
different shards making the network faster and more scalable.

Phase 2

The Merge aka “Docking”

Once phase 1 is complete, the plan is to merge or “dock” Eth 1.0 with the Beacon Chain
and its accompanying architecture of shard chains. Eth 1.0 will be one of the 64 shard
chains and will operate using the new PoS protocol. The Eth 1.0 shard will act as the
history of the current state of Ethereum onto the Beacon Chain, which will make the
transition smoother.

Let’s consider an analogy. Imagine Ethereum is a spaceship that isn’t quite ready for an
interstellar voyage. With the Beacon Chain, the community has built a new engine and
a hardened hull. After significant testing, it’s almost time to hot-swap the new engine
for the old mid-flight. This will merge the new, more efficient engine into the existing
ship, ready to put in some serious lightyears and take on the universe. — Taken from
ethereum.org

EVM to eWASM
https://medium.com/pnetwork/eth-2-0-what-is-it-6104a86ff634#:~:text=Ethereum 2.0%2C also known as Serenity%2C is a massive upgrade,more scal… 4/6
2/12/23, 2:44 AM ETH 2.0, What is it?. Ethereum 2.0, also known as Serenity… | by pNetwork Team | pNetwork | Medium

Ethereum is set to move from the Ethereum Virtual Machine (EVM) to Ethereum-
flavoured WebAssembly (eWASM). This will have numerous benefits for Ethereum
users and developers. eWASM is a more efficient instruction set, meaning that
Ethereum contracts will be cheaper to deploy and run. In addition, eWASM is designed
to be more developer-friendly, with better support for programming languages such as
Rust and C++. Ethereum’s move to eWASM will also make it more compatible with
other blockchains already using WASM, such as EOS and Polkadot. Ultimately, this will
make Ethereum a more attractive platform for developers and users.

How does ETH 2.0 affect pNetwork?

Ethereum 2.0 will affect pNetwork and projects currently on the Ethereum network in
a few ways.

First, it will provide a much faster and more efficient way to run contracts and
transactions on the network. This will make it easier for projects to use the Ethereum
network as a platform for their operations.

Second, Ethereum 2.0 will provide a more secure platform for running contracts and
transactions. This will make it less likely for projects to experience security breaches
or other issues on the network.

Finally, Ethereum 2.0 will help to promote interoperability between different


blockchain projects. This will make it easier for projects to work together and
exchange data and value seamlessly.

Conclusion

Overall, Ethereum’s upcoming upgrades are very exciting and have the potential to
make it the most dominant blockchain platform in the world. Ethereum’s current
proof-of-work consensus algorithm is not very scalable or efficient. Sharding and
proof-of-stake will allow Ethereum to scale to meet mainstream users’ needs. In
addition, eWASM will enable more efficient smart contract execution. These upgrades
are important and will make Ethereum faster, more scalable, and more secure.

https://medium.com/pnetwork/eth-2-0-what-is-it-6104a86ff634#:~:text=Ethereum 2.0%2C also known as Serenity%2C is a massive upgrade,more scal… 5/6


2/12/23, 2:44 AM ETH 2.0, What is it?. Ethereum 2.0, also known as Serenity… | by pNetwork Team | pNetwork | Medium

Cryptocurrency Blockchain Ethereum

About Help Terms Privacy

Get the Medium app


Open in app Sign up Sign In

Search Medium

https://medium.com/pnetwork/eth-2-0-what-is-it-6104a86ff634#:~:text=Ethereum 2.0%2C also known as Serenity%2C is a massive upgrade,more scal… 6/6


2/12/23, 2:49 AM A Comprehensive view of Ethereum 2.0 (Serenity) | by sheinix | The Startup | Medium

Published in The Startup

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

sheinix Follow

Nov 14, 2019 · 11 min read · · Listen

Save

A Comprehensive view of Ethereum 2.0 (Serenity)


You can find my original post for the bitprime blog here.

The Ethereum Network


Back in 2013, Vitalik Buterin, a Bitcoin programmer and publisher of the Bitcoin
magazine, published the Ethereum whitepaper. Ethereum aimed to apply Blockchain
technology beyond payments.

Ethereum is a general-purpose blockchain. Like many other Blockchains, it’s open-


source, public and has its own currency: Ether or ETH.

A general-purpose blockchain means there is a decentralised platform providing a


programming language that developers can use to create Smart Contracts. Smart
Contractsrun in each node of the network, making it possible to develop decentralised
applications called DApps. These DApps inherit the remarkable features of blockchain
technology, meaning they are tamper-proof, transparent, trustworthy and secure.

Ethereum Programming Language


Solidity is the name of the primary programming language on Ethereum created by Dr.
Gavin Wood. It is a high-level object-oriented programming language for developing

https://medium.com/swlh/a-comprehensive-view-of-ethereum-2-0-serenity-5865ad8b7c62 1/12
2/12/23, 2:49 AM A Comprehensive view of Ethereum 2.0 (Serenity) | by sheinix | The Startup | Medium

smart contracts and is heavily influenced by Python and JavaScript languages. This was
intentional so that developers would find it easy to jump straight into developing Smart
Contracts. Solidity is a “Turing complete” language, meaning it has all the capabilities
for developing complex use cases. In contrast, the Bitcoin programming language,
Scrypt, is “Turing incomplete” by design, so developers are restricted to what use cases
they can implement. Nowadays, Solidity is the most popular programming language
for Smart Contracts, and the one every developer should look into if he or she wants to
start developing Smart Contracts.

Vyper is another programming language created by the Ethereum team, and it runs on
the Ethereum Virtual Machine (“EVM”). It was designed to simplify the process of
writing Smart Contracts and, at the same time, making it simpler to read. One of the
critical differences with Solidity is that Vyper doesn’t include some of the object-
oriented capabilities, making Vyper more secure as there is less room for developers to
make mistakes and introduce bugs.

Gas & ETH Price


Gas is a unit of measure of how much it costs to execute a transaction on the Ethereum
network. Every time a smart contract runs a transaction, it consumes Gas. This gas
needs to be fed into the smart contract at the moment the transaction is run. The way
to pay the Gas is with ETH.

Issues and Challenges Facing Ethereum


The main problem Ethereum is facing is scalability. The network is supposed to be the
“world computer”, but at the moment it can only handle around 15 transactions per
second, while private companies like Visa can handle up to 45,000 transactions per
second. This is an issue that needs to be solved if Ethereum wants massive adoption.
This will allow for better projects to be built on top of Ethereum. To show why this
issue is critical, we can look at the example of the CryptoKitties project. Back in 2017,
this project gained so much popularity that the transactions executed on the Smart
Contract congested the network. Therefore there was a considerable delay in
processing transactions.

Security has been a significant headache for Ethereum. Mainly because on some
projects, there were poor development practices that allowed for hacks and loss of

https://medium.com/swlh/a-comprehensive-view-of-ethereum-2-0-serenity-5865ad8b7c62 2/12
2/12/23, 2:49 AM A Comprehensive view of Ethereum 2.0 (Serenity) | by sheinix | The Startup | Medium

funds. Ethereum needs to provide developers with tools for better security in Smart
Contracts, without compromising the capabilities of Solidity.

The ETH price and Gas cost makes the process of running transactions fragile and in
some cases, not worth it. Especially for Ethereum validators who currently have to
spend a lot of electricity running the nodes with the Proof of Work consensus
algorithm, when they don’t get much in return.

The lack of general knowledge from the wider public and the user experience of DApps
are other concerns that need to be addressed in the future as this is key to reach the
massive adoption of the DApps.

Current status of Ethereum


Ethereum ecosystem has been growing steadily for the last few years, although it still
has a lot of issues. ETH, the Ethereum currency, is the second-biggest cryptocurrency
in market capitalisation. Solidity is the most popular open blockchain programming
language and has the most prominent developer community (which is an indicator of
the health of the project). The more developers a platform has, the more useful and
valuable projects can be developed on top of it. Through the years, we have seen a lot
of good, average and scammy projects built on Ethereum.

In 2017, we saw a significant increase in the number of projects, mainly due to the
“ICO fever” and bullish markets. The reality is that only a few projects survived, and
less will in the following years. The general public is not adopting DApps yet, mainly
because of the platform’s lack of maturity and the lack of understanding of the
technology in general. Nevertheless, in the last year, there have been quite a few
projects related to Gaming, Gambling, and Finance that has grown a lot and obtained a
good user base.

https://medium.com/swlh/a-comprehensive-view-of-ethereum-2-0-serenity-5865ad8b7c62 3/12
2/12/23, 2:49 AM A Comprehensive view of Ethereum 2.0 (Serenity) | by sheinix | The Startup | Medium

source: stateofthedapps.com

source: stateofthedapps.com

Ethereum Development phases


https://medium.com/swlh/a-comprehensive-view-of-ethereum-2-0-serenity-5865ad8b7c62 4/12
2/12/23, 2:49 AM A Comprehensive view of Ethereum 2.0 (Serenity) | by sheinix | The Startup | Medium

Ethereum development was planned over four different stages. Each stage was meant
to introduce more features and fix problems. Each step also includes “sub releases”,
known as “hard forks”, that change functionality in a way that is not backward
compatible.
This is the original timeline for the Ethereum development stages and the
intermediate hard forks:

Block #0 — Frontier
This was the initial development stage of Ethereum, from July 30, 2015, to March 2016.

Block #200,000 — Ice Age


Ice Age was a “hard fork” to introduce an exponential difficulty increase, to motivate a
transition from Proof of Work consensus to Proof of Stake when ready.

Block #1,150,000 — Homestead


The second state of Ethereum launched in March 2016.

Block #1,192,000 — DAO


The infamous DAO case. This was a hard fork that reimbursed victims of the DAO hack
and caused Ethereum and Ethereum Classic to split into two opposing systems.

Block #2,463,00 — Tangerine Whistle


Another hard fork to change the gas calculation for certain I/O heavy operations and to
clear the accumulated state after a denial-of-service (DoS) attack that exploited the low
gas cost of those operations.

Block #2,675,000 — Spurious Dragon


A hard fork addressing more DoS attack vectors and another state clearing. Also, a
replay attack protection mechanism.

Block #4,370,000 — Metropolis Byzantium


This is the third stage of Ethereum development, launched in October 2017. Byzantium
was the first of two hard forks for Metropolis.

Block #7,280,000 — Constantinople

https://medium.com/swlh/a-comprehensive-view-of-ethereum-2-0-serenity-5865ad8b7c62 5/12
2/12/23, 2:49 AM A Comprehensive view of Ethereum 2.0 (Serenity) | by sheinix | The Startup | Medium

This is the second hard fork from the Metropolis stage, completed in February 2019.
This hard fork also included other changes that fix security issues codenamed
Petersburg.

Block #9,056,000 — Istanbul


This is another hard fork that is planned to be activated by December 4, 2019, and will
include more security fixes and incentives to move away from Proof of Work to Proof
of Stake algorithm.

Serenity — Ethereum 2.0


Serenity is the last stage of Ethereum development. It will introduce Ethereum 2.0, the
new Ethereum blockchain that will finally have Proof of Stake integrated, a new
Ethereum Virtual Machine, and much more. There has been a lot of discussion and
rumors around when Serenity is going to be launched. This massive phase that will
break into different sub-stages:

Serenity Road Map

Phase 0: Beacon Chain (Q1/2020)

Phase 1: Shard Chains (2021)

Phase 2: eWASM (New Ethereum Virtual Machine) (2021)

Phase 3: Continued Improvement (2022)

Ethereum 2.0
Ethereum 2.0 is the term that describes all the updates from Serenity, which will make
Ethereum more scalable, faster and a better blockchain. As stated by Ethereum
researcher Danny Ryan the primary design goals of Ethereum 2.0 are:

Resilience: The network should still be live even when lots of nodes go offline.

Security: Utilize crypto and design techniques that allow for the massive
participation of validators in total and per unit time.

Simplicity: Minimise complexity, even at the cost of some efficiency.

https://medium.com/swlh/a-comprehensive-view-of-ethereum-2-0-serenity-5865ad8b7c62 6/12
2/12/23, 2:49 AM A Comprehensive view of Ethereum 2.0 (Serenity) | by sheinix | The Startup | Medium

Longevity: Make components either quantum secure or easily swappable for


quantum secure counterparts when available. This will mean preparing the
network for a future where Quantum computing is fully accessible.

Decentralisation: to allow for typical consumer laptops with O(C) resources to


process O(1) shards (including any system-level validation such as the beacon
chain). This will allow for more low-end devices to participate in the network as
validators.

To understand how all of this be achieved, let’s see each Serenity phase in detail:

Phase 0: Beacon Chain


The Beacon Chain will be a separate blockchain from the main Ethereum blockchain.
This new chain will have a Proof of Stake (PoS) consensus algorithm, and it will run in
parallel to the main PoW Ethereum blockchain. Initially, the blockchain will be created
for simplicity and will not support smart contracts or accounts.

At the time of writing, Ethereum is using a “Proof of Work” (PoW) consensus


algorithm, very similar to what Bitcoin uses. The name of this algorithm in Ethereum
is called Ethash. On the beacon chain, we will see the new PoS algorithm called
Casper. The introduction of Casper to replacement Ethash has been postponed several
times over the past years, necessitating interventions to defuse the difficulty bomb and
delay its forced obsolescence of PoW. Now we are finally there with the Beacon chain.

A short explanation of PoS:


On a PoS consensus, the blockchain keeps track of a set of validators, and anyone who
holds the blockchain’s base cryptocurrency (in this case Ether) can become a validator
by sending a particular type of transaction that locks up their ether into a deposit. The
validators take turns, proposing and voting on the next valid block. The weight of a
validator’s vote depends on the size of their deposit (stake). A validator risks losing
their deposit if the majority of validators rejects the block they staked it on. Conversely,
validators earn a small reward, proportional to their deposited stake, for every block
that is accepted by the majority. Therefore, PoS forces validators to act honestly and
follow the consensus rules by a system of reward and punishment.

ETH2: The new Ether


https://medium.com/swlh/a-comprehensive-view-of-ethereum-2-0-serenity-5865ad8b7c62 7/12
2/12/23, 2:49 AM A Comprehensive view of Ethereum 2.0 (Serenity) | by sheinix | The Startup | Medium

Another feature of Phase 1 is the introduction of ETH2. A new asset for validators on
the new Beacon chain. This new ETH2 will be created as a reward for validating
transactions on the Beacon Chain, and also can be purchased by any ETH1. Initially,
there won’t be a way to withdraw ETH2 from the beacon chain. If anyone wants to be a
validator for the new chain, they will need at least 32 ETH to stake on the original
chain.

Phase 1: Shard Chains


Sharding is a scalability technique that allows parallel transactions throughout. This is
intended to help transactions scale by dividing the network across multiple shards,
allowing the network to process many transactions concurrently.

As stated by Vitalik Buterin on sharding:

“Imagine that Ethereum has been split into thousands of islands. Each island can do its own
thing. Each of the islands has its own unique features and everyone belonging on that island,
i.e., the accounts, can interact with each other and they can freely indulge in all its features.
If they want to contact with other islands, they will have to use some sort of protocol”.

Sharding will be introduced on the Beacon chain, and it will have initially 100 shards.
Validators will validate transactions from their own shard, and in the first phase, they
won’t approve any smart contract, account or asset.

While sharding will bring more scalability, there are a few setbacks to take into
account. Validators have a small pool of transactions to validate, which makes it easier
for a 51% attack, as they only need 51% computing power (or stake) of the shard they
are in, instead of the whole network.

This technique can also lead to higher centralisation, as each shard can be validated
with a small group of validators.
It will be fascinating to see how this stage is implemented, as it still needs thorough
testing to ensure all validators are randomly selected to avoid centralisation and any
risk attack.

Phase 2: eWASM (New Ethereum Virtual Machine)

https://medium.com/swlh/a-comprehensive-view-of-ethereum-2-0-serenity-5865ad8b7c62 8/12
2/12/23, 2:49 AM A Comprehensive view of Ethereum 2.0 (Serenity) | by sheinix | The Startup | Medium

What is the EVM


Ethereum is a decentralised network that acts as a “supercomputer”. All nodes on the
system need to run the smart contracts that execute transactions ending up on the
Blockchain. The Ethereum Virtual Machine (EVM) allows those smart contracts to
execute.
The EVM is the heart of the Ethereum network; it’s the part that handles smart
contract deployment and execution. It can be thought of as a global decentralised
computer containing millions of executable objects, each with its own permanent data
store.
On a more technical note, it’s a stack-based virtual machine that executes bytecode
(machine-language instructions). The smart contracts are written in “high-level”
languages like Solidity and compiled to bytecode for execution on the EVM.

The problem with the current EVM


One of the main issues with the current EVM is that it processes transactions
sequentially. With the PoS and Sharding changes, there’s a need to process transactions
in parallel, and the current EVM won’t be suitable for this.

The new EVM


The new EVM called eWASM stands for Ethereum WebAssembly. WebAssembly is an
open standard defining a portable binary code format for executable programs. This
new architecture for the EVM will allow for much better performance and will make it
possible to support smart contracts, accounts, states and much more on the new
blockchain. The current status of the eWASM development is at the very early stages,
as it is planned to be released in 2021. There’s still a lot of research to do around this
phase.

Phase 3: Continued Improvement


Continued Improvement is the code name to encompass all the future changes, fixes
and improvements of the previous stages, and whatever comes along. Unfortunately,
there’s not much information around this Phase, as it was initially planned to start in
2022. What we do know is that the following technologies will be implemented:

Cross-shard transactions

https://medium.com/swlh/a-comprehensive-view-of-ethereum-2-0-serenity-5865ad8b7c62 9/12
2/12/23, 2:49 AM A Comprehensive view of Ethereum 2.0 (Serenity) | by sheinix | The Startup | Medium

Lightweight clients

Super-square charting

Closer ties

What will Ethereum 2.0 mean for Crypto


One of the most important things to understand about Ethereum 2.0 is that it’s not a
change that will happen overnight. The initial launch is planned in 4 stages, but no one
is saying development ends there, or that there won’t be delays and changes along the
way. As with every software, there’s no final version; there’s always improvements and
fixes that need to be done.

Ethereum is one of the most significant projects in the crypto space and one on which
a lot of other projects depend. It has excellent support from the development
community as well as enterprises. There are a lot of parties heavily invested in the
future of Ethereum, and the pressure to succeed is high. If the team manages to pull
this off, we will have a fully scalable general-purpose blockchain, which will be closer
to the initial Ethereum pitch: “The world’s supercomputer”. And will also show the
world that the “Blockchain dream” is possible. This will attract even more developers
and investors to keep creating amazing projects on top of general-purpose
blockchains.

Keeping an eye on Ethereum 2.0 development in the following years is key to


understanding how current projects on the Ethereum 1.0 blockchain will migrate to
the new chain and what will happen with the crypto space. Only time will tell how and
when all of these events will unfold.

https://medium.com/swlh/a-comprehensive-view-of-ethereum-2-0-serenity-5865ad8b7c62 10/12
2/12/23, 2:49 AM A Comprehensive view of Ethereum 2.0 (Serenity) | by sheinix | The Startup | Medium

Blockchain Ethereum Serenity Crypto Dapps

Sign up for Top 5 Stories


By The Startup

Get smarter at building your thing. Join 176,621+ others who receive The Startup's top 5 stories, tools, ideas, books —
delivered straight into your inbox, once a week. Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

https://medium.com/swlh/a-comprehensive-view-of-ethereum-2-0-serenity-5865ad8b7c62 11/12
2/12/23, 2:49 AM A Comprehensive view of Ethereum 2.0 (Serenity) | by sheinix | The Startup | Medium

About Help Terms Privacy

Open in app Sign up Sign In


Get the Medium app
Search Medium

https://medium.com/swlh/a-comprehensive-view-of-ethereum-2-0-serenity-5865ad8b7c62 12/12
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

Published in DataDrivenInvestor

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

Henrique Centieiro Follow

Mar 18, 2022 · 11 min read · · Listen

Save

Goodbye, Ethereum 1.0… Hello, Ethereum 2.0!


Are you fed up with the crazy high Ethereum gas fees, highly congested network, and
failed transactions when you transact on Ethereum? I don’t know about you, but I
certainly am!

When I found out how much gas fees I’ve paid transacting on Ethereum blockchain so
far, I was totally blown away. You can also check yours here if you want to be
surprised…

https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 1/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

Just by transacting NFTs for a few months on Ethereum, I spent $1.9 million on gas. Kidding 🤣 unfortunately
this is not my account.

It’s certainly time for the Ethereum blockchain to have ht belong promised upgrade to
make it a lot cheaper, much faster, and more scalable. Here comes Ethereum 2.0 (also
known as Serenity), the exciting makeover of the current Ethereum blockchain (also
known as Ethereum 1.0), in which phase 1 — The Merge is expected to roll out in Q1/Q2
2022.

🎞️Crypto Henri Youtube

Let’s explore Ethereum 2.0 today, shall we?

https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 2/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

Here’s a special shoutout to Ms. Bee Lee, for her crucial effort contributed to create
this article. Enjoy!

The Roadmap of Ethereum 2.0 Upgrade


As Ethereum 2.0 is a series of upgrades, it has been (and will be) rolling out in phases.

The First Phase: Phase 0 — Beacon Chain


The Beacon Chain is the new Proof of Stake consensus layer that was implemented in
Dec 2020, that the current Ethereum 1.0 chain will eventually merge with. The Beacon
Chain not only introduces PoS consensus mechanism which sets Ethereum up for
staking and shard chains, it is also a testnet for the future PoS version of the Ethereum
2.0. The Proof of Work chain still continues to run alongside the new PoS chain, to
ensure there is no break in data continuity. Each validator (node) represents 32ETH
staked on the Beacon chain.

The Second Phase: Phase 1 — The Merge


https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 3/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

The current Ethereum network will merge with the Beacon Chain. The merge
represents the official switch to the Proof of Stake consensus model, which will end
the Proof of Work model. The merge is expected to happen in Q2 2022 (very soon!).
After the merge, Ethereum will officially become a PoS blockchain which allows
holders to stake their ETH and earn rewards. As the merge is going to be automatic,
Ethereum holders do not need to do anything while Ethereum goes through this phase.

On 15 March 2022, the Kiln Merge Testnet was launched. Kiln will be the last Merge
testnet before the existing public testnets are upgraded. Ethereum developer Tim
Beiko has tweeted about the success of Kiln:

By the way, talking about Kiln:

Here is how to add Kiln to Metamask: https://kiln.themerge.dev/

Here is the Beacon explorer: https://beaconchain.kiln.themerge.dev/

Here is the faucet to get some test ETH on Kiln: https://faucet.kiln.themerge.dev/


https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 4/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

And, if you wanna learn how to create tokens, NFTs, and DAOs smart contracts,
check this link.

The Third Phase: Phase 2 — Sharding


Sharding is expected to launch in late 2022 after the Merge happened. Shard chains
will provide a lot more capacity to store and access data for the Ethereum network.
With the development of rollups scaling solutions in 2021, which takes much of the
burden of computation and storage out of the blockchain, rollups now plays a key part
on the scalability side of the Ethereum 2.0 upgrade.

https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 5/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

Please no more delay, ETH 2.0

What’s so special about Ethereum 2.0?

Proof of Stake (PoS)


Proof of Stake (PoS) is a consensus mechanism. To understand what PoS is, first let me
explain what a consensus mechanism is.

Typically, companies and organizations have certain databases that store users’ data
such as their names, e-mail addresses, addresses, etc. The computers that store such
data usually exist in one location and are controlled by one person or one small group
of people.

A blockchain however, is a type of database with its information dispersed among


many locations and individuals. With such a decentralized and distributed linked data
structure, even with one computer goes down, there are plenty more computers
continue to keep the data and network alive, it can also at the same time ensure the
data is resistant to any kind of modification.

With such structure, these individuals need to find a way to agree on the correct set of
data (in the case of a cryptocurrency, the data refers to transactions), so that all of the
versions of their data would match. That is why some sort of mechanism is necessary
to form such a consensus.

Proof of Work vs Proof of Stake


https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 6/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

So, what is Proof of Stake (PoS)? There are many types of consensus mechanisms, PoS
is one of the most well-known ones among the others like Proof of Work (PoW), which
is what the current Ethereum 1.0 is adopting.

In the PoS system, nodes (or “validators”) process transactions and create new blocks
of data of a blockchain like the way miners do in a PoW blockchain. The difference lies
in the way of gaining the right to create a block. In the PoW system, miners need to
compete to be the first to solve complex mathematical problems which require a lot of
computing power and electricity.

In the PoS system however, consensus is reached by using an algorithm that chooses a
node to win a block of transactions, instead of the nodes having to race to win the
block by spending a lot of computing power and electricity. When a node is chosen, it
forges the next block of transactions in the chain.

From those who have staked a minimum amount of coins, a node is then semi-
randomly chosen by an algorithm. The chosen node creates the block and other nodes
validate it, it will then gets rewarded for creating the new block by getting paid with
the blockchain’s native coin from the transaction fees. For example, Cardano
blockchain nodes get rewarded in the form of ADA. However, if the block that the node
created turns out to have any fraudulent transactions, both the node who creates the
block and the ones who validate it would lose part of or even all of the staked coins.

In order to determine who can be the next block creator, the PoS algorithm uses
different factors such as the size of the stake. To ensure the wealthiest stake pools do
not always win, other factors like the duration the coins have been staked are also
being factored. Some PoS blockchains have also added a degree of randomization to
the selection process, so the bigger and older stakes do not always win. Holders of the
coin can then “stake” their holdings to a staking pool, when a node is selected to forge
a block, the reward it receives is then distributed among the individual stakers.

https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 7/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

How to get chosen to create a block in PoS

Unlike the PoW system which the miners need to be the first to solve a complex
mathematical problem in order to be able to create a block, PoS requires way less
computing power and electricity needing to spend. It is also way less time-consuming
than the PoW system.

That is why Proof of Stake is chosen as the consensus mechanism of Ethereum 2.0, as
it is a much more environmentally friendly and efficient choice, allowing Ethereum
transactions to be a lot faster and cheaper.

Currently, the 10 million ETH the investors staked in the Beacon Chain is earning
about 4.8% in yield per year. It is expected the yield will grow to as high as 15% after
the Merge, while the network transaction fee will be reduced to a fraction compared to
the current PoW system, all thanks to PoS!

By the way, if you are interested in ETH staking, Lido Finance provides great options
with way better liquidity (you don’t need to have your ETH locked).

Sharding
Sharding is a method Ethereum 2.0 plans to use in order to scale its capacity. With the
Proof of Work blockchain (which is what Ethereum 1.0 is using right now), most nodes
in the network have an entire copy of the history of all the transactions. Such a copy
can take up a lot of space, especially for the older cryptocurrencies like Bitcoin and
Ethereum which come with a long list of transaction record. The Ethereum blockchain
is almost reaching 1 Terabyte whish is not good for decentralization since only big
computers can handle it.
https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 8/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

Sharding is a common technique used among the newer PoS cryptocurrencies to help
with scaling without sacrificing security and decentralization. It is a form of database
partitioning that breaks down a large database into smaller and more manageable
pieces, to boost the efficiency in a large scale.

A simple breakdown of how sharding works

Shard chains are created by sharding, which decrease the workload of network nodes
by requiring each node to only store and manage one shard of the network, instead of
the whole blockchain. On the other hand, shard chains enable parallel processing
which reduces the latency of linear processing that occurs when using only one single
blockchain.

Let’s imagine a blockchain network with three nodes — A, B and C. In a sequential


format, in order to verify a dataset D, they would each have to verify it individually.
With sharding, D can then be broken down into multiple shards, D1, D2, D3 and so on.
Node A, B and C can then each take up one individual shard and process them at the
same time. Can you see how this parallelizing can dramatically speed up the whole
verifying process?

https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 9/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

So how is Ethereum 2.0 upgrade going to implement sharding to scale its blockchain?

Phase one of the upgrade will spread the whole Ethereum network load across 64
separate shard chains, which will be coordinated by the Beacon Chain. As part of
Phase 0, the teams of validators which have deposited collateral into the Ethereum 2.0
deposit contract, will be randomly assigned to manage particular shard chains on the
Ethereum network.

Eventually, shard chains will be able to execute nodes, just like the main Ethereum
blockchain. It will then be able to support smart contracts as well as decentralized
applications (dApps). It is believed they will need to do a lot of testing on the
movement and aggregation of data between the Beacon Chain and the shard chains
before finalizing. Creating more shard chains other than the assigned 64 ones is also
possible in the future.

Rollups + Sharding
The implementation of rollups is another strategy being developed as part of the
Ethereum 2.0 Phase 1 update. Rollups are already existing today, they are a “hybrid”
Layer 2 scaling solution, which aims at achieving the best of these two worlds by fully
relying on the security of Ethereum while creating a scaling solution for general
purpose applications.

Rollups are a type of Ethereum-scaling solution that works by executing transactions


outside Layer 1, but posting transaction data on Layer 1. This can allow the rollup to
scale the Ethereum network while not sacrificing its security from the Ethereum
consensus.

The 2 different types of rollups include Optimistic rollups and ZK rollups. They are
able to scale the Ethereum network at around 15–45 transactions per second, it can
however be able to scale up to 1,000 to 4,000 transactions per second depending on the
type of transactions.

With the exciting sharding method of Ethereum 2.0 upgrade, which offers a significant
amount of space by creating multiple shards, it creates an amazing synergy when
combining together with rollups. The combination of the two is expected to bring the
transaction speed of the Ethereum blockchain up to 100k transactions per second.

https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 10/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

Vitalik Buterin’s Twitter post

Rollups is especially useful in boosting the throughput of decentralized applications


(dApps). The way they allow dApps to “roll up” the transactions and bundle them into
one single transaction off-chain before settling the final state on-chain, makes data
processing of smart contracts a lot more efficient. This can also largely lower gas fees
due to the popularity of Ethereum dApps and DeFi (decentralized finance) offerings,
such as UniSwap.

Want to learn more in-depth about rollups? Check my 2 other articles dedicated to
rollups!

Rollups — Ultimate Solution to Cheaper & Faster Ethereum


Transactions? (Part 1)
Rollups… such a funny name isn’t it?
medium.datadriveninvestor.com

Rollups — Ultimate Solution to Cheaper & Faster Ethereum


Transactions? (Part 2)
What are some of the projects working on Optimistic rollups and ZK
rollups?

https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 11/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

medium.datadriveninvestor.com

Ethereum 2.0 & DeFi


Currently, Ethereum 1.0 blockchain has a massive DeFi (Decentralized Finance)
ecosystem. However, most of it is nearly unusable due to how slow and congested it is.
Such congestion is also the reason to cause very high gas fees, which sometimes is
even higher than the amount of money the users want to transact.

Right now, only those with larger holdings and transact in larger amount are able to
benefit from the ecosystem. I still remember how ridiculously expensive it has costed
me (close to $150 in transaction fee) when I tried to swap a small amount of an altcoin
on UniSwap a few months back, which also stopped me from hoping to participate in
the liquidity pools provided on these decentralized exchanges on the Ethereum
network.

https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 12/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

The transaction fee is so ridiculously high as they are controlled by miners due to the
Proof of Work mechanism, which create a large conflict of interest. With the switch to
Proof of Stake, such issue will no longer exist. Should Ethereum 2.0 prove successful, it
will certainly has a drastic effect on the current bottlenecks that slow down the current
DeFi development.

Final Thoughts
If there is no delay, Ethereum 2.0 is set to roll out sometime this year (Yay!). This is by
far the most significant blockchain network upgrade ever (and probably ever will
be?). If Ethereum can achieve its goals of becoming the global settlement layer for the
metaverse, this Ethereum 2.0 upgrade will certainly be one of the most significant
events in the entire crypto history.

Imagine some day in the future, your kids (hopefully not grandkids) will think you
were insane spending $100 on gas fee buying a $25 NFT on Ethereum 1.0. Same as the
way we now think about how we needed to dial-up to log into the internet back then
when we were all kids. Don’t you still remember that dialing sound?!

What an exciting time we are at, don’t you think? Let’s wait and see how it will all play
out!

If you thought this blog post was worth every bit of your time, please share it with a
friend who would benefit from it too 🥂

👾 Create NFTs, Tokens and DAOs — Smart Contracts Masterclass

https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 13/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

🦄 Metaverse Masterclass — Learn Everything about the Metaverse

⭐ NFT Investing Masterclass — Pro-Tips about NFT Investing

📖 The Complete NFTs Course — Learn everything about NFTs

🎞️Crypto Henri Youtube

Schedule a DDIChat Session in Blockchain and Cryptocurrency:

Experts - Blockchain and Cryptocurrency - DDIChat


DDIChat allows individuals and businesses to speak directly with
subject matter experts. It makes consultation fast…
app.ddichat.com

Apply to be a DDIChat Expert here.


Work with DDI: https://datadriveninvestor.com/collaborate
Subscribe to DDIntel here.

Ethereum Ethereum Blockchain Smart Contracts Crypto Nft

Get an email whenever Henrique Centieiro publishes about NFTs and


blockchain!
By signing up, you will create a Medium account if you don’t already have one. Review
our Privacy Policy for more information about our privacy practices.

https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 14/15
2/12/23, 2:51 AM Goodbye, Ethereum 1.0… Hello, Ethereum 2.0! | by Henrique Centieiro | DataDrivenInvestor

Subscribe

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.datadriveninvestor.com/goodbye-ethereum-1-0-hello-ethereum-2-0-f9b088bf4c2e 15/15
2/12/23, 2:54 AM What is Proof of Stake? (PoS). Proof-of-Work (PoW) was the first… | by Max Thake | Medium

Max Thake Follow

Jul 8, 2018 · 6 min read · Listen

Save

What is Proof of Stake? (PoS)

Proof-of-Work (PoW) was the first blockchain consensus mechanism and is still
arguably the most popular choice in achieving distributed consensus (the ability to
trust a stranger without having to go through a third-party).

https://maxthake.medium.com/what-is-proof-of-stake-pos-479a04581f3a#:~:text=Proof-of-Stake algorithms achieve,also differs in fundamental ways. 1/7


2/12/23, 2:54 AM What is Proof of Stake? (PoS). Proof-of-Work (PoW) was the first… | by Max Thake | Medium

PoW is used by the likes of Bitcoin and Ethereum (for now) and several other
cryptocurrencies. Strong as it may be, it comes with disadvantages like high
computation requirements, high energy costs and the threat of centralisation-by-
mining-pool.

Once you understand PoW and its downfalls, the need for a system like Proof-of-Stake
(PoS) becomes clear.

But first — what’s a stake?

In crypto-terms, the stake is the cryptocurrency a user owns and pledges in order to
partake in validation — more on that soon.

How does Proof-of-Stake work?


A one sentence description tends to be a good starting to point when trying to explain
complex ideas. So in short:

Proof-of-Stake algorithms achieve consensus by


requiring users to stake an amount of their tokens so
as to have a chance of being selected to validate
blocks of transactions, and get rewarded for doing so.

https://maxthake.medium.com/what-is-proof-of-stake-pos-479a04581f3a#:~:text=Proof-of-Stake algorithms achieve,also differs in fundamental ways. 2/7


2/12/23, 2:54 AM What is Proof of Stake? (PoS). Proof-of-Work (PoW) was the first… | by Max Thake | Medium

PoS shares many similarities with PoW, but also differs in fundamental ways. As in any
blockchain based consensus algorithm, the goal is still to achieve distributed
consensus — to create a secure system whereby users are incentivised to validate other
peoples’ transactions while maintaining complete integrity.

In PoS the miner of a new block, in this case known as the forger, is chosen in a semi-
random, two-part process. The first element to be considered in this selection process
is a user’s stake. How much of the currency in question is the user staking?

Every validator must own a stake in the network. Staking involves depositing an
amount of tokens into the system, locking it in what you can think of as a virtual safe,
and using it as a collateral to vouch for the block.

The more a user stakes, the better their chance of being selected since they’d have
more skin in the game — acting maliciously would see them set back by a greater
amount than someone who stakes less.

In the majority of PoS consensus algorithms, the incentive to partake in validation of


blocks is a payout in the form of transaction fees, as opposed to freshly created
currency in PoW systems.

Not much is random about that first part, in fact it’s probably got you thinking that PoS
is ripe to be abused by the wealthy. The key here is to include a degree of chance to the

https://maxthake.medium.com/what-is-proof-of-stake-pos-479a04581f3a#:~:text=Proof-of-Stake algorithms achieve,also differs in fundamental ways. 3/7


2/12/23, 2:54 AM What is Proof of Stake? (PoS). Proof-of-Work (PoW) was the first… | by Max Thake | Medium

selection process so as to avoid a scenario where the richest users are always selected
to validate transactions, consistently reap the rewards and grow richer and richer.

The second element adds the ‘random’ to the semi-random selection process, although
the way in which this is done differs from blockchain to blockchain. The two most
commonly used methods are Randomised Block Selection and Coin Age Selection.

In Randomised Block Selection, forgers are selected by looking for users with a
combination of the lowest hash value and highest stakes. The Coin Age Selection
method chooses validators based on how long their tokens have been staked for. These
are by no means the only methods of selecting validators, though. Some currencies
combine the aforementioned methods while others are experimenting with their own.

Another difference worth noting between PoW and PoS, is that unlike in PoW systems
where more and more cryptocurrency is continually created as rewards for miners,
the total amount of cryptocurrency units are usually created at launch in PoS systems.

That’s often the reasoning behind using transaction fees as reward for validators. That
being said, in certain cases new currency can be created by inflating the coin supply
which can then be used as reward.

Advantages of Proof-Of-Stake
PoS is widely regarded as one of the best options for a cryptocurrency consensus
algorithms. Here’s why:

Energy Efficiency
PoS algorithms are energy efficient — especially when compared to PoW. Cutting
out the energy-intensive mining process makes PoS a greener option.

Security
Attackers must put their assets — their stake — on the line in order to attempt a
51% attack. A big deterrent. For comparison, attackers don’t lose their hardware
when attempting 51% attacks on PoW systems.

Decentralisation
Large mining-pools (groups of miners combining their resources) can control over
51% of networks running PoW systems, leading to a very real threat of

https://maxthake.medium.com/what-is-proof-of-stake-pos-479a04581f3a#:~:text=Proof-of-Stake algorithms achieve,also differs in fundamental ways. 4/7


2/12/23, 2:54 AM What is Proof of Stake? (PoS). Proof-of-Work (PoW) was the first… | by Max Thake | Medium

centralisation. This comes as a result of the exponential increase in reward per


investment on PoW systems, as opposed to the linear increase on PoS systems.
If a user on a PoS based network investments twice as much as another user, they’ll
have twice as much control. The same scenario on PoW would grant the user
exponentially more control.

The ‘Nothing at Stake ‘ Problem


For all its plus points, critics of the Proof of Stake system are quick to point out the
economic challenge known as the Nothing at Stake problem. It’s an interesting little
dilemma that allegedly prevents PoS from being an ideal option for distributed
consensus.

The idea here is that in the event of a fork (the blockchain splitting in two), block
generators have nothing to lose by supporting different blockchains, essentially
preventing the conflict from ever resolving.

In PoW systems this is guarded against since users would have to split their
computational resources in order to support both sides of the fork. In PoS systems,
however, validators’s stakes would be duplicated onto both chains meaning they could
potentially claim twice the amount of rewards.
https://maxthake.medium.com/what-is-proof-of-stake-pos-479a04581f3a#:~:text=Proof-of-Stake algorithms achieve,also differs in fundamental ways. 5/7
2/12/23, 2:54 AM What is Proof of Stake? (PoS). Proof-of-Work (PoW) was the first… | by Max Thake | Medium

Simulations have shown that forging on several chains is possible, even profitable, but
PoS advocates have demonstrated several work-arounds. Ethereum’s Casper protocol,
for instance, is set to require participants to submit a deposit which will be confiscated
if they are deemed to have violated a pre-determined set of rules — such as signing off
on multiple forks.

Ethereum’s Casper Protocol


Ethereum, the second largest cryptocurrency by market cap, is transitioning from a
PoW to a PoS system, codenamed Casper. While we still don’t know the exact details of
how and when the transition will take place, we know that it will be a two part process,
with the first part including a hybrid PoW/PoS system, before moving on to PoS
completely.

The reasoning behind the move makes an interesting read:

“Transitioning the Ethereum network from PoW to PoS has been on the roadmap and in the
Yellow Paper since the launch of the protocol. Although effective in coming to a decentralized
consensus, PoW consumes an incredible amount of energy, has no economic finality, and has
no effective strategy in resisting cartels. Excessive energy consumption, issues with equal
access to mining hardware, mining pool centralization, and an emerging market of ASICs
each provide a distinct motivation to make the transition as soon as possible.”

It’s important to keep in mind that different cryptocurrencies use different consensus
mechanisms (PoW, PoS, DPoS etc.) and it’s just as important to remember that the
consensus mechanisms themselves differ from one another. Not all PoS algorithms
work the same way, for instance.

Doing your own proper due diligence on a cryptocurrency involves understanding its
inner workings. We hope this article helps you do that.

Proof Of Stake Pos Blockchain Development Consensus Blockchain Education

https://maxthake.medium.com/what-is-proof-of-stake-pos-479a04581f3a#:~:text=Proof-of-Stake algorithms achieve,also differs in fundamental ways. 6/7


2/12/23, 2:54 AM What is Proof of Stake? (PoS). Proof-of-Work (PoW) was the first… | by Max Thake | Medium

Get an email whenever Max Thake publishes.

Your email

Subscribe

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy


Open in app Sign up Sign In

Search Medium
Get the Medium app

https://maxthake.medium.com/what-is-proof-of-stake-pos-479a04581f3a#:~:text=Proof-of-Stake algorithms achieve,also differs in fundamental ways. 7/7


2/12/23, 2:56 AM Proof of Stake — What is and how does it work? | by Henrique Centieiro | Nerd For Tech | Medium

Published in Nerd For Tech

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

Henrique Centieiro Follow

May 18, 2021 · 5 min read · · Listen

Save

Proof of Stake — What is and how does it work?


After proof of work, proof of stake is the second most well known and
used consensus algorithm. A few cryptocurrencies use it, and it has a
quite different mechanism compared to proof of work.
With Ethereum moving to 2.0 with the Proof of Stake, everyone starts talking about it.
By the way, at the end of the article, I show how to start earning with Ethereum 2.0
staking (not financial advice tho).

https://medium.com/nerd-for-tech/proof-of-stake-what-is-and-how-does-it-work-1c8bd7f00303 1/7
2/12/23, 2:56 AM Proof of Stake — What is and how does it work? | by Henrique Centieiro | Nerd For Tech | Medium

This is my kind of proof of steak 🤭

The mechanics and incentives of proof of state algorithms work differently. When
creating a new block, the proof of stake algorithm chooses who is the block validator
by checking how many coins a person is staking. The bigger the stake, the higher the
probability of being chosen as a block validator. In proof of stake, we call the nodes
doing the work block validators instead of miners, and we say that block validators
mint new blocks instead of mining new blocks.

When a new transaction is issued, it is placed into a block with other transactions, and
the block is limited to a certain size in MB. The validating node verifies the
transactions’ validity in a block and broadcasts the block to the other nodes in the
blockchain. After validating the block and sharing it with the other nodes, the
validating node will receive a reward if the other nodes agree with the content of the
block.

Ethereum is moving to Ethereum 2.0, integrating Casper, a proof of stake consensus


mechanism that will switch Ethereum from proof of work to proof of stake. The new
Ethereum proof of stake protocol demands block validators to make a security deposit
https://medium.com/nerd-for-tech/proof-of-stake-what-is-and-how-does-it-work-1c8bd7f00303 2/7
2/12/23, 2:56 AM Proof of Stake — What is and how does it work? | by Henrique Centieiro | Nerd For Tech | Medium

for the validator to be able to participate in the consensus. If they create a fraudulent
block, their deposit will be forfeited, and the block validator loses the ability to
participate.

Pros and cons of proof of stake


Pros

It doesn’t require much electricity when comparing to proof of work

It’s considered safe and resilient to 51% attacks when comparing to small proof of
work cryptocurrencies

Cons

Nothing at stake problem

Fake stake attack and DDoS attacks — somebody can lie on how much stake do they
own in order to connect to another node and flood him with connections (DoS
attack)

In proof of stake, block validators increase their chance of being selected to validate a
block based on how much do they have at stake. Bigger the stake, the higher the odds
of being selected to validate the block and win then reward. In other words, the more
lottery tickets you buy, the higher the probability of winning the prize. Following the
https://medium.com/nerd-for-tech/proof-of-stake-what-is-and-how-does-it-work-1c8bd7f00303 3/7
2/12/23, 2:56 AM Proof of Stake — What is and how does it work? | by Henrique Centieiro | Nerd For Tech | Medium

example of our chart, let’s say Eve bought ten lottery tickets, Frank bought 20 lottery
tickets, and Carol bought 30 lottery tickets, increasing this way her chance.

To perform a 51% attack, one’s would need to buy at least 50% of the cryptocurrency
available, which would be very expensive. Most of the proof of stake mechanisms have
protections against this, but performing a 51% attack on a proof of stake
cryptocurrency wouldn’t be very smart anyway.

Although it would be very expensive for someone to acquire 51% of all the coins of a
cryptocurrency, a person could indeed do it and try an attack. However, it wouldn’t be
in his best interest to attack the network on which he holds a majority. This would
harm the network and make the cryptocurrency value to fall, which means that the
attacker’s holdings would also fall. Consequently, someone who holds a majority in the
network would be incentivized to maintain the network secure.

How does the proof of stake block validating or “mining” works?

The bigger the stake, the bigger the chances of being the chosen one for that specific
round. In a network of nodes, Carol was selected to be the validating node of the
round.

1. Carol is selected to validate the block for that round

https://medium.com/nerd-for-tech/proof-of-stake-what-is-and-how-does-it-work-1c8bd7f00303 4/7
2/12/23, 2:56 AM Proof of Stake — What is and how does it work? | by Henrique Centieiro | Nerd For Tech | Medium

2. Carol has to place a larger stake than the transaction fees and rewards that he may
receive. This stake will be locked until the validation is completed

3. Carol produces a block with transactions

4. The new block is broadcasted to the other peer nodes on the network

5. A fixed amount of time needs to elapse in order to allow time for the peer nodes to
confirm that Carol did a good job and that he validated the block correctly

6. If the validation is correct, the block is permanently appended to the blockchain

7. If the validation is incorrect (i.e. has incorrect data, incorrect transactions, or Carol
tried to forge some fake coins for herself), Carol will lose the stake and reward and
probably also get banned from the network

Bonus: How to start participating on Ethereum 2.0 staking

If you have a Binance account (and probably a few other exchanges), you can start
locking your ETH and earn interest. You can basically lock your ETH for a period of
time (2 years I think) and earn interest which can go up to 20%. Note that the locking
period can be up to 2 years here.

https://medium.com/nerd-for-tech/proof-of-stake-what-is-and-how-does-it-work-1c8bd7f00303 5/7
2/12/23, 2:56 AM Proof of Stake — What is and how does it work? | by Henrique Centieiro | Nerd For Tech | Medium

This Ethereum 2.0 is the long-awaited upgrade to the Ethereum network that is going
to switch it to proof of stake and make it more scalable, spend less electricity (because
it’s proof of stake) and better efficient. In theory, this will happen without impacting
security and decentralization.

🚀 Follow me and please also check my 🧱 blockchain book and course:

🐶 The First Ever Dogecoin Course

👨‍🎓 Fintech, Cloud and Cybersecurity Course

📖 The Complete NFTs Course

👨‍🎓 Unblockchain Course — The Brain-Friendly Blockchain Course

Proof Of Stake Ethereum Dogecoin Cardano Blockchain

Sign up for NFT Weekly Digest


By Nerd For Tech

Subscribe to our weekly News Letter to receive top stories from the Industry Professionals around the world Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

Open in app Sign up Sign In

Search Medium

https://medium.com/nerd-for-tech/proof-of-stake-what-is-and-how-does-it-work-1c8bd7f00303 6/7
2/12/23, 2:56 AM Proof of Stake — What is and how does it work? | by Henrique Centieiro | Nerd For Tech | Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/nerd-for-tech/proof-of-stake-what-is-and-how-does-it-work-1c8bd7f00303 7/7
2/12/23, 2:59 AM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

Published in UTRUST

Miguel Palhas Follow

Sep 12, 2019 · 8 min read · Listen

Save

Proof of Work

Proof of Work is yet another buzzword that gets thrown around a lot in the
cryptosphere. This is because it is an important component of some of the most
important blockchains like Bitcoin. In this post we aim to shed some light into what
exactly this means, and why it is such an important term.

Consensus

https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In short%2C Proof of Work,state of the public ledger. 1/9


2/12/23, 2:59 AM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

In short, Proof of Work (PoW) is one of the mechanisms through which a blockchain
can achieve consensus. That is to say, ensuring that all nodes of the system can agree
on the state of the public ledger. Value, information, and wealth can only be
transferred when actors in an exchange agree upon what is being exchanged and how.
This is usually dealt with by banks, companies and even governments, but blockchains
can do this peer-to-peer, so long as they achieve consensus.

This is important, as you may guess, because it’s what creates consistency in the
blockchain data, prevents users from double-spending their funds, or attacking each
other.

In a Proof of Work (PoW) system, consensus is agreed upon via the work done by
network miners. These are the miners you keep hearing about. They collect your
transaction fees in exchange for keeping the network up and running.

In a broad sense, it can be said that miners process network transactions, and take up
their fees as payment for their effort (e.g.: electricity spent on computing power), and
as an incentive to keep working.

If we take a more technical perspective though, they’re not exactly “processing


transactions”. All transactions are already fully prepared to be included in the
blockchain when they reach miners. Miners only need to check their validity.

The real processing that happens is more of an endless competition between all
miners, the winner of which gets to create the next block in the chain.

This competition is done via a cryptographic algorithm. For every block, a


cryptographic puzzle needs to be solved, and some processing power must be put into
finding a valid solution. When a miner finds a solution, it is able to create a valid block,
and broadcast it to everyone else.

The broadcasting of a single block, and some of its caveats, is a topic I already covered
in more detail on my previous post about [achieving Finality].

Here, we’ll focus a bit more on how this cryptographic puzzle works, and why it is
needed in the first place.

https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In short%2C Proof of Work,state of the public ledger. 2/9


2/12/23, 2:59 AM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

Cryptographic hashes
A hash works very similarly to a written signature.

Your signature proves that a document was read and validated by you, without your
own presence being required. Only you can produce your own signature, but everyone
else can easily check it’s yours. This can be summed up in two simple properties:

1. hard to fake;

2. easy to validate.

These properties are what makes signatures, and hashes, interesting for quickly
validating something.

Yes, I know. Written signatures are not really that secure. But cryptographic signatures,
on the other hand, can be. They serve the same function as the written ones, which is
why the analogy works so well, but they’re generated through mathematical functions
that are designed to provide better guarantees.

A sensible cryptographic hash should be:

1. Hard to produce, Making it impossible to create a valid signature without first


having access to the original data;

2. Trivial to verify. So that anyone can quickly validate data.

Let’s see a quick example of what a cryptographic hash would look like. In many
software download pages, you’ll often see a hash checksum. For example, here’s the
download page for Ubuntu:

https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In short%2C Proof of Work,state of the public ledger. 3/9


2/12/23, 2:59 AM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

After downloading the file, I should be able to independently calculate a SHA256 hash
of that file, and compare it against the hash displayed on the page. If they match, I
have proof that the download file is not corrupted or tampered with. And that’s exactly
what I did:

$ shasum -a 256 ubuntu-18.04.3-desktop-amd64.iso


add4614b6fe3bb8e7dddcaab0ea97c476fbd4ffe288f2a4912cb06f1a47dcfa0

Great, the hash works perfectly! You can notice that the resulting hash (add461…)
matches exactly the hash from the screenshot.

https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In short%2C Proof of Work,state of the public ledger. 4/9


2/12/23, 2:59 AM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

This is a one-way operation. While I can calculate a SHA256 hash for any file or piece
of data, the reverse is not possible. It’s obviously impossible to recreate the entire
Ubuntu file from just this small string of random characters.

The process I just did manually is similar to what’s used in a blockchain to ensure the
integrity of all transactions. Each transaction hash is derived from the data of the
transaction itself, and serves as a unique identifier.

Each block has a hash, too. And that hash needs to follow certain rules. Let’s take a
look at the latest Bitcoin block hashes, for example:

Notice how all of them start with a bunch of zeros? How did this happen, if hashes are
supposedly random?

Well, that’s where the cryptographic mining contest begins.

And how do they “Prove the Work”?


https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In short%2C Proof of Work,state of the public ledger. 5/9
2/12/23, 2:59 AM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

Each miner is constantly trying to mine the next block in the chain. And they’re on a
constant race with each other.

As they aggregate transactions sent in by users, they aggregate them in a new block,
and then try to create a hash for the entire block.

This hash can’t be just any hash tough. The blockchain imposes some rules on it.
Bitcoin, for example, requires the hash to start with a certain number of leading zeros.
The actual amount of zeros required is called the network’s difficulty, and it’s a number
that is adjusted every few blocks.

If the current difficulty is 2, then 00abc… would be a valid hash, but 0abc… would not.

Couple this with the fact that hashes are, for all intents and purposes, randomly
generated and unguessable, and miners have only one way to produce different
hashes: brute force. They keep trying over and over to generate new hashes, until they
find one that fulfils the requirement.

Since the same block always generates the same hash, they need to change it slightly
for every new attempt. This is often done by adding a random number within the
block’s data. The only purpose of this number is for miners to change it in order to be
able to make different blocks, and therefore, different hashes.

The better your hardware, the more hashes you can produce. That’s called your Hash
Rate. If you increase your hash rate (by improving your hardware) you get a better
chance of finding valid hashes before everyone else. But since this process is
essentially random, having slower hardware still gives you a small chance at
preventing more powerful miners from getting 100% of the blocks.

This difficulty is adjusted automatically every few blocks, in response to changes in the
total hash rate of the network. If a lot of miners significantly increase their hash rate,
or if a lot of miners join the game, the average time to mine a block will decrease. In
response to this, the difficulty may increase, to keep the average block time around 10
minutes.

If you’ve ever wondered why it takes 10 minutes to mine a Bitcoin block, there’s your
answer. The blockchain itself is enforcing that rule, by adjusting the mining difficulty.
https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In short%2C Proof of Work,state of the public ledger. 6/9
2/12/23, 2:59 AM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

Maybe you’re wondering why this is done at all! Good question! Let’s talk about that:

A Supply and Demand game


Miners are a necessary part of the system because they’re what keeps the blockchain
alive. It is therefore important to keep a steady number of them.

It is also important for the number of miners to be sufficiently large, or else the
decentralization of the system could be compromised. This compromises security as
well. These are some of the basic tenets of a decentralized blockchain.

On the other side of the system, we have the users, sending transactions through their
wallets.

Users want the blockchain to support as many transactions per second as possible, to
reduce their waiting times. They also want lower fees, or even no fees at all!

Miners, on the other hand, want the reverse. The more fees are paid, the more they
get. And the less transactions there are, the easier it is for them to compute hashes for
new blocks.

Even if miners were willing to mine for free, you still wouldn’t be able to do as the
users wish. More transactions per minute mean that we’d have to support larger block
sizes (or increase the rate of blocks), or decrease the 10 minutes it takes for a block to
be produced.

This would make the mining process more difficult, possibly to a point where only
those with more powerful hardware would be able to do anything at all.

If only the most powerful can compete in the game, then the whole system will
degrade to a much less decentralized one. And decentralization is what guarantees the
security of your transactions.

Preserving the size of blocks, as well as the time between them, is a balance that has to
be done to keep the network usable while still preserving the ability of small miners to
be able to contribute to the network.

And what about all the energy waste?


https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In short%2C Proof of Work,state of the public ledger. 7/9
2/12/23, 2:59 AM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

Yes, this is a tough one. We’ve all seen the scary news about how Bitcoin consumes
more energy than Switzerland, or the entire cryptocurrency ecosystem, for that
matter, is wasting tons of energy.

Not only that, the incentive given to miners (read: the ability to convert electricity into
money) is driving the industry to produce more powerful mining hardware, and
driving the miners to purchase more and more of that hardware.

So, not only are we creating an incentive to spend energy, but the competitive nature of
this is pushing everyone to spend increasingly more!

This is all true, and of course, a concern. But unlike some may claim, it’s not an
inherent problem of cryptocurrencies, and not even inherent to Proof-of-Work. This
means that there are ways to create Proof-of-Work systems that don’t drive energy
usage up like we’re seeing today.

If you’re into computer science research, then there are a few research papers worth
looking into (such as the Cuckoo Cycle algorithm, or Proofs of Useful Work)

If not though, rest assured that this is an acknowledged problem, and is being actively
worked on by many communities. While it is true that cryptocurrencies do consume
excessive amounts of energy right now, this is a problem that can be solved, and
should see some improvements over the next couple of years.

Utrust Academy Blockchain Crypto Digital Currency

About Help Terms Privacy

Open in app Sign up Sign In

https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In short%2C Proof of Work,state of the public ledger. 8/9


2/12/23, 2:59 AM Proof of Work. Proof of Work is yet another buzzword… | by Miguel Palhas | UTRUST | Medium

Get the Medium app


Search Medium

https://medium.com/utrust/proof-of-work-ab12b8e13c7#:~:text=In short%2C Proof of Work,state of the public ledger. 9/9


2/12/23, 3:01 AM Understanding Blockchain Fundamentals, Part 2: Proof of Work & Proof of Stake | by Georgios Konstantopoulos | Loom Network |…

Published in Loom Network

Georgios Konstantopoulos Follow

Dec 9, 2017 · 5 min read · Listen

Save

Understanding Blockchain Fundamentals, Part


2: Proof of Work & Proof of Stake

Articles in this Understanding Blockchain Fundamentals series:


1. Part 1: Byzantine Fault Tolerance

2. Part 2: Proof of Work & Proof of Stake 👈

3. Part 3: Delegated Proof of Stake

https://medium.com/loom-network/understanding-blockchain-fundamentals-part-2-proof-of-work-proof-of-stake-b6ae907c7edb 1/9
2/12/23, 3:01 AM Understanding Blockchain Fundamentals, Part 2: Proof of Work & Proof of Stake | by Georgios Konstantopoulos | Loom Network |…

In part one, we discussed the Byzantine Generals Problem, how to achieve Byzantine
Fault Tolerance, and how this all relates to blockchain.

The algorithm in the previous article is in fact a solution which achieves Byzantine
Fault Tolerance. However, that solution is not efficient enough, and its variations have
constraints, namely that less than a third of the network is dishonest.

Running time of solving the Byzantine Generals Problem with the algorithm proposed by Lamport, Shostak and
Pease (n = number of actors, m = number of traitors)

That leads us to a classic question in Computer Science:

Can we do better?

The topic of the present article will discuss alternative algorithms which achieve
Byzantine Fault Tolerance.

Note: Please bear with any simplifications that I make. These algorithms have a lot of
complex research behind them. I will be providing links as we proceed for the
interested reader to do their own further research.

Blockchains use consensus algorithms to elect a


leader who will decide the contents of the next block.
https://medium.com/loom-network/understanding-blockchain-fundamentals-part-2-proof-of-work-proof-of-stake-b6ae907c7edb 2/9
2/12/23, 3:01 AM Understanding Blockchain Fundamentals, Part 2: Proof of Work & Proof of Stake | by Georgios Konstantopoulos | Loom Network |…

That leader is also responsible for broadcasting the block to the network, so that the
other peers can verify the validity of its contents.

Proof of Work (PoW)


This is the most popular algorithm being used by currencies such as Bitcoin and
Ethereum, each one with its own differences.

Before continuing, for the non-technical readers:

A hash function is any function that can be used to map data of arbitrary size to data of
fixed size¹.

If a hash function is secure, its output is indistinguishable from random.

Example:
keccak256("hello") =
1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8
keccak256("hello1") =
57c65f1718e8297f4048beff2419e134656b7a856872b27ad77846e395f13ffe

In Proof of Work, in order for an actor to be elected as a leader and choose the next
block to be added to the blockchain they have to find a solution to a particular
mathematical problem.

Let that mathematical problem be:

Given data X, find a number n such as that the hash of n appended to X results is a number
less than Y.

Example - hash is a hypothetical hash function that has the outputs


listed as below
Y = 10, X = 'test'
hash(X) = hash('test') = 0x0f = 15 > 10
hash(X+1) = hash('test1') = 0xff = 255 > 10
https://medium.com/loom-network/understanding-blockchain-fundamentals-part-2-proof-of-work-proof-of-stake-b6ae907c7edb 3/9
2/12/23, 3:01 AM Understanding Blockchain Fundamentals, Part 2: Proof of Work & Proof of Stake | by Georgios Konstantopoulos | Loom Network |…

hash(X+2) = hash('test2') = 0x09 = 9 < 10 OK, Solved.

Given that the hash function used is cryptographically secure [1,2], the only way to find
a solution to that problem is by bruteforce (trying all possible combinations). In other
words, probabilistically speaking, the actor who will solve the aforementioned
problem first the majority of the time is the one who has access to the most computing
power. These actors are also called miners.

It has been widely successful primarily due to its following properties:

1. It is hard to find a solution for that given problem

2. When given a solution to that problem it is easy to verify that it is correct

Whenever a new block is mined, that miner gets rewarded with some currency (block
reward, transaction fees) and thus are incentivized to keep mining. In Proof of Work,
other nodes verify the validity of the block by checking that the hash of the data of the
block is less than a preset number.

Due to the limited supply of computational power, miners are also incentivized not to
cheat. Attacking the network would cost a lot because of the high cost of hardware,
energy, and potential mining profits missed.

The picture illustrates very well how Bitcoin, and any other coin that uses Proof of
Work, discourages malicious behavior.

https://medium.com/loom-network/understanding-blockchain-fundamentals-part-2-proof-of-work-proof-of-stake-b6ae907c7edb 4/9
2/12/23, 3:01 AM Understanding Blockchain Fundamentals, Part 2: Proof of Work & Proof of Stake | by Georgios Konstantopoulos | Loom Network |…

For the readers who are interested in how chain-splits (a.k.a. forks or chain
reorganizations work in the case of a disagreement, I suggest this article.

Proof of Work provides the needed security and has been proven to work pretty well so
far. However, it is very energy consuming:

https://medium.com/loom-network/understanding-blockchain-fundamentals-part-2-proof-of-work-proof-of-stake-b6ae907c7edb 5/9
2/12/23, 3:01 AM Understanding Blockchain Fundamentals, Part 2: Proof of Work & Proof of Stake | by Georgios Konstantopoulos | Loom Network |…

Almost all African countries (separately) consume less electricity than the Bitcoin Mining industry

Proof of Stake (PoS)


Before continuing, let me make the analogy of the leader election (the actor who will
select the next block) as a lottery:

In a lottery, probabilistically, if Bob has more tickets than Alice, he is more likely to win.

In a very similar manner:

In Proof of Work, if Bob has more computational power and energy than Alice — and thus
can output more work — he is more likely to win (mine the next block).

Similarly, yet again:

In Proof of Stake, if Bob has more stake than Alice, he is more likely to win (“mine” the next
block).

Proof of Stake takes away the energy and computational power requirement of PoW
and replaces it with stake. Stake is referred to as an amount of currency that an actor is
willing to lock up for a certain amount of time. In return, they get a chance
proportional to their stake to be the next leader and select the next block. There are
various existing coins which use pure PoS, such as Nxt and Blackcoin.

https://medium.com/loom-network/understanding-blockchain-fundamentals-part-2-proof-of-work-proof-of-stake-b6ae907c7edb 6/9
2/12/23, 3:01 AM Understanding Blockchain Fundamentals, Part 2: Proof of Work & Proof of Stake | by Georgios Konstantopoulos | Loom Network |…

The main issue with PoS is the so-called nothing-at-stake problem. Essentially, in the
case of a fork, stakers are not disincentivized from staking in both chains, and the
danger of double spending problems increase. More on that here.

In order to avoid that, hybrids consensus algorithms appeared, such as the PoW-PoS
combination used by Decred. Active research towards a secure and decentralized Proof
of Stake protocol is being done by the Ethereum Foundation with Casper The Friendly
Ghost and Casper The Friendly Finality Gadget.

Conclusion
In this article, we discussed Proof of Work & Proof of Stake, which are currently the
consensus algorithms that achieve Byzantine Fault Tolerance and are practically used
in today’s blockchain systems.

https://medium.com/loom-network/understanding-blockchain-fundamentals-part-2-proof-of-work-proof-of-stake-b6ae907c7edb 7/9
2/12/23, 3:01 AM Understanding Blockchain Fundamentals, Part 2: Proof of Work & Proof of Stake | by Georgios Konstantopoulos | Loom Network |…

Other consensus algorithms such as Practical Byzantine Fault Tolerance (Tendermint)


or Distributed Byzantine Fault Tolerance (NEO) exist. A great comparison between
PBFT and Casper can be found here.

Loom Network is the multichain interop platform for scaling high-performance dapps —
already live in production, audited, and battle-tested.

Deploy your dapp to Loom’s Basechain once and reach the widest possible user base across all
major blockchains today.

New to Loom? Start here.

Want to stake your LOOM tokens and help secure Basechain? Find out how.

Like what we’re doing here? Stay in the loop by signing up for our private mailing list.

Bitcoin Blockchain Business Ethereum Cryptocurrency

Some rights reserved

https://medium.com/loom-network/understanding-blockchain-fundamentals-part-2-proof-of-work-proof-of-stake-b6ae907c7edb 8/9
2/12/23, 3:01 AM Understanding Blockchain Fundamentals, Part 2: Proof of Work & Proof of Stake | by Georgios Konstantopoulos | Loom Network |…

About Help Terms Privacy

Open in app Sign up Sign In

Get the Medium app


Search Medium

https://medium.com/loom-network/understanding-blockchain-fundamentals-part-2-proof-of-work-proof-of-stake-b6ae907c7edb 9/9
2/12/23, 3:04 AM Proof of Stake vs. Proof of Work in Cryptocurrencies | by Christian Behler | Geek Culture | Medium

Published in Geek Culture

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

Christian Behler Follow

May 15, 2021 · 6 min read · · Listen

Save

Proof of Stake vs. Proof of Work in


Cryptocurrencies
What are the differences between the two blockchain consensus
mechanisms?

https://medium.com/geekculture/proof-of-stake-vs-proof-of-work-in-cryptocurrencies-f558dbbaec4d 1/8
2/12/23, 3:04 AM Proof of Stake vs. Proof of Work in Cryptocurrencies | by Christian Behler | Geek Culture | Medium

Photo by Worldspectrum from Pexels

With some of the recent price records of Bitcoin, Ethereum, Dogecoin, and other
cryptocurrencies, the positive and negative aspects of cryptocurrencies have become a
major focus once again. One aspect that is particularly controversial, is the huge
amount of energy needed to progress and update the blockchains.

Most big coins use Proof of Work as a consensus mechanism, which is inherently
inefficient and not sustainable. A newer alternative is Proof of Stake which hopes to
improve upon the flaws of Proof of Work. Let’s have a look at some of the pros and
cons of both concepts.
https://medium.com/geekculture/proof-of-stake-vs-proof-of-work-in-cryptocurrencies-f558dbbaec4d 2/8
2/12/23, 3:04 AM Proof of Stake vs. Proof of Work in Cryptocurrencies | by Christian Behler | Geek Culture | Medium

Proof of Work
Proof of Work is the most common method of achieving and maintaining consensus in
a blockchain. It’s a way for one party to prove that a significant amount of
computational effort has been made. All other parties can then verify the result with
very minimal effort.

In the Bitcoin blockchain, this is done with a hashing algorithm (SHA-256). Hashing
algorithms can be computed very quickly in one direction, but they are almost
impossible to reverse. Every block in the blockchain contains a number of transactions
and the hash of the previous block. The miners that want to progress the blockchain
try to find a hash value for all of this data by adding an incremental integer until they
find one where the hash value is below a certain numerical value. The threshold value
can be adjusted to set the difficulty of the problem. This controls the likelihood of
guessing the correct result and therefore ensures that the time between blocks stays
roughly consistent.

Once a solution has been found, the person who got the result is rewarded with new
Bitcoins and the transaction fees from the block. Then the process starts over with the
next block. This is called mining because just like in traditional mining, new and very
valuable resources are being found/created.

Modern graphic cards and especially ASIC miners can compute a hash value very
quickly. Therefore, the number of attempts needed to correctly guess the next value is
extremely high. The bitcoin network currently has a hashing power of 177 TH/s (that’s
177,000,000,000,000 hashes every second). As you can imagine, all of this computing
power takes an enormous amount of energy.

Proof of Stake
Proof of Stake is another method of updating the blockchain. It removes the energy-
wasting mining process that Proof of Work suffers from. To emphasize the differences,
Proof of Stake uses another term for mining: Blocks are “forged” rather than “mined”.

To participate in the forging process, users need to own a certain amount of the
currency and lock it into the network as their stake. The chance of winning a block
increases with the size of the stake. The winning node can process all transactions in
the block and append the block to the blockchain. It is also rewarded with all of the
https://medium.com/geekculture/proof-of-stake-vs-proof-of-work-in-cryptocurrencies-f558dbbaec4d 3/8
2/12/23, 3:04 AM Proof of Stake vs. Proof of Work in Cryptocurrencies | by Christian Behler | Geek Culture | Medium

transaction fees of the transactions in the block. To prevent the wealthiest nodes from
dominating the process too much, there are different methods of randomly selecting
the winning node.

The first cryptocurrency to make use of Proof of Stake was Peercoin. While Proof of
Work is still the most common method, more and more coins are using Proof of Stake.
Ethereum, the second-largest cryptocurrency, has started to implement plans to switch
from Proof of Work to Proof of Stake.

Pros and Cons

Power Consumption
By far the biggest problem of both of these methods is the power consumption needed
for Proof of Work systems. The Bitcoin blockchain alone consumes more power than
Argentina, which would place it in the top 30 of the most power-hungry countries.
Proof of Work isn’t sustainable in the world’s path towards a greener future and coins
that rely solely on Proof of Work will probably lose their value in the mid to long term.
This makes the energy efficiency of Proof of Stake its biggest advantage.

https://medium.com/geekculture/proof-of-stake-vs-proof-of-work-in-cryptocurrencies-f558dbbaec4d 4/8
2/12/23, 3:04 AM Proof of Stake vs. Proof of Work in Cryptocurrencies | by Christian Behler | Geek Culture | Medium

Proof of Work/Bitcoin wastes a lot of energy, Photo by Maxim Tolchinskiy on Unsplash

Scalability
Besides power consumption, the number of transactions per second in Proof of Work
is another big problem. The Bitcoin network can only handle up to 7 transactions per
second (in reality more like 4 per second), which isn’t even close to enough to function
as a global payment processor. Because the number of transactions is so limited, the
transaction fees have gone up significantly in recent years and are now somewhere
around 20$ for a single transaction, which doesn’t really work if you want to buy a
coffee for 2$.

While Proof of Stake itself doesn’t improve scalability, it opens up the possibility to
dramatically increase the number of transactions per second with a concept called
Sharding or Shard Chains.

Decentralization
Another benefit of the Proof of Stake system is the barrier of entry. You don’t need to
invest in expensive mining hardware, which makes it easier to participate in the

https://medium.com/geekculture/proof-of-stake-vs-proof-of-work-in-cryptocurrencies-f558dbbaec4d 5/8
2/12/23, 3:04 AM Proof of Stake vs. Proof of Work in Cryptocurrencies | by Christian Behler | Geek Culture | Medium

forging process and more nodes in a network are beneficial against attacks. Although
you still need a large investment to acquire enough coins for the staking threshold.

Security
A potential security problem for cryptocurrencies is the 51% attack. If a single entity
controls 51% of the hashing power in a mined coin or 51% of the stakes in a staked
coin, they can use their majority to rewrite the blockchain and add fraudulent
transactions to their benefit.

However, this isn’t a real problem for Proof of Stake because, in order to gain a 51%
stake in the currency, the attacker needs to own at least 51% of the coins, which is not
only very expensive but also goes against the interests of the attackers themselves.
When they own such a large share of the currency, they wouldn’t have any interest in
lowering its value by an attack.

Also, stakeholders that are behaving maliciously and are caught can lose a portion of
their stake, which further disincentivizes any attacks.

Infancy
A disadvantage of Proof of Stake is its relative infancy. It isn’t as battle-tested as Proof
of Work, which may reveal problems when it is used in large-scale currencies like
Ethereum.

Are the Rich Getting Richer?


One of the most common criticisms of Proof of Stake is that the rich are getting richer
because you need a large amount of currency to be able to stake the network, and the
chance to win a block is based on the size of the stake, i.e. the more coins you own, the
more coins you get.

It’s certainly the first thing I thought when I heard about the concept. However, when
you think about it, it is just as much of a problem for the Proof of Work model or — let’s
be honest — the world as a whole. The rich are able to buy the expensive hardware
needed for mining and they are able to open mining centers in countries with low
electricity prices. In fact, only a few big mining pools control a big portion of the
Bitcoin network.

https://medium.com/geekculture/proof-of-stake-vs-proof-of-work-in-cryptocurrencies-f558dbbaec4d 6/8
2/12/23, 3:04 AM Proof of Stake vs. Proof of Work in Cryptocurrencies | by Christian Behler | Geek Culture | Medium

It might be more difficult to get started in a Proof of Stake model though. I have been
doing some small-scale mining with my consumer graphics card recently and it has
been profitable after electricity costs. I guess I could have spent the electricity money
on some staked coins instead, but it would only be a one-to-one transaction without
any profit and it would take a very long time to get enough coins to start staking them
this way.

The Proof of Work consensus mechanism used in the Bitcoin blockchain and many
others is inherently flawed. The massive amount of electricity needed to guess the
correct hash value for the next block is not sustainable in a world on the edge of a
climate disaster.

The Proof of Stake method promises to fix some of the problems of Proof of Work. It is
energy-efficient, arguably more secure, and more decentralized. While it isn’t without
problems of its own, it is undoubtedly the future of cryptocurrencies.

Cryptocurrency Bitcoin Ethereum Blockchain Crypto

Open in app Sign up Sign In

Search Medium

Enjoy the read? Reward the writer.Beta


Your tip will go to Christian Behler through a third-party platform of their choice, letting them know you appreciate their
story.

Give a tip

https://medium.com/geekculture/proof-of-stake-vs-proof-of-work-in-cryptocurrencies-f558dbbaec4d 7/8
2/12/23, 3:04 AM Proof of Stake vs. Proof of Work in Cryptocurrencies | by Christian Behler | Geek Culture | Medium

Sign up for Geek Culture Hits


By Geek Culture

Subscribe to receive top 10 most read stories of Geek Culture — delivered straight into your inbox, once a week. Take a
look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/geekculture/proof-of-stake-vs-proof-of-work-in-cryptocurrencies-f558dbbaec4d 8/8
2/12/23, 3:06 AM Proof of work vs Proof of stake. A participation testing algorithm, also… | by Li₿εʁLiøη | Coinmonks | Medium

Published in Coinmonks

Li₿εʁLiøη Follow

Jan 10, 2021 · 7 min read · Listen

Save

Proof of work vs Proof of stake

In this article I want to summarize the most relevant characteristics of both


consensus protocols, based on the pillars of the blockchain, security,
scalability and decentralization, among other approaches.

First of all, you must understand that the entire blockchain is an accounting ledger,
which records movements of money over time, and has a consensus method to be able
to record those transactions, based on a protocol that uses an algorithm, so that a node
at the same time validate blocks, and the rest of the nodes agree, and the chain is
forged consecutively and ordered in time.
https://medium.com/coinmonks/proof-of-stake-vs-proof-of-work-65cce1b280f3 1/7
2/12/23, 3:06 AM Proof of work vs Proof of stake. A participation testing algorithm, also… | by Li₿εʁLiøη | Coinmonks | Medium

The Proof of Stake algorithm (PoS) is a consensus protocol that proposes the validation
of blocks through proof of possession of cryptocurrencies, and thus a node is chosen
to forge a block.

A Proof of Work (PoW) is a system that requires the validator node, that is, the miner,
to perform work at a cost of time and energy consumption. The work consists of
performing a computation with different degrees of difficulty.

Why is consensus used?


In distributed networks there should be no central authority. Consensus means that
the majority of the participants (the validator or mining nodes) agree on a certain
version of the truth, (the ledger records), at a given time. This is how the power of
decision is distributed.

Persistence and Security


Persistence is the ability to continually add new blocks. Security means that only valid
blocks will be added. Both qualities complement each other.

Bitcoin persistence is high as there is a competition between all mining pools to


propose a block. So if one fails, another will be ready. In this way it is ensured that a
new block is eventually prepared at a given time. However, it is a slow process that
takes about 10 minutes (not exact).

The PoS protocol actively participates in choosing the node with the right to create a
block. The chosen node will produce a block in a certain interval, having to insert a
cryptographic proof in the transaction validation, and all other nodes can verify it.
Because block allocation occurs at the start of an epoch (time period), if the node is
unavailable for any reason (eg offline), the interval remains empty (no blocks).
However, this situation is compensated by the fact that an interval only lasts 20
seconds. So there is a high probability that after the next 20 seconds another available
node will produce a block. We could see block production delays only in the event that
no more nodes were available at a given time. Eventually, some running node gets the
right and produces a block. We can conclude that the persistence is also high
compared to Bitcoin, mainly because the period for block production is shorter.

https://medium.com/coinmonks/proof-of-stake-vs-proof-of-work-65cce1b280f3 2/7
2/12/23, 3:06 AM Proof of work vs Proof of stake. A participation testing algorithm, also… | by Li₿εʁLiøη | Coinmonks | Medium

Still, Bitcoin could be considered a bit better if we don’t care about other variables like
block irrevocability, transaction speed, and fees.

Decentralization
The more powerful the PoW participant is, i.e. the one with a higher hash rate, the
more often he wins.

This has led to consensus management in mining farms, where individual miners
delegate their hash rate to pool groups for a higher chance of reward. Mining
competition in PoW has led to having few entities that collect decision power.
Currently, in 2022, more than 50% of the consensus is in 3 mining farms.

In PoS all users with ADA can participate in a consensus algorithm, the validator nodes
with the technology and their funds, and the delegators with their funds in
cryptocurrencies and delegate them to a stake pool. When the user’s ADA succeeds in
creating a block, the pool will create the block on behalf of the user. Stake pool
operators and users will be rewarded. In this way, all users are incentivized to
participate in decentralization.

The main difference in terms of incentives is that in PoW the winner takes all, both the
new coins issued and the fees for that block, while in PoS the rewards are distributed
by first assigning a participation margin to the operator and the rest in the form of
proportional to the funds between the stakepool operator and its delegators. In PoW,
holders cannot participate in consensus, unlike PoS, which decentralizes incentives.

PoS rewards participants proportionally and fairly based on the holding of funds the
users have. Not so in PoW where a few participants get most of the rewards, and small
individual miners have almost no chance of creating a block.

The advantage in PoS is that the incentives tend to be more decentralized in their
distribution than in PoW.

The disadvantage in PoS can be the concentration of funds in a few hands, where the
whales generate a plutocracy in the consensus.

Security
https://medium.com/coinmonks/proof-of-stake-vs-proof-of-work-65cce1b280f3 3/7
2/12/23, 3:06 AM Proof of work vs Proof of stake. A participation testing algorithm, also… | by Li₿εʁLiøη | Coinmonks | Medium

A blockchain is secure when it is not possible to change the history of the ledger
arbitrarily and only new transactions are recorded respecting the general consensus.

The ledger is distributed on many computers around the world. The attacker has no
chance to find all computers and try to change the ledger of all hard drives at the same
time.

The security of the PoW is based on its hash power, that is, the more participants there
are in the network, the more powerful and secure it becomes. PoW electricity
consumption is the largest cost.

In PoS, hash power is replaced by science and mathematics, where the protocol
randomly chooses the validator node of each block, weighing better luck for the node
with more delegation. So PoS is more complex and there may be a higher chance that
something will go wrong or you will be attacked in a vulnerability of your code.

Scalability
Scalability is the ability to process all transactions in the blockchain (layer 1) in a set
time, as new users join the network. It is easy to scale when the network is used by
only a few people. However, it is getting more and more difficult as the number of
users gradually grows.

L2 scaling is not considered as scalability of the blockchain (L1), but as a complement


that allows increasing scalability in the ecosystem.

Generally PoW produces blocks at a lower frequency of time than PoS, due to hash
difficulty management. For example, in the Cardano PoS, blocks are forged every 20
seconds against the 10 minutes of the Bitcoin PoW. This comparison is based on time,
but you must also consider the size of the transaction and other parameters such as
latency, to define the speed of network processing, which is measured in transactions
per second (TPS).

Therefore, it is not possible to say that one protocol is faster than another, in general.

We see that, with the configuration as of July 2022, in PoW, Bitcoin with a block size of
1 MB processes ~7 TPS and Bitcoin Cash, with a block size of 32 MB, is capable of

https://medium.com/coinmonks/proof-of-stake-vs-proof-of-work-65cce1b280f3 4/7
2/12/23, 3:06 AM Proof of work vs Proof of stake. A participation testing algorithm, also… | by Li₿εʁLiøη | Coinmonks | Medium

managing 25,000 transactions per block, through a network stress test performed in
September 2018, or ~42 TPS. Cardano, with PoS, can process up to 88 KB every 20
seconds, that is 2640 KB or 2.58 MB in 10 minutes, with ~60 TPS for average size
transactions (no smart contracts, no metadata, no large token bundles, etc.).

Also, among other scalability methods, PoS allows to introduce Sharding, so in the
future we can expect thousands of transactions per second. Sharding is dividing the
blockchain into individual segments or Shards, where each segment will have a unique
set of smart contracts and account balances, thus increasing transaction performance.

As we can see, PoS can be more scalable in its L1, in theory, through other methods
than just increasing the block size or decreasing the weight of each transaction.

Fees per Transaction


Transaction fees are part of the scalability, since very expensive fees do not encourage
the use of the network.

The fees are influenced by two aspects. Firstly, because of the number of transactions
that the network is capable of processing at a given time and, secondly, because of the
cost required to keep the network running.

The two most used systems for calculating fees are the auction (market fee) and the
fixed one. Bitcoin uses the market fee method, that is, the greater the use of the
network, the cost of the fee increases so that a transaction is processed faster. Cardano
has a fixed fee system, and it only increases in cost by the weight of the transaction
(NFT or smart contracts are heavier), and does not depend on network activity.

The system is more scalable if it processes a greater number of transactions with


accessible fees, and that do not increase prices. In this case, in theory, the Cardano PoS
looks better performing.

Sustainability
Sustainability implies the continuity over time of a system with adequate incentives. If
costs go up and revenues go down, of course there is no such thing as sustainability.
PoW requires large energy consumption over a period of time, unlike PoS.

https://medium.com/coinmonks/proof-of-stake-vs-proof-of-work-65cce1b280f3 5/7
2/12/23, 3:06 AM Proof of work vs Proof of stake. A participation testing algorithm, also… | by Li₿εʁLiøη | Coinmonks | Medium

This relationship is not new, there has been a lot of talk, and I am not referring to
ecology and its defenders who say that Bitcoin is harmful, but to the fact that with high
energy costs, the PoW network is only sustainable when miners can develop activity
with high prices in the cryptocurrency price, so that its rewards can exceed the costs,
and in addition there must be activity of use in the network, since the greater the use,
the more fees and the less need for high prices of the cryptocurrency.

I appreciate your contribution to encourage my articles

₳da (Cardano)

addr1qxdlld4mux6gl38860w297lse59m0646v68x6sraw0asp85ml7mthcd53lzw057u5talp
ngtkl4t5e5wd4q86ulmqz0qskgn43

New to trading? Try crypto trading bots or copy


trading

Blockchain Cryptocurrency

https://medium.com/coinmonks/proof-of-stake-vs-proof-of-work-65cce1b280f3 6/7
2/12/23, 3:06 AM Proof of work vs Proof of stake. A participation testing algorithm, also… | by Li₿εʁLiøη | Coinmonks | Medium

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

We couldn't process your request. Try again, or contact our


support team.

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

Open in app Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/proof-of-stake-vs-proof-of-work-65cce1b280f3 7/7
2/12/23, 3:09 AM Explained: Database Sharding. what do you understand the term… | by Sparsh Gupta | Nerd For Tech | Medium

Published in Nerd For Tech

Sparsh Gupta Follow

Nov 8, 2020 · 7 min read · Listen

Save

Explained: Database Sharding


what do you understand from the term database sharding ??

Well, The word “Shard” means “a small part of a whole“. Hence Sharding means
dividing a larger part into smaller parts. That means dividing the database into small
databases. Well, actually yes but how ?? the answer is below.

https://medium.com/nerd-for-tech/explained-database-sharding-442b72eb28ed#:~:text=Database sharding is the process,smaller chunks%2C called … 1/11


2/12/23, 3:09 AM Explained: Database Sharding. what do you understand the term… | by Sparsh Gupta | Nerd For Tech | Medium

Database sharding is the process of splitting up a database across multiple machines to


improve the scalability of an application. In Sharding, one’s data is broken into two or
more smaller chunks, called logical shards. The logical shards are then distributed
across separate database nodes, referred to as physical shards.

Need for Sharding:

Consider a very large database whose sharding has not been done. For example, let’s
take a DataBase of a college in which all the student’s record (present and past) in the
whole college are maintained in a single database. So, it would contain very very large
number of data, say 100, 000 records.

Now when we need to find a student from this Database, each time around 100, 000
transactions has to be done to find the student, which is very very costly.
https://medium.com/nerd-for-tech/explained-database-sharding-442b72eb28ed#:~:text=Database sharding is the process,smaller chunks%2C called … 2/11
2/12/23, 3:09 AM Explained: Database Sharding. what do you understand the term… | by Sparsh Gupta | Nerd For Tech | Medium

Now consider the same college students records, divided into smaller data shards
based on years. Now each data shard will have around 1000–5000 students records
only. So not only the database became much more manageable, but also the
transaction cost of each time also reduces by a huge factor, which is achieved by
Sharding.

Hence this is why Sharding is needed.

Types of Sharding :

1. Key based Sharding


Key based sharding, also known as hash based sharding, involves using a value taken from
newly written data — such as a customer’s ID number, a client application’s IP address,
a ZIP code, etc. — and plugging it into a hash function to determine which shard the
data should go to. A hash function is a function that takes as input a piece of data (for
example, a customer email) and outputs a discrete value, known as a hash value. In the
case of sharding, the hash value is a shard ID used to determine which shard the
incoming data will be stored on. Altogether, the process looks like this:

https://medium.com/nerd-for-tech/explained-database-sharding-442b72eb28ed#:~:text=Database sharding is the process,smaller chunks%2C called … 3/11


2/12/23, 3:09 AM Explained: Database Sharding. what do you understand the term… | by Sparsh Gupta | Nerd For Tech | Medium

2. Range Based Sharding


Range based sharding involves sharding data based on ranges of a given value. To
illustrate, let’s say you have a database that stores information about all the products
within a retailer’s catalog. You could create a few different shards and divvy up each
products’ information based on which price range they fall into, like this:

https://medium.com/nerd-for-tech/explained-database-sharding-442b72eb28ed#:~:text=Database sharding is the process,smaller chunks%2C called … 4/11


2/12/23, 3:09 AM Explained: Database Sharding. what do you understand the term… | by Sparsh Gupta | Nerd For Tech | Medium

3. Directory Based Sharding


To implement directory based sharding, one must create and maintain a lookup table that
uses a shard key to keep track of which shard holds which data. In a nutshell, a lookup
table is a table that holds a static set of information about where specific data can be
found. The following diagram shows a simplistic example of directory based sharding:

https://medium.com/nerd-for-tech/explained-database-sharding-442b72eb28ed#:~:text=Database sharding is the process,smaller chunks%2C called … 5/11


2/12/23, 3:09 AM Explained: Database Sharding. what do you understand the term… | by Sparsh Gupta | Nerd For Tech | Medium

Directory based sharding is flexible as compared to range-based sharding and key-


based sharding. Range-based sharding limits you to specifying range of values, while
key-based sharding limits you to using fixed hash-based function.

Benefits of Sharding :
The main appeal of sharding a database is that it can help to facilitate horizontal
scaling, also known as scaling out.

Smaller Databases are Easier to Manage. Production databases must be fully


managed for regular backups, database optimization and other common tasks.
With a single large database these routine tasks can be very difficult to accomplish,
if only in terms of the time window required for completion. By using the sharding

https://medium.com/nerd-for-tech/explained-database-sharding-442b72eb28ed#:~:text=Database sharding is the process,smaller chunks%2C called … 6/11


2/12/23, 3:09 AM Explained: Database Sharding. what do you understand the term… | by Sparsh Gupta | Nerd For Tech | Medium

approach, each individual “shard” can be maintained independently, providing a


far more manageable scenario, performing such maintenance tasks in parallel.

Smaller Databases are Faster. The scalability of sharding is apparent and achieved
through the distribution of processing across multiple shards and servers in the
network. What is less apparent is the fact that each individual shard database will
outperform a single large database due to its smaller size. By hosting each shard
database on its own server, the ratio between memory and data on disk is properly
balanced, thereby reducing disk I/O and maximizing system resources. This results
in less contention, greater join performance, faster index searches and fewer
database locks. Therefore, not only can a sharded system scale to new levels of
capacity, individual transaction performance is benefited as well.

Database Sharding can Reduce Costs. Most database sharding implementations take
advantage of low-cost open source databases and commodity databases. The
technique can also take full advantage of reasonably priced “workgroup” versions
of many commercial databases. Sharding works well with commodity multi-core
server hardware, systems that are far less expensive when compared to high-end,
multi-CPU servers and expensive storage area networks (SANs). The overall
reduction in cost due to savings in license fees, software maintenance and
hardware investment is substantial-in some cases 70% when compared to
traditional solutions.

Drawbacks of Sharding :
1. Adds complexity in the system: Properly implementing a sharded database
architecture is a complex task. If not done correctly, there is a significant risk that
the sharding process can lead to lost data or corrupted tables. Sharding also have
major impact on your team’s workflows.

2. Rebalancing data: In a sharded database architecture, sometimes a shard outgrows


other shards and becomes unbalanced, which is also known as database hotspot. In
this case any benefits of sharding the database is canceled out. The database would
be likely need to be re-sharded to allow for a more even data distribution.

3. Joining data from multiple shards: To implement some complex functionalities we


may need to pull lot of data from different sources spread across multiple shards.
https://medium.com/nerd-for-tech/explained-database-sharding-442b72eb28ed#:~:text=Database sharding is the process,smaller chunks%2C called … 7/11
2/12/23, 3:09 AM Explained: Database Sharding. what do you understand the term… | by Sparsh Gupta | Nerd For Tech | Medium

We can’t issue a query and get data from multiple shards. We need to issue multiple
queries to different shards, get all the responses and merge them.

4. No Native Support: Sharding is not natively supported by every database engine.


Because of this, sharding often requires a “roll your own”. This means that
documentation for sharding or tips for troubleshooting problems are often difficult
to find.

The main question Should you implement it on your System ?


Well , maybe or maybe not it depends on lot factor, Some see sharding as an inevitable
outcome for databases that reach a certain size, while others see it as a headache that
should be avoided unless it’s absolutely necessary, due to the operational complexity
that sharding adds.

Because of this added complexity, sharding is usually only performed when dealing
with very large amounts of data. Here are some common scenarios where it may be
beneficial to shard a database:

1. The amount of application data grows to exceed the storage capacity of a single database
node.

2. The volume of writes or reads to the database surpasses what a single node or its read
replicas can handle, resulting in slowed response times or timeouts.

3. The network bandwidth required by the application outpaces the bandwidth available to a
single database node and any read replicas, resulting in slowed response times or timeouts.

Before sharding, you should exhaust all other options for optimizing your database. Some
optimizations you might want to consider include:

1. Setting up a remote database.

2. Implementing caching

3. Creating one or more replicas

4. Upgrading to a large server

https://medium.com/nerd-for-tech/explained-database-sharding-442b72eb28ed#:~:text=Database sharding is the process,smaller chunks%2C called … 8/11


2/12/23, 3:09 AM Explained: Database Sharding. what do you understand the term… | by Sparsh Gupta | Nerd For Tech | Medium

Many big tech company uses this method for their Distributed system and many of
them innovate this method to next extent part for eg. Google,facebook,Amazon & etc.

Google Spanner and HBase — Range Sharding


This type of sharding allows efficiently querying a range of rows by the primary key
values. Examples of such a query is to look up all keys that lie between a lower bound
and an upper bound.

You will saw many big tech companies using sharding architecture in their system
designs.

However,Sharding can be a great solution for those looking to scale their database
horizontally. However, it also adds a great deal of complexity and creates more
potential failure points for your application. Sharding may be necessary for some, but
the time and resources needed to create and maintain a sharded architecture could
outweigh the benefits for others.

Further Reading:

Mr. Moore gets to punt on sharding


Sharding is a database technique where you break up a big database
into many smaller ones. Instead of having 1 million…
signalvnoise.com

Understanding Database Sharding | DigitalOcean


Sharded databases have been receiving lots of attention in recent years,
but many don't have a clear understanding of…
www.digitalocean.com

and great explanation of data sharding by the Guru of system design a.k.a Gaurav Sen

https://medium.com/nerd-for-tech/explained-database-sharding-442b72eb28ed#:~:text=Database sharding is the process,smaller chunks%2C called … 9/11


2/12/23, 3:09 AM Explained: Database Sharding. what do you understand the term… | by Sparsh Gupta | Nerd For Tech | Medium

What is Database Sharding?

I hope you Like it my article , I try to explain the database sharding in most minimal
manner . I have started the series called “ Explained: System design” series for
explaining the system designing in software development .

I hope you have good see you next Time !!

And please do follow me on Social media :

Sparsh Gupta - Noida Institute of Engineering &amp; Technology -


New Delhi, Delhi, India | LinkedIn
View Sparsh Gupta's profile on LinkedIn, the world's largest professional
community. Sparsh has 3 jobs listed on their…
www.linkedin.com

for twitter : https://twitter.com/Sparsh94749562

for Instagram : https://www.instagram.com/sparsh.gupta06/

Open in app Sign up Sign In

https://medium.com/nerd-for-tech/explained-database-sharding-442b72eb28ed#:~:text=Database sharding is the process,smaller chunks%2C calle… 10/11


2/12/23, 3:09 AM Explained: Database Sharding. what do you understand the term… | by Sparsh Gupta | Nerd For Tech | Medium

Software Development Database


Search Medium Sharding Scalability Software Engineering

Enjoy the read? Reward the writer.Beta


Your tip will go to Sparsh Gupta through a third-party platform of their choice, letting them know you appreciate their
story.

Give a tip

Sign up for NFT Weekly Digest


By Nerd For Tech

Subscribe to our weekly News Letter to receive top stories from the Industry Professionals around the world Take a look.

Your email

We couldn't process your request. Try again, or contact our


support team.

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/nerd-for-tech/explained-database-sharding-442b72eb28ed#:~:text=Database sharding is the process,smaller chunks%2C calle… 11/11


2/12/23, 3:12 AM How Sharding Works. This is a continuation of the last blog… | by Jeeyoung Kim | Medium

Jeeyoung Kim Follow

Dec 5, 2014 · 12 min read · Listen

Save

How Sharding Works


This is a continuation of my last post, why I love databases

Your application suddenly becomes popular. Traffic and data is starting to grow, and
your database gets more overloaded every day. People on the internet tell you to scale
your database by sharding, but you don’t really know what it means. You start doing
some research, and run into this post.

Welcome!

What is sharding?
Sharding is a method of splitting and storing a single logical dataset in multiple
databases. By distributing the data among multiple machines, a cluster of database
systems can store larger dataset and handle additional requests. Sharding is necessary
if a dataset is too large to be stored in a single database. Moreover, many sharding
strategies allow additional machines to be added. Sharding allows a database cluster to
scale along with its data and traffic growth.

Sharding is also referred as horizontal partitioning. The distinction of horizontal vs


vertical comes from the traditional tabular view of a database. A database can be split
vertically — storing different tables & columns in a separate database, or horizontally
— storing rows of a same table in multiple database nodes.

https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6 1/12
2/12/23, 3:12 AM How Sharding Works. This is a continuation of the last blog… | by Jeeyoung Kim | Medium

An illustrated example of vertical and horizontal partitioning

# Example of vertical partitioning


fetch_user_data(user_id) -> db[“USER”].fetch(user_id)
fetch_photo(photo_id) -> db[“PHOTO”].fetch(photo_id)
# Example of horizontal partitioning
fetch_user_data(user_id) -> user_db[user_id % 2].fetch(user_id)

Vertical partitioning is very domain specific. You draw a logical split within your
application data, storing them in different databases. It is almost always implemented
at the application level — a piece of code routing reads and writes to a designated
database.

In contrast, sharding splits a homogeneous type of data into multiple databases. You
can see that such an algorithm is easily generalizable. That’s why sharding can be
implemented at either the application or database level. In many databases, sharding
is a first-class concept, and the database knows how to store and retrieve data within a
cluster. Almost all modern databases are natively sharded. Cassandra, HBase, HDFS,
and MongoDB are popular distributed databases. Notable examples of non-sharded
modern databases are Sqlite, Redis (spec in progress), Memcached, and Zookeeper.

There exist various strategies to distribute data into multiple databases. Each strategy
has pros and cons depending on various assumptions a strategy makes. It is crucial to
understand these assumptions and limitations. Operations may need to search through
many databases to find the requested data. These are called cross-partition operations
and they tend to be inefficient. Hotspots are another common problem — having
https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6 2/12
2/12/23, 3:12 AM How Sharding Works. This is a continuation of the last blog… | by Jeeyoung Kim | Medium

uneven distribution of data and operations. Hotspots largely counteract the benefits of
sharding.

Before you start: you may not need to shard!


Sharding adds additional programming and operational complexity to your
application. You lose the convenience of accessing the application’s data in a single
location. Managing multiple servers adds operational challenges. Before you begin,
see whether sharding can be avoided or deferred.

Get a more expensive machine. Storage capacity is growing at the speed of Moore’s
law. From Amazon, you can get a server with 6.4 TB of SDD, 244 GB of RAM and 32
cores. Even in 2013, Stack Overflow runs on a single MS SQL server. (Some may argue
that splitting Stack Overflow and Stack Exchange is a form of sharding)

If your application is bound by read performance, you can add caches or database
replicas. They provide additional read capacity without heavily modifying your
application.

Vertically partition by functionality. Binary blobs tend to occupy large amounts of


space and are isolated within your application. Storing files in S3 can reduce storage
burden. Other functionalities such as full text search, tagging, and analytics are best
done by separate databases.

Not everything may need to be sharded. Often times, only few tables occupy a majority
of the disk space. Very little is gained by sharding small tables with hundreds of rows.
Focus on the large tables.

Driving Principles
To compare the pros and cons of each sharding strategy, I’ll use the following
principles.

How the data is read — Databases are used to store and retrieve data. If we don’t need
to read data at all, we can simply write it to /dev/null. If we only need to batch process
the data once in a while, we can append to a single file and periodically scan through
them. Data retrieval requirements (or lack thereof) heavily influence the sharding
strategy.
https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6 3/12
2/12/23, 3:12 AM How Sharding Works. This is a continuation of the last blog… | by Jeeyoung Kim | Medium

How the data is distributed — Once you have a cluster of machines acting together, it is
important to ensure that data and work is evenly distributed. Uneven load causes
storage and performance hotspots. Some databases redistribute data dynamically,
while others expect clients to evenly distribute and access data.

Once sharding is employed, redistributing data is an important problem. Once your


database is sharded, it is likely that the data is growing rapidly. Adding an additional
node becomes a regular routine. It may require changes in configuration and moving
large amounts of data between nodes. It adds both performance and operational
burden.

Common Definitions
Many databases have their own terminologies. The following terminologies are used
throughout to describe different algorithms.

Shard or Partition Key is a portion of primary key which determines how data should
be distributed. A partition key allows you to retrieve and modify data efficiently by
routing operations to the correct database. Entries with the same partition key are
stored in the same node. A logical shard is a collection of data sharing the same
partition key. A database node, sometimes referred as a physical shard, contains
multiple logical shards.

Case 1 — Algorithmic Sharding


One way to categorize sharding is algorithmic versus dynamic. In algorithmic
sharding, the client can determine a given partition’s database without any help. In
dynamic sharding, a separate locator service tracks the partitions amongst the nodes.

https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6 4/12
2/12/23, 3:12 AM How Sharding Works. This is a continuation of the last blog… | by Jeeyoung Kim | Medium

An algorithmically sharded database, with a simple sharding function

Algorithmically sharded databases use a sharding function (partition_key) ->


database_id to locate data. A simple sharding function may be “hash(key) % NUM_DB”.

Reads are performed within a single database as long as a partition key is given.
Queries without a partition key require searching every database node. Non-
partitioned queries do not scale with respect to the size of cluster, thus they are
discouraged.

Algorithmic sharding distributes data by its sharding function only. It doesn’t consider
the payload size or space utilization. To uniformly distribute data, each partition
should be similarly sized. Fine grained partitions reduce hotspots — a single database
will contain many partitions, and the sum of data between databases is statistically
likely to be similar. For this reason, algorithmic sharding is suitable for key-value
databases with homogeneous values.

Resharding data can be challenging. It requires updating the sharding function and
moving data around the cluster. Doing both at the same time while maintaining
consistency and availability is hard. Clever choice of sharding function can reduce the
amount of transferred data. Consistent Hashing is such an algorithm.

Examples of such system include Memcached. Memcached is not sharded on its own,
but expects client libraries to distribute data within a cluster. Such logic is fairly easy to
implement at the application level.

Case 2— Dynamic Sharding

https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6 5/12
2/12/23, 3:12 AM How Sharding Works. This is a continuation of the last blog… | by Jeeyoung Kim | Medium

A dynamic sharding scheme using range based partitioning.

In dynamic sharding, an external locator service determines the location of entries. It


can be implemented in multiple ways. If the cardinality of partition keys is relatively
low, the locator can be assigned per individual key. Otherwise, a single locator can
address a range of partition keys.

To read and write data, clients need to consult the locator service first. Operation by
primary key becomes fairly trivial. Other queries also become efficient depending on
the structure of locators. In the example of range-based partition keys, range queries
are efficient because the locator service reduces the number of candidate databases.
Queries without a partition key will need to search all databases.

Dynamic sharding is more resilient to nonuniform distribution of data. Locators can


be created, split, and reassigned to redistribute data. However, relocation of data and
update of locators need to be done in unison. This process has many corner cases with
a lot of interesting theoretical, operational, and implementational challenges.

The locator service becomes a single point of contention and failure. Every database
operation needs to access it, thus performance and availability are a must. However,
locators cannot be cached or replicated simply. Out of date locators will route
operations to incorrect databases. Misrouted writes are especially bad — they become
undiscoverable after the routing issue is resolved.

Since the effect of misrouted traffic is so devastating, many systems opt for a high
consistency solution. Consensus algorithms and synchronous replications are used to

https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6 6/12
2/12/23, 3:12 AM How Sharding Works. This is a continuation of the last blog… | by Jeeyoung Kim | Medium

store this data. Fortunately, locator data tends to be small, so computational costs
associated with such a heavyweight solution tends to be low.

Due to its robustness, dynamic sharding is used in many popular databases. HDFS uses
a Name Node to store filesystem metadata. Unfortunately, the name node is a single
point of failure in HDFS. Apache HBase splits row keys into ranges. The range server is
responsible for storing multiple regions. Region information is stored in Zookeeper to
ensure consistency and redundancy. In MongoDB, the ConfigServer stores the
sharding information, and mongos performs the query routing. ConfigServer uses
synchronous replication to ensure consistency. When a config server loses
redundancy, it goes into read-only mode for safety. Normal database operations are
unaffected, but shards cannot be created or moved.

Case 3 — Entity Groups

Entity Groups partitions all related tables together

Previous examples are geared towards key-value operations. However, many databases
have more expressive querying and manipulation capabilities. Traditional RDBMS
features such as joins, indexes and transactions reduce complexity for an application.

The concept of entity groups is very simple. Store related entities in the same partition
to provide additional capabilities within a single partition. Specifically:

1. Queries within a single physical shard are efficient.

2. Stronger consistency semantics can be achieved within a shard.

https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6 7/12
2/12/23, 3:12 AM How Sharding Works. This is a continuation of the last blog… | by Jeeyoung Kim | Medium

This is a popular approach to shard a relational database. In a typical web application


data is naturally isolated per user. Partitioning by user gives scalability of sharding
while retaining most of its flexibility. It normally starts off as a simple company-
specific solution, where resharding operations are done manually by developers.
Mature solutions like Youtube’s Vitess and Tumblr’s Jetpants can automate most
operational tasks.

Queries spanning multiple partitions typically have looser consistency guarantees than
a single partition query. They also tend to be inefficient, so such queries should be
done sparingly.

However, a particular cross-partition query may be required frequently and efficiently.


In this case, data needs to be stored in multiple partitions to support efficient reads.
For example, chat messages between two users may be stored twice — partitioned by
both senders and recipients. All messages sent or received by a given user are stored in
a single partition. In general, many-to-many relationships between partitions may
need to be duplicated.

Entity groups can be implemented either algorithmically or dynamically. They are


usually implemented dynamically since the total size per group can vary greatly. The
same caveats for updating locators and moving data around applies here. Instead of
individual tables, an entire entity group needs to be moved together.

Other than sharded RDBMS solutions, Google Megastore is an example of such a


system. Megastore is publicly exposed via Google App Engine’s Datastore API.

Case 4 — Hierarchical keys &


Column-Oriented Databases

https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6 8/12
2/12/23, 3:12 AM How Sharding Works. This is a continuation of the last blog… | by Jeeyoung Kim | Medium

Column-oriented databases partition its data by row keys.

Column-oriented databases are an extension of key-value stores. They add


expressiveness of entity groups with a hierarchical primary key. A primary key is
composed of a pair (row key, column key). Entries with the same partition key are stored
together. Range queries on columns limited to a single partition are efficient. That’s
why a column key is referred as a range key in DynamoDB.

This model has been popular since mid 2000s. The restriction given by hierarchical
keys allows databases to implement data-agnostic sharding mechanisms and efficient
storage engines. Meanwhile, hierarchical keys are expressive enough to represent
sophisticated relationships. Column-oriented databases can model a problem such as
time series efficiently.

Column-oriented databases can be sharded either algorithmically or dynamically. With


small and numerous small partitions, they haveconstraints similarto key-value stores.
Otherwise, dynamic sharding is more suitable.

The term column database is losing popularity. Both HBase and Cassandra once
marketed themselves as column databases, but not anymore. If I need to categorize
these systems today, I would call them hierarchical key-value stores, since this is the
most distinctive characteristic between them.

https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6 9/12
2/12/23, 3:12 AM How Sharding Works. This is a continuation of the last blog… | by Jeeyoung Kim | Medium

Originally published in 2005, Google BigTable popularized column-oriented databases


amongst the public. Apache HBase is a BigTable-like database implemented on top of
Hadoop ecosystem. Apache Cassandra previously described itself as a column
database — entries were stored in column families with row and column keys. CQL3,
the latest API for Cassandra, presents a flattened data model — (partition key, column
key) is simply a composite primary key. Amazon’s Dynamo popularized highly available
databases. Amazon DynamoDB is a platform-as-a-service offering of Dynamo.
DynamoDB uses (hash key, range key) as its primary key.

Understanding the pitfalls


Many caveats are discussed above. However, there are other common issues to watch
out for with many strategies.

A logical shard (data sharing the same partition key) must fit in a single node. This is
the most important assumption, and is the hardest to change in future. A logical
shard is an atomic unit of storage and cannot span across multiple nodes. In such a
situation, the database cluster is effectively out of space. Having finer partitions
mitigates this problem, but it adds complexity to both database and application. The
cluster needs to manage additional partitions and the application may issue additional
cross-partition operations.

Many web applications shard data by user. This may become problematic over time, as
the application accumulates power users with a large amount of data. For example, an
email service may have users with terabytes of email. To accommodate this, a single
user’s data is split into partitions. This migration is usually very challenging as it
invalidates many core assumptions on the underlying data model.

https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6 10/12
2/12/23, 3:12 AM How Sharding Works. This is a continuation of the last blog… | by Jeeyoung Kim | Medium

Illustration of a hotspot at the end of partition range even after numerous shard splits.

Even though dynamic sharding is more resilient to unbalanced data, an unexpected


workload can reduce its effectiveness. In a range-partitioned sharding scheme,
inserting data in partition key order creates hot spots. Only the last range will receive
inserts. This partition range will split as it becomes large. However, out of the split
ranges, only the latest range will receive additional writes. The write throughput of a
cluster is effectively reduced to a single node. MongoDB, HBase, and Google Datastore
discourages this.

In the case of dynamic sharding, it is bad to have a large number of locators. Since the
locators are frequently accessed, they are normally served directly from RAM. HDFS’s
Name Node needs at least 150 bytes of memory per file for its metadata, thus storing a
large number of files is prohibitive. Many databases allocate a fixed amount of
resources per partition range. HBase recommends about 20~200 regions per server.

Concluding Remarks
There are many topics closely related to sharding not covered here. Replication is a
crucial concept in distributed databases to ensure durability and availability.
Replication can be performed agnostic to sharding or tightly coupled to the sharding
strategies.
https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6 11/12
2/12/23, 3:12 AM How Sharding Works. This is a continuation of the last blog… | by Jeeyoung Kim | Medium

The details behind data redistribution are important. As previously mentioned,


ensuring both the data and locators are in sync while the data is being moved is a hard
problem. Many techniques make a tradeoff between consistency, availability, and
performance. For example, HBase’s region splitting is a complex multi-step process. To
make it worse, a brief downtime is required during a region split.

None of this is magic. Everything follows logically once you consider how the data is
stored and retrieved. Cross-partition queries are inefficient, and many sharding
schemes attempt to minimize the number of cross-partition operations. On the other
hand, partitions need to be granular enough to evenly distribute the load amongst
nodes. Finding the right balance can be tricky. Of course, the best solution in software
engineering is avoiding the problem altogether. As stated before, there are many
successful websites operating without sharding. See if you can defer or avoid the
problem altogether.

Happy databasing!
Open in app Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/@jeeyoungk/how-sharding-works-b4dec46b3f6 12/12
2/12/23, 3:16 AM What Are Altcoins and How Do They Differ From Bitcoin? | by MaskEX | Coinmonks | Medium

Published in Coinmonks

MaskEX Follow

Jul 10, 2022 · 4 min read · Listen

Save

What Are Altcoins and How Do They Differ From


Bitcoin?

ALTCOINS

The first cryptocurrency to exist was Bitcoin, which debuted in 2008. It was created by
an individual or group named “Satoshi Nakamoto.” Apart from bitcoin, there are

https://medium.com/coinmonks/what-are-altcoins-and-how-do-they-differ-from-bitcoin-31bb789a8896 1/6
2/12/23, 3:16 AM What Are Altcoins and How Do They Differ From Bitcoin? | by MaskEX | Coinmonks | Medium

cryptocurrencies referred to as altcoins. What are they, and how do they differ from
bitcoin?

What are Altcoins?


The term “Altcoin,” which is short for “Alternative Coin,” simply refers to a Bitcoin
substitute. They are digital currencies that employ blockchain technology to enable
safe peer-to-peer exchanges.

All cryptocurrencies except Bitcoin are referred to as altcoins. Because most


cryptocurrencies are forked from one of Bitcoin or Ethereum (ETH), some people
define altcoins as all cryptocurrencies other than those two. Altcoins expand on
Bitcoin’s success by modestly altering the rules to cater to diverse users.

While using the same decentralized idea that gave rise to Bitcoin, altcoins go further
by having their special characteristics.

For instance, the idea of “smart contracts,” which are computer programs that utilize
blockchain technology to autonomously carry out agreements between two parties,
was invented by Ethereum. New applications and use cases for cryptography were thus
made possible.

The following are examples of altcoins:

Ripple XRP

Cardano (ADA)

Solana (SOL)

Dogecoin (DOGE)

Polkadot (DOT)

Polygon (MATIC)

Uniswap (UNI)

Avalanche (AVAX)

https://medium.com/coinmonks/what-are-altcoins-and-how-do-they-differ-from-bitcoin-31bb789a8896 2/6
2/12/23, 3:16 AM What Are Altcoins and How Do They Differ From Bitcoin? | by MaskEX | Coinmonks | Medium

Cronos (CRO)

Helium (HNT)

Types of Altcoins
Stablecoins

Cryptocurrencies known as stablecoins are backed by a physical good like gold or are
tied to a fiat currency like the US dollar to preserve price stability. USDC, Dai, and
USDT are among the examples. As they combat the extreme volatility of other
cryptocurrencies, stablecoins are becoming increasingly popular as liquidity vehicles
in the digital world.

A stablecoin’s value may be linked to a basket of reference assets and being directly
tethered to an asset to maintain price stability. Commodities, fiat money, government
securities, digital assets, or any mix of these can be included in the reference asset
basket.

Examples are: USDT, USDC, and DAI

New to trading? Try crypto trading bots or copy trading

Utility Tokens

A cryptocurrency token with a specific use case within a particular ecosystem is called
a utility token. These tokens enable users to carry out specified actions on a particular
network.

An ecosystem’s utility token is special. For instance, the FIL token on Filecoin may only
be used to pay for storage. Other than speculating on its worth, FIL has no use. Any
utility token may be stated to be the same way.

Unlike cryptocurrencies, utility tokens cannot be mined. Instead, they are often pre-
mined, meaning they are generated all at once and distributed in a way decided upon
by the project team.

https://medium.com/coinmonks/what-are-altcoins-and-how-do-they-differ-from-bitcoin-31bb789a8896 3/6
2/12/23, 3:16 AM What Are Altcoins and How Do They Differ From Bitcoin? | by MaskEX | Coinmonks | Medium

Examples of utility tokens include Filecoin (FIL), Basic Attention Token (BAT), and
Polygon (MATIC).

Governance Tokens

A specific kind of utility token known as a governance token is used to secure voting
rights (the opportunity to vote in blockchain-wide elections). Users may vote on
choices that affect blockchain ecosystems using governance tokens, as the name
implies.

Examples of governance tokens: Maker (MKR), Apecoin (APE), and Aave (AAVE).

Meme Coins

Meme coins, as their name indicates, are parodies or humorous interpretations of


other well-known cryptocurrencies. However, they usually become well-known
quickly and are frequently promoted online by famous influencers or investors looking
to make quick money.

Examples of meme coins are Dogecoin (DOGE), Shiba Inu (SHIB), and MonaCoin
(MONA).

Security Tokens

Tokenized assets provided on stock exchanges include security tokens. Tokenization is


the conversion of an asset’s value into a token, which is subsequently distributed to
investors. Any asset, including stocks and real estate, may be tokenized. But, of course,
the asset must be kept and secured to operate. If not, the tokens wouldn’t have any
value because they wouldn’t stand for anything.

Examples of security tokens are Swarm (BZZ) and Polymath (POLY).

Payment Tokens

Payment tokens are used to transact directly between buyers and sellers of products
and services on digital marketplaces, as opposed to via an intermediary, as is common
in traditional banking and finance. Of course, the bulk of cryptocurrencies and tokens

https://medium.com/coinmonks/what-are-altcoins-and-how-do-they-differ-from-bitcoin-31bb789a8896 4/6
2/12/23, 3:16 AM What Are Altcoins and How Do They Differ From Bitcoin? | by MaskEX | Coinmonks | Medium

fit within this category, whether they are security or utility tokens. But not all utility
tokens may also function as payment tokens.

Examples of payment tokens are Litecoin (LTC) and Dash (DASH).

Bitcoin vs Altcoins
Bitcoin and altcoins are different from one another in many respects, despite the fact
that they are quite similar and operate on the same basis.

Since the technique used to construct the cryptographic blocks, known as proof-of-
work, is so energy-consuming, demanding, and constrained, implementing and using
Bitcoin is exceedingly challenging.

Altcoins, however, have developed beyond this. Instead, they make use of the proof-of-
stake mechanism to get an edge over the competition, which requires less energy and
speeds up transaction validation.

These criticisms of Bitcoin have been skillfully handled by altcoins, which have been
operating along the lines of sustainability and scalability.

Join Coinmonks Telegram Channel and Youtube


Channel learn about crypto trading and investing
Also, Read
Anny Trade Review | Huobi Margin Trading

Decentralized Exchanges | Bitbns FIP | Pionex Review

10 Best Places to Buy Crypto with Credit Card

Best Cardano Wallets | Bingbon Copy Trading

How to add Arbitrum to MetaMask wallet?

Bitcoin Altcoins

https://medium.com/coinmonks/what-are-altcoins-and-how-do-they-differ-from-bitcoin-31bb789a8896 5/6
2/12/23, 3:16 AM What Are Altcoins and How Do They Differ From Bitcoin? | by MaskEX | Coinmonks | Medium

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you day's best crypto news, Technical analysis, Discount Offers, and MEMEs directly in your
inbox, by CoinCodeCap.com Take a look.

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
Open in app
practices. Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/coinmonks/what-are-altcoins-and-how-do-they-differ-from-bitcoin-31bb789a8896 6/6
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

Published in DataDrivenInvestor

You have 2 free member-only stories left this month. Sign up for Medium and get an extra one

Stephen Dalton Follow

Feb 9 · 9 min read · · Listen

Save

CRYPTOCURRENCY | BLOCKCHAIN

Top 5 Bargain Gaming Altcoins to Own with $50


in 2023
Buying these five bargain gaming altcoins won’t make you a millionaire
(well, maybe not), but they could give your investment portfolio an
incredible boost

https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 1/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

Top 5 bargain gaming altcoins to buy now with $50 — PowerPoint Design Creation by the author.

OK, the cryptocurrency market has been on a tear for the past five weeks. Now you’re
worried that if you get in, you’ll somehow sabotage the system, and it will suddenly
turn the other way. Let’s look at these bargain gaming altcoins.

Don’t feel like the Lone Ranger; most new investors or those coming back into the
market have the same worries. The way to overcome those doubts is with dollar-cost-
averaging (DCA).

“What is dollar-cost averaging in crypto? Dollar-cost


averaging means making smaller, equal buys on an
ongoing basis, instead of making large or irregular
crypto buys.” — The Bit Pay Blog.
Who says you must buy $500 worth of Bitcoin or one altcoin to start investing?

I use $50 in most of my articles because most workers can afford to put away $50 a
month for their future. You just have to ask yourself, what am I willing to give up
setting myself on the right path and not worry about still working at 65 or 70.
https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 2/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

Maybe it’s that daily Starbucks or those cigarettes that are destroying your health. It’s
up to you.

Several artificial intelligence (AI) altcoins are doing quite well during the crypto
winter’s thaw. Look at Fetch AI (FET) or Singularity Net (AGIX). You might do well with
$50 worth of either of those too.

If you invest $50 in even the most expensive of these five gaming altcoins, you could
get 56 $SAND tokens, but by buying the least expensive, you could get 29,976 IBAT
tokens.

Once I publish this, a few of my readers will come back and ask why I didn’t include…
insert any of the other gazillion gaming altcoins. It never fails. Someone always does.

Some I already wrote about elsewhere or I’m not familiar with it. I am familiar with
these and own a few, so I am confident that what I write is correct.

These are not in any particular order except familiarity. Some of these are trending.
But do yourself a favor and do your own research (DYOR).

What’s trending today could be in the toilet tomorrow.

As the 2022 Rug Pull Report on Coin Edition warned, 350 scam coins were created each
day. That’s 117,629 chances to get scammed, as nearly two million investors were last
year. That’s not counting the 1.8 million who lost money due to the bankruptcy of
Celsius, Voyager, and FTX.

DYOR, and only leave your coins on an exchange if you have them locked for staking.
However, even that is a substantial risk. Otherwise, they wouldn’t pay so much.

Remember Squid Game ($SQUID), the $3.3 million rug pull. The developers wrote it
into a smart contract that buyers wouldn’t be able to resell. May they rot in hell!

A friend of mine lost about $2,000 worth of ETH they had staked when the exchange
stopped servicing investors in their country. They were warned to remove their crypto
by a specific date but couldn’t because they were locked.

https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 3/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

Anyway, be careful and consider these five bargain gaming altcoins only after you
DYOR.

Top Five Bargain Gaming Altcoins to Buy Now

#1 — Decentraland ($MANA)
Decentraland is a virtual reality (VR) platform built on Ethereum. The Decentraland
opened to prospectors three years ago in FEB ’20. Gamers and imaginative
homesteaders can buy plots of land to develop using $MANA, an ERC-20 token you
burn to get ERC-721 $LAND tokens.

MANA is also used to buy avatars and other “in-game” items in the marketplace.

$MANA Price Data

“The live Decentraland price today is $0.788985 USD with a 24-hour trading volume of
$376,659,186 USD. We update our MANA to USD price in real-time. Decentraland is up
7.83% in the last 24 hours. The current CoinMarketCap ranking is #42, with a live market
cap of $1,463,634,379 USD. It has a circulating supply of 1,855,084,192 MANA coins and
the max. supply is not available.” — Coin Market Cap.

I’ve never liked a coin with an unavailable max supply. What makes them any different
than a government with the ability to “print on demand?”

Let’s say the price gets to $20, and they decide to put 5 billion more coins into
circulation. The price will plunge like the Titanic. Otherwise, I do like $MANA.

If you buy an altcoin with no max supply, keep an eye out for increased production.

Decentraland: Why MANA Will RULE the Metaverse!! 👑

https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 4/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

Decentraland: Why MANA Will RULE The Metaverse!! 👑

30-Day Activity Chart

MANA to USD 30-Day Chart Screenshot of CoinMarketCap 8 FEB 23.

As you can see in the chart, MANA has doubled in the previous 30 days.
https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 5/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

#2 — The Sandbox ($SAND) Is One of the Bargain Gaming Altcoins


The Sandbox is a world-famous virtual world based on the blockchain. It combines
non-fungible tokens (NFT) and decentralized autonomous organizations (DAO)
administration to create a thriving VR community where players can commune and
communicate with avatars and buy, build, create, and sell land plots.

Players use the SAND token to facilitate transactions on the Sandbox platform.

Sandbox Game is INSANE!! SAND Price Potential?? 📈

Sandbox Game is INSANE!! SAND Price Potential?? 📈

$SAND Price Data

“The live The Sandbox price today is $0.888426 USD with a 24-hour trading volume of
$990,579,049 USD. We update our SAND to USD price in real-time. The Sandbox is up
23.05% in the last 24 hours. The current CoinMarketCap ranking is #43, with a live
market cap of $1,332,168,091 USD. It has a circulating supply of 1,499,470,108 SAND
coins and a max. supply of 3,000,000,000 SAND coins.” — Coin Market Cap.

30-Day Activity Chart

https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 6/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

SAND to USD 30-Day Chart Screenshot of CoinMarketCap 8 FEB 23.

This might account for the drastic move to the upside:

#3 — Gala Games ($GALA)


https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 7/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

GALA is a decentralized gaming token that facilitates transactions within the Gala
Games ecosystem. It is built on the Ethereum blockchain and is an ERC-20 standard
token. It is a utility token to access various games and services within the ecosystem.

Their most popular games are Town Star, a play-to-earn (P2E) farming game like
Farmville, which the founders of Gala Games created for Zynga, and Spider Tanks.

Want to know more? I wrote about it one month ago when the price was $0.023681,
about half of today’s price of $0.052295.

What’s Up with the Bargain Cryptocurrency GALA?


If you haven’t been monitoring the cryptocurrency prices, and I could
understand why not (FUD), you might have missed…
medium.datadriveninvestor.com

GALA Games: NEXT BEST Gaming Token?? Deep Dive!!

GALA Games: NEXT BEST Gaming Token?? Deep Dive!!

GALA Price Data

https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 8/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

“The live Gala price today is $0.052295 USD with a 24-hour trading volume of
$165,846,591 USD. We update our GALA to USD price in real-time. Gala is down 0.62% in
the last 24 hours. The current CoinMarketCap ranking is #111, with a live market cap of
$364,873,289 USD. It has a circulating supply of 6,977,205,436 GALA coins and the max.
supply is not available.” — Coin Market Cap.

30-Day Activity Chart

GALA to USD 30-Day Chart Screenshot of CoinMarketCap 8 FEB 23.

#4 — Star Atlas ($ATLAS)


Star Atlas is the massive multiplayer online (MMO) game in the virtual reality (VR)
gaming metaverse. This real-time, cinema-quality environment is built on Unreal
Engine 5. It is a futuristic sci-fi game set in the year 2620. Three significant factions,
MUD — humankind, a merger of aliens known as ONI, and the sentient android group,
Ustur, emerge to compete for control of resources.

The $ATLAS token is a bargain gaming altcoins that you should own now with $50.

Star Atlas First Look! Let’s See Our Ships! │Star Atlas Showroom Review
https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 9/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

Star Atlas First Look! Let's See Our Ships! │Star Atlas Showroom Review

$ATLAS Price Data

“The live Star Atlas price today is $0.004157 USD with a 24-hour trading volume of
$1,898,068 USD. We update our ATLAS to USD price in real-time. Star Atlas is up 3.74% in
the last 24 hours. The current CoinMarketCap ranking is #460, with a live market cap of
$40,755,100 USD. It has a circulating supply of 9,803,356,511 ATLAS coins and a max.
supply of 36,000,000,000 ATLAS coins.” — Coin Market Cap.

At the current price, you can buy 12,028 tokens with $50, then sit back and wait for the
next bull run. I think you can do the math if this gaming altcoin becomes $1.00.

30-Day Activity Chart

https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 10/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

ATLAS to USD 30-Day Chart Screenshot of CoinMarketCap 8 FEB 23.

#5 — Battle Infinity (IBAT)

https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 11/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

Is Battle Infinity and the metaverse Battle Arena the future face of fantasy sports? It
could be. However, it will take a lot of promotion. Currently, Battle Infinity is made up
of various P2E games within the IBAT Battle Arena.

In the Battle Arena metaverse world, gamers can battle and play. They can also interact
through their avatars, talk shit, and draft fantasy teams. The virtual world of Battle
Arena can be something special if the founders create a medium for real-world fantasy
sports.

$IBAT is one of the bargain gaming altcoins with tremendous upside potential.

BATTLE INFINITY | MULTIVERSE OF METAVERSE | TEASER

BATTLE INFINITY | MULTIVERSE OF METAVERSE | TEASER

$IBAT Price Data

“The live Battle Infinity price today is $0.001668 USD with a 24-hour trading volume of
$153,288 USD. We update our IBAT to USD price in real-time. Battle Infinity is down
1.17% in the last 24 hours. The current CoinMarketCap ranking is #3400, with a live
market cap of not available. The circulating supply is not available and a max. supply of
10,000,000,000 IBAT coins.” — Coin Market Cap.

https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 12/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

At that price, you could get nearly 30,000 tokens. Of course, if it keeps going down, you
could lose a significant portion of your $50. So, keep an eye on it.

30-Day Activity Chart

IBAT to USD 30-Day Chart Screenshot of CoinMarketCap 7 FEB 23.

Final Takeaways from Bargain Gaming Altcoins


These bargain gaming altcoins have upward movement potential. Many of them have
enjoyed double digit gains during the past 5-week run. However, there should be plenty
of room for growth in an extended bull run.

I would caution you to do your own research (DYOR) and never invest money you
cannot afford to lose.

You might also like one of these:

5 Fabulously Fun P2E Games for 2023 [with Video Explainers]

https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 13/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

Play-to-earn (P2E) games are a new gaming experience gaining


popularity. Now, you can own many in-game items as…
medium.datadriveninvestor.com

Why Is the Bargain Cryptocurrency RNDR Soaring?


ICYMI, Apple made Octane X available in the Apple Store. Imagine
having 3D rendering right at your fingertips. The…
medium.datadriveninvestor.com

Want a Little Crypto MAGIC in Your Life?


The gaming token and bargain cryptocurrency, MAGIC is up 300% over
the past thirty days. Yet, it could still be an…
medium.datadriveninvestor.com

DISCLAIMER: This article is for entertainment and informational purposes only. It


should not be considered financial or legal advice. Not all information will be
accurate. I am not a financial adviser, and you should consider anything I write as
informational and friendly banter to show you what is possible if you invest your
money in these vehicles. However, there are no guarantees. Consult a financial
professional before making any significant financial decisions.

Note: This post contains affiliate links. Read my disclosure statement for additional
information.

About the Author Photo by Jean Springs from Pexels.

https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 14/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

Stephen Dalton is a retired US Army First Sergeant with a degree in journalism from
the University of Maryland and a Certified US English Chicago Manual of Style Editor.
Also, a Top Writer in Nutrition, Investing, Travel, Fiction, Transportation, VR, NFL,
Design, Creativity, and Short Story.

Website | Facebook | Twitter | Instagram | Reddit | Ko-fi | NewsBreak | Simily

If you want to make money writing online, start by signing up for a Medium Membership
Today!

It only costs $5 per month, I’ve made money every month since I became a paying member,
and you can too. Thank you.

Join Medium with my referral link - Stephen Dalton


Read every story from Stephen Dalton (and thousands of other writers
on Medium). Your membership fee directly supports…
stephendalton.medium.com

Subscribe to DDIntel Here.

Visit our website here: https://www.datadriveninvestor.com

Join our network here: https://datadriveninvestor.com/collaborate

Cryptocurrency Blockchain Fintech Investing Business

https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 15/16
2/12/23, 3:19 AM Top 5 Bargain Gaming Altcoins to Own with $50 in 2023 | by Stephen Dalton | Feb, 2023 | DataDrivenInvestor

Enjoy the read? Reward the writer.Beta


Your tip will go to Stephen Dalton through a third-party platform of their choice, letting them know you appreciate their
story.

Give a tip

Get an email whenever Stephen Dalton publishes.


By signing up, you will create a Medium account if you don’t already have one. Review
our Privacy Policy for more information about our privacy practices.

Subscribe

Open in app Sign up Sign In

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.datadriveninvestor.com/top-5-bargain-gaming-altcoins-to-own-with-50-in-2023-30b297e1b98c 16/16
2/12/23, 3:23 AM Finding the 100x Altcoin. Altcoins are cryptocurrencies other… | by Rohan Joseph | DataDrivenInvestor

Published in DataDrivenInvestor

Rohan Joseph Follow

Dec 31, 2021 · 5 min read · Listen

Save

Finding the 100x Altcoin

Source

https://medium.datadriveninvestor.com/finding-the-100x-altcoin-3c9af2bdd7b5 1/11
2/12/23, 3:23 AM Finding the 100x Altcoin. Altcoins are cryptocurrencies other… | by Rohan Joseph | DataDrivenInvestor

Altcoins are cryptocurrencies other than Bitcoin, which share some similar
characteristics as Bitcoin but may differ in their mechanism to produce blocks or
validate transactions. It improves on aspects of Bitcoin, offers high potential rewards,
but does not have Bitcoin’s market share, and is significantly riskier as many altcoins
end up failing. There are over 16000 coins as of December 2021.

This article will take us through the top-down approach of finding the altcoin gems as
outlined by Guy in this video, and automating the process wherever possible using
Python.

Step 1: Filter on Market Cap


Low market cap coins have a higher potential to jump in price. First, let’s filter out the
cryptocurrency list with a market cap between 5Mn and 10Mn. This is not a hard
cutoff, but 10Mn as the upper bound gives enough room for the coin to grow, and 5Mn
as the lower bound weeds out many of the ‘shit’ coins. But feel free to play around with
the bounds.

Install the required packages

from requests import Request, Session


from requests.exceptions import ConnectionError, Timeout,
TooManyRedirects
import json
import pandas as pd

Sign up for a developer portal account on CoinMarketCap and you would be provided
with an API key. Copy the API key and paste it into the code below. The below snippet
is to make an API call to CoinMarketCap to download the top 5000 cryptocurrencies
based on Market Cap and convert the list into a pandas data frame.

url = 'https://pro-
api.coinmarketcap.com/v1/cryptocurrency/listings/latest'
parameters = {
'start':'1',
'limit':'5000',
'convert':'USD'
}
https://medium.datadriveninvestor.com/finding-the-100x-altcoin-3c9af2bdd7b5 2/11
2/12/23, 3:23 AM Finding the 100x Altcoin. Altcoins are cryptocurrencies other… | by Rohan Joseph | DataDrivenInvestor

headers = {
'Accepts': 'application/json',
'X-CMC_PRO_API_KEY': 'PASTE_YOUR_API_KEY_HERE',
}
session = Session()
session.headers.update(headers)
try:
response = session.get(url, params=parameters)
data = json.loads(response.text)
print(data)
except (ConnectionError, Timeout, TooManyRedirects) as e:
print(e)
coindf = pd.json_normalize(data['data'])

Filtering the dataset based on Market Cap.

coindf2 = coindf[ (coindf['quote.USD.market_cap'] < 10000000) &


(coindf['quote.USD.market_cap'] > 5000000)]

Filtering on Market Cap leaves us with only 221 Cryptocurrencies out of the 5000 we
started with. The dataset (not all rows and columns shown) looks as below ->

Step 2: Filter based on Volume/MarketCap Ratio


https://medium.datadriveninvestor.com/finding-the-100x-altcoin-3c9af2bdd7b5 3/11
2/12/23, 3:23 AM Finding the 100x Altcoin. Altcoins are cryptocurrencies other… | by Rohan Joseph | DataDrivenInvestor

The 24 hr volume gives us a sense of how active the trading is, i.e ‘Is the coin in use?.
Let’s filter out the list by keeping only the coins with the Volume to Market Cap ratio
between 10% and 50%. This means the coin would take approximately 2 to 10 days to
cover its market cap.

coindf3 = coindf2[
(coindf2['quote.USD.volume_24h']/coindf2['quote.USD.market_cap']).betw
een(0.1,0.5) ]

This leaves us with just 41 coins to look at. Now we need to investigate whether the
volume of these coins contains any wash trading. Wash trading is when the investor
simultaneously sells and buys the same security to artificially increase the trading
volume, giving the impression the security is more in demand than it really is.

Step 3: Check the exchange listings


Many of the unregulated exchanges engage in wash trading to inflate their trading
volume. Coingecko has developed a “Trust Score” for exchanges based on liquidity, the
scale of operations, security, etc. A green signal tells us that the exchange is
trustworthy. For example, shown below is the exchange listings for the
cryptocurrency: “Lympo”

https://medium.datadriveninvestor.com/finding-the-100x-altcoin-3c9af2bdd7b5 4/11
2/12/23, 3:23 AM Finding the 100x Altcoin. Altcoins are cryptocurrencies other… | by Rohan Joseph | DataDrivenInvestor

https://www.coingecko.com/en/coins/lympo#markets

Instead of manually checking the exchange listings for each of the coins on the
website, we can download this data using the Coingecko API. Also, let’s keep only the
coins where the trading volume through the “green” exchanges is the majority.

from pycoingecko import CoinGeckoAPI


cg = CoinGeckoAPI()
crypto_list_shortlisted = []
for index, row in coindf3.iterrows():
symbol1 = row.symbol.lower()
symbol2 = coindf3.loc[index]['name'].lower()

try:
print(symbol1)
coin_exchange = cg.get_coin_by_id(id = symbol1 )['tickers']
df = pd.DataFrame(coin_exchange)
df.trust_score.value_counts()
except:
print(symbol2)
try:
coin_exchange = cg.get_coin_by_id(id = symbol2 )
['tickers']
except:
https://medium.datadriveninvestor.com/finding-the-100x-altcoin-3c9af2bdd7b5 5/11
2/12/23, 3:23 AM Finding the 100x Altcoin. Altcoins are cryptocurrencies other… | by Rohan Joseph | DataDrivenInvestor

continue
df = pd.DataFrame(coin_exchange)
df.trust_score.value_counts()
if df.groupby('trust_score')['volume'].sum()
['green']/df.groupby('trust_score')['volume'].sum().sum() >= 0.5:
crypto_list_shortlisted.append(symbol1)

Starting with 5000 coins, we are left with only 14 coins to research :

Step 4: Check the on-chain metrics


On-chain analytics is the data that can be extracted from a blockchain. A website to get
on-chain metrics is https://www.intotheblock.com. The few metrics to look at are:

1. % Active Addresses (Addresses with activity/Total number of Addresses with


balance): A higher ratio is better as it signifies a more active network

https://medium.datadriveninvestor.com/finding-the-100x-altcoin-3c9af2bdd7b5 6/11
2/12/23, 3:23 AM Finding the 100x Altcoin. Altcoins are cryptocurrencies other… | by Rohan Joseph | DataDrivenInvestor

2. Comparison of Active Addresses to New Addresses: If the ratio above remains


constant over time, take a look at the count of active vs new addresses separately and if
they are moving together.

3. Distribution of tokens on the network: Tokens concentrated in a few addresses is not


desirable as they can easily control the market

https://medium.datadriveninvestor.com/finding-the-100x-altcoin-3c9af2bdd7b5 7/11
2/12/23, 3:23 AM Finding the 100x Altcoin. Altcoins are cryptocurrencies other… | by Rohan Joseph | DataDrivenInvestor

Step 5: Development Activity


Check the GitHub repository of the token, and check the “insights” section to observe
the frequency of code commits. Also, check the activity on the issues section. Example
for MATIC token shown below :

https://medium.datadriveninvestor.com/finding-the-100x-altcoin-3c9af2bdd7b5 8/11
2/12/23, 3:23 AM Finding the 100x Altcoin. Altcoins are cryptocurrencies other… | by Rohan Joseph | DataDrivenInvestor

https://github.com/maticnetwork/bor/graphs/commit-activity

https://github.com/maticnetwork/bor/issues

Some of the development may not be reflected in the Github repository, so be sure to
also check out the official webpage of the token. As an example, the webpage of MATIC
token -> https://blog.polygon.technology

Step 6: Team Quality, Project Uniqueness, and Community


Last but not the least, we need to check the qualitative aspects of the project :

1. Do a background of the team’s credentials and experiences (LinkedIn, Twitter, and


other Social Media).

https://medium.datadriveninvestor.com/finding-the-100x-altcoin-3c9af2bdd7b5 9/11
2/12/23, 3:23 AM Finding the 100x Altcoin. Altcoins are cryptocurrencies other… | by Rohan Joseph | DataDrivenInvestor

2. READ the white paper: Read about the tech (consensus protocol, interoperability,
scalability), use cases, and roadmap of the project

3. Community: Check the activity/discussions of the token’s owners and followers.


The social media stats can be found here -> https://www.intotheblock.com

Open in app Sign up Sign In

Search Medium

https://app.intotheblock.com/coin/MATIC/deep-dive?group=socials&chart=all

References :

1. https://www.youtube.com/watch?v=GIfihSBT6Bc

2. https://www.intotheblock.com

Connect on LinkedIn and find the notebook on Github.

https://medium.datadriveninvestor.com/finding-the-100x-altcoin-3c9af2bdd7b5 10/11
2/12/23, 3:23 AM Finding the 100x Altcoin. Altcoins are cryptocurrencies other… | by Rohan Joseph | DataDrivenInvestor

Data Science Cryptocurrency Finance Stock Market Money

104 2

About Help Terms Privacy

Get the Medium app

https://medium.datadriveninvestor.com/finding-the-100x-altcoin-3c9af2bdd7b5 11/11
2/12/23, 11:43 AM Types of Blockchain (Part 4- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Published in Blockchain 101 by Techskill Brew

Techskill Brew Follow

Jan 5, 2022 · 13 min read · Listen

Save

Types of Blockchain (Part 4- Blockchain Series)

Welcome to the fourth part of the 100 part series on Blockchain.

Part 1: What is Blockchain technology?

Part 2: Components of a Block in the Blockchain

Part 3: Hash Functions in Blockchain


https://medium.com/techskill-brew/types-of-blockchain-part-4-blockchain-basics-c0b2e40c1780 1/13
2/12/23, 11:43 AM Types of Blockchain (Part 4- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

There are different types of Blockchain that are being used currently. Learning the
basics of these Blockchains will give you a clear understanding of the type of
Blockchain you can use for your business or for starting a new project.

Public Blockchain
Public Blockchain, as the name suggests, is public. A public blockchain is completely
decentralized and does not have a single entity that controls the network. In this type
of Blockchain, anyone with an internet connection can join the network and
participate in reading, writing, or auditing within the Blockchain. Hence anyone can
review anything at a given point of time on a public blockchain. Simply put, anyone
can use public blockchain from anywhere to input data and transactions and review
them as long as they are connected to the network.

Public blockchain can also be called Permissionless Blockchain because it allows any
user to create a personal address and join the blockchain network, i.e., become a
‘node’ of the network. Also, the public blockchains do not restrict the rights of the
nodes on the blockchain network.

Another critical point to remember is that these types of Blockchain are more
transparent and secure than permissioned blockchains because there are many nodes
to validate transactions. Thus, it would be difficult for bad actors to collude on the
network. Also, it is not possible to modify or alter the data once it has been validated
on the Blockchain.

(i) To be part of a public blockchain, one needs to download the code without needing
any permission from anyone and start running a public node on their local device.
Once this is done, he can then validate transactions in the network, thus participating
in the consensus process — the process for determining what blocks can be added to
the Blockchain.

(ii) Anyone in the world can send transactions through the network and can expect
them to be included in the Blockchain if they are valid.

(iii) In a public blockchain, anyone in the world can access and read Blockchain
transactions using a block explorer, which is a program or a website that allows a user
to search and navigate the blocks of a Blockchain, their contents, and relevant details.
https://medium.com/techskill-brew/types-of-blockchain-part-4-blockchain-basics-c0b2e40c1780 2/13
2/12/23, 11:43 AM Types of Blockchain (Part 4- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

(iv) Speed of transactions in the public blockchain is slower than in the case of private
blockchain.

Examples: To date, public blockchains are primarily used for exchanging and mining
cryptocurrency. A few examples of cryptocurrency public blockchain platforms
include Bitcoin, Ethereum, Litecoin, etc. Ethereum is actually the most popular public
blockchain at present.

Limitations: One may face some challenges while using a public blockchain. For
instance,

(i) Difficult Fraud Tracking: The transactions on the public blockchain can be done
anonymously or pseudo anonymously and are not tied directly to the real identity of
the user. These transactions are linked to an account address comprised solely of
numbers and letters. With no real-world identity attached to this address, it is
impossible to track the transaction’s originator. It raises a very critical concern, what if
activities like fraud, hacking, or money laundering take place in this type of
Blockchain. How will the guilty party or person be tracked and punished?

(ii) Lack of governance and regulations: The public blockchain being completely open
and decentralized makes it susceptible to a lack of proper regulation and governance
by an authorized body. Thus, there is no safe upgrade path for any protocols, and there
is no one who can be held responsible for setting and maintaining the network
standards. It is definitely good to keep the development of Blockchain technology as
decentralized as possible; however, we still need some organization that can look after
its features, upgrades, and code of conduct. For instance, if a developer designs a new
standard or protocol but gets busy and forgets to respond, then the progress on that
protocol halts regardless of how valuable that protocol is for everybody. You cannot
hold anyone responsible for maintaining the network standard, thus making the entire
system dicey and skeptical. Therefore there is a need for leadership that needs to look
after all these aspects. Additionally, the public blockchains are not suitable for use in
any internal system and for projects that have strict criteria to follow.

(iii) Slow speed and massive consumption of energy: Another critical area of concern
while using public blockchain technology is its speed and the energy it consumes.
Public blockchains are slow because it takes time for the network to reach a

https://medium.com/techskill-brew/types-of-blockchain-part-4-blockchain-basics-c0b2e40c1780 3/13
2/12/23, 11:43 AM Types of Blockchain (Part 4- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

consensus. For instance, public blockchains like bitcoin manage to process seven
transactions per second compared to Visa, which can do 1700 transactions per second.
Also, public blockchains like Bitcoin rely on a consensus mechanism- Proof of Work to
validate transactions and add new blocks of transactions to the network. In this
process, a lot of energy gets consumed while solving complex mathematical problems
to validate the transactions and create a block. As per the studies published in June
2017, each bitcoin transaction consumes 80,000 times more electricity than a Visa
credit card transaction. But various other consensus mechanisms have been proposed,
like Proof of Stake, which uses far less electricity.

Private Blockchain
The second type of blockchain is Private Blockchain, where the network participants
have control over who can join the network and who can participate in the consensus
process. This is in contrast to public blockchain which is open for anyone to participate
in the network. Access controls in the network will vary for every participant, and the
Regulatory Authority or central organization would decide on various activities inside
the network starting from joining the network until executing any of the
functionalities in this closed network. In this platform, the digital identities of the
participants need to be managed and monitored by the Regulatory Authority.
Therefore, it is not necessarily decentralized even among its members but is a
centralized system that uses distributed ledger technology.

However, private blockchain offers several advantages over public blockchain:

(i) In the case of the public blockchain, the credentials of nodes are not known;
therefore, nobody can decipher who these validators are, which increases the risk of
malicious activities. But in the case of a private blockchain, the credentials of
participating nodes are present on the blockchain; therefore, it is much easier to track
where the fraud happened.

(ii) Additionally, since private blockchains are generally smaller than public
blockchains and have far fewer participants, therefore it takes less time for the
network to reach a consensus. As a result, more transactions can take place. Private
blockchains can process thousands of transactions per second. Also, they take up a lot
less energy and power to validate transactions. On the contrary public blockchain

https://medium.com/techskill-brew/types-of-blockchain-part-4-blockchain-basics-c0b2e40c1780 4/13
2/12/23, 11:43 AM Types of Blockchain (Part 4- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

networks, which usually have thousands of computers to verify transactions, consume


tons of energy.

(iii) Private blockchain provides exciting opportunities for businesses to leverage


trustless and transparent activities for internal and business-to-business use cases. For
instance, banks and financial institutions can use private blockchain as they are
regulated entities that cannot operate over open protocols or public blockchain
without performing due diligence of the parties involved in the transaction.
Additionally, with the advent of smart contracts, this technology could eventually
replace many centralized businesses.

Limitations: There are certain challenges associated with the private blockchain. For
instance,

(i) Centralization of private blockchain is one of its biggest disadvantages. Blockchain


was built to avoid centralization, and private blockchain inherently becomes
centralized due to its private network.

(ii) The second disadvantage of using private blockchain is trust. The credibility of a
private blockchain network relies on the credibility of the authorized nodes. They need
to be trustworthy as they are verifying and validating transactions.

(iii) Security is another concern while using a private blockchain. With fewer nodes, it
is easier for malicious hackers to gain control of the network. Thus, compared to the
public blockchain, a private blockchain is far more at risk of being hacked or having
data manipulated.

Consortium or Federated Blockchain


The third type of blockchain is consortium blockchain that tries to remove the sole
autonomy which gets vested in just one entity as in private blockchain. In the case of
consortium blockchain, unlike private blockchain, more than one entity is present on
the network. Since there is no single authority governing the control, it maintains
decentralized nature. There is a group of companies or representative individuals
making decisions in the best interest of the whole network. Such groups are called
consortiums or federations; that’s why this blockchain got its name consortium or
federated blockchain. For example, let’s assume there is a consortium of 20 financial
https://medium.com/techskill-brew/types-of-blockchain-part-4-blockchain-basics-c0b2e40c1780 5/13
2/12/23, 11:43 AM Types of Blockchain (Part 4- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

institutes on the blockchain network. From these 20 institutes, the nodes will be pre-
selected to make changes on the network.

Consortium/Federated Blockchain

These nodes have the authority to read or write transactions, and they can also allow
or restrict participants on the network. But none of the nodes alone can add a block to
the Blockchain. To add a block, every single node has to approve the block. The
mechanism of reaching a decision to add a block is based on the voting system, also
referred to as the Proof of Vote mechanism. The purpose of this mechanism is to
https://medium.com/techskill-brew/types-of-blockchain-part-4-blockchain-basics-c0b2e40c1780 6/13
2/12/23, 11:43 AM Types of Blockchain (Part 4- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

follow up on the selected nodes. Here every node will need to vote in order to validate
a block. The number of votes required will be pre-determined in order to reach a
decision of adding the block to the Blockchain. This means that it has been decided in
the code that for fifteen selected nodes, it might take ten nodes’ votes or even fifteen
nodes’ votes to validate a block. By using the Proof of Vote mechanism, the network
helps to ensure that no one is misusing their power.

Let’s understand consortium blockchain by taking a real-world example of insurance


claims. People have to deal with a lot of paperwork when it comes to claiming
insurance. Also, in specific scenarios, the whole process of claim submission and
approval takes a lot of time. Suppose a patient visits a hospital because of a health issue
and needs emergency surgery. But claiming the insurance and waiting for approval
can delay his treatment, putting his life at risk. If the hospital and insurance
companies can unite in a Federated Blockchain network, where they can exchange the
information without any hassle, then it would be much easier to manage this process.
This type of network also ensures safety as they are dealing with sensitive, confidential
records of the patient. Thus, the Federated blockchain can unite these two institutions
and give them the security they need. Not only healthcare but other insurances claims
can also be streamlined using Federated Blockchain.

Permissioned Blockchain: Both Private and Federal Blockchains are types of


Permissioned blockchain. Permissioned blockchain maintains an access control layer
to allow certain actions to be performed only by certain identifiable participants. On
such Blockchain platforms, there is a need of special permissions to read, access, and
write information on them. The platform will allow anyone to join the Blockchain
network after suitable verification of their identity, and then permissions are allocated
and designated to perform only certain activities on the network. The roles of each
participant who can access and contribute to the blockchain are defined.

Let’s understand permissioned blockchain through an example. Say a farmer in the


USA cultivates a medicinal plant that he ships to multiple markets across the globe.
The supply chain involves multiple stakeholders like the customs department who
gives clearance for the product to enter their respective nation, shipping companies,
and warehouse operators who need to maintain the product within a specified
temperature range. The farmer finalizes a particular price and quantity for selling his

https://medium.com/techskill-brew/types-of-blockchain-part-4-blockchain-basics-c0b2e40c1780 7/13
2/12/23, 11:43 AM Types of Blockchain (Part 4- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

produce to a buyer in India and another price and quantity to another buyer in
Australia. The information about the agreed prices between the farmer and buyers
should not be revealed to other entities involved, like the customs department, the
shipping company, and the warehouse operator. They simply need access to limited
information, like quality specifications and quantity, to perform their necessary
function in supporting such deals. This is a perfect use case for the application of a
permissioned blockchain, that can allow such restricted implementation and limited
permission to the various participants.

Permissioned Blockchain has many other applications like payments, KYC validation,
escrow, insurance claims, charity, music publishing, and much more. In a nutshell, the
permissioned blockchain offers a secure business environment with customization
that allows wider industry adoption across multiple enterprises.

Hybrid Blockchain
The fourth type of Blockchain is Hybrid Blockchain, the blockchain which combines
the best of both private and public blockchains. Simply put, a hybrid blockchain
provides controlled access and freedom simultaneously. In other words, the hybrid
blockchain lets organizations set up a private, permission-based system alongside a
public permissionless system.

With such a system, organizations can control -

who can access what data on the blockchain,

what data can be opened up publicly,

what data needs to be kept confidential on the private network?

Fusing different features from private and public blockchains ensures that an
organization can work with its stakeholders in the best possible way.

Like a consortium blockchain, a hybrid blockchain has the privacy benefits of a


permissioned blockchain.

But, unlike a consortium blockchain with multiple participants collectively helping


to maintain the network, a hybrid blockchain can have a single entity network

https://medium.com/techskill-brew/types-of-blockchain-part-4-blockchain-basics-c0b2e40c1780 8/13
2/12/23, 11:43 AM Types of Blockchain (Part 4- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

administrator.

Hybrid Blockchain has features of both public and private blockchains

A transaction in a private network of a hybrid blockchain is usually verified within that


network. But users can also release it in the public blockchain to get it verified. Even
though transactions and records in a hybrid blockchain are kept private and not made
public, they are always open for verifiability on the public blockchain whenever
required.

In the hybrid blockchain, there are two different types of users/nodes based on the
level of information that they access:

(i) The first type of users/nodes are those who are part of the private blockchain and
have all the control over the blockchain and can decide the level of security
permissions for a particular user.

https://medium.com/techskill-brew/types-of-blockchain-part-4-blockchain-basics-c0b2e40c1780 9/13
2/12/23, 11:43 AM Types of Blockchain (Part 4- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

(ii) And the other type of users/nodes are those who are part of the public blockchain
and can just access the data released on the blockchain.

Even though a set of individuals control the hybrid blockchain network, they cannot
change the transactions’ immutability and security. They can only control which
transactions are made public and which are not.

Components of Hybrid Blockchain

How can a user join the private network of a hybrid blockchain?


https://medium.com/techskill-brew/types-of-blockchain-part-4-blockchain-basics-c0b2e40c1780 10/13
2/12/23, 11:43 AM Types of Blockchain (Part 4- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

(i) A user is required to get permission to join the hybrid blockchain network and
become a node on the private network. Once he joins the network, he can fully
participate in the blockchain’s activities, like the rights to do transactions, view them,
or even append or modify them.

(ii) The identity of the user is kept secret from other participating users to protect that
user’s privacy. His identity is only revealed to the party/user he is dealing with.

(iii) To ensure that the identification process of a user is done correctly, companies and
organizations carry out KYC (Know Your Customer) to make it work. Financial
institutes, especially, need to handle the KYC process correctly as they cannot allow
the transaction to be carried out by a user who is anonymous or not entirely known to
the blockchain. Thus the hybrid blockchain has limited anonymity for the users who
take part in the network, though public anonymity is still maintained. This leads to an
intersection of both the public and private systems.

Advantages of Hybrid Blockchain:


(i) The hybrid network offers all the critical features of a public blockchain, such as
security, transparency, immutability, and decentralization, but also restricts the ability
to access transactions, view, or change transactions like in a private blockchain.
Moreover, not everyone can use the network, ensuring that confidential information
doesn’t go out of the network. Thus, a hybrid blockchain provides security and privacy
but allows communication with third parties.

(ii) Since a hybrid blockchain provides the ability to work in a closed ecosystem, thus,
organizations don’t have to worry about getting their information leaked or hacked.

(iii) Another benefit of using a hybrid blockchain is the low transaction cost as it
requires few nodes to verify the transactions. Therefore it also takes less time for the
network to reach a consensus.

Here are a few examples where Hybrid Blockchain can be used:


(i) An area where hybrid blockchain technology can be implemented is the Hybrid IoT
(Internet of Things). It is not secure to manage the IoT on public blockchains as it will
give hackers free access to data to map nodes and hack them. But with a hybrid
blockchain, the IoT devices can be placed in a private network with selective access to

https://medium.com/techskill-brew/types-of-blockchain-part-4-blockchain-basics-c0b2e40c1780 11/13
2/12/23, 11:43 AM Types of Blockchain (Part 4- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

people who need them. Conversely, the managing authority decides which aspects of
the network should be made public depending on what data needs to be shared.

(ii) The second application of hybrid blockchain is in government activities like voting,
creating public identification databases, automating acquisitions, providing social/
humanitarian assistance, etc. The hybrid blockchain offers the government the
necessary control and enables the public to access it. Totally private or public
blockchains will not work as they either hinder users’ access or reveal too much data.
The hybrid blockchain can ensure that the government stays in control of the data and,
at the same time, gives access of data to the public. Thus, maintaining transparency in
government operations.

(iii) The third application of hybrid blockchain is in real estate. Companies can use a
hybrid blockchain to run systems privately but show certain information, such as
listings, to the public.

(iv) Hybrid blockchains have applications in various other sectors like supply chains,
banking, finance, trade, enterprise services, etc.

To decide on the type of blockchain technology implementation for your organization


or project, you have to consider the following two critical factors:

(a) Does the access to the network need to be restricted or permissionless, or a


combination of both?

(b) Does the network operate on a global level or an organizational level?

Different blockchains offer trade-offs in terms of scalability, transaction speed,


transparency, and security within these parameters. After considering all the
parameters, you can decide which type of Blockchain technology is best suitable for
your business or project.

If you liked this article and want to know more about Blockchain, NFTs, Metaverse, and
their applications, click the below link.

50+ Real World Applications of Blockchain: A beginner’s complete


guide to Blockchain Fundamentals…

https://medium.com/techskill-brew/types-of-blockchain-part-4-blockchain-basics-c0b2e40c1780 12/13
2/12/23, 11:43 AM Types of Blockchain (Part 4- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

50+ Real World Applications of Blockchain: A beginner’s complete


guide to Blockchain Fundamentals, Consensus…
www.amazon.com

Happy learning!

Blockchain Blockchain Technology Blockchain Development Blockchain Startup

Blockchain Game

Open in app Sign up Sign In

Search Medium
Get an email whenever Techskill Brew publishes.

Your email

Subscribe

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app

https://medium.com/techskill-brew/types-of-blockchain-part-4-blockchain-basics-c0b2e40c1780 13/13
2/12/23, 11:46 AM Merkle Tree in Blockchain (Part 5- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Published in Blockchain 101 by Techskill Brew

Techskill Brew Follow

Jan 10, 2022 · 7 min read · Listen

Save

Merkle Tree in Blockchain (Part 5- Blockchain


Series)

Welcome to the fifth part of the 100 part series on Blockchain.

Part 1: What is Blockchain technology?

Part 2: Components of a Block in the Blockchain


https://medium.com/techskill-brew/merkle-tree-in-blockchain-part-5-blockchain-basics-4e25b61179a2 1/8
2/12/23, 11:46 AM Merkle Tree in Blockchain (Part 5- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Part 3: Hash Functions in Blockchain

Part 4: Types of Blockchain

The data/transactions in a block are not stored as plain text; instead, they are stored in
a data structure called the Merkle tree. In other words, the Merkel tree serves as a
summary of all the transactions in a block. Every transaction in a block is uniquely
hashed by hash functions like MD5, BLAKE2, SHA-1, SHA-256 to produce a digital
fingerprint of the entire set of transactions. Each pair of hashed transactions is hashed
together by the hash function, and this process continues until there is one hash for
the entire block.

Structurally, the Merkle tree is a type of binary tree, where the hashes of the
transactional data on the bottom row are referred to as “leaf nodes,” the intermediate
hashes as “branches,” and the hash at the top as the “root.” Merkle tree is also called
the Hash tree. Each block in the Blockchain has one Merkle root.

The Merkle tree of transactions A, B, C, and D; Hash ABCD is the Merkle root/root hash

A Basic Merkle tree


To make it easier, let’s understand the Merkle tree with the help of an example.

Suppose there are four transactions in a block, as shown in the above figure. Each of
the four transactions (A, B, C, and D) has a unique hash (Hash A, Hash B, Hash C, and
Hash D). Then every pair of these hashed transactions combine together to create
another hash. In this case, hashed transaction A pairs with hashed transaction B to
generate a new Hash AB. On the other hand, hashed transaction C pairs with hashed
https://medium.com/techskill-brew/merkle-tree-in-blockchain-part-5-blockchain-basics-4e25b61179a2 2/8
2/12/23, 11:46 AM Merkle Tree in Blockchain (Part 5- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

transaction D to create a new Hash CD. The Hash AB and Hash CD are the branches of
the Merkle tree. The Hash AB and Hash CD are then grouped together by the hash
function to produce the Hash ABCD, which is the Merkle root/root hash for this Merkle
tree. Merkle root is then stored in the block header.

But now the question arises what is this block header?

A block is composed of a header and a body. The block header contains Merkel root,
Timestamp, Block Version number (indicates which set of block validation rules to
follow), Difficulty Target, Nonce, and Previous Hash. On the other hand, the block
body contains all confirmed transactions within the block.

The Merkle root is stored in the block header of the block

An Unbalanced Merkle tree with an odd number of transactions


The above example illustrates the fundamental case of a Merkle tree. There are just the
correct number of Merkle leaves at every level to form exact pairs. What happens if
you have an odd number of transactions, leading to the formation of an odd number of
Merkle leaves? For example, suppose there are five transactions in the block. Each of
https://medium.com/techskill-brew/merkle-tree-in-blockchain-part-5-blockchain-basics-4e25b61179a2 3/8
2/12/23, 11:46 AM Merkle Tree in Blockchain (Part 5- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

the five transactions (A, B, C, D, and E) will have a unique hash (Hash A, Hash B, Hash
C, Hash D, and Hash E). The pair of hashed transactions A and B is hashed to produce
the Hash AB. Similarly, the pair of hashed transactions C and D is hashed to produce
the Hash CD. But hashed transaction E is left without a pair to hash into a new branch.
Since the Merkle trees are binary in nature, they require leaf nodes to be even for them
to work. Therefore, if there happens to be an unpaired hash, then that hash is copied
and paired with itself. In this example, Hash E is duplicated to pair with itself to be
hashed to form Hash EE. After this, the Hash AB and Hash CD are grouped and hashed
to create a new Hash ABCD. On the other hand, Hash EE gets duplicated and pairs with
itself to be hashed to form Hash EEEE. The hashes ABCD and EEEE are further
grouped and hashed to produce one hash, i.e., the Merkle root.

The Merkle tree of transactions A, B, C, D, and E; Hash ABCDEEEE is the Merkle root/root hash

This root hash of a block is then used to find the block’s unique valid hash with leading
0’s. For example, the Merkle root/root hash of a block #72608 is
a1c6d67c992a70fca66188e178d9ca7c20d5c775393948f19955be7f0952c0f. The root hash
is then combined with other information of the block (block number, the previous
block’s hash, the timestamp, the difficulty target, and the nonce) and run through a
hash function to produce the block’s unique and valid hash with leading 0’s:
00001a03b7328189f5f7154681c5827a1b2fce2fcb5301a8e412e22ea9a7859. Once the block
gets the valid hash, it becomes a part of the Blockchain, and further new blocks can be
added to this block.

https://medium.com/techskill-brew/merkle-tree-in-blockchain-part-5-blockchain-basics-4e25b61179a2 4/8
2/12/23, 11:46 AM Merkle Tree in Blockchain (Part 5- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Advantages of Merkle tree


1. Each block has a unique hash value, calculated from the Merkle root. The block
also contains the previous block’s hash, thus linking one block to another in the
Blockchain. If there is a change in any transaction, then the hash of that
transaction changes. This change cascades up to the Merkle Root, changing the
value of the Merkle root and thus making the block invalid. This then is reflected in
the succeeding block, leading to a change in its hash, thus making the rest of the
Blockchain invalid. Therefore, the Merkle tree makes an immutable record of
transactions in the block.

2. Blockchains are usually made up of hundreds of thousands of blocks, and each


block can contain up to several thousand transactions, thereby making memory
space and computing power the two big problems while validating the data. If the
Blockchain did not have the concept of Merkle trees, then every single node on the
network would have been required to keep a complete copy of every single
transaction that has ever occurred on the Blockchain. While confirming a
transaction, a node would have been required to compare each entry line by line to
make sure its own records match exactly with the network records. If there was
any discrepancy between the records, it could compromise the security of the
network. Therefore, the computer used for validating the data would have required
much higher processing power to compare the records to ensure that there had
been no changes. On the other hand, Merkle trees solve this problem by
considerably reducing the amount of data that has to be maintained for
verification purposes. They hash all the records in the ledger, which effectively
separates the proof of data from the data itself. Users can verify individual blocks
and can also check transactions by using hashes. Thus, reducing the amount of
computing power required to validate the transactions.

3. Merkle trees help eliminate modifying transaction records and double-spending


within a Blockchain. For example, if someone tries to hack an entry on the
Blockchain to make it appear as if he has more cryptocurrency than what is
available in reality, any such false entry would not be in line with the rest of the
hashes in a Merkle tree and thus would be rejected by the network. This is because
when a transaction happens on the Blockchain, it is not stored as such; instead, it
gets verified. The transaction is hashed by the hash function, and then its hash is

https://medium.com/techskill-brew/merkle-tree-in-blockchain-part-5-blockchain-basics-4e25b61179a2 5/8
2/12/23, 11:46 AM Merkle Tree in Blockchain (Part 5- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

verified with every other hash on the Blockchain to prove that nothing has been
altered or tampered with.

Since the hash function is said to be deterministic, it generates the same hash
whenever the same input is passed through it. Therefore, if an individual tries to
double-spend his digital currency, a hash will be generated for that transaction. If that
hash matches with the existing records present on the Blockchain, that transaction is
rejected. Hence, double-spending is prevented.

Merkle proofs
Merkle proofs allow for verification of a specific transaction/content in a large body of
data. In Blockchain systems, there are two types of nodes:

(i) The nodes holding a complete history of Blockchain are called “full nodes.”

(ii) And other nodes are called “lightweight nodes.” A Lightweight Node contains only a
partial list of Blockchain, which usually includes just the block headers (containing
Merkle root) instead of its entire transaction history. The lightweight node can only
validate transactions included in a block without the need to download the whole
Blockchain.

When a lightweight node wants to verify a specific transaction, it uses the hash
function to obtain the hash value of that transaction. The full node sends all the hash
values to the lightweight node required for verification based on the structure of the
Merkle tree. Next, the lightweight node repeats the hash operation to compute the root
hash value. Then the root hash value obtained by the process is compared with the root
hash value sent by the full node.

Suppose a lightweight node wants to verify whether transaction D has been lost or
tampered with. For this, the full node sends the hash values Hash C, Hash AB, Hash
EFGH, and Merkle root to the lightweight node. First, the lightweight node finds the
hash of transaction D, i.e., Hash D using the hash function. Then Hash D, along with
the values Hash C, Hash AB, and Hash EFGH, are recomputed to generate Merkle
root/root hash. If the computed Merkle root and original Merkle root match, then it
can be verified that the Hash D is a genuine leaf of the Merkle tree, and thus,
transaction D is a part of the Merkle tree. On the contrary, if the computed Merkle root
https://medium.com/techskill-brew/merkle-tree-in-blockchain-part-5-blockchain-basics-4e25b61179a2 6/8
2/12/23, 11:46 AM Merkle Tree in Blockchain (Part 5- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

and original Merkle root do not match, then it can be confirmed that transaction D has
been tampered with.

Merkle proof for transaction D

If you liked this article and want to know more about Blockchain, NFTs, Metaverse, and
their applications, click the below link.

50+ Real World Applications of Blockchain: A beginner’s complete


guide to Blockchain Fundamentals…
50+ Real World Applications of Blockchain: A beginner’s complete
guide to Blockchain Fundamentals, Consensus…
www.amazon.com

Happy learning!

Blockchain Blockchain Technology Blockchain Development Blockchain Startup

Blockchain Game

https://medium.com/techskill-brew/merkle-tree-in-blockchain-part-5-blockchain-basics-4e25b61179a2 7/8
2/12/23, 11:46 AM Merkle Tree in Blockchain (Part 5- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Get an email whenever Techskill Brew publishes.

Your email

Subscribe

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

About Help Terms Privacy

Get the Medium app


Open in app Sign up Sign In

Search Medium

https://medium.com/techskill-brew/merkle-tree-in-blockchain-part-5-blockchain-basics-4e25b61179a2 8/8
2/12/23, 11:47 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Published in Blockchain 101 by Techskill Brew

Techskill Brew Follow

Dec 31, 2021 · 7 min read · Listen

Save

Hash Functions in Blockchain (Part 3-


Blockchain Series)

Welcome to the third part of the 100 part series on Blockchain.

Part 1: What is Blockchain technology?

Part 2: Components of a Block in the Blockchain


https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 1/9
2/12/23, 11:47 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Hash functions are one of the most extensively-used cryptographic algorithms that
generate a fixed-length output for any input data irrespective of its size and length. The
input data can be a word, a sentence, a longer text, or an entire file. The fixed-length
output generated for the input data is called a hash. Many types of cryptographic hash
functions/ algorithms are available like MD5, BLAKE2, SHA-1, SHA-256, etc. Secure
Hashing Algorithm 256, commonly referred to as SHA-256, is one of the most famous
cryptographic hash functions used extensively in Blockchain technology. It was
developed by the National Security Agency (NSA) in 2001.

Hash or fixed-length output for any input data

When we pass a certain message through the hash algorithm, it generates a hash
against this input. Regardless of the size of the letters or numbers you input, the hash
algorithm always generates a fixed-length output. The fixed-length output can vary like
32-bit, 64-bit, 128-bit, or 256-bit depending on the hash algorithm being used. For
instance, SHA-256 generates a hash value of 256 bits, equivalent to the size of 64
characters.

Using a fixed-length output increases security since anyone trying to decrypt the hash
won’t be able to tell how long or short the input is simply by looking at the length of the
output. The only method to determine the original string from its hash is by using
https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 2/9
2/12/23, 11:47 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

“brute-force.” Brute-force basically means that one has to take random inputs, hash
them and compare them with the target hash. For instance, if the SHA-256 hash
algorithm is used, a brute-force attack would need to make 2^256 attempts to generate
the initial data.

Now, let’s discuss the important properties of a cryptographic hash function used in
the Blockchain:

A small change in the input value alters the Hash value significantly
One of the unique properties of a cryptographic hash function is that even a small
change in the input value brings about a drastic change in its output value. This is
referred to as the Avalanche Effect. For instance, when the first input, ‘Blockchain is
the future’ is passed through the hash function, a specific output or hash is generated.
But when a small change is made to the input, like, an extra exclamation mark is
added- ‘Blockchain is the future!’ you can see that the new hash is generated, which is
entirely different from the previous hash. This property of cryptographic hash
functions makes them resistant to hacking as no correlation can be derived about the
input data by just looking at the hash alone.

Different hash is generated when a small change is made in input data

Computationally Efficient

https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 3/9
2/12/23, 11:47 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

One of the other crucial properties of a cryptographic hash function used in the
Blockchain is its quick computation. The hash function requires computers on the
Blockchain network to perform certain complex mathematical tasks to generate a hash
from the input data. So when we say that the hash function should be computationally
efficient, it simply means that the computers should be able to finish the required
mathematical task in a short time.

Deterministic
A cryptographic hash function used in the Blockchain must be deterministic. In simple
words, a hash function is said to be deterministic if it generates the same hash
whenever the same input is passed through it. No matter how many times we pass an
input ‘ Blockchain is the future’ through the hash function, it should always generate
the same exact output or hash every single time.

If different outputs are generated by a hash function for the same input, the hash
function will become useless, and it would be impossible to verify a specific input.

Pre-Image Resistance
The input for a cryptographic hash function can be any kind of data. This data can be a
number, a word, a sentence, a passcode, a song, a book, or a complete movie. But the
hash generated for any kind of input data by the hashing algorithm will be an
alphanumeric code and that too of a fixed length.

It is very crucial for a cryptographic hash function to be Pre-image resistant. Pre-image


resistance means that the output generated by a cryptographic hash function must not
reveal any information about the input data. For example, when an input X is passed
through the hash function, the hash generated is represented as H(X). Pre-image
resistance simply means that even if you know H(X), it must be infeasible for you to
determine the corresponding input X.

https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 4/9
2/12/23, 11:47 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Pre-image resistant hash function

Collision Resistant
Collision resistance is another important property of a cryptographic hash function.
Being collision-resistant simply means that it should be highly improbable to generate
the same output or hash for two different inputs.

Collision resistant hash function


https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 5/9
2/12/23, 11:47 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

As discussed earlier, the input for a hash function can be of any type, size, and length.
Therefore, there are infinite possibilities for the data input that can be fed into a hash
function. But the corresponding hash or output generated will have a fixed length. This
means that there will be a finite number of outputs that can be generated using the
hash algorithm. If inputs can be infinite and outputs are finite in number, it is quite
possible that more than one input can produce the same output.

So the goal of being collision-resistant is to make the probability of finding any two
such inputs which share the same output negligible. So if a hashing function is
collision-resistant, this possibility won’t pose any security risk to the data.

One-way functions
Hash functions are generally referred to as one-way functions because they are not
reversible. While a hash function is a cryptographic function, it’s not encryption.
Encryption works by encrypting the relevant data with an encryption algorithm and an
encryption key. This results in a ciphertext that can only be viewed in its original form
if decrypted with the correct key. A hash function, in contrast to encryption, works as a
one-way function; in simple words, if you have a hash, you can not decrypt it to find
the corresponding input. So in a real-life scenario, even if a hacker gets access to a
hash output, it is completely useless as he can’t decrypt it to get the input.

https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 6/9
2/12/23, 11:47 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

One-way Hash Functions

Therefore, cryptography used in Blockchain requires one-way hash functions, making


it safe, secure, and reliable. Though hash functions can be used to track and validate
the input data, they can’t be used to decrypt and reach the input data.

To help you understand it in a better way, let us take an example — Suppose Mr. A
holds the land entitlement of a piece of land. That information is stored with the
relevant Government Authority in their database. Now, this land record data is given a
unique hash using a hash function. As the record is a centralized record, it can be
tampered with, and changes can be made in the records by some corrupt officials
because of their personal gains. Assume that some corrupt official tampers the data
and changes the land area Mr. A owns. In this case, when the altered land record data
will be passed through the hash function, the hash generated would be different from

https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 7/9
2/12/23, 11:47 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

the previous one. Thus, indicating that the land data has been tampered with. So this is
how a hash can be used to track and validate the data.

On the other hand, it is not possible to decrypt this hash and find out that it represents
land record data for the land owned by Mr. A. Therefore, we can say that a hash can be
used to track and validate the information but can’t decrypt and find the original data.

If you liked this article and want to know more about Blockchain, NFTs, Metaverse, and
their applications, click the below link.

50+ Real World Applications of Blockchain: A beginner’s complete


guide to Blockchain Fundamentals…
50+ Real World Applications of Blockchain: A beginner’s complete
guide to Blockchain Fundamentals, Consensus…
www.amazon.com

Happy learning!

Blockchain Blockchain Technology Blockchain Development Blockchain Startup

Blockchain Game

Get an email whenever Techskill Brew publishes.

https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 8/9
2/12/23, 11:47 AM Hash Functions in Blockchain (Part 3- Blockchain Series) | by Techskill Brew | Blockchain 101 by Techskill Brew | Medium

Your email

Subscribe

Open in app Sign up Sign In


By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy
practices.

Search Medium

About Help Terms Privacy

Get the Medium app

https://medium.com/techskill-brew/hash-functions-in-blockchain-part-3-blockchain-basics-c3a0286064b6 9/9

You might also like