LAKIREDDY BALI REDDY COLLEGE OF ENGINEERING
(AUTONOMOUS)
Accredited by NAAC & NBA (Under Tier - I) ISO 9001:2015 Certified Institution
Approved by AICTE, New Delhi. and Affiliated to JNTUK, Kakinada
L.B. REDDY NAGAR, MYLAVARAM, KRISHNA DIST., A.P.-521 230.
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
20CS29 BLOCKCHAIN TECHNOLOGIES
Program & Semester: B.Tech & VII SEM
Academic Year: 2023 - 24
UNIT I
Module 1: INTRODUCTION
Introduction
A blockchain is an open, distributed ledger that can
record transactions between two parties efficiently in a
verifiable and permanent way without the need for a
central authority.
Open : Accessible to ALL
Distributed Ledger : No Single party control
Efficiently : Fast and Scalable
Verifiable : Everyone can check the validity of
Information
Permanent : Information is Persistent
“A blockchain is a continuously growing list of records, called
blocks, which are linked and secured using cryptography.”
The concept is introduced by Satoshi Nakamoto in 2009
Blockchain Features
Blockchain is simply a data structure where each block is
linked to another block in a time- stamped chronological
order
It is a distributed digital ledger of an immutable public
record of digital transactions.
Every new record is validated across the distributed
network before it is stored in a block.
All information once stored on the ledger is verifiable and
auditable but not editable .
Each block is identified by its cryptographic signature.
The first block of the blockchain is known as Genesis
block
Blockchain is used for the secure transference of items
like money, contracts, property rights, stocks, and even
networks without any requirement of Third Party
Intermediaries like Governments, banks, etc.
Basic ideas behind Block Chain
How trading happens Using Current System
Ledger
A ledger is a record-keeping book that stores all the
transactions of an organization
Problems with the current system
Banks and other third parties take fees for
transferring money.
Mediating costs increases transaction costs.
Minimum practical transaction size is limited.
System is opaque and lacks transparency and
fairness.
Also, central authority in control can overuse the
power and can create money as per their own
will.
Distributed Ledger
Different Network Systems
Centralized System
Centralized systems are conventional (client-server) IT
systems in which there is a single authority that controls the
system, and who is solely in charge of all operations on the
system.
All users of a centralized system are dependent on a single
source of service.
The majority of online service providers, including Google,
Amazon, eBay, and Apple's App Store, use this conventional
model to deliver services.
Advantages Disadvantages
Command chain Not 100% Trustable
Reduced Costs Single point of Failure
Consistent Output Scalability Limitation
Decentralized System
A decentralized system is a type of network where nodes are
not dependent on a single master node; instead, control is
distributed among many nodes.
This is analogous to a model where each department in an
organization is in charge of its own database server, thus
taking away the power from the central server and
distributing it to the sub-departments, who manage their own
databases.
Advantages Disadvantages
Full Control Costly
Immutable Data Misuse of Authority
High Security Volatility
Distributed Systems
A System where two or more nodes work with each other in
a coordinated fashion in order to achieve a common
outcome
It’s modeled in such a way that end users see it as a single
logical platform
For example, Google's search engine is based on a large
distributed system; however, to a user, it looks like a single,
coherent platform.
How Blockchain is changing the
landscape of digitalization
Digital Advertising
The world of digital advertising continues to change around
us. consumers are demanding more effort be made to secure
their data and privacy.
Blockchain enables a new kind of digital advertising platform
through which consumers can ‘own’ their own data,
With blockchain, “users can choose which advertising they
want to see and are rewarded in tokens for doing so in this
type of browser.”
An example of a blockchain-based browser is the Brave
browser, which blocks ads and web trackers by default. Users
can also opt to receive Brave Rewards by choosing the ads
they want to see.
Digital Marketing
Blockchain can optimize the way we track customer
interactions, increase targeting accuracy, and even manage
online advertising campaigns.
Blockchain offers better traceability, transparency, and
accountability than existing methods.
Strengthens Content Monetization
Boosting Transparency
Fraud Prevention
You can expect greater transparency and security in online
transactions, provide customers with more control over
their data, and reduce digital advertising costs. Clearly, the
future of blockchain is bright when it comes to digital
marketing.
Digital Ownership
“Digital ownership” describes the legal rights and authority a
person or organization has over a digital asset or piece of
property.
Blockchain technology allows people to own and control
their digital assets without intermediaries like banks or
governmental organizations. Democratizing ownership could
open new avenues for value production and trade in the
digital economy.
Blockchain technology is beneficial for digital ownership
because it provides a secure and decentralized ledger of
transactions that can be used to record ownership and
transfer of Web3 digital assets
Introduction to cryptographic
concepts required for Blockchain
Basic cryptographic primitives behind the blockchain
technology
Cryptographically Secured Hash Function
Digital Signature
Hash Function
Used to connect the “blocks” in a blockchain in a
tamper-proof way
Digital Signature
Digitally sign the data so that no one can “deny”
about their own activities
Cryptography: Basic Terminology
Plaintext (or clear text) : The message.
Encryption (encipher) : Encoding of message.
Ciphertext : Encrypted message.
Decryption (decipher) : Decoding of ciphertext
Encryption / Decryption Model
Key Based Encryption/Decryption
Symmetric Case
Both keys are the same or derivable from each
other. K1 = K2.
Asymmetric Case
keys are different and not derivable from each other.
K1 != K2
Hash function
We need to remember just the hash value rather than the
entire message – we call this as the message digest
SHA256 is used in Bitcoin mining – to construct the
Bitcoin blockchain
Secure Hash Algorithm (SHA) that generates 256 bit
message digest
Digital Signature
A digital code, which can be included with an electronically
transmitted document to verify
The content of the document is authenticated
The identity of the sender
Prevent non-repudiation – sender will not be able to
deny about the origin of the document
Only the signing authority can sign a document, but
everyone can verify the signature
Signature is associated with the particular document
Signature of one document cannot be transferred to another
document
Digital Signature using Public Key
Cryptography
Sign the message using the Private key
Only Alice can know her private key
Verify the signature using the Public key
Everyone has Alice’s public key and they can
verify the signature
Use the message digest to sign, instead of the
original message
Used Digital signature in Blockchain is used to
validate the origin of a transaction, Prevent non-
repudiation
Alice can not deny her own transactions
No one else can claim Alice’s transaction
as his/her own transaction
Block chain or distributed trust
A blockchain is a decentralized, distributed public ledger
where all transactions are verified and recorded.
Blockchain is a system consists of
Transactions
Immutable ledgers
Decentralized peers
Encryption processes
Some Blockchains allow for “BYOE”
Consensus mechanisms
Optional Smart Contracts
Consensus mechanisms
Consensus algorithm is a process in computer science used
to achieve agreement on some information among the
distributed systems.
The consensus algorithm was designed for the blockchain
technology to achieve reliability in a blockchain network
having multiple nodes.
Building trust with Blockchain:
Blockchain builts trust through the following five attributes:
Distributed
Secure
Transparent
Consensus-based
Flexible
Distributed
The distributed ledger is shared and updated with every
incoming transaction among the nodes connected to the
Blockchain. All this is done in real-time.
Secure
There is no unauthorized access to Blockchain made
possible through Permissions and Cryptography. The data
will be tampered proof.
Transparent
Because every node or participant in Blockchain has a copy of
the Blockchain data, they have access to all transaction data.
They themselves can verify the identities without the need for
mediators.
Consensus-based
All relevant network participants must agree that a
transaction is valid. This is achieved through the use of
consensus algorithms.
Flexible
Smart Contracts which are executed based on certain
conditions can be written into the platform. Blockchain
Network can evolve in pace with business processes.
How Block Chain Works
Blockchain Evolution
Benefits of Blockchains
Types of blockchain
Public Blockchains
Private Blockchains
Consortium Blockchains
Hybrid Blockchains
Public Blockchains
Public blockchains are open, decentralized networks of
computers accessible to anyone wanting to request or
validate a transaction (check for accuracy).
Those (miners) who validate transactions receive rewards.
Public blockchains use proof-of-work or proof-of-stake
consensus.
permission-less distributed ledger system.
Example : Bitcoin and Ethereum
Private Blockchains
A Private Blockchain is just like a relational database i.e.
fully centralized and owned by a single organization.
Private blockchains are not open, they have access
restrictions.
People who want to join require permission from the
system administrator.
Example: Hyperledger is a private, permissioned blockchain.
Consortiums Blockchain
Validation is conducted by known and identified members
of the limited network of nodes
greater privacy since the information from verified blocks
is not exposed to the public.
There are no transaction fees.
A consortium platform is more flexible.
Voting-based system, it ensures low latency and superb
speed.
Hybrid Blockchain
Hybrid blockchain is best defined as a combination of a
private and public blockchain.
It has use-cases in an organization that neither wants to
deploy a private blockchain nor public blockchain and simply
wants to deploy both worlds’ best.
Example of Hybrid Blockchain:
Dragonchain, XinFin’s Hybrid blockchain
Cryptocurrency
Cryptocurrency is digital money that doesn’t require a bank
or financial institution to verify transactions and can be used
for purchases or as an investment. Transactions are then
verified and recorded on a blockchain, an unchangeable
ledger that tracks and records assets and trades.
Cryptocurrencies are fungible, meaning the value remains
the same when bought, sold, or traded.
Although government regulations are absent from the
cryptocurrency market, they are taxable assets.
Mining is the term used to describe the process of creating
cryptocurrency. Transactions made with cryptocurrency
need to be validated, and mining performs the validation
and creates new cryptocurrency.
Example: Bitcoin, Ethereum,altcoins, include Cardano, Solana,
Dogecoin, and XRP
How Does Cryptocurrency Work
Mining
Cryptocurrencies (which are completely digital) are
generated through a process called “mining”. This is a
complex process.
Transactions made with cryptocurrency need to be
validated, and mining performs the validation and creates
new cryptocurrency.
Mining uses specialized hardware and software to add
transactions to the blockchain.
Buying, selling, and storing
Users today can buy cryptocurrencies from central
exchanges, brokers, and individual currency owners or sell
it to them.
An exchange is an online platform where you can trade
cryptocurrencies. Brokers use interfaces that interact
with exchanges.
An exchange allows you to trade without a third party.
Should you decide to use an exchange, you’ll need to find
buyers for your cryptocurrency.
Exchanges or platforms like Coinbase are the easiest ways
to buy or sell cryptocurrencies.
Once bought, cryptocurrencies can be stored in digital
wallets. Digital wallets can be “hot” or “cold”.
Hot wallets
A hot wallet offers online storage that you can access from a
computer, phone, or tablet. A hot wallet has a security risk
because it’s stored on the internet and is more susceptible
to cyber-attacks.
Cold wallets
A cold wallet doesn’t connect to the internet. You can store
your cryptocurrency in an external drive, such as a USB
device. You’ll receive a keycode to keep in a safe place. You
lose the keycode, you may lose your cryptocurrency
Transacting or investing
Cryptocurrencies like Bitcoins can be easily transferred from
one digital wallet to another, using only a smartphone. Once
you own them, your choices are to:
a) use them to buy goods or services
b) trade in them
c) exchange them for cash
If you are using Bitcoin for purchases, the easiest way to do
that is through debit-card-type transactions.You can also use
these debit cards to withdraw cash, just like at an ATM.
Types of Cryptocurrencies
Bitcoin
Bitcoin is the world’s first widely accepted form of
cryptocurrency. Bitcoin is so popular, there was a time when
its name was synonymous with cryptocurrency. But
potential investors need to know bitcoins have become very
expensive.
Altcoin
Altcoin is the term used for any alternative digital currency
to bitcoin. The most popular in this ecosystem is Ethereum
– one of the fastest-growing cryptocurrencies in the market.
There is also a range of other altcoins in the market today
such as Luckyblock, Shiba Inu and Terra
Crypto tokens
Crypto tokens are assets that exist on a blockchain.
Coins and tokens appear the same. However, the two have
many differences
Coins can be mined, but tokens cannot be mined.
Coins are linked to blockchains, tokens are not.
In terms of utility, they vary in the type of product or
service they allow users to purchase.
Advantages:
They are private and secure:
The blockchain technology that fuels cryptocurrencies
ensures user anonymity. It also assures high levels of security
through cryptography.
They are decentralized, immutable, and transparent
The entire system functions on shared ownership, where
data is available to all permissioned members and is tamper-
proof.
They are a hedge against inflation
Cryptocurrency makes for a great investment in times of
inflation.
Disadvantages:
They are not widely understood
They are a relatively new concept and the long-
term sustainability of cryptocurrencies remains to
be seen.
They are prone to high risks
Needless to say, cryptocurrencies bring in as many
rewards as risks. Their highly volatile and speculative
nature makes them prone to sharp downward
spirals.
Factors Effecting Crypto Markets
Economic conditions: Economic conditions, such as
inflation, interest rates, and unemployment, can affect the
crypto market. For example, if inflation is high, people may
be more likely to invest in cryptocurrencies to hedge
against inflation.
Government regulations: Government regulations can
significantly impact the crypto market. For example, if
governments impose strict regulations on the use of
cryptocurrencies, it could discourage people from using
them and cause the market to decline.
Security Concerns: 2022 alone accounts for over $3Bn
worth of losses due to several crypto hacks and scams that
have plunged the crypto market. Later, a significant event of
FTX collapse was the last nail in the coffin. This has led to a
bleeding crypto market for an extended period now.
Hype and Fear: Crypto market is quite volatile. This is
due to the two prominent driving factors of hype and fear.
A blooming crypto market creating a positive sentiment
pushes investors to buy even at high prices in the hope
that the market would go up. In fact, crypto has seen
investors flocking to the market regardless of crypto
fundamentals.Vice versa is true in the case of a bleeding
crypto market when the fear triggers a mass sell-off, which
triggers a higher price fall.
Federal Bank Interest Rate: A higher interest rate is
inversely proportional to the appetite for high-risk assets
such as crypto. Theoretically, this signifies a decline in
crypto investors. 2022 has been the same, and one can
easily observe a bearish crypto market for a long time.
However, it has been affected by other factors as well.
Technological developments: Technological
developments, such as improvements in blockchain
technology or the development of new cryptocurrencies,
can affect the crypto market. For example, suppose a new
cryptocurrency is developed with significant advantages
over existing ones. In that case, it could cause people to
shift their investments to the new cryptocurrency, leading
to changes in the market.
Media coverage: Media coverage of the crypto market
can also significantly impact market sentiments. For
example, if the media reports positive news about the
market, it could encourage more people to invest in
cryptocurrencies and cause the market to rise.