0% found this document useful (0 votes)
116 views12 pages

Blockchain Basics: Bitcoin & Beyond

The document provides an overview of blockchain technology and cryptocurrencies. It discusses the history of cryptocurrency and Bitcoin's anonymous creator Satoshi Nakamoto. It then explains the concepts of decentralization and how blockchain achieves a distributed ledger through replication across networks. The document also covers how transactions are processed in blockchain networks.

Uploaded by

Alan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views12 pages

Blockchain Basics: Bitcoin & Beyond

The document provides an overview of blockchain technology and cryptocurrencies. It discusses the history of cryptocurrency and Bitcoin's anonymous creator Satoshi Nakamoto. It then explains the concepts of decentralization and how blockchain achieves a distributed ledger through replication across networks. The document also covers how transactions are processed in blockchain networks.

Uploaded by

Alan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

October 2023

Blockchain Technology Explained:


How do Bitcoin & Cryptocurrencies Work?
Table of Contents

04 CHAPTER - 1 A Brief History of Cryptocurrency

05 CHAPTER - 2 What is Decentralization


(and why is it a good thing)?

05 CHAPTER - 3 How Does Blockchain Technology Work?

06 CHAPTER - 4 The Life Cycle of a Transaction

10 CHAPTER - 5 What is an NFT?

10 CHAPTER - 6 What are Other Potential Blockchain Applications?

11 CHAPTER - 7 Energy Consumption

11 CHAPTER - 8 Conclusion

2 https://community.element14.com/learn/publications/ebooks/
Blockchain Technology Explained:
How do Bitcoin & Cryptocurrencies Work?

element14 is a Community of over 800,000 makers, professional engineers, electronics enthusiasts, and
everyone in between. Since our beginnings in 2009, we have provided a place to discuss electronics,
get help with your designs and projects, show off your skills by building a new prototype, and much
more. We also offer online learning courses such as our Essentials series, video tutorials from element14
Presents, and electronics competitions with our Design Challenges.

Cryptocurrencies such as Bitcoin, Ethereum, and Dogecoin have made waves in the financial world, but
the blockchain technology that drives them can enable a variety of new applications. From supply chain
to smart contracts, blockchain offers a decentralized solution to managing data. In this eBook, we’ll
discuss blockchain technology and how it works by doing a deep dive into its first application, Bitcoin.

element14 Community Team

https://community.element14.com/learn/publications/ebooks/ 3
CHAPTER - 1 A Brief History of Cryptocurrency

Bitcoin, Ethereum, Dogecoin, and other Although there have been major setbacks, such as
cryptocurrencies have turned the financial world the Mt. Gox security breach or the FTX scandal,
upside down. Once a form of currency for online the popularity of cryptocurrencies as an investment
black markets like Silk Road, cryptocurrencies have vehicle has grown steadily. Now, over ten years later,
now become legitimate, making up a portion of cryptocurrency is a regular vehicle for investors. A
millions of investment portfolios. single Bitcoin has seen values as high as $60,000
USD. Ethereum, which powers the Ethereum network
However, this eBook isn’t about cryptocurrency, it’s (where other tokens and blockchain applications can
about the underlying technology, blockchain. Before be created), has experienced similar gains. Billionaire
we go into the details of blockchain technology, Elon Musk has thrown his support behind Dogecoin,
we should talk about Bitcoin, how it works, and its proclaiming it the currency of the future.
anonymous creator, Satoshi Nakamoto. We’ll explain
the concepts as they relate to Bitcoin, and we’ll talk Who is Satoshi Nakamoto?
about how blockchain works in other applications.
Despite rampant speculation and a handful of people
In 2007, Nakamoto published “Bitcoin: A Peer-to-Peer stepping forward and claiming to be Nakamoto, the
Electronic Cash System”, a white paper detailing the identity of Bitcoin’s creator has remained anonymous.
blockchain technology underlying Bitcoin, a brand- The only confirmed fact is that the person (or persons)
new electronic payment system. Nakamoto launched using the pseudonym is a talented software engineer
the Bitcoin network and released version 0.1 of the who would prefer to stay out of the limelight.
Bitcoin software in January of 2009.
Proponents of blockchain say it’s the next disruptive
In the early years, Bitcoin was mainly used for technology, affecting every single aspect of the
black market transactions, such as on the Silk Road Internet as we know it. Blockchain is the driving
marketplace. A Florida man famously paid 10,000 force of Web 3.0, or “web3”, the next evolution of
bitcoins for two pizzas, a transaction that would the Internet; a decentralized version where software
be worth over $250 million US today. Other coins is hosted not on servers, but on the blockchain. If
emerged, such as Ethereum, Litecoin, and Dogecoin, you’ve seen the show Silicon Valley, this is what Pied
each developing their own following. Because of its Piper was ultimately trying to accomplish.
volatility in value when exchanged with fiat currency,
investors began trading Bitcoin on exchanges.

