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

1 Introduction to Blockchain

The document discusses the evolution of transaction recording from traditional ledgers to digital ledgers and introduces blockchain as a decentralized technology that enables secure transactions without intermediaries. It explains key concepts of cryptocurrencies, including their reliance on cryptographic principles and the importance of distributed consensus to prevent issues like double-spending. Additionally, it highlights the differences between Bitcoin and blockchain, emphasizing that while Bitcoin is a cryptocurrency, blockchain serves as the underlying technology with broader applications.

Uploaded by

A0554
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)
13 views

1 Introduction to Blockchain

The document discusses the evolution of transaction recording from traditional ledgers to digital ledgers and introduces blockchain as a decentralized technology that enables secure transactions without intermediaries. It explains key concepts of cryptocurrencies, including their reliance on cryptographic principles and the importance of distributed consensus to prevent issues like double-spending. Additionally, it highlights the differences between Bitcoin and blockchain, emphasizing that while Bitcoin is a cryptocurrency, blockchain serves as the underlying technology with broader applications.

Uploaded by

A0554
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
You are on page 1/ 62

Introduction

Prof. J. Ujwala Rekha


Traditional Transactions
• Business transactions are recorded in ledgers and with the widespread
adoption of computers, the digital ledger replaced the physical ledger.
• Although the medium of entry has changed, the fundamental
principles of the recording of sales and purchases have remained the
same throughout the centuries.
• The general ledger records the assets, liabilities, income, expenses,
and capital of the company or business.
• The drawbacks of manual paper-based transaction entry are laborious
recording and maintenance, human error, lack of security, and limited
copies that were unsuitable for large organizations.
• Although digital transactions eliminated the drawbacks of manual
paper-based transaction entry, it introduced new set of complications,
such as potential fraud, data inconsistencies, and other technical
problems with regard to outages and virus attacks.
Traditional Online Transaction
• Assume Joe and Ann would like to do the transaction online.
– Bank acts as the central authority or intermediary.
– The bank debits Joe’s account by $ 50 and adds $ 50 to Ann’s
account.
– Though no real money exchanges hands, a credit and debit entry
is made in the bank’s centralized DB or ledger. Only bank has
access to this ledger.
– The bank acts as a trusted third party for which the bank may
collect a transaction fee, say, $ 1 from Joe’s account.
• In the real-life, transactions involving large amounts of money
typically take place through exchanges for cross-border transfers or
across multiple banks.
• As a result, financial institutions must maintain transactions, verify
ownership, and mediate disputes.
What is Blockchain?
• Blockchain is a distributed, replicated, peer-to-
peer network of databases that allows multiple
non-trusting parties to transact without a trusted
intermediary.
• It maintains an ever-growing, append-only,
tamper-resistant list of time-sequenced records.
• In other words, it is a distributed ledger that sits
on the internet for recording transactions and
maintaining a permanent and verifiable record of
information.
Blockchain
• This innovative technology was first published in 2008
by Satoshi Nakamoto (pseudonym of a person/persons
as-of-yet unknown) in a white paper titled “A Peer-to-
Peer Electronic Cash System.”
• The idea behind the design was to create a
decentralized digital currency that is free from
government regulation whereby two people can
confidently trade directly with one another without the
need for mediators or intermediaries.
• In 2009, the concept became a reality when Satoshi
Nakamoto implemented the first application of the
blockchain, Bitcoin.
Currencies
• All currencies need some way to control supply and enforce various
security properties to prevent cheating.
• In fiat currencies, organizations like central banks control the money
supply and add anti-counterfeiting features to physical currency.
• While it is not entirely impossible, these security features certainly pose
significant challenges for anyone attempting to produce fake currency,
highlighting the necessity of law enforcement in preventing such
activities.
• Cryptocurrencies too must have security measures that prevent people
from tampering with the state of the system.
• A single unit of currency cannot be used more than once. For example,
Alice cannot pay Bob and Carol same digital coin leading to double-
spending.
• Cryptography provides a mechanism for securely encoding the rules of a
cryptocurrency system, such as rules for creation of new units, protocols
for preventing double-spending, etc.
Cryptocurrency
• A cryptocurrency is a digital currency designed
to work through a computer network that is not
reliant on any central authority, such as a
government or bank, to uphold or maintain it.
• Individual coin ownership records are stored in
a digital ledger or “blockchain” using strong
cryptography to secure transaction records,
control the creation of additional coins, and
verify the transfer of coin ownership.
Formal Definition of Cryptocurrency
• The system does not require a central authority; its state is maintained
through distributed consensus.
• The system keeps an overview of cryptocurrency units and their ownership.
• The system defines whether new cryptocurrency units can be created. If
new cryptocurrency units can be created, the system defines the
circumstances of their origin and how to determine the ownership of these
new units.
• Ownership of cryptocurrency units can be proved exclusively
cryptographically.
• The system allows transactions to be performed in which ownership of the
cryptographic units is changed. A transaction statement can only be issued
by an entity proving the current ownership of these units.
• If two different instructions for changing the ownership of the same
cryptographic units are simultaneously entered, the system performs at
most one of them.
Bitcoin Vs Blockchain
• Though bitcoin and blockchain are often referred
to interchangeably, they are not the same.
• Blockchain is the underpinning technology that
the bitcoin was built on.
• In addition to the bitcoin blockchain, there is also
the Ethereum blockchain and other private
blockchains that are adapted to cater to various
industry applications such as supply chain, cross-
border payments and many others.
Bitcoin Vs Blockchain
• Bitcoin is a cryptocurrency, while blockchain is a ledger or database
of information.
• Bitcoin was created to reduce the government’s control over cross-
border transactions and to speed up the transaction process by
removing the need for third-party intermediaries.
• On the other hand, blockchain provides a secure environment that
bitcoin needs for peer-to-peer transactions.
• Blockchain acts as bitcoin’s ledger and maintains all the transactions
of bitcoin.
• Bitcoin is limited to currency transactions, while the blockchain has
numerous applications in business.
• Bitcoin has a high degree of anonymity. Though the transactions are
visible, it is close to impossible to identify the user.
• Even though Satoshi Nakamoto had about one million bitcoins worth
about eight billion dollars as of 2019, his identity is still unknown.
Key Blockchain and Cryptocurrency Concepts

