Blockchain Technology and
Business Applications
Dr. Jithesh A
Assistant Professor
Information Systems Area
Agenda
• Blockchain Technology: A quick recap
• Byzantine generals problem
• Consensus mechanism
• PoW, PoS, PoA
• Hands-on
• The Block contains the ledger / transaction data.
Story so far! • The Block data is hashed by cryptographic hash
functions.
• Traceability
• Decentralied
Blockchain • Transparency
• Distributed
• Immutability
Public Private Consortium
E.g. Bitcoin, E.g.
Ethereum etc. Hyperledger
Fabric, Corda,
Quorum
Cryptography: Digital
signatures, Public key
infrastructure (Asymmetric Wallet
cryptography)
Tips for keeping your wallets secure
Concept Can access Private or public
Mnemonic All of your accounts Keep private
Private key 1 of your account Keep private
Public key Nothing It is public
Bitcoin Blockchain
Hashing
• One-way hash functions.
• It is difficult to find another hash value for the same string.
Hashing
• The First Block is the Genesis
Block.
• The Valid Block is added to the
chain.
• Each Block contains a pointer to
the previous hash.
• The chain of blocks contains the
ledger of all the systems.
How does blockchain provide immutability,
traceability, and privacy?
• If someone tries to change the data in any of the blocks in the
blockchain, it will:
• Change the hash of the current block.
• Change the previous pointer of the next block.
• Change all subsequent blocks.
• Hence this breaks the chain.
• The attacker will need to hash all the blocks again to change the
complete chain.
How does blockchain provide immutability,
traceability, and privacy?
• Transactions are generally stored in
the Merkle tree.
• Each transaction record is hashed.
• Transactions are hashed and paired
again.
• Process repeats until there is only
one root hash.
How does blockchain provide immutability,
traceability, and privacy?
• Each Transaction Record is Signed by the Private Key of the Sender.
• The Signature is appended to the transaction.
• At any point in time, it can be validated that the transaction is
initiated by a particular sender.
• The Public Key of the Sender can be used to generate the signature
which can be validated.
The Byzantine Generals Problem
Problem Scenario:
• A group of generals needs to agree on a common
plan of action.
• Some generals may be traitors and can send
conflicting information to others.
• The goal is to ensure that the loyal generals reach a
consensus on a common strategy despite the
presence of traitors.
Conditions:
• All loyal generals should agree on the same plan.
• A small number of traitors should not be able to
cause the loyal generals to adopt a bad plan.
Challenges:
• Traitor generals can send different information to
different generals.
• Messages may be delayed or lost.
• The system needs to ensure that consensus can be
reached in a decentralized and fault-tolerant
manner.
Consensus Mechanisms
• Proof of Work (PoW)
• Proof of Stake (PoS)
• Delegated Proof of Stake (DPoS)
• Proof of Authority (PoA)
Proof of Work (PoW)
• Miners compete to solve complex mathematical puzzles.
• The first one to solve the puzzle gets to add the next block to the blockchain and
is rewarded with cryptocurrency.
• Essentially showing the Proof of Some Work done.
• Eliminate entities that are slow or not capable enough to generate the proof of
work.
• Examples:
• Bitcoin, Ethereum (until it transitioned to Proof of Stake).
• Advantages:
• High security and decentralization.
• Disadvantages:
• Energy-intensive and slower transaction processing.
Proof of Work (PoW)
• The idea behind Proof of Work is:
• Find or generate a value which is:
• Difficult to generate (in terms of CPU power)
• And yet easily verifiable.
• E.g.,
• In Bitcoin, Block hash should have n leading 0s.
• For example, n = 4, the hash should have 4 leading zeros.
0000f727854b50bb95c054b39c1fe5c92e5ebcfa4bcb5dc279f56aa96a365e5a
• How to Get Such Proof of Work?
• Generate Nonce, such that:
• Combination of Nonce and Block Data generates the Leading Zeros.
• As per the difficulty of the challenge (Value of n).
• The more the value of n, the more the difficulty.
Proof of Work (PoW)
• Significance of Proof of Work
• Signifies that the computation required is exponential to the number of
leading zeros required.
• Once the CPU effort has been spent to satisfy proof of work, the block cannot
be changed.
• Until redoing the proof of work.
• And as the blocks are chained, redoing will require the entire chain to be
redone.
Proof of Work (PoW)
• Validity of Proof-of-Work
• Even if an attacker tries to catch up and produce the proof-of-work faster, the
added block will be assessed again when a new block is added.
• The chain with the longest proof of work will be accepted.
• Parallel chains are formed.
• Other block will be rejected (called the Dangling).
Proof of Stake (PoS)
• Selects validators based on the number of coins they hold and are willing
to "stake" as collateral.
• Unlike Proof of Work (PoW), which relies on computational power to solve
complex puzzles, PoS relies on the economic value of the stake
• Staking: Users lock cryptocurrency to support network integrity and
incentivize honesty.
• Validator Selection: Validators are chosen based on stake size; more coins
staked increase selection chances.
• Block Creation: Selected validators create and validate new blocks,
ensuring transaction integrity.
• Rewards: Validators earn fees or new coins for network maintenance
efforts.
Proof of Stake (PoS)
• Advantages of Proof of Stake (PoS):
• Energy Efficiency: PoS uses far less energy than PoW, lacking heavy
computational demands, making it sustainable.
• Scalability: Enables faster transactions with its efficient consensus
mechanism, improving scalability.
Proof of Stake (PoS)
• In PoS, people with more cryptocurrencies can stake more. Doesn’t this
promote centralization?
• Validator Pools
• Randomized Validator Selection
• In Ethereum, the network ensures that the same validators are not selected repeatedly just
because they have more ETH staked
• Slashing Mechanisms
• Validators can be penalized (slashed) for malicious behavior or prolonged downtime. These
penalties are significant enough to discourage any single entity or coalition from attempting
to centralize control, as the financial risks outweigh the potential benefits.
• Proportional Rewards
• The rewards decrease as the number of validators increases, which prevents disproportionate
gains for larger stakers
• Diminishing Returns
• Beyond a certain point, increasing your stake yields proportionally lower rewards
Delegated Proof of Stake (DPoS)
• A small number of delegates are elected by the community to
validate transactions and create blocks
• DPoS sacrifices some degree of decentralization for:
• higher transaction throughput
• scalability,
• Suitable for applications where performance is critical, but it
inherently centralizes control among delegates
Proof of Authority (PoA)
• Transactions and blocks are validated by approved accounts, known as validators.
• Validators are usually chosen based on their reputation and reliability, making
PoA particularly suited for private or permissioned blockchain setups
• Key features
• Trust-Based Validation: Unlike Proof of Work (PoW) or Proof of Stake (PoS), PoA relies on a
small number of trusted and pre-approved nodes to validate transactions.
• Energy Efficiency: PoA consumes significantly less power compared to PoW since it doesn't
require extensive computational work.
• Faster Transactions: Due to the limited number of validators, PoA networks can achieve
faster transaction confirmations.
• Less Decentralization: The network is less decentralized than PoW or PoS because it depends
on a select group of validators.
• E.g., VeChain
Summary
• Blockchain is a decentralized ledger
• Hashing, Merkel tree
• Consensus mechanisms