4 https://community.element14.com/learn/publications/ebooks/
CHAPTER - 2 What is Decentralization
(and why is it a good thing)?

Decentralization means shifting responsibility from a All of the content is hosted on their servers, and
central provider or authority and putting it into the because they are the central authority, Instagram (or
hands of the users. In a truly decentralized system, their parent company, Meta) create and enforce the
a central provider or authority doesn’t even exist. In rules, as well as control all user data.
the software world, this means that data is not stored
in a single place, but rather distributed throughout On the other hand, a truly decentralized system is
the software’s userbase. peer-to-peer, with no centralized authority. There
are no centralized servers or storage; all data is
The majority of businesses throughout the software distributed among the userbase—the more users,
industry run in a centralized manner. For example, the better, and more secure. There is no risk of a
eBay provides a platform where users can sell and centralized authority changing the rules or doing
purchase products. eBay is the central authority something unscrupulous with user data. There
making all the rules, and in turn, must provide a is also no risk of a central server going down and
secure system, handling payments and protecting shutting down the system. This distributed data is
its buyers and sellers. For this service, eBay takes a the cornerstone of blockchain technology.
commission on each transaction. Instagram provides
a secure platform with minimal downtime, where
users can post and view content free of charge.

CHAPTER - 3 How Does Blockchain Technology Work?

Another name for blockchain is distributed ledger. does the opposite. Blockchain technology puts the
The core principle is the storage of identical data out in the open, replicated millions of times. If
information on as many computers as possible, and hackers want to hack Bitcoin and send all the bitcoins
thus, not having to rely on a central server to store to their own account, they would need the resources
that information. We’ll use Bitcoin as an example, to change that data on millions of computers.
however, most blockchain applications work on the
same principles, especially those where security is Of course, the risk of a majority attack poses a threat
crucial. Bitcoin is essentially a distributed ledger to smaller blockchain systems. If a single entity or
containing every single Bitcoin transaction ever group controls more than 50% of the mining power
made. At the time of this writing, the size of the in a decentralized blockchain network, they can
Bitcoin blockchain is over 500 gigabytes, containing interfere with the consensus protocol and potentially
over 700 million transactions. engage in network manipulation and other malicious
activities. This requires a high level of computational
What are the challenges that blockchain faces? resources and is more likely to occur in smaller or
less secure blockchain networks. Conducting a
Security is the biggest challenge for most applications successful 51% attack on well-established and
on the Internet. Most Internet applications hide highly secure blockchain networks like Bitcoin is
their data behind layers of firewalls trying to block extremely difficult and resource intensive.
intruders from getting in. Blockchain technology