• Three vital technological concepts are the


backbone of blockchain and crypto-currency
transactions.
– Peer-to-peer network
– Cryptography
– Distributed consensus
Peer-to-Peer Network
• A peer-to-peer (P2P) network is a collection of computers, each of
which serves as equal peer nodes acting as both clients and servers to
the other nodes within the network.
• Here are some ways P2P networks contribute to blockchain:
– Decentralization – P2P networks have no central authority
– Data accuracy – P2P networks maintain complete replica of
records and ensure data accuracy
– Transaction verification – P2P network uses consensus
mechanisms
– Security – P2P networks are resistant to cyber threats because of
the lack of a centralized vulnerability point.
– Transparency – P2P networks ensure the integrity and
transparence of the blockchain.
– Efficiency – P2P networks can be efficient and fast as more users
join and share resources.
Crytographic Hash Functions
• The first cryptographic primitive that we’ll need to
understand is a cryptographic hash function.
• A hash function is a mathematical function with the
following three properties:
– It’s input can be string of any size.
– It produces a fixed size output.
– It is efficiently computable. Intuitively, this means that for a
given input string, you can compute the hash function in a
reasonable amount of time. More technically, computing the
hash of an n-bit string should have a running time that is O(n).
• These properties define a general hash function, one that
could be used to build a data structure such as a hash table.
Crytographic Hash Functions
• For a hash function to be cryptographically
secure, three additional properties are required:
– Collision-resistance
– Hiding
– Puzzle-friendliness
Crytographic Hash Functions
• Property 1: A collision occurs when two
distinct inputs produce the same output. A hash
function H(.) is collision resistant if nobody
can find a collision.
– Formally, a hash function H is said to be collision
resistant if it is infeasible to find two values x and
y, such that x≠y, yet H(x)=H(y).
Cryptographic Hash Functions
• Property 2: The hiding property asserts that if we’re given the
output of the hash function y=H(x), there’s no feasible way to
figure out what the input, x, was.
• This problem is that this property can’t be true in the stated
form.
• Consider an experiment, in which a coin is flipped. If the result
was head, the hash of the string “heads” is announced.
Similarly, if the result was tail, the hash of the string “tails” is
announced.
– An adversary who didn’t see the coin flip, but only saw the
hash output could compute both the hash of the string
“heads” and “tails” and figure out what the input was.
• The adversary was able to guess the input, because there were
only two possible values, and it was easy for the adversary to
try both of them.
Cryptographic Hash Functions
• In order to be able to achieve the hiding property, the
input must be chosen from a set that’s spread out.
• In information-theory, min-entropy is a measure of how
predictable an outcome is, and high min-entropy means
the random variable is very spread out.
• We can achieve the hiding property by concatenating an
input that’s not spread out with another input that is
spread out.
• Specifically, a hash function H is hiding if when a
secret r is chosen from a probability distribution that
has high min-entropy, then given H(r || x) it is infeasible
to find x. (the double bar || denotes concatenation)
Cryptographic Hash Functions
• Let’s look at an application of the hiding property.
• A commitment scheme is a two-phase cryptographic
protocol between two parties, a sender and a receiver.
– In the first-phase, the sender sends a message m without
revealing this value. The sender picks a random k and
encodes (commit) the message with k and some
randomness r. The encoding result c is called a
commitment, which is sent to the receiver.
– In the reveal phase, the sender sends k to the receiver. The
receiver can open the commitment c using k , and then
check to determine whether to accept or reject that
commitment.
Cryptographic Hash Functions
Formally, a commitment scheme works as follows:
Commit Phase: Reveal Phase:
• Sender chooses a nonce r • Sender sends key k to the
• Sender encrypts or commits receiver.
the message m and r with • Receiver opens or decrypts
key k c with key k
c=encrypt(k,m,r) (m’,r’)=decrypt(k,c)
• Sender sends commitment c • If c=encrypt(k,m’,r’) then
to the receiver accept else reject.
Cryptographic Hash Functions
• Property 3: A hash function H is said to be puzzle-friendly if
for every possible n-bit output value y, if k is chosen from a
distribution with high min-entropy, then it is infeasible to find
x such that H(k||x)=y in time significantly less than 2n.
• Let H be a cryptographic hash function and let an output y be
given. Let it be required to find z such that H(z) = y. Let us
also assume that a part of the string z, say k, is known. Then,
the problem of determining z boils down to finding x that
should be concatenated with k to get z. The problem of
determining x can be thought of a puzzle.
• The search is puzzle-friendly, if the only way to find a solution
is to try every possible value, which is called brute-force
approach.
Cryptographic Hash Functions

• The puzzle-friendly property is used in Bitcoin


mining.
• The miner needs to find a specific number,
concatenate it with the block data, and make
sure the hash falls with in a certain range.
• The first miner to solve the puzzle can add the
transaction to the blockchain and receive a
reward.
Cryptographic Hash Functions
• SHA-256 satisfies all the three properties –
collision-resistance, hiding and puzzle-friendly
properties and is used in Bitcoin blockchain.
Hash Pointers and Data Structures
• A hash pointer is simply a pointer to where some information
is stored together with a cryptographic hash of the information.
• While a regular pointer gives you a way to retrieve the
information, a hash pointer also gives you a way to verify that
the information hasn’t changed.

Hash pointer to where data is stored together with a


cryptographic hash of the value of that data
Hash Pointers and Data Structures
• We can use hash pointers to build all kinds of data
structures.
• A regular linked list has a series of blocks and each block
has data as well as a pointer to the previous block in the list.
• In a blockchain, the previous block pointer will be replaced
with a hash pointer.
• Each block not only tells us where the value of the previous
block was, but it also contains a digest of that value that
allows us to verify that the value hasn’t changed.
• The head of the list, which is a regular hash-pointer points
to the most recent data block.
Hash Pointers and Data Structures
Hash Pointers and Data Structures
• A blockchain is tamper-resistant.
• If an adversary changes the data of some block k, then the
hash in block k+1 is not going to match because the hash
function is collision-resistant and the inconsistency in the
data can be detected.
• Therefore, the adversary can continue to try and cover up
this change by changing the next block’s hash as well. In
fact, the adversary must continue doing this until he reaches
the head of the list.
• As long as we store the hash pointer at the head of the list in
a place where the adversary cannot change it, the adversary
will be unable to change any block without being detected.
Hash Pointers and Data Structures
• Merkle trees is another useful data structure that we can build using
hash pointers.
• A Merkle tree is a binary tree with hash pointers named after its
inventor Ralph Merkle.
– The blocks containing the data comprise the leaves of the tree.
– The blocks are grouped into pairs of two, and then for each pair,
a node is created in the next higher level that has two hash
pointers one for each of the blocks.
– These nodes are grouped into two and for each pair a node is
created in a level above them that contain two hash pointers one
for each of these nodes.
– This is continued and until a single block, the root of the tree is
constructed.
Hash Pointers and Data Structures
• In a Merkle tree, you can traverse down through
the hash pointers to any point in the list.
• As with the blockchain, if an adversary tampers
with some data block at the bottom of the tree,
that will cause the hash pointer that’s one level up
to not match, and even if he continues to tamper
with this block, the change will eventually
propagate to the top of the tree where he won’t be
able to tamper with.
Public Key Cryptography
• Most of the time blockchain uses public-key cryptography, also
known as asymmetric-key cryptography.
• Public key cryptography uses both public key and private key in order
to encrypt and decrypt data.
• The public key can be distributed commonly but the private key can
not be shared with anyone.
• It is commonly used for two users or two servers in a secure way.
Distributed Consensus
• The key technical problem to solve in building a
distributed e-cash system is achieving distributed
consensus.
• The distributed consensus avoids double-spending
and other internet attacks.
• Double-spending is the act of spending the same
crypto-currency or blockchain token more than
once.
• Distributed consensus allows decentralized
network to reach an agreement on a data set or
ledger state.
Distributed Consensus
Here are some key points about distributed consensus in blockchain:
• Consensus Mechanisms – These are protocols that use automated
group verification to achieve agreement, trust and security across a
network.
– They replace the need for human verifiers and auditors, which can
be slower, inaccurate or untrustworthy.
• Consensus Algorithms – These are used to achieve consensus and
coordination in blockchain.
– Some examples include Proof-of-Work (PoW), Proof-of-Stake
(PoS), and Delegated Proof of Stake.
• Design choices – Design choices made in a consensus protocol can
significantly impact a blockchain system’s performance like
transaction capacity, scalability and fault tolerance.
• Cost – Some consensus mechanisms like PoW can be costly to set up
and operate. Bitcoin miners can cost over $1,700, and PoW
blockchains require a lot of power to operate.
A Simplified Consensus Algorithm

1. New transactions are broadcast to all nodes


2. Each node collects new transactions into a block
3. In each round, a random node gets to broadcast
its block
4. Other nodes accept the block only if all
transactions in it are valid (unspent, valid
signatures).
5. Nodes express their acceptance of the block by
including its hash in the next block they create.
Digital Trust
• One of the features in the blockchain is digital trust.
• Trust relates to two questions: “Are you whom you say you
are?” and “Do you have the right to do what you want to do?”
– Proving identity (authentication) and proving permissions
(authorization)
• Authentication is addressed with cryptography. Blockchain
utilizes public-key or asymmetric cryptography that involves a
public key and a private key.
• While the private key must be maintained confidential, the
public key may be distributed to anyone and therefore, the data
can be tampered during transit.
• Digital signature ensures that the data is not tampered in
transit.
Digital Signatures for Authentication
A digital signature scheme typically consists of
three algorithms:
• 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.
• A signing algorithm that, given a message and a
private key, produces a signature.
• A signature verifying algorithm that, given the
message, public key and signature, either accepts
or rejects the message’s claim to authenticity.
Digital Signatures for Authentication
• Sender
– Message digest MD is computed by applying the hash function on
the message M. MD=HASH(M)
– Message digest is encrypted using the private key of the sender
PrS to form digital signature DS. DS=ENCRYPT(MD,PrS)
– A digital signature is then transmitted with the message (M+DS).
• Receiver
– The message digest is retrieved by decrypting the digital
signature using the public key of the sender PuS.
MD1=DECRYPT(DS,PuS)
– Compute the message digest from the actual message sent.
MD2=HASH(M)
– The message digest computed from the message and decrypted
from the signature need to be same for ensuring integrity.
MD1=MD2
Digital Signatures for Authentication
Digital Signatures for Authentication
• Although the verification process seems like
much work, it is generally done by a software
application, and the process is typically invisible
to the end-user.
• Digital signatures are what gives the data
recorded on a blockchain its immutability.
• Encryption and digital signatures are the de facto
ways blockchain technology guarantees the
security, authentication, integrity, and non-
repudiation requirements of the data or
transaction.
Authorization by Distributed Consensus
• Digital trust comprises of “authentication” and “authorization”.
• While digital signatures address authentication, distributed consensus
addresses authorization in blockchain technology.
• In a blockchain, all the nodes in the network share the responsibility
of ensuring that appropriate rules are applied, in contrast to the
centralized system where a central authority defines the rules and has
complete control over the network data and users.
• Blockchain leverages Distributed Ledger Technology to support
immutable transactions on a P2P network without any centralized
coordinating entity.
• Authentication and authorization in blockchain systems are
maintained using cryptographic signatures and consensus-based
validation procedures.
Components of Blockchain
Node
• A node is an electronic device (computers, mobile devices,
servers, etc.) that participates in the blockchain.
• All the nodes in the network have a copy of the blockchain ledger
and are interconnected.
• A node can be:
– A Full Node – The node maintains a full copy of the
transaction history of the blockchain. They process and accept
transactions/blocks, validating those transactions/blocks, and
then broadcasting them to the network.
– Partial Nodes – It is also called a lightweight node because it
doesn’t maintain the whole copy of the blockchain ledger. It
maintains only the hash value of the transaction.
Components of Blockchain
Ledger
• A ledger in blockchain technology refers to a digital database of
information that is immutable.
• Blockchain is commonly referred to as a public distributed
decentralized ledger.
• Ledger is public because anyone in the blockchain has access to the
ledger and can read or verify the transaction.
• Ledger is distributed because all the nodes in the blockchain
network have a copy of the blockchain ledger.
• Ledger is decentralized because blockchain protocols are built such
that no node or group of nodes has excessive control over the ledger.
• While traditional database works on CURD principle (Create,
Update, Read, and Delete), the blockchain works in the principle of
append-only.
Components of Blockchain
Wallet
• A wallet in the blockchain is a digital wallet that
allows users to manage cryptocurrency such as
Bitcoin, Ether, etc.
• It stores the record of transactions and also public and
private keys which are used to perform transactions.
• It helps to exchange funds easily and the transactions
are more secure as they are cryptographically signed.
• The privacy and the identity of users are maintained.
• The term “wallet” is a misnomer, as real money is not
stored.
Components of Blockchain
Wallet
• When Person A sends cryptocurrency coins to Person B’s
wallet, Person A is, in effect, signing off ownership of the
coins to Person B.
• Person B can spend the coins only if the private key stored
in Person B’s wallet matches the public address the
cryptocurrency is assigned to.
• If the keys match, the balance in Person B’s wallet increases
while that in Person A’s wallet decreases accordingly.
• It should be noted that there are no real coins at play here.
The said transaction is a new record added on the
blockchain along with a change in the balance in the
cryptocurrency wallet.
Components of Blockchain
Wallet
• The wallet provides all the features that are needed for a safe, easy
and secure transfer of funds between two parties.
• Privacy is maintained – Whenever a user creates a wallet, the public
and private key associated with the wallet is also generated.
• Transactions are secure – The private key is used to send funds as
well as to open encrypted messages.
• Ease of Usage – Wallets can be installed and accessed from the web,
desktop or any mobile device. Transfer of funds is relatively
instantaneous, without any geographical constraints or
intermediaries like banks.
• Currency Conversion – Wallets help you to transact across various
types of cryptocurrencies like Bitcoin (BTC), Ether (ETX), Monero
(XMR), Litecoin (LTC), and others without worrying about the
currency conversion.
Components of Blockchain
Nonce - “number used once”
• A nonce is a number generated randomly that
can be used just once in the cryptographic
communication.
• Adding a nonce to a transaction’s identifier
makes it additionally unique, thus reducing the
chance of duplicate transactions.
• Nonce is the key to creating a block in a
blockchain database.
Components of Blockchain
Hash
• A hash function can take data of any size, perform an operation on it,
and return a “hash” that is a data of a fixed size.
• In the blockchain, hashes are used as identifiers for blocks,
transactions and addresses since a hash creates a unique identifier.
• In the bitcoin, blockchain hashes are 256 bits.
• The hashing algorithm used in the blockchain is SHA-256.
• It is one-directional and hence a right candidate for encryption. A hash
function takes input of any length to create a fixed-length data output.
However, the input cannot be recreated from the data output.
• A very minute change gives a different hash making it one of the most
secure functions.
• It keeps the database small. As mentioned earlier, the data output is
always a fixed size. Hence, storing the hash of a file instead of the
original file considerably reduces the size of the database.
Components of Blockchain
Mining
• In the simplified consensus algorithm, a random node broadcasts the
block and other nodes upon validation accept the block by adding
the new block to the blockchain.
• We can actually allow nodes to compete with each other to solve a
complex mathematical problem based on cryptographic hash
algorithms. The node that first solves the puzzle broadcasts the
block and other nodes upon validation accept the block by adding
the new block to the chain.
• The nodes that compete with each other are called “miners” in the
Bitcoin world or “forgers” in the Ethereum world.
• Mining is the mechanism whereby nodes called “miners” in the
Bitcoin world or “forgers” in the Ethereum world validate new
transactions and add them to the blockchain ledger.
Components of Blockchain
Mining
• In order to create a block, the node that proposes that block is required to find a
number, or nonce, such that when you concatenate the nonce, the previous
hash, and the list of transactions that comprise that block and take the hash of
this whole string, then that hash output should be a number that falls into a
target space that is quite small in relation to much larger output space of that
hash function.
• We can define such a target space as any value falling below a certain target
value.
• Formally,
H(nonce||prev_hash||tx1||tx2||…||txn||)<target
• If the hash function satisfies the puzzle-friendliness property, then the only way
to succeed in solving this hash puzzle is to just try enough nonces one by one
until you get lucky.
• The lucky node that solves the puzzle proposes the next block and receives the
rewards in the form of transaction fees or new bitcoins.
• The system is decentralized because nobody decides which node gets to
propose the next block.
Block in a Blockchain
A block in a blockchain contains:
• Timestamp – indicates when the transaction data was
recorded
• Hash of the previous block
• Merkle root – hash that summarizes all the transactions that
occurred during that block
• Nonce – the random number used to vary the value of the
hash.
• Hash of the block – An alphanumeric number to identify the
block.
• Transaction data – This contains the details of several
transactions
The Structure of a Blockchain
Genesis Block

• The genesis block is the first block. It is the only block with no
hash of the previous block. The genesis block contains
transactions that are combined and validated to produce a
unique hash.
Blockchain Transaction in a Nutshell

High-level steps involved in a blockchain transaction:


• Blockchain is a digital ledger or digital database
• The blockchain ledger is distributed to all the nodes in
the network, i.e., all the nodes have the same copy of
the ledger.
• Blockchain is decentralized, i.e., there is no central
authority. All the nodes in the network can participate
in the processing and creation of a block.
• A unique cryptographic key secures every record on the
blockchain.
Step-by-Step Representation of a Blockchain
Transaction
Let Joe plan to send 0.5 BTC to Ann through the blockchain, then the
following steps are involved in the transaction:
1. Joe requests the proposed transaction. Joe sends 0.5 BTC from his Wallet.
The transaction is signed with the Joe’s private key to ensure authenticity.
2. The proposed transaction is broadcast to the network
3. Miners verify the transaction’s validity and bundle it into a block along
with other transactions. (check authenticity, Joe’s balance, etc.)
4. Miners compete to solve the complex mathematical puzzle.
5. The miner who finds the correct hash broadcasts the block to the network.
Majority of the nodes/miners need to approve/verify the block for it to be
accepted into the blockchain. Once approved, the winning miner can
collect his reward.
6. Block is added to the blockchain.
7. Transaction is completed
Double Spending
• The double-spend problem is circumvented in blockchain through the
consensus mechanism and the basic chronological structure of how the
blocks are chained together.
• A transaction is verified and added to a block via the consensus
mechanism after a considerable amount of computational power and
resources are spent. Attempting to double-spend would require the
same if not more computational power and resources. No one will
expend enormous amount of resources if the payback is not worth the
effort.
• Also, the first transaction would be time-stamped and cryptographically
linked to previous blocks and broadcasted to all nodes in the network.
When the second (fraudulent) transaction is proposed, it will fail at the
verification process and be rejected.
• However, it is theoretically possible to double-spend a cryptocurrency.
Though rare, this can be done by the 51% attack, Finney attack, or Race
attack.
Figure. Blockchain Ecosystem
Blockchain Ecosystem
• The Presentation Layer – This layer gives access to
the whole network and blockchain applications.
• The Application Layer – This is the layer on which
apps are built.
– This layer includes smart contracts, decentralized
applications, and other software that run on top of the
blockchain network.
– It allows developers to create new applications and services
that leverage the security and transparency of the
blockchain.
– Wallets, social media Apps, browsers, Defi Apps, and NFT
platforms
Blockchain Ecosystem
• The Blockchain Layer – This is where the core
of the blockchain subsists.
– It consists of the consensus algorithms, the medium
and the interface for the P2P network that decide how
data is packetized and transmitted between peers.
– It controls mining, protocols that decide the consensus
methods and participation, nodes that execute
protocols and the distributed ledger.
• The Internet Layer – Blockchain works over the
internet. This layer ties all the networks together –
the computers, IoT devices, smart phones, etc.
Pros and Cons of Blockchain
• Decentralized and Distributed – no single
central authority
– Pros
• Removes single point of failure
• Fosters transparency
• Everyone is involved in decision-making process
– Cons
• Traditional DB may be more suitable and do the work a lot
faster and cheaper.
• Trusted third parties exist that may guarantee more efficient
and specialized services
• Stronger players (nodes with high computing power) can
take control of the network impacting decentralization.
Pros and Cons of Blockchain
Integrity – Complex consensus protocols ensure integrity at all times.
• Pros
– Allows multiple players who do not trust each other to transact
directly with one another
– Consensus algorithms and block propagation mitigate the risk of
double-spending, fraud, and manipulation of data.
– Removal of the intermediaries reduces the overall cost of
transaction
• Cons
– The integrity of data is obtained at the expense of time. Every node
needs to run the blockchain to verify transactions and maintain
consensus.
– Significant computing power is expended by miners leading to
substantial energy consumption.
– Nodes may prioritize transactions with higher rewards
Pros and Cons of Blockchain
Immutability – One cannot modify data or transactions once they are
recorded in the blockchain database. Any change required can be
addressed only by adding a new block of data to the existing chain of
blocks in chronological order, ensuring that the database is complete
and consistent.
• Pros
– Contains a verifiable record of all transactions made.
• Cons
– Not every node has the capacity to maintain and run a full copy
of the blockchain. This can potentially affect consensus and
immutability.
– In smaller blockchains, there is a risk of a 51% attack.
– Quantum computing can potentially break the cryptographic
algorithm to reverse engineer public keys of blockchain
networks to obtain the private keys.
Potential Applications in the Industry

• Digital identity
• Payments and settlements
• Proof of ownership
• Records management
• Supply chain management
• Loyalty programs and rewards
• Decentralized IoT
• Charity

You might also like