https://community.element14.com/learn/publications/ebooks/ 5
Additionally, because the data is out in the open, capacity of the blockchain network to handle the
strong encryption must be employed to protect the increased load becomes crucial. Achieving high
privacy of the data. transaction throughput and reducing confirmation
times while maintaining security and decentralization
In a distributed ledger system such as blockchain, is a complex task.
records exist at multiple locations. Care must be
taken to prevent the data from becoming out of sync, Interoperability and integration with existing systems
and in the case of Bitcoin, to avoid double spending, present challenges as well. Blockchain networks
where the same bitcoins are spent more than once. often need to interact with external systems, such
Blockchain technology relies on a mining process to as legacy databases or other blockchain networks.
prevent double spending and secure the network. Standardization is needed to ensure seamless
integration and smooth data flow across different
Another ongoing challenge is scalability. As the platforms and protocols.
number of transactions and users grows, the

CHAPTER - 4 The Life Cycle of a Transaction

Let’s go over a simplified version of what happens during a Bitcoin transaction.

Figure 1: A Bitcoin transaction (Source: bitcoindesigned.com & researchgate.net)

Step 1: A Bitcoin Transaction

The process of mining begins with a Bitcoin transaction. When someone sends a bitcoin to another person, the
transaction is broadcast to the network of nodes that validate transactions on the Bitcoin network.

6 https://community.element14.com/learn/publications/ebooks/
Step 2: Verification by Nodes Step 8: Rewards and Fees

Nodes verify the transaction by checking that the sender Miners who successfully add a block to the blockchain
has enough bitcoin in their wallet and the transaction is receive a newly minted bitcoin. This reward is halved
valid according to the rules of the Bitcoin protocol. approximately every four years. In addition to the
reward, miners also receive transaction fees for each
Step 3: Block Creation transaction they include in the block.

Validated transactions are collected into a block. A Step 9: Repeat


block is a record of several transactions that is added to
the blockchain. Each block in the blockchain contains a This process repeats continuously, with new transactions
reference to the previous block, forming this chain. being broadcast to the network and validated by nodes,
new blocks being created by miners, and the blockchain
Step 4: Mining growing longer and longer over time.

Miners then compete to solve a complex mathematical What are nodes?


problem that is associated with the current block. This
problem is called a proof-of-work problem and is solved Each computer hosting the Bitcoin ledger is called
using a computer program that tries to guess a specific a node. The job of a node is to validate transactions
number, known as a nonce. The first miner to solve the on the network. Validation is a simple operation that
problem adds the block to the blockchain and receives confirms that the mining job that created the transaction
a reward in the form of newly minted bitcoin. was correct. Nodes validate each transaction, and once
a certain number of validations occur between different
Step 5: The Nonce nodes, the transaction is added to the ledger. This is
called a consensus algorithm and is very similar to a
The nonce is a number that is added to the block header
voting system. Nodes operate in a true peer-to-peer
during the mining process. The block header contains
fashion, with each node connecting to several other
the hash of the previous block, the transactions in the
nodes, sharing data and keeping each other up to date.
current block, and the current time. The miner’s goal is
Because there is no central authority, every node needs
to find a nonce that, when added to the block header,
to eventually get their copy.
produces a hash that meets a certain target value. We’ll
go through the mining process in detail a little later. To become a node, a user must download and run
Bitcoin Core, the official wallet software for Bitcoin.
Step 6: Difficulty Adjustment
Once Bitcoin Core is downloaded and installed, the
The Bitcoin protocol adjusts the difficulty of the proof- software will begin downloading the blockchain. This
of-work problem every 2016 blocks, or roughly every computer is now part of the Bitcoin network.
two weeks. The difficulty is adjusted so that the time it
What is mining?
takes to solve the problem remains roughly constant,
even as more miners join the network. In order to keep the blockchain secure, each
block can only be added when a sufficient amount
Step 7: Verification by Other Nodes
of resources has been expended. In blockchain
Once a block has been added to the blockchain, other technology, expending these resources comes in the
nodes on the network validate it by checking that the form of running algorithms that solve problems, the
proof-of-work problem has been solved correctly and difficulty of which increases as time goes on. This is
that the transactions in the block are valid according to called mining. Without mining, it would be too far too
the Bitcoin protocol. easy for a hacker to add new transactions. Mining
keeps the blockchain secure.

https://community.element14.com/learn/publications/ebooks/ 7
Mining has its origins in spam prevention. HashCash 2. The block header is input into a hashing algorithm.
is a cryptographic “Proof of Work” system that was
originally created by Adam Back in 1997 with the 3. The validity of the resulting hash is checked to
intention of preventing email spam. Email software see if it meets the conditions of the target hash.
would be required to use a moderate amount of CPU
4. If the hash is valid, the block can be added to the
power to generate a hash (an encrypted string) before
blockchain. In most cases, however, the hash will
sending the email, which the recipient can then
not be valid, and the miner must return to Step 1
verify. It is unlikely that a spammer would be able to
to try a new nonce.
dedicate the computational resources for generating
a separate hash for each email when sending out This process will likely have to be repeated
thousands, therefore, any email that made it through quadrillions of times in order to produce a valid
must be legitimate. hash; this is why mining requires so much processing
power. This leads to the following question:
Bitcoin also uses Proof of Work as its crypto
consensus mechanism. The job of each Bitcoin miner What is a valid hash?
is to find a nonce, an arbitrary number that is very
difficult to discover. Nonce is an abbreviation for Why is it so difficult to come up with a valid hash?
“number only used once”. This process is typically The keyword in that question is difficult. Bitcoin
described as trying to solve a “complex mathematical features a difficulty algorithm that is designed to find
problem”, however, finding a nonce is nothing more a new block every ten minutes. The difficulty level is
than brute-force guessing. adjusted by the Bitcoin network every 2016 blocks,
or approximately every two weeks, based on the time
A simple summary of the trial-and-error process that it took to mine the previous 2016 blocks. An average
miners execute is as follows: time that is shorter than ten minutes indicates that
mining was too easy, and the difficulty is increased.
1. The miner creates the block header (the unique
If the average time is longer than ten minutes, mining
identifier for the block). The block header
was too difficult, and the difficulty is decreased.
contains these fields:
Every time the difficulty increases, the target hash
a. Version – The block version (current version
gets smaller, and the number of leading zeroes in the
of the software)
hash increases. To be valid, the hash generated by
b. hashPrevBlock – the hash of the previous the miner must be smaller than the target hash. The
block header smaller the target hash, the less valid hashes exist
that are smaller than it, and thus, the more difficult
c. hashMerkleRoot – a 256-bit hash derived to find.
from all the transaction in the block
For example, consider a target hash with six
d. Time – The block’s timestamp hexadecimal digits. If we needed to find a hash less
than or equal to 0FFFFF, there would be 1,048,576
e. Bits – Current difficulty target; more on this possible valid hashes. The explanation is as follows:
later! because the first digit must be 0, there are five digits
remaining. Each hexadecimal digit has 16 potential
f. Nonce – The 32-bit number (starting at 0)
values, so for 5 digits, the number of total possible
that is generated by the miner. This is the
combinations is 16 5, or 1,048,576.
number that the miner increments with each
trial in order to find a valid hash. The nonce If the target hash is 0000FF, there are only 16 2, or
is the only part of the block header that the 256 possible valid hashes; an order of magnitude
miner can change. more difficult than if the target hash were 0FFFFF.

8 https://community.element14.com/learn/publications/ebooks/
Bitcoin’s hashing algorithm, SHA-256, produces referred to as stakeholders, are chosen to create
a 256-bit hash, which can be represented as 64 new blocks based on their stake in the network. The
hexadecimal digits. As of Aug 2023, the current selection process considers factors like the number
difficulty is 52.39. The number of leading zeroes in of coins held and the length of time they have
the target hash is 19. been held. PoS offers advantages such as energy
efficiency, as it eliminates the need for resource-
What is a Halvening? intensive mining operations, and lower barriers to
entry, which enables broader participation. However,
Bitcoin has a deflationary monetary policy; the rate
PoS is not without its own challenges. One concern
at which bitcoins are created decreases following
is the “nothing at stake” problem, where validators
a predetermined schedule. This is accomplished
can potentially support multiple conflicting chains
by a halvening. Halvenings, also known as halvings
without any cost, leading to a lack of consensus
or halving events, occur in the Bitcoin network
during forks.
approximately every four years, specifically every
210,000 blocks. During a halvening, the block reward Both consensus mechanisms have their merits and
for miners is reduced by half. In the early years of limitations. PoW provides a robust and battle-tested
Bitcoin, the block reward was set at 50 bitcoins security model, but at the expense of high energy
per block. However, as part of Bitcoin’s design, the consumption. PoS offers a more energy-efficient
block reward is programmed to undergo a halvening alternative and encourages broader participation,
event to control the issuance of new bitcoins and but with potential centralization risks. It’s worth
create scarcity. noting that variations and hybrid approaches of
these consensus mechanisms are being explored
After the first halvening in 2012, the block reward
to leverage the strengths of both and mitigate their
reduced to 25 bitcoins per block. The second
respective weaknesses. Ultimately, the choice
halvening occurred in 2016, reducing the block
between PoW and PoS depends on the specific
reward to 12.5 bitcoins per block.
requirements and goals of a blockchain network and
Proof of Work (PoW) vs Proof of Stake (PoS) its participants.

With Proof of Work, miners compete to be the


first to come up with a valid nonce. This requires
significant computational power. The first miner
to find a valid solution gets the right to add a new
block to the blockchain and receives a reward. The
advantages of PoW include its security through the
massive computational power needed to manipulate
the blockchain and its successful track record in
the case of Bitcoin. However, PoW has drawbacks,
such as high energy consumption and the need
for expensive mining hardware, which can lead to
centralization due to economies of scale.

Another consensus mechanism exists, called Proof


of Stake, used by other cryptocurrencies, including
Ethereum and Solana. PoS operates based on the
ownership of cryptocurrency units. Validators, often

https://community.element14.com/learn/publications/ebooks/ 9
CHAPTER - 5 What is an NFT?

There was much hype around non-fungible tokens differentiate it from others, making it unique. They
(NFTs) in 2020-2021. Digital art was selling for can represent various digital or physical items
extremely high values, sometimes in the range of such as artwork, music, videos, in-game items,
hundreds of thousands of dollars. The hype has and more. NFTs enable creators and artists to sell
since died down, but it left a lot of people wondering, their work directly to buyers, establish provenance
“Why is a jpeg worth so much, when I can save it and ownership, and potentially earn royalties from
to my hard drive for free?” subsequent sales.

An NFT is a unique digital identifier that is recorded Digital art NFTs showed that there are applications
on a blockchain and is used to certify ownership and for blockchain beyond cryptocurrencies. While the
authenticity. The blockchain ensures the immutability enthusiasm for buying and selling digital art has
and transparency of ownership records, allowing waned, NFTs remain a very promising technology
individuals to verify the authenticity and ownership that can be used for a wide variety of applications.
of an NFT. Each NFT has distinct attributes that

CHAPTER - 6 What are Other Potential Blockchain Applications?

While Bitcoin and other cryptocurrencies were the Voting: Blockchain can be used to create secure
first applications of blockchain tech, other industries and transparent voting systems that are resistant
have started adopting it for various purposes. Large to hacking and fraud. Votes can be recorded
corporations are developing blockchain solutions, anonymously, and the results can be verified and
including Microsoft, Google, Amazon, Nvidia, and audited by anyone.
more. Some of the other applications and industries
that have adopted blockchain tech include: Banking and Finance: As cryptocurrency has
already demonstrated, blockchain can be used to
Supply Chain Management: Blockchain can be create faster, cheaper, and more secure payment
used to create secure, transparent supply chains. and remittance systems. Blockchain can also be
By tracking products and components through the used for identity verification and secure storage of
entire supply chain, companies can ensure authentic, financial data.
quality, and ethical production.
Gaming: Blockchain can be used to create secure
Healthcare: Blockchain can be used to securely and transparent gaming systems. Gamers can own
store and share medical data and records. Patients and trade in-game assets, and game developers can
control access to their information, and healthcare create provably fair games.
providers share data more easily and securely.
Intellectual Property: Blockchain can be used to
Real Estate: Blockchain can be used to streamline create secure and transparent systems for tracking
the buying and selling process by providing a secure, and protecting intellectual property rights. Artists and
transparent, and tamper-proof record of property creators can securely record and verify ownership
ownership, transactions, and contracts. In fact, any and usage rights for their work.
system involving contracts could benefit from being
hosted on blockchain technology.

10 https://community.element14.com/learn/publications/ebooks/
CHAPTER - 7 Energy Consumption

With Bitcoin mining alone estimated to consume • Green Mining: Some initiatives focus on
160 TWh annually (more than many countries) the promoting renewable energy sources for mining
energy consumption of blockchain technology is a operations. By utilizing clean energy sources
significant issue that needs to be addressed. There such as solar or wind power, the environmental
are various solutions that could potentially make impact of blockchain mining can be reduced.
blockchain more efficient:
• Energy-Efficient Algorithms: Researchers are
• Proof-of-stake (PoS) Consensus Mechanism: developing more energy-efficient consensus
In a PoS system, nodes are selected to algorithms that maintain the security and integrity
verify transactions based on the amount of of blockchain networks, while reducing energy
cryptocurrency they hold. Because miners are no consumption. These algorithms aim to strike a
longer required to solve complex problems, PoS balance between security and efficiency.
can lead to reductions in energy consumption.
• Blockchain Optimization: Improvements in the
• Off-chain Transactions: Off-chain transactions underlying blockchain protocols and optimization
are transactions that are processed outside of of network scalability can help mitigate energy
the blockchain network. This can reduce energy usage. By enhancing transaction processing
consumption by eliminating the need to verify capabilities and reducing network congestion,
transactions on the blockchain. overall energy consumption can be reduced.

• Layer 2 Scaling Solutions: These are • Hybrid Approaches: Combining different


technologies that allow for more transactions consensus mechanisms or implementing hybrid
to be processed on a blockchain network approaches that blend PoW and PoS can
without increasing the energy consumption of strike a balance between security and energy
the network. Some examples of layer 2 scaling efficiency. These approaches aim to leverage the
solutions include the Lightning Network for advantages of multiple consensus mechanisms
Bitcoin and Raiden Network for Ethereum. to reduce energy consumption while maintaining
network integrity.

CHAPTER - 8 Conclusion

Blockchain technology is still in its infancy in terms of development and adoption. We, as hardware and
software engineers, have a say in the direction it goes, beyond just hodling 1 Dogecoin to the moon. Many
smart people are building web3 at this very moment, but no one really knows where it’ll go. We have the
resources and knowledge to contribute to creating the next killer app or hardware innovation, so let’s put
our thinking caps on and start developing!

1.Hodling” is crypto slang for buying and not selling. It originated from a typo for “holding” in an online forum.

https://community.element14.com/learn/publications/ebooks/ 11
For more engineering trends please check
out the Business of Engineering.

300 S. Riverside Plaza, Suite 2200 Facebook.com/e14Community


Chicago, IL 60606 Twitter.com/e14Community
https://community.element14.com/

© 2023 by Newark Corporation, Chicago, IL 60606. All rights reserved. No portion of this publication, whether in whole or in part, can be reproduced without the express written consent of
Newark Corporation. Newark® is a registered trademark of Farnell Corp. All other registered and/or unregistered trademarks displayed in this publication constitute the intellectual property of
their respective holders. Printed in the U.S.A. WF-3421961

You might also like