0% found this document useful (0 votes)
27 views235 pages

BCT Notes-1

The document provides an overview of blockchain technology, highlighting its disruptive nature and the decentralized, peer-to-peer system it enables for transactions without intermediaries. It explains how blockchain works, including the process of transaction verification, block formation, and the consensus mechanism used to maintain the integrity of the ledger. Additionally, it addresses common myths about Bitcoin, clarifying misconceptions regarding its anonymity, transparency, and value.

Uploaded by

sanjana.kirodian
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)
27 views235 pages

BCT Notes-1

The document provides an overview of blockchain technology, highlighting its disruptive nature and the decentralized, peer-to-peer system it enables for transactions without intermediaries. It explains how blockchain works, including the process of transaction verification, block formation, and the consensus mechanism used to maintain the integrity of the ledger. Additionally, it addresses common myths about Bitcoin, clarifying misconceptions regarding its anonymity, transparency, and value.

Uploaded by

sanjana.kirodian
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/ 235

Block Chain Technology

Unit 1
Why I Should Study Blockchain

➢ It is a Disruptive Technology
Why I Should Study Blockchain
Why I Should Study Blockchain

➢ Satoshi Nakamoto (invented bitcoin-2008 after financial crisis)


Why I Should Study Blockchain

➢ It is a Disruptive Technology
➢ Can we trust?
What is Blockchain
What is Blockchain
What is Blockchain
Introduction to Block Chain
→ The blockchain is a distributed database of records of all transactions or
digital events that have been executed and shared among participating parties.

→ Each transaction is verified by the majority of participants of the system.

→ It contains every single record of each transaction.


→ Bitcoin is the most popular cryptocurrency an example of the blockchain.

→Blockchain is a system of records to transact value (not just money!) in a


peer-to-peer fashion.

→ Blockchain is a peer-to-peer system of transacting values with no trusted


third parties in between.

→ This ledger database is an append-only database and cannot be changed or


altered. It means that every entry is a permanent entry. Any new entry on it
gets reflected on all copies of the databases hosted on different nodes.
→ This ledger database is an append-only database and cannot be
changed or altered. It means that every entry is a permanent entry. Any
new entry on it gets reflected on all copies of the databases hosted on
different nodes.

→ There is no need for a trusted intermediary such as banks, brokers, or


other escrow services to serve as a trusted third party.

For example, if Alice pays to Bob $10.


Example 2:
A typical stock transaction happens in seconds, but its settlement takes
weeks.
If someone wants to buy some stocks from a company or a person, they
can just directly buy it from them with instant settlement, with no need
for brokers, clearing houses, or other financial institutions in between.
A decentralized and peer-to peer solution
to such a situation can be represented as:
LET’S FIRST TALK ABOUT BANKING
LET’S FIRST TALK ABOUT BANKING-ISSUES
LET’S FIRST TALK ABOUT BANKING-ISSUES
➢ Double Spending - Simultaneously
HOW DO YOU TRANSACT?
➢ Your write a check or do internet transaction to pay a payee
➢ Bank checks if you have balance > transaction amount
❖ If yes, it debits your account by balance = balance ‐ transaction_amount
✓ credit’s payee’s account by payee.balance = payee.balance + transaction_amount
❖ If no, the transaction is invalid and rejected.
➢ You can check your transaction list online, or check the monthly
statement
➢ Who maintains the ledger?
❖ Bank Does
❖ What if Bank allows an invalid transaction go through
✓ Invalid = you did not authenticate the transaction
✓ Invalid = your balance was not sufficient but transaction was made
Bank Frauds
➢ You find a check was used to pay someone but you never wrote the check
✓ Someone forged your check and/or signature
➢ You did sign a check for x amount, but the amount field was modified
✓ How do you prove to the bank that an extra 0 was not there in your signing time?
➢ The monthly statement says that you did a transaction but you did not recall or the
amount of a transaction is different from what you had done
✓ Someone got your password, and possibly redirected OTP to another SIM (SIM
Fraud)
✓ Bank employees themselves might have done something
➢ How do you argue to the bank? (Non-repudiation)
➢ How do you argue that the amount was modified? (Integrity)
➢ Finally, do you tally your transactions when you receive your monthly statement?
✓ Most people do not
Again, What is a Blockchain? –who invented?
Proposed in their research paper published in 1991, entitled, “How to digitally time stamp
a document”
How Does the Blockchain Work?
A blockchain is a distributed database that stores information electronically in a digital format and is shared among the nodes
of a computer network. A typical difference between a blockchain and a database is how data is structured. A blockchain is a
shared, immutable ledger as the name suggests structures data into chunks or blocks, and a database structures data into tables.
A blockchain is a chain of blocks. Once a block is filled with data and it is chained to the previous blocks. Different types of
information can be stored on the blockchain network but the most important is transactions.

The transaction process in a blockchain can be summarized as follows:


1. Facilitating a transaction: A new transaction enters the blockchain network. All the information that needs to be
transmitted is doubly encrypted using public and private keys.
2. Verification of transaction: The transaction is then transmitted to the network of peer-to-peer computers distributed
across the world. All the nodes on the network will check for the validity of the transaction like if a sufficient balance is
available for carrying out the transaction.
3. Formation of a new block: In a typical blockchain network there are many nodes and many transactions get verified at
a time. Once the transaction is verified and declared a legitimate transaction, it will be added to the mem pool. All the
verified transactions at a particular node form a mem pool and such multiple mem pools form a block.
4. Consensus Algorithm: The nodes that form a block will try to add the block to the blockchain network to make it
permanent. But if every node is allowed to add blocks in this manner then it will disrupt the working of the blockchain
network. To solve this problem, the nodes use a consensus mechanism to ensure that every new block that is added to the
Blockchain is the one and only version of the truth that is agreed upon by all the nodes in the Blockchain, and only a valid
block is securely attached to the blockchain.
The node that is selected to add a block to the blockchain will get a reward and hence we call them “miners”. The consensus
algorithm creates a hash code for that block which is required to add the block to the blockchain
5. Addition of the new block to the blockchain: After the newly created block has got its hash value and is
authenticated, now it is ready to be added to the blockchain. In every block, there is a hash value of the previous block and that
is how the blocks are cryptographically linked to each other to form a blockchain. A new block gets added to the open end of
the blockchain.
6. Transaction complete: As soon as the block is added to the blockchain the transaction is completed and the details of this
transaction are permanently stored in the blockchain. Anyone can fetch the details of the transaction and confirm the
transaction.
Let’s understand this working of blockchain with the help of an example:
Let’s say Jack and Phil are two nodes on the bitcoin blockchain network who wants to carry out a transaction between them.

Step 1: Facilitating the transaction: Jack wants to send 20 BTC to Phil via the Blockchain network.
Step 2: Verification of transaction: The message for verification will be sent to all the nodes on the network. All the nodes
will check the important parameters related to the transaction like Does Jack has sufficient balance i.e. at least 20BTC to
perform the transaction. Is Jack a registered node? Is Phil a registered node? After checking the parameters the transaction is
verified.
Step 3: Formation of a new block: A number of verified transactions stack up in mem pools and get stored in a block. This
verified transaction will also get stored in a block.
Step 4: Consensus algorithm: Since here we are talking about bitcoins so the Proof-of-Work consensus algorithm will be
used for block verification. In proof-of-work, the system assigns the target hash value to a node, and according to this, it must
come up with a hash for the new block. The node has to calculate the hash value for the new block that is less than the target
value. If two or more miners mine the same block at the same time, the block with more difficulty is selected. The others are
known as stale blocks. Mining usually rewards miners with blockchain currency. In this case, the blockchain currency is
bitcoin.
Step 5: Addition of the new block in the blockchain: After the newly created block has got the hash value and
authentication through proof-of-work only then it will be added to the network and the transaction will mark as complete.
Phil will receive 20 BTC from jack. The new block will be linked to the open end of the blockchain.
• Step 6: Transaction complete: As soon as the block is added to the
blockchain, the transaction will take place and 20 BTCs will get transferred
from Jack’s wallet to Phil’s wallet. The details of the transaction are
permanently secured on the blockchain.
• Anyone on the network can fetch the information and confirm the
transaction. This will help to keep track of all the transactions and to verify
whether any user is trying to double spend. For example, if Jack tries to carry
out a transaction in the future, the rest of the nodes can check Jack’s past
transaction records to check whether Jack has enough balance to carry out
the current transaction. If there is enough balance then the transaction will be
approved.
How Block Chain Works?
→Every node on the blockchain network has an identical copy of the
blockchain, where every block is a collection of transactions

→ There are two major parts in every block. The “header” part links
back to the previous block in the chain.

→ Every block header contains the hash of the previous block so that
no one can alter any transaction in the previous block.
The other part of a block is the “body content” that has a validated list
of transactions, their amounts, the addresses of the parties involved,
and some more details
Example 1:
Assume that there are three candidates—Alice, Bob, and Charlie—who
are doing some monetary transactions among each other on a
blockchain network.
Step-1:
Let us assume that Alice had $50 with her, which is the genesis of all
transactions and every node is aware of it, as shown in Figure
Step-2: Alice makes a transaction by paying $20 to Bob. Observe how
the blockchain gets updated at each node, as shown in Figure
Step-3: Bob makes another transaction by paying $10 to Charlie and
the blockchain gets updated as shown in Figure
The transaction data in the blocks is immutable.

All transactions are fully irreversible.

Any change would result in a new transaction, which would get


validated by all contributing nodes
Centralized vs Decentralized system
A centralized distributed system is one in which there is a master node
responsible for breaking down the tasks or data and distribute the load across nodes.

On the other hand, a decentralized distributed system is one where there is no


“master” node as such and yet the computation may be distributed.

Blockchain is one such example


Centralized systems
→ A centralized system has a centralized control with all administrative
authority. Such systems are easy to design, maintain, impose trust, and
govern, but suffer from many inherent limitations, as follows:
They have a central point of failure, so are less stable.
They are more vulnerable to attack and hence less secured.
Centralization of power can lead to unethical operations.
Scalability is difficult most of the time.
Decentralized System
→ A decentralized system does not have a centralized control and every node has equal
authority. Such systems are difficult to design, maintain, govern, or impose trust. However,
they do not suffer from the limitations of conventional centralized systems. Decentralized
systems offer the following advantages:

They do not have a central point of failure, so more stable and fault tolerant

Attack resistant, as no central point to easily attack and hence more secured

Symmetric system with equal authority to all, so less scope of unethical


operations
Blockchain Vs Bitcoin

The basis for comparison between


Bitcoin Blockchain
Bitcoin vs Blockchain

What is it? A crypto-currency A digital ledger

To simplify and increase the speed To provide a low cost, safe, and
Main Aim of transactions without much of secure environment for peer-to-peer
government restrictions. transactions.

Blockchain can easily transfer


Bitcoin is limited to trading as a
Trade anything from currencies to property
currency.
rights of stocks.

The blockchain is more open to


Scope The scope of bitcoin is limited. changes and hence has the backing
of many top companies.
Blockchain Vs Bitcoin

Bitcoin focuses on lowering the cost Blockchain can be adapted to any


Strategy of influencers and reduces the time of change and hence it can cater to
transactions but is less flexible. different industries.

Bitcoin likes to be anonymous and


As blockchain works with various
hence even though we can see the
businesses, it should have compliance
Status transactions in the ledger, they are
with KYC and other norms. Hence
numbers that are not in any particular
blockchain is very transparent.
sequence.
Benefits of Blockchain Technology
• Time-saving: No central Authority verification needed for settlements making the
process faster and cheaper.

• Cost-saving: A Blockchain network reduces expenses in several ways. No need for


third-party verification. Participants can share assets directly. Intermediaries are reduced.
Transaction efforts are minimized as every participant has a copy of shared ledger.

• Tighter security: No one can temper with Blockchain Data as it shared among
millions of Participant. The system is safe against cybercrimes and Fraud.
How Blockchain Transforming Business
Myths About Bitcoin

1.Bitcoin Is Dead

The most common myth that people repeat about Bitcoin is that it is dead and no longer
used by anyone in the world. There is a website, Bitcoin Obituaries, which keeps track of
the declarations of Bitcoin’s death going all the way back to 2010. At that time, bitcoin
was trading at $0.23.
In reality, Bitcoin is currently at its most successful point in history -- at least when
measured by the number of transactions that are happening on the network every day. The
real problem right now is scalability (increasing block size to handle more transactions),
which Blockchain Capital Managing Partner Brock Pierce recently pointed out is a sign of
its success.
2.Bitcoin Is Anonymous
• Although Bitcoin is often referred to as the “anonymous currency of
the dark web,” it is more correct to say that Bitcoin addresses are
pseudonymous. This means that there is an identifiable address (or
many addresses) for each user on the network, but no one necessarily
knows who is behind each address.
• With Bitcoin, it’s important to remember that every transaction is
recorded on a completely public ledger that anyone can view on a
block explorer. A few blockchain analytics companies have popped up
over the past few years, and they’re able to deanonymize large
portions of the network.
3. Bitcoin Is Completely Transparent

It’s also a myth that Bitcoin is completely transparent. As mentioned in the above
section, the true identities of the individuals or organizations behind specific
Bitcoin addresses are not always known. There are also various privacy-
enhancing services, such as JoinMarket, which allow users to enhance their
privacy on the blockchain. There are also other enhancements, such as
Confidential Transactions and Zerocash, that could come to Bitcoin in due time.
Rather than being completely anonymous or completely transparent, Bitcoin is
better identified as somewhere between these two extremes.
4. Bitcoin Is Used by Terrorists
• Whenever Bitcoin is brought up in a movie or television show, it’s
almost always being used by some kind of serious criminal or terrorist;
however there is no evidence of terrorists using Bitcoin on any
noteworthy scale. In fact, a Europol investigation from earlier in the
year found, “Despite third-party reporting suggesting the use of
anonymous currencies like Bitcoin by terrorists to finance their
activities, this has not been confirmed by law enforcement.”
• Although Bitcoin is sometimes used for illegal transactions on the
Internet, the reality is that the privacy issues related to the public
blockchain make it a poor choice for terrorists. In the world of
untraceable payments, cash is still king.The Winklevoss Twins, who
founded a Bitcoin exchange called Gemini, have gone as far as
to say Bitcoin is a haven for really stupid criminals.
5. Bitcoin Is Not Backed By Anything, So It Has No Value

Many gold bugs and those who do not understand the value of a decentralized,
censorship-resistant digital payment network believe bitcoins are essentially
worthless because they aren’t backed by anything. There are varying opinions on
this point. Some believe bitcoin’s scarcity is the main attribute that gives it value,
while others claim bitcoins are useful because they are required to use the
world’s most prominent and secure decentralized ledger.
Currency Wars author and gold bull Jim Rickards recently took issue with the
argument that bitcoins are backed by nothing, pointing out that like all currency
in the history of money, bitcoins are backed by confidence. (Also known as
consensus.) Gold is valuable because people agree that it is.
6. Bitcoin’s Price Volatility Makes It Useless
• While Bitcoin has had quite a volatile history, the trend has definitely
been toward stability since the first blocks were mined in early 2009.
Having said that, not many people are attempting to use bitcoin as a
unit of account right now. Instead, the digital currency, commodity or
however you want to define it is mainly viewed as a store of value by
those who hold it.
• There are also various mechanisms for using the Bitcoin network for
payments while avoiding the volatility associated with the token of
value. Some Bitcoin companies, such as Circle and Coinbase, allow
users to store funds in U.S. dollars or other fiat currencies before
making Bitcoin transactions on the user’s behalf.
7. Bitcoin Is Only Used for Illegitimate Purposes
One of the fundamental values of Bitcoin is its resistance to censorship. As Elon Musk put it in 2014
“I think it’s primarily going to be a means of doing illegal transactions. But that’s not necessarily entirely
bad. You know, some things maybe shouldn’t be illegal.”
What is or isn’t a legitimate or legal transaction can change when moving between various jurisdictions, but
Bitcoin is also used for completely legal purposes. Some people use Bitcoin to save 10-20 percent on
purchases at Amazon, Starbucks and Target via Foldapp and Purse.io. Others see it as a valuable tool for
cheaper international money transfers and remittances. Abra, Align Commerce and Freemit are three
startups using Bitcoin to lower the costs of money transfers around the world.
8. Bitcoin Mining Wastes Electricity
A recent report found that Bitcoin’s network hashrate could consume as much power as Denmark by
2020. Other reporters dispute this characterization, pointing out that Bitcoin uses the same electricity as the
yearly consumption of 674.5 average American homes, two Amtrak locomotives or a California
hydroelectric plant. Do these things waste electricity? It depends on your point of view. The reality is that
the use of computing power serves a purpose in Bitcoin, which is securing all of the transactions on the
network. If you don’t think Bitcoin is valuable, maybe that’s a waste. If you don’t think fiat currencies are
valuable, maybe keeping the lights on at the Federal Reserve is a waste.
Electricity-intensive Bitcoin mining is essentially a way to prove that someone has expended resources in
hopes of getting a block reward and transaction fees in return for their efforts. Proof-of-work, as it’s called,
acts as a prevention mechanism against Sybil attacks (forged identities) on the Bitcoin network. Waste? You
decide.
Applications and Uses of Blockchain
•Cryptocurrencies: A cryptocurrency is a digital currency, basically designed to be used as a medium of exchange
wherein each coin ownership record is stored in a decentralized ledger. Cryptocurrencies use ‘decentralized control’,
which suggests that they are not controlled by one person or government. When Bitcoin launched in 2008, it allowed
people to directly transact with each other without having to trust third parties like banks. Since then 4000 different
cryptocurrencies have been created. Some examples are Bitcoin, Ethereum, Dogecoin, Fantom, etc. The blockchain is the
technology behind cryptos where all the exchange or transaction information is stored which cannot be hacked or
changed and a copy of the ledger is distributed among all the participants of the network. It records every single
transaction. Each and every person can buy/sell or deal in cryptos and be a part of the network. Nowadays, several
financial applications provide a user with the luxury of doing so.
•Cars: Let us see how can blockchain be used in cars. Ever heard of odometer fraud? By tampering with the odometer,
someone can make a car appear to be newer and less worn out, resulting in customers paying more than what the car is
actually worth. The government tries to encounter by collecting the mileage of cars when they get a safety inspection, but
that’s not enough. So, instead, we could replace regular odometers with smart ones that are connected to the internet and
frequently write the car’s mileage to the blockchain. This would create a secure and digital certificate for every car. And
because we use a blockchain, nobody can tamper with the data/information, and everyone can look up a vehicle’s history
to ensure it’s correct. In fact, this has already been developed used by Bosch’s IoT lab and they are currently testing it on
a fleet of 100 cars in Germany and Switzerland.
•Legal Documents: So, blockchains are great at keeping a good track of data over time. So, besides odometers, you can
keep track of things like intellectual property or patents or it can even function as a notary. A notary is someone (for example
the Central Government) who can confirm and verify signatures on legal documents. But we can just as well use blockchain
for it. The online website stampd.io as an example, allows you to feature the documents to the Bitcoin or Ethereum
Blockchain. Once, a document has been added you can always prove that you simply created a document at a particular
point of time very similar to a notary, although right now blockchains are not on the same level as notaries in a legal
perspective.
•Digital Voting: Another interesting application is digital voting. Right now voting happens either on paper or EVM
(electronic voting machines) which are special computers running proprietary software. Voting on paper costs a lot of money
and wastage and electronic voting has security issues. In recent years we have seen countries move away from digital voting
and adopting paper again because they fear that electronic votes can be tampered with and influenced by hackers. In our
country as well, we have seen politicians fight over “EVM hack” things. But, in place of paper ballots or EVMs, we could
use blockchains to cast and store votes. Such a system would be very transparent and everyone could verify the voting count
for themselves and it would make tampering with it very difficult. The Swiss company Agora is already working on such a
system and it is going to be completely open-source. But there are many challenges. First, you have to be able to verify
voters without compromising their privacy. Secondly, if you allow people to vote with their own computers or phones, you
have to take care of the situation that those devices might be infected with malware designed to tamper with the voting
process. And a final example: a system like this also has to be able to withstand denial-of-service attacks that could render
the whole thing unusable. Definitely, a very tough nut to crack but if it becomes reality it could make for a more transparent
and practical voting system.
•Food and Medical Industry: They could use blockchain technology to track their food products from the moment they are
harvested or made, to when they end up in the hands of the customers. See, every year almost half a million people die
because of food-borne diseases and that’s partly because it takes too long to isolate the food that is causing harm. Blockchains
could help us to create a digital certificate for each package of food, proving where it came from and where it has been. So, if
contamination has been detected i.e. the manufacturer wants to revert a batch of food because of certain quality issues, we can
trace it back to its root and instantly notify other people who bought the same batch of bad food. Walmart and IBM are the
two big giants currently working on such a system. It allowed them to trace the origin of a box of mangoes in just 2 seconds,
compared to days or even weeks with a traditional system. A system like this could be applied to other similar industries as
well. We could use it to track medicines, and other regular products and battle counterfeit goods by allowing anyone (the
officials in general) to verify whether or not the product comes from the original and authentic manufacturer.
•Logistics and Supply-chain: Another idea would be to track packages and shipments using blockchain. That is something
that IBM and container shipping giant Maersk Line are working on a decentralized ledger to help with making the global
trade of goods more efficient. Many hackathons on blockchain have this topic for college students to build the project. It is
still in the development phase and companies are trying to come up with such a system to track their package pinpoint.
•Smart Contracts: So far, we have looked at ways blockchains can be used to keep track of information and verify its
integrity. But blockchains are even more powerful when we use them as smart contracts as one of its applications. These
contracts live on the blockchain and can perform actions when various conditions are met. Insurance companies could use
smart contracts to validate claims and keep a record of all the people who are buying insurance and paying their premiums on
time so as to continue the terms of the policy. Or they could allow us to only pay for car insurance when we are driving. But it
goes even further, with smart contracts we can our own data on a blockchain. In the same fashion, you could store your
personal identity there and choose what data you want to reveal.
Practical use of Block Chain-Financial
Payments and Remittance:
Transaction can occur directly between two parties on a frictionless
P2P basis.
Reduces risk of overseas transaction
Improves speed, efficiency and transparency
Instrument, ownership and transfer of Financial instruments
A blockchain based security market allows traders to buy or sell
stocks directly in a P2P manner
Practical use of Block- Health care
Smart Contracts:
Automatically pay providers when conditions of service are
established such as:
validation that a service was received by a registered
Medicaid patient
service was provided by a properly registered doctor or
provider
Neither party is on a list of past participants in any fraud
Practical use of Block- Health care
DNA wallet:
Stores genetic and medical data
allows healthcare providers to securely share patient data
helping pharmaceutical companies to tailor drugs more
efficiently

EHR Storage and Security:


Blockchain is a security technology concerns over securing
electronic health records.
Cryptographically encoding private medical data
Block Chain – Health care Example
→The patient of the future is a vast collection of data
→ Currently when someone comes into a healthcare institution, all we
have today is a small database of data and have some file that is
separated and might be in stacks of paper
→Patient information can be consistent in variety of database where
MR number are different
→The healthcare entities would join a blockchain to have access to a
large network of verified and secure data.
Block Chain – Health care Example
→When a patient comes to the hospital and wants care the provider
has a method to see all the imaging data, pharma data past claims
data EMR information etc.
→The advantage of block chain enabled solution is that healthcare
providers will have a greater ability to treat patients with a better
picture and understanding of the patients health.
→Block chain can eliminate the redundant test and reduce cost.
Use Cases of Blockchain Technology
Reducing The Cost Of Data Breaches
• Organizations can reduce the costs of data breaches by using
blockchain. They can also avoid litigation, losses, compromised
customer data, and interruption or downtime costs related to the
breaches.
• Consider that data and information security is costing organizations
more than 20% of their IT budgets. Part of these is malware costs
which are in the tune of $2.4 million per year on average. Further, it
takes months to fix the affected systems. The annual cost of data
breaches now stands at $3.2 million, up by 12 percent in five
years according to a recent report by IBM.
Reducing Cost Of Cross-border Transactions
• Banks and other organizations experience the high cost of cross-border
transactions. For instance, most of these transactions take a model 3
days or longer to complete. Organizations such as Ripple – whose
network is now available in over 40 countries and six continents, are
now using blockchain and cryptocurrencies to overcome these
barriers.
Blockchain In Healthcare: Tracking Drugs Throughout Supply
Chains And Securing Data
• Blockchain is being applied in the tracking and tracing of prescription
drugs throughout supply chains. This has been demonstrated in the
Drug Supply Chain Security Act Interoperability Pilot program in the
United States. Using this program, it is possible to prevent and control
the distribution of counterfeit drugs and to recall ineffective and
harmful drugs very easily and quickly.
• Securing customer data is a top priority in healthcare as sharing and
distribution of this data that helps to facilitate the better provision of
healthcare services across hospitals, governments, and research
institutions. Good examples of startups using blockchain to secure data
sharing in this area include Amchart, ARNA Panacea, BlockRx, and
many others.
Application In Copyright Protection

• There are countless startups using blockchain to allow their customers


to secure IP rights. Once artwork is registered on the platform,
customers can protect their work from being used illegally without
their permission. The owners can also pursue legal injunction in case
of violations using the certificate provided on the platforms.
• For instance, Blockai and Copyrobo use blockchain and artificial
intelligence to help artists to protect their art on the internet in
seconds. They can create a timestamp or fingerprints on the blockchain
and they, in turn, will get a copyright certificate to prove the
copyrights.
Notary Services
• With blockchain-based online notary services, users can upload their
digital certificates and documents and have them verified within
minutes. These services can be used by those licensed by governments
to authenticate the signing of documents, for instance when applying
for VISAs.
• Proof of Existence, for instance, is a service that uses blockchain this
way.
Blockchain And Voting

• Blockchain can ensure transparency and security in voting


• Blockchain has emerged as an important topic in the secure voting
discussions. Although electronic voting addresses most of the problems of
traditional manual voting, lack of voter privacy, voter fraud, high cost of
legacy digital voting platforms, lack of transparency still remain as major
concerns.
• Using smart contracts and encryption, blockchain can make the voting
process more secure from fraud, more transparent, and ensure voter privacy.
In this regard, GenVote leverages blockchain to achieve these and also
allows customization of the voting process using different types of
ballots and allowing logic based voting. It is being applied in University-
scaled elections.
Major Pros of Blockchain Technology
Decentralized Trust
• One of its biggest strengths is that you no longer need to trust a third
party to make any transaction. People using blockchain worldwide are
confident that no single party is manipulating transactions, viewing
personal information or performing any other activity breaching their
privacy and security.
• That doesn’t mean blockchain-based applications are always
secure—that depends on how good developers are at creating secure
code—but it does mean there are opportunities for better security than
conventional applications. With blockchain, you can feel more
confident about your data and identity.
Low Operational Cost
• Blockchain reduces overhead costs as it has no centralized authority or
servers to maintain operations. There are no payment processing or banking
fees as it opts for peer-to-peer transactions without third-party approval. It
embeds documents, agreements, or transactions within the system.

No Single Point of Failure


• With blockchain technology, there’s no single point of failure. If a hacker
were to gain access to your business’s server or database, they could very
easily wipe out your entire network—all at once.
• Blockchain technology is not centralized; instead, it is in distributed form. It
saves your data if the network goes down as hackers cannot break into the
central grid and affect any connected account.
• You can create passwords up to 100 characters long, making it impossible
for hackers to guess or decode. It gives better security than regular networks
with the option of up to 8-character long passwords (including letters and
numbers)
Enhanced Security And Confidentiality
• Being distributed across a global network of computers and protected
by cryptography, blockchain technology is inherently more secure than
centralized systems.
• As the Economist reports, it is tough to tamper with records once they
are in there. Any attempt to alter one’s record will reflect immediately
because copies and digital signatures are checked against each other
automatically.
• It has an added layer of confidentiality that secures your data from
hackers. Transactions are impossible to trace or link back to an
individual user. The user can select their names and e-mail addresses
during transactions. You get the option to complete your transactions
while remaining anonymous
Quick Transactions
• Blockchain is capable of processing much faster transactions than any
traditional bank. As a result, businesses that use blockchain instead of
banks can save a considerable amount on fees.
• Deloitte has predicted that blockchain technology could save
companies up to billions in the form of banking fees. Blockchain’s
decentralized structure doesn’t require massive data centers and
expensive third-party verification. It also limits the number of people
involved in monitoring the transactions.
Reduces Fraud
• Blockchain technology has some fantastic attributes that make it ideal
for financial institutions to reduce forgery. It records every activity,
making it impossible for anyone to make duplicate transactions.
• Each block stores the financial information, and if any modification is
made to a previous block, other nodes on the network rejected it.
• Once your bank confirms your transaction, they can’t deny receiving
the funds. On top of that, you could see that fraudulent activity
happened when another node changed transactions.
Transparent & Universal Recording System
• The transactions in the blockchain are recorded in a public ledger that
anyone can view. All can see the amount stored in the wallet but
cannot identify its owner.
• A wallet could be tied to an individual or group. Still, if users want to
remain anonymous, they must transfer their Bitcoins to another
address (e.g., a different Bitcoin wallet) that isn’t linked with their
real identity.
• But even without anonymity features enabled, blockchain tech
provides more transparency than traditional payment methods like
credit cards and checks; you don’t need a bank intermediary (or
permission from one) to see what or whom you paid or received
money from.
Better Accessibility
• A blockchain allows anyone with a computer and an internet connection to
be part of its network. It is decentralized, meaning any single entity can’t
control it—and everyone has equal access to it.
• Anyone can make changes (add information) or add new blocks (to
store data) to a blockchain, provided they know how to do so. Even non-
tech individuals have the same access to blockchains! This openness
makes blockchains much more accessible than traditional institutions like
banks and financial services.
• That doesn’t mean you shouldn’t be wary when dealing with blockchain
providers: you should always research your choices before making any
significant financial decisions.
Prevents Double Spending
• Bitcoin transactions are verified by network nodes through
cryptography and recorded in a publicly distributed ledger called a
blockchain. This ensures safety by eliminating direct access to your
money.
• That’s why some say bitcoin is fungible—its value is equal even if its
physical form changes. In other words, bitcoins derive their worth
from mathematics alone, unlike fiat currencies like U.S. dollars or
euros, which get their value from an organization’s financial standing.
Major Cons of Blockchain Technology
1) Scalability
Blockchain is capable of handling fewer transactions per second. It causes delays in finalizing the massive volume of
transactions resulting in poor scalability. However, several methods have been proposed to overcome this
shortcoming, but none has been implemented till now.

2) Security
Blockchain is publicly accessible as a distributed ledger. It may attract any unknown visitor monitoring your wallet.
Though there are several provisions to add privacy and encryption layers to enable your preferred privacy, all are not
commonplace yet.
Moreover, much of your data is linked directly to your digital identity, so it could potentially expose parts of your private
life that you wouldn’t necessarily want online. Security concerns often lead people to trust third-party solutions (like
exchanges) over direct blockchain transactions, relinquishing control over personal assets.

3) Cost
One of the biggest problems with blockchain technology is that it requires enormous energy. Because miners have to
solve complicated math problems to get a payout, they need powerful rigs that consume tons of electricity.
As a result, some blockchains are incredibly costly to run, especially for smaller businesses or individuals. You cannot
make changes later; if you want your blockchain online, you must pay for it up front!
4) Competitiveness
There is a lot of hype surrounding these industries trying to use blockchain. It leads to unnecessary competition between
businesses as they opt for this technology and waste their time, money, and efforts even when it is useless for their business.
Companies will have no alternative but to invest heavily to keep up with their competitors.

5) Speed
The other significant con to blockchain technology is its speed. Unlike a centralized database, blockchains require miners—
or people with high-end computers and dedicated software that solve computational puzzles in exchange for new crypto
tokens.
In simple terms, blockchain transactions take longer than traditional payment methods like cash or credit cards. This can be
discouraging if you’re interested in using blockchain technology as a daily payment method.
Public and Private keys
A public key is a cryptographic code that allows a user to receive
cryptocurrency into their account. It is derived from the private key using a
cryptographic algorithm.
Function: The public key is like a bank account number. You can share it with
others to receive funds. It is used to verify the sender's signature in
transactions.
Usage: It is openly shared and can be used by anyone to send you
cryptocurrency. However, it cannot be used to withdraw funds from your
account.
Private Key
• Definition: A private key is a cryptographic code that allows a user to
access their cryptocurrency. It is a randomly generated number that
must be kept secret.
• Function: The private key is like a PIN for your bank account. It is
used to sign transactions and provide proof that the transaction has
been authorized by the account owner.
• Usage: It must be kept confidential and secure. If someone gains
access to your private key, they can control your cryptocurrency
holdings.
How They Work Together
When a user creates a blockchain wallet, a pair of keys (public and private) is
generated.
The public key is mathematically derived from the private key, but the
process is irreversible. This ensures that the private key cannot be deduced
from the public key.
The public key undergoes a hashing process (e.g., using SHA-256) to
generate the wallet address. This address is what users share to receive
cryptocurrency .
When a user wants to send cryptocurrency, they create a transaction and sign
it with their private key. The signature is a mathematical proof that the
transaction has been authorized by the owner of the private key.
The transaction includes details such as the recipient's public key
(address), the amount to be sent, and the sender's signature.
The signed transaction is broadcast to the blockchain network.

Nodes (computers in the network) verify the transaction. They use the
sender’s public key to confirm that the signature matches the transaction
data. This process ensures that the transaction has not been altered and
is indeed authorized by the owner of the funds.
Example:
Alice wants to send 1 Bitcoin to Bob.
She creates a transaction specifying the amount and Bob's public key
(address).
Alice signs the transaction with her private key, creating a digital signature.
Alice broadcasts the signed transaction to the Bitcoin network.
Nodes in the network use Alice's public key to verify the digital signature.
They check that Alice has sufficient funds and that the transaction has not
been tampered with.
Once verified, the transaction is included in a new block
Bob receives the Bitcoin, and the transaction is recorded permanently on the
blockchain.
BLOCK CHAIN
ARCHITECTURE
Unit II
Core Components of Blockchain
Architecture
Node

User or computer within the blockchain architecture (each has an


independent copy of the whole blockchain ledger)

Transaction

Smallest building block of a blockchain system (records, information, etc.) that


serves as the purpose of blockchain
Block

A data structure used for keeping a set of transactions which is distributed to all
nodes in the network

Each blockchain block consists of

Data: Each block contains a list of transactions.

Hash: Each block has a unique identifier called a hash,


generated from the block's data.

Previous Hash: Each block also contains the hash of the previous block,
creating a chain.
P2P Network

The blockchain is a peer to peer (P2P) network working on the IP protocol. A P2P network is a
flat topology with no centralized node. P2P networks are generally more secure because they
do not have a single point of attack or failure as in case of a centralized network.

A blockchain network can be a permission-based network as well as a permissionless network.


A permissionless network is also known as public blockchain because anyone can join the
network, while a permission-based blockchain is called a consortium blockchain.
A permission-based blockchain or private blockchain requires pre-verification of the
participants within the network and these parties are usually known to each other.
Consensus (consensus protocol)

A set of rules and arrangements to carry out blockchain operations

The consensus mechanism ensures that whatever local copy every


individual party has, they are consistent with each other and is the
most updated one.

Some of the consensus algorithms are:

Proof-of-Work(POW)

Proof of Stake(POS)
There are Three Version’s of Blockchain:
BlockChain 1.0 (Cryptocurrency) –
BlockChain Version 1.0 was introduced in 2005 by Hall Finley, who implements DLT
(Distributed Ledger Technology) represents its first application based on Crypto currency.
This allows Financial Transaction based on BlockChain technology or DLT which is
executed with the help of BitCoin. This type of Version is permissionless as any participant
will perform valid transaction of Bitcoin. This type is mainly used in Currency and
Payments.
BlockChain 2.0 ( Smart Contracts) –
The new Version of BlockChain come because there is a problem in version 1.0 which was
Mining of BitCoin was Wasteful and there was also lack of Scalability of Network in it. So
problem is improved in Version 2.0. In this version, the BlockChain is not just limited to
Cryptocurrencies but it will extend up to Smart Contracts.

Smart contracts are contracts that are written in code and designed to follow a set of instructions.
They are safe, devoid of third-party interference, transparent, and precise.

In BlockChain 2.0, BitCoin is replaced with Ethereum. Thus, BlockChain 2.0 was successfully
processing high number of Transactions on Public network rapidly.
3. BlockChain 3.0 (DApps) –

Decentralized apps, or DApps, are essentially a collection of linked smart contracts. Smart
contracts are computer programs that carry out a set of instructions. DApps are decentralized
apps that combine smart contracts into packages that can be interacted with by users
Types of Block Chain
Architecture(variants)
Public:

In this type of blockchain, ledgers are visible to everyone on the internet. It allows anyone to
verify and add a block of transactions to the blockchain. Public networks have incentives for
people to join and are free for use. Anyone can use a public blockchain network.

Public blockchain does not have any central authority controlling or directing its operations

Transactions on a public blockchain are public and visible to anyone through explorers.

Examples include Bitcoin and Ethereum blockchains.


As the name is public this blockchain is open to the public, which means it is not owned by
anyone.

Anyone having internet and a computer with good hardware can participate in this public
blockchain.

All the computer in the network hold the copy of other nodes or block present in the network

In this public blockchain, we can also perform verification of transactions or records


Advantages:

Trustable: There are algorithms to detect no fraud. Participants need not worry about the other
nodes in the network

Secure: This blockchain is large in size as it is open to the public. In a large size, there is greater
distribution of records

Anonymous Nature: It is a secure platform to make your transaction properly at the same time,
you are not required to reveal your name and identity in order to participate.

Decentralized: There is no single platform that maintains the network, instead every user has a
copy of the ledger.
Disadvantages:

Processing: The rate of the transaction process is very slow, due to its large
size. Verification of each node is a very time-consuming process.

Energy Consumption: Proof of work is high energy-consuming. It requires


good computer hardware to participate in the network

Acceptance: No central authority is there so governments are facing the


issue to implement the technology faster.
Private:
The private blockchain is within a single organization. It allows only specific people of the
organization to verify and add transaction blocks. However, everyone on the internet is
generally allowed to view it.
Private blockchain networks, also known as permissioned networks, on the other hand, are run
by private organizations. The organization, a group or consortium acts as a means of centralization
because it limits the participants based on given criteria and defines who connects to and transacts
on the network.

An example of this is when a company wants to collaborate with a few others to share sensitive
data that cannot be revealed through a public blockchain. These blockchains may or may not have
a cryptocurrency or token as a native asset.
• These are not as open as a public blockchain.

• They are open to some authorized users only.

• These blockchains are operated in a closed network.

• In this few people are allowed to participate in a network within a company/organization.


Advantages:

• Speed: The rate of the transaction is high, due to its small size. Verification of each node is
less time-consuming.

• Scalability: We can modify the scalability. The size of the network can be decided manually.

• Privacy: It has increased the level of privacy for confidentiality reasons as the businesses
required.
Disadvantages:

• Security- The number of nodes in this type is limited so chances of manipulation are there.
These blockchains are more vulnerable.

• Centralized- Trust building is one of the main disadvantages due to its central nature.
Organizations can use this for malpractices.

• Count- Since there are few nodes if nodes go offline the entire system of blockchain can be
endangered.
Public Blockchain Private Blockchain

In this type of blockchain anyone can read, write and In this type of blockchain read and write is done upon
participate in a blockchain. Hence, it is permissionless invitation, hence it is a permissioned blockchain.
blockchain. It is public to everyone.

Participants Don’t know each other Participants Know each other

A public blockchain is decentralized. A private blockchain is more centralized.

Transactions per second are lesser in a public blockchain. Transaction per second is more as compared to public
blockchain.

Slow Fast

Examples: Bitcoin, Ethereum, Monero, Zcash, Dash, Example: R3 (Banks), EWF (Energy), B3i (Insurance),
Litecoin, Stellar, Steemit etc. Corda.
A hybrid blockchain combines the privacy benefits achieved on a permissioned network with
the transparency benefits achieved on a public block chain.

An example of a hybrid blockchain network is the Dragonchain, which is a protocol that allows
its users to connect with other users on other blockchain protocols

• It is a combination of both public and private blockchain.


• Permission-based and permissionless systems are used.
• User access information via smart contracts
Advantages:

• Ecosystem: Most advantageous thing about this blockchain is its hybrid nature. It cannot be
hacked as 51% of users don’t have access to the network

• Cost: Transactions are cheap as only a few nodes verify the transaction. All the nodes don’t
carry the verification hence less computational cost.

• Architecture: It is highly customizable and still maintains integrity, security, and transparency.

• Operations: It can choose the participants in the blockchain and decide which transaction can
be made public.
Disadvantages:

• Efficiency: Not everyone is in the position to implement a hybrid Blockchain. The organization
also faces some difficulty in terms of efficiency in maintenance.

• Transparency: There is a possibility that someone can hide information from the user. If
someone wants to get access through a hybrid blockchain it depends on the organization
whether they will give or not.

• Ecosystem: Due to its closed ecosystem this blockchain lacks the incentives for network
participation
Consortium Blockchain

• A consortium blockchain is managed by a group of organizations rather than being open to the
public or controlled by a single entity.

• Also known as Federated Blockchain.


• Some part is public and some part is private.
• In this type, more than one organization manages the blockchain.
Advantages:

• Speed: A limited number of users make verification fast. The high speed makes this more
usable for organizations.

• Authority: Multiple organizations can take part and make it decentralized at every level.
Decentralized authority, makes it more secure.

• Privacy: The information of the checked blocks is unknown to the public view. but any
member belonging to the blockchain can access it.

• Flexible: There is much divergence in the flexibility of the blockchain. Since it is not a very
large decision can be taken faster.
Disadvantages:

• Approval: All the members approve the protocol making it less flexible. Since one or more
organizations are involved there can be differences in the vision of interest.

• Transparency: It can be hacked if the organization becomes corrupt. Organizations may hide
information from the users.

• Vulnerability: If few nodes are getting compromised there is a greater chance of vulnerability
in this blockchain
Blockchain Use Cases
Blockchain Technology is used widely in the different sectors as given in the following table.

Markets • Billing, monitoring and Data Transfer


• Quota management in the Supply Chain Network
Government Sector • Transnational personalized governance services
• Voting, propositions P2P bond,
• Digitization of documents/ contracts and proof of ownership for
transfers
• Registry & Identify
• Tele-attorney service
• IP registration and exchange
• Tax receipts Notary service and document registry

IOT • Agricultural & drone sensor networks


• Smart home networks
• Integrated smartcity.
• Smart home sensors
• Self-driving car
• Personalized robots, robotic component
• Personalized drones
• Digital Assistants
Health • Data management
• Universal EMR Health databanks
• QS Data Commons
• Big health data stream analytes
• Digital health wallet Smart property
• Health Token
• Personal development contracts
Science & Art • Supercomputing
• Crowd analysis
• P2P resources
• Digital mind fit services
Finance & Accounting • Digital Currency Payment
• Payments & Remittance
• Decartelized Capital markets using a network of the computer on the
Blockchain
• Inter-divisional accounting
• Clearing & Trading & Derivatives
• Bookkeeping
Real life use case of block chain

Walmart uses blockchain to track the provenance of its food products. This ensures

food safety by allowing quick identification of contamination sources.

Medicalchain uses blockchain to securely store health records and ensure they can be

accessed by authorized doctors and patients.

Propy uses blockchain to facilitate international real estate transactions by providing a

secure and transparent process.


Civic uses blockchain technology to secure and verify digital identities, enabling secure

access to services without the need for traditional identity documents.

Voatz provides a blockchain-based voting platform that ensures secure, transparent, and

tamper-proof elections
Database Blockchain

Database uses centralized storage of data. Blockchain uses decentralized storage of data.

Database needs a Database admin or Database


There is no administrator in Blockchain.
administrator to manage the stored data.

Modifying data does not require permission. Users have a


copy of data and by modifying the copies does not affect the
Modifying data requires permission from database admin.
master copy of the data as Blockchain is irresistible to
modification of data.

Centralized databases keep information that is up-to-date at Blockchain keeps the present information as well as the
a particular moment past information that has been stored before.

Centralized databases are used as databases for a really Blockchain is ideal for transaction platform but it slows
long time and have a good performance record, but are down when used as databases, specially with large
slow for certain functionalities. collection of data.
What is Crypto
currency
Cryptocurrency is a digital payment system that does not rely on banks to
verify transactions.
Cryptocurrency payments exist purely as digital entries to an online
database. When cryptocurrency funds are transferred, the transactions are
recorded in a public ledger.
In cryptocurrency, “coins” (which are publicly agreed on records of
ownership) are generated or produced by “miners”.
•These miners are people who run programs on ASIC (Application Specific Integrated
Circuit) devices made specifically to solve proof-of-work puzzles.

•The work behind mining coins gives them value, while the scarcity of coins and demand
for them causes their value to fluctuate.
Cryptocurrencies can be used for buying goods just like fiat currency.
Cryptocurrencies use encryption to verify and protect transactions.

It does not exist in physical form and is not typically issued by any central
authority.

They use decentralized control in contrast to central bank digital currency.


Cryptocurrency Working
vs Fiat Currency
Working

There are two things that make cryptocurrency


working and fiat currency working different:

Transactions and the Consensus protocol.


Fiat currency is the traditional money issued by governments. It is not
backed by a physical commodity (like gold or silver) but rather by the
government that issued it.

Example: US Dollar (USD)

Buying Coffee: You go to a coffee shop in the U.S. and pay $5 for a cup of
coffee using a $5 bill or a credit card linked to your bank account.
Cryptocurrency is a digital or virtual currency that uses cryptography for security and operates
independently of a central authority or government.

Example: Bitcoin (BTC)

Buying Coffee: You go to a coffee shop that accepts Bitcoin and order a coffee priced at 0.0005
BTC (equivalent to $5, assuming 1 BTC = $10,000). You scan a QR code with your Bitcoin wallet
app and transfer 0.0005 Bitcoin to the shop's wallet. The transaction is recorded on the blockchain.
Example 2
Buying a Car: You decide to buy a car for $20,000. You can pay by writing a check, using a
credit/debit card, or transferring the money from your bank account to the dealership’s account.
The bank verifies you have enough funds and processes the transaction, updating your and the
dealership’s account balances accordingly.

Buying a Car: You decide to buy a car for 1 Bitcoin. You open your Bitcoin wallet app, enter the
dealership’s wallet address, and send 1 Bitcoin. The transaction is broadcast to the Bitcoin
network, verified by miners, and recorded on the blockchain. The dealership sees the confirmed
transaction and hands you the keys to your new car.
A consensus protocol is a mechanism used in distributed systems and blockchain networks to
achieve agreement on a single data value among distributed processes or systems.

Proof of Work (PoW): Bitcoin

Proof of Stake (PoS):Ethereum 2.0


How Does Cryptocurrency Works?
Mining: Cryptocurrencies are generated through the process called Mining. In this process, the
miners are required to solve a mathematical puzzle over a specially equipped computer system to
be rewarded with bitcoins in exchange.

Buying, selling, and storing: Users can buy cryptocurrencies from central exchanges, brokers, or
individual currency owners and sell crypto to them. Cryptocurrencies can be stored in wallets.

Investing: Cryptocurrencies can be transferred from one digital wallet to another.


Cryptocurrencies can be used for the following purposes:
Buying goods and services.

Trade-in them.

Exchange them for cash.

Once the cryptocurrency is purchased, it needs to be stored safely to protect it from hackers. The
usual place to store cryptocurrency is crypto wallets which can be physical devices or online
software. Not all exchanges or brokers provide crypto wallet services.

The cryptocurrencies can be stored in these four places:


A custodial wallet is a type of cryptocurrency wallet where a third party, holds and manages the user's
private keys on their behalf. This means that the user does not have direct control over their private keys;
instead, they must trust the custodian to securely store and manage their funds.

Cold Wallet: These are also known as Hardware wallets. It is an offline wallet in which hardware connects
to the computer and stores the cryptocurrency. The device connects to the internet at the time of sending
and receiving cryptocurrency but other than that the cryptos are safely stored offline.

Hot Wallet: These are the applications that store cryptocurrencies online. These are available as desktop or
mobile apps.

Paper Wallet: This is also known as a physical wallet. It is a printout of the public and private keys
available as a string of characters or scannable QR codes. To send crypto scan the public and private keys
and crypto will be received using the public keys.
Custodial Wallet Cold Wallet Hot Wallet Paper Wallet

Third-party such as The hardware


Applications that Physical storage of
the crypto exchange connects to the
Definition store cryptocurrencies public and private
store the computer and stores
online keys.
cryptocurrency. the cryptocurrency.

•Simple and
convenient method. •Gives control over
•Maximum security at
•Easy to access. •Highest level of crypto.
Advantage the lowest possible
•No worry about security. •Almost always free.
cost.
losing your crypto •Easy to use.
wallet.

The security risk of •The process is slower


•Less user-friendly.
leaving crypto in compared to when
Disadvantage Risk of being hacked. •Risk of losing a
third-party’s storing crypto online.
wallet.
possession. •Cost of device.
What Can You Do With Cryptocurrency

Shopping: Some luxury retailers like Rolex and Patek Philippe accept cryptocurrency
as a form of payment.
Insurance: Some insurance companies like Premier Shield insurance accept Bitcoin
for premium payments.
Gift: Cryptocurrency can be a great gift for persons who want to learn and invest in
new technology.
Travel: As crypto is not tied to a specific country, thus traveling with crypto can
save a lot on money exchange fees.
Advantages of Cryptocurrencies
The following are some of the advantages of cryptocurrencies:
Private and Secure: Blockchain technology ensures user anonymity and at the
same time the use of cryptography in blockchain makes the network secure for
working with cryptocurrencies.
Decentralized, Immutable, and Transparent: The entire blockchain network
works on the principle of shared ownership where there is no single regulating
authority and the data is available to all the permissioned members on the
network and is tamper-proof.
Advantages of Cryptocurrencies
Inflation Hedge: Cryptocurrencies are a good means of investing in times of inflation as they are
limited in supply and there is a cap on mining any type of cryptocurrency.

Faster Settlement: Payments for most cryptocurrencies settle in seconds or minutes. Wire
transfers at banks can cost more and often take three to five business days to settle.

Easy Transactions: Crypto transactions can be done more easily, in a private manner in
comparison to bank transactions. using a simple smartphone and a cryptocurrency wallet, anyone
can send or receive a variety of cryptocurrencies.
Disadvantages of Cryptocurrencies

Cybersecurity issues: Cryptocurrencies will be subject to cyber security


breaches and may fall into the hands of hackers. Mitigating this will require
continuous maintenance of security infrastructure.
Price Volatility: Cryptocurrencies are highly volatile in terms of price as they
have no underlying value and there is a supply-demand-like equation that is
used to determine the price of cryptocurrencies.
Scalability: Scalability is one of the major concerns with cryptocurrencies. Digital coins
and tokens adoption is increasing rapidly but owing to the sluggish nature of the
blockchain makes cryptocurrencies prone to transaction delays. Cryptocurrencies cannot
compete with the number of transactions that payment giants like VISA, and Mastercard
processes in a day.

Less awareness: Cryptocurrency is still a new concept for the people and the long-term
sustainability of cryptocurrencies remains to be seen.
DOUBLE SPENDING
Unit- III
How Does Double Spending Happen?

Double spending can never arise physically. It can happen in online transactions.
This mostly occurs when there is no authority to verify the transaction. It can also
happen if the user’s wallet is not secured. Suppose a user wants to avail of services
from Merchant ‘A’ and Merchant ‘B’.
• The user first made a digital transaction with Merchant ‘A’.
• The copy of the cryptocurrency is stored on the user’s computer.
• So the user uses the same cryptocurrency to pay Merchant ‘B’
• Now both the merchants have the illusion that the money has been credited since
the transactions were not confirmed by the miners.
This is the case of double spending.
Example: Suppose a user has 1 BTC. He/She wants to avail of services from merchant A
and merchant B. The user creates multiple copies of the same BTC and stores it. The user
first sends the original BTC to Merchant A and gets the service. Simultaneously, the user
sends the copied version of 1 BTC to Merchant B. Since the second transaction was not
confirmed by other miners, the merchant accepts the bitcoin and sends the service. But the
cryptocurrency that was sent is invalid. This is the case of Double Spending.
Let us discuss a detailed example of how bitcoin handles double-
spending.

A user wants to spend 2 BTC. He/She can create multiple copies of


the same cryptocurrency.
The user can send the same cryptocurrency to two different
addresses say ‘Bob’ and ‘Alice’.
Both of these transactions are sent to the pool of unconfirmed
transactions.
The first transaction T1 would be approved via the confirmation
mechanism.

The confirmation mechanism states that a minimum of six


confirmations by miners should be done for block validation. The
block is added to the network.

However, the second transaction T2 didn’t get sufficient


confirmation so it would be recognized as invalid by the
confirmation process. The block with the highest number of
confirmations is accepted and the other one is rejected. So
transaction T1 is valid, and Alice received the bitcoin.
How to Combat Double Spending?

Double spending has been minimized to a large extent as companies


are using many security features. But we as users also have some
responsibility so that such attacks don’t happen.

Any user should wait for a minimum of six confirmations of the


transaction before performing another transaction. In the blockchain,
more the confirmations by different users, lesser will be double
spending attacks.
Users should keep their hardware resources safe so that hackers do
not misuse them for their own purposes. Often hackers target the
hardware part because the hardware is costly. If they somehow steal
the hardware, they can roll back any transaction or alter information.

Users should delete spam mails and avoid phishing to avoid


unnecessary malware attacks Phishing is a very common attack by
hackers as hackers target login credentials.

Software should be updated regularly with the latest antivirus


installed. If the software is not up to date then the bugs present can
cause major damage.
HASHING IN BLOCKCHAIN
Hashing is the process of converting an input (or 'message') into a
fixed-size string of bytes.
The hash value is quickly computed.
Even a tiny change in the input will produce a significantly
different hash.
Each block in a blockchain has a unique hash, which is created from
the data within the block. This hash serves as a digital fingerprint of
the block.

Each block contains the hash of the previous block, creating a chain
of blocks. This ensures the integrity of the blockchain, as altering
one block would change its hash, thereby breaking the chain.

Common Hashing Algorithms in Blockchain is SHA-256 which is


used by Bitcoin and many other blockchain systems. It produces a
256-bit hash.
The size of the hash will depend on the hash function utilized,
but the output using a particular hashing algorithm will be of a
specific size.

Example:
When you take a YouTube video of say 50 megabytes and hash it
using SHA-256, the output will be a hash of 256-bits in length.
Similarly, if you take a text message of 5 kilobytes, the output
hash will still be 256-bits.
CHARACTERISTICS OF CRYPTOGRAPHIC
HASH FUNCTIONS
Deterministic
A hash function needs to have a fixed or specific output. What this
means is that it doesn’t matter what number of times you process
a given input using a hash function; the result is always of the
same length. The hashes will be random and of different patterns,
but the same size/length.
Quick Computation
In blockchain technology, a good hash function would be one that
performs quick computations for every data input. It may be
difficult to find the input data for a hash, but computing or
calculating the hash should be ideally very fast. For instance, you
can have the hash result of a simple “hi” within a fraction of a
second. Similarly, the hash of a very large file will be received
within a fraction of a second.
Different hashes for every input (Randomized) Hash functions
produce different outputs for every input, even if the input data
differs by only a digit or letter. For instance, the hash of the word
“Alpha” should be completely different from the hash of the word
“Alpha1”.

Collision resistant
Cryptographic hash functions are also supposed to have collision
resistant properties. Collisions can occur in cases where a hash
function gives similar outputs for different inputs. For example, if
“pic1” is photo and “pic2” is a video, but a hash function produces
the same output, then we call that a collision. Normally, this should
not happen.
Pre-image resistance
One of the important properties of secure cryptographic hash
functions is they are one-way. Let’s take it this way: given a hash
of a particular transaction, it should be virtually impossible or
practically infeasible to determine the original input data using
this output.
BLOCKCHAIN MINING
Blockchain mining is a process to validate every step in the
transactions while operating bitcoins or other cryptocurrencies.
The people involved here are known as blockchain miners
The process is rewarding, as well. A single user does not handle
the mining process, but a number of them compete on a unified
authentication to get the rewards. Each mining success comes
with a bonus of several bitcoins.
SCENARIO 1:
Imagine a classroom where students are playing a game. The teacher writes math problems on
the board, and the first student to solve each problem gets a piece of candy. The classroom
represents the blockchain network, the teacher's math problems are the puzzles to be solved,
and the pieces of candy are the cryptocurrency rewards.
Here's how blockchain mining works with this analogy:
Pending Transactions: Let's say the students in the class have been making promises to each
other: "I'll give you my toy if you give me your book." These promises are like pending
transactions in the blockchain.
Math Problem: The teacher (the blockchain system) writes a difficult math problem on the
board. This is the puzzle that needs to be solved to verify and add the transactions to the
blockchain.
Solving the Problem: All the students (miners) start working on solving the math problem. It’s
a hard problem, so it takes some time.
1.First to Solve: One student solves the problem first and shows the
answer to the teacher. This student is like the miner who solves the puzzle
first.
2.Verification: The teacher checks the answer quickly. If it’s correct, the
student is allowed to write the promises (transactions) on the class
notebook (blockchain ledger) and everyone updates their own
notebooks.
3.Reward: The student who solved the problem gets a piece of candy
(cryptocurrency) as a reward.
4.Security: If a student tries to cheat and write fake promises in the
notebook, other students will notice because they all have copies of the
notebook and can see the changes don’t match.
HOW BLOCKCHAIN MINING WORKS
All the pending transactions are collected in a pool.
Miners (special computers) compete to solve a mathematical puzzle. The
puzzle is difficult to solve but easy for others to verify. Think of it like a
sudoku that takes hours to solve but seconds to check.
The first miner to solve the puzzle gets to add a block of transactions to the
ledger. This block contains the solved puzzle, the transactions, and a
reference to the previous block in the chain (hence the name blockchain).
The miner is rewarded with some cryptocurrency for their effort. This is how
new coins are created and distributed.
Other miners and participants in the network quickly check the solution. If it’s
correct, the block is added to everyone’s copy of the ledger.
This process is secure because solving the puzzle requires a lot of
computational power, making it difficult for anyone to tamper with the
transactions.
NOTE:
The miner who solves the puzzle in blockchain mining does not perform
the transactions themselves. Instead, the miner who solves the puzzle is
responsible for validating and adding a block of transactions to the
blockchain.
Users of the blockchain network create transactions. For example, Alice
sends 1 Bitcoin to Bob. This transaction is broadcast to the network and
placed in a pool of unconfirmed transactions.
Miners collect a batch of these unconfirmed transactions from the pool
and form a block.
Miners compete to solve a complex mathematical puzzle. The first miner
to solve the puzzle gets the right to add their block of transactions to the
blockchain.
Why would you mine Blockchain?

You can earn money by mining Blockchain; the amount you will
earn depends on your mining capacity. In the mining mechanism
in blockchain, mining needs certain resources like a cooling
system, electricity, computational hardware, and maintenance. The
more robust your mining setup is, the higher would be your mining
capacity. Consequently, you can make more money. You get paid for
mining because mining is significant for Blockchain to maintain
integrity.
TYPES OF MINING
1. Individual Mining
In Individual Mining, the user has to register itself as a miner. As
soon as a transaction occurs, all the single users in the blockchain
network will receive a mathematical problem. The first one to solve
the complex mathematical problem gets rewarded. The solution
comes after rigorously using the hardware and software properties
of the computer, which is being used by the miner.
Pool Mining
Another type of mining is Pool Mining, where several users
operate together to approve the transaction. Numerous
transactions occur every second. Then the entire team of miners
in the network operate together to solve the complex numerical
and computational problem. After the result is validated, the
reward is then also split between all users.
Cloud mining
Cloud mining involves renting mining power from a provider
who owns and operates the mining hardware. Users pay for a
contract and receive a portion of the mined cryptocurrency.
USE OF BLOCKCHAIN MINING
1. Validating Transactions
Bitcoins are decentralized digital currencies, which are managed on a peer-
to-peer computer network and transferred from one user to another. Bitcoin
transactions occur in huge figures daily. But there is a certain lag in the
entire framework.
Since these cryptocurrencies operate without a central administrator, there
is a substantial amount of insecurity with the transactions that transpire.
While dealing with printed currency, the validation lies in the printed
numerical codes in each of them. Accordingly, what is the authentication
with such cryptocurrencies?
With each transaction, blocks are added to the blockchain. The validation
lies in the mining results from the blockchain miners.
Confirming Transactions
Miners work in the blockchain mining process to confirm whether
the transaction is authentic or not. Transactions get confirmed on
completing the inclusion in the block.

Securing Network
Bitcoin Miners work together to secure the transaction network.
Network security increases with the increase in the operators
mining the blockchain.
ALGORITHMS FOR BLOCKCHAIN
MINING:
Two prominent algorithms used for Blockchain mining are proof-of-work
and proof of stake.
PoW is like a race where miners compete to solve a puzzle. The first one to
solve it gets to add a block of transactions to the blockchain and earns a
reward.
Example: Bitcoin uses PoW. Miners compete to solve puzzles. The first miner
to solve it broadcasts the solution, and if verified by others, the block is
added to the blockchain, and the miner gets bitcoins as a reward.
PoW requires a lot of electricity because miners need powerful computers
to solve puzzles quickly.
PoS is like a lottery where the more cryptocurrency (like coins)
you have, the more likely you are to win the right to add the next
block of transactions to the blockchain.

Example: Ethereum 2.0 is transitioning to PoS. Validators are


selected based on the amount of Ether (ETH) they hold and are
willing to stake. Chosen validators validate transactions and create
new blocks, earning ETH rewards in return.
PoS is more energy-efficient compared to PoW because it doesn't
require intensive computations to solve puzzles.
BLOCKCHAIN - MERKLE TREE
A Merkle tree (also known as a hash tree) is a fundamental
data structure used in computer science and cryptography.
It's particularly important in blockchain technology for
efficient and secure verification of large sets of data.
STRUCTURE OF MERKLE TREE
The tree is constructed from the bottom up, starting with
individual pieces of data known as "leaves“. Each leaf node is
associated with a cryptographic hash of a data block.

Pairs of leaf nodes are combined to compute a hash of their


combined values. This process continues until there is only one
hash, known as the "root hash" or "Merkle root," at the top of the
tree. The root hash is a cryptographic hash that uniquely
represents all the data in the tree.
▪ Suppose we have a blockchain with a block containing 4
transactions:
• Transaction A
• Transaction B
• Transaction C
• Transaction D

Each transaction (A, B, C, D) is hashed individually. Let's denote


these hashes as H(A), H(B), H(C), and H(D).
• Pair transactions and hash their concatenated hashes:
• Pair H(A) and H(B), compute H(AB) = hash(H(A) + H(B))
• Pair H(C) and H(D), compute H(CD) = hash(H(C) + H(D))

Root Hash = hash(H(AB) + H(CD))


BLOCK HEADER
In a blockchain, a block header is like an ID card for each
block of transactions. It contains important information that
makes sure everything in the blockchain works smoothly
and securely.
COMPONENTS OF A BLOCK HEADER:
Version Number: This indicates the version of the blockchain protocol
being used.

Previous Block Hash: This is the cryptographic hash of the header of the
previous block in the blockchain. It links the current block to its
predecessor, creating the chain of blocks.

Merkle Root: The Merkle root is the root hash of the Merkle tree
Timestamp: The timestamp records the exact time when the block was
created or mined. It helps in maintaining the chronological order of blocks
in the blockchain.

Difficulty Target: This field specifies the difficulty level that the block's
proof-of-work must meet.

Nonce: The nonce is a 32-bit (or larger) field used in proof-of-work


algorithms. Miners change the nonce value repeatedly to find a hash value
that meets the difficulty target.
{
"version": 1,
"previousBlockHash":
"00000000000000000014cde3a62f24e8f7ee562f0fe8d1bfa1e36d7c69b17a21",
"merkleRoot":
"c7f7a1c5d3feadfa4e5c632c899d7b9c9e5321c8a4467c9146e7b153e7a612ce",
"timestamp": 1630850492,
"difficultyTarget": 120330,
"nonce": 1984710036
}
PAYMENT VERIFICATION- MERKLE
TREE BENEFITS
The Merkle tree helps you quickly find and verify transactions by
using hashes in a hierarchical way.
Scenario:
You want to check if a payment you received in the past was
actually recorded on the blockchain. However, you only have a
simplified version of the blockchain on your computer that
includes just the headers of each block.
Find the Time of the Payment:
Figure out roughly when the payment was made. This helps narrow
down where to look in the blockchain.
Look Back in Your Blockchain:
Start from the most recent block (the latest transactions) and go
backwards.
Check each block's timestamp until you find one that might include the
payment transaction.
Find the Right Block:
When you find a block that matches the timeframe of the payment,
check inside it to see if it contains the specific transaction you're
interested in.
Request the Merkle Tree:
Once you find the block that likely contains the payment transaction, ask
your blockchain software to show you the Merkle tree for that block.

Locate Your Payment:


In the Merkle tree, find the transaction that matches the details of the
payment you received. Each transaction is represented by a hash (a unique
identifier).
RESOLVING CONFLICTS
As we have seen the Bitcoin network contains several miners. It is possible,
that the two different miners solve the Proof-of-Work at the same time and
thus add their blocks to the last known block in the chain. This is illustrated
in below image −
The Bitcoin blockchain is currently at Block 103, and miners are
competing to find the next valid block (Block 104).
Miner A and Miner B are both actively mining Block 104. They are
trying to solve the Proof-of-Work puzzle, which involves finding a
hash value that meets the network's difficulty target.
Miner A and Miner B both find a valid solution to the PoW puzzle
at almost the same time.
Let's say, Miner A finds Block 104a with its own set of transactions
and broadcasts it to the network. Miner B finds Block 104b with a
different set of transactions and also broadcasts it to the network.
Nodes in the Bitcoin network receive both Block 104a and Block
104b almost simultaneously. Some nodes might receive Block
104a first, while others might receive Block 104b first due to
network latency.
Miners and nodes in the network continue to mine and add new blocks to
either Chain 1 or Chain 2, based on their received blocks.
The Bitcoin protocol dictates that nodes always follow the longest valid
chain, which is the chain with the most accumulated Proof-of-Work.

As more miners continue to mine subsequent blocks One of the chains (let's
say Chain 1) will eventually have more blocks added to it, making it the
longest chain.
Nodes on the network will abandon the shorter chain (Chain 2 in this case)
and adopt Chain 1 as the valid blockchain.
So the Block 104-B has to be purged. This is how the conflicts are
resolved and only one single chain of blocks is maintained by the
system
BLOCK CHAIN PRIVACY
As the ledger which is recording all the bitcoin transactions is made truly
public, the privacy is at stake. Anybody in the world would be able to know
who paid whom? The traditional banking system is able to maintain this
kind of privacy by keeping its records confidential.

Privacy in Bitcoin system is achieved by a different strategy. Note that we


said that the sender of a bitcoin needs to know whom to pay. So he asks for
the public key of the vendor to which he desires to make the payment. This
public key can be anonymous.
In the sense, as a vendor of some services, when somebody asks you
where to send the payment, you would simply send him your public key.
The association of this public key with you is not recorded anywhere in the
ledger. That way anybody outside of this transaction would only know how
much money is transacted and to which public key the money is paid out.

To achieve a higher degree of privacy, for every transaction, you may


generate a new private/public key for each transaction so that multiple
transactions made by you cannot be grouped together by a third party.
For an outsider, this would simply mean that multiple transactions of
smaller values were made and they will never will be linked to a common
source.
SCENARIO
Alice wants to receive Bitcoin from Bob for a service she provided. She generates a pair
of keys:
Public Key (Address): 𝐴𝑝𝑢𝑏
Private Key: 𝐴𝑝𝑟𝑖𝑣
Alice provides Bob with her public key 𝐴𝑝𝑢𝑏 . This is where Bob will send the Bitcoin.
Bob initiates a transaction to Alice's public address 𝐴𝑝𝑢𝑏 with the specified amount of
Bitcoin.
The transaction details are recorded on the blockchain
Sender: Bob's address
Receiver: Alice's public address 𝐴𝑝𝑢𝑏
Amount: X BTC
Transaction ID: 𝑇𝑋𝐼𝐷
On the blockchain, anyone can see that a transaction occurred from
Bob to Alice for amount X BTC. They can also see the transaction ID
𝑇𝑋𝐼𝐷.
Alice's identity is protected because only her public key or address
𝐴𝑝𝑢𝑏 is visible on the blockchain. Her real-world identity is not
explicitly tied to 𝐴𝑝𝑢𝑏 .
To enhance privacy further, Alice can generate a new pair of keys for
each transaction
For another transaction, she uses a different public key 𝐴𝑝𝑢𝑏’ and its
corresponding private key 𝐴𝑝𝑟𝑖𝑣’.
This way, transactions are less likely to be linked to the same owner,
enhancing privacy even if someone observes multiple transactions
involving Alice.
BITCOIN
Unit-4
There are a number of currencies in this world used for trading amenities. Rupee, Dollar,
Pound Euro, and Yen are some of them. These are printed currencies and coins and you
might be having one of these in your wallet. But bitcoin is a currency you can not touch,
you can not see but you can efficiently use it to trade amenities. It is an electronically
stored currency. It can be stored in your mobiles, computers, or any storage media as a
virtual currency.
Bitcoin is a type of digital currency, also known as a cryptocurrency. It allows people to
send and receive money over the internet without the need for a central authority, like a
bank.
There are 3 ways you can get a bitcoin in your electronic storage:

Trade Money For Bitcoin: Say that the value of a bitcoin is 1 lakh rupees, so if you want a
bitcoin, you can trade a bitcoin in place of 1 lakh rupees. This Bitcoin will further be stored
in your electronic storage media which you can further use.

Trade Goods For Bitcoin: Say that the value of a bitcoin is 1 lakh rupees and you have a
commodity that has its value as 1 lakh rupees, so you can trade that commodity in place of
a bitcoin, and the bitcoin will be stored in your electronic storage media.

Mine Bitcoins: Other than trading, you can also mine bitcoins. Since it is a decentralized
currency, there is no authority that brings bitcoins into the market. Bitcoins only come into
the market by mining them.
FEATURES
Distributed: All bitcoin transactions are recorded in a public
ledger known as the blockchain. There are nodes in the network
that maintain copies of the ledger and contribute to the correct
propagation of the transactions following the rules of the protocols
making it impossible for the network to suffer downtime.

Decentralized: There is no third party or no CEO who controls the


bitcoin network. The network consists of willing participants who
agree to the rules of a protocol and changes to the protocol are
done by the consensus of its users. This makes bitcoin a quasi-
political system.
Transparent: The addition of new transactions to the
blockchain ledger and the state of the bitcoin network is
arrived upon by consensus in a transparent manner according
to the rules of the protocol.

Peer-to-peer: In Bitcoin transactions, the payments go straight


from one party to another party so there is no need for any
third party to act as an intermediary.

Censorship resistant: As bitcoin transactions are pseudo-


anonymous and users possess the keys to their bitcoin
holdings, so it is difficult for the authorities to ban users from
using their assets. This provides economic freedom to the
users.
Public: All bitcoin transactions are available publicly for
everyone to see. All the transactions are recorded, which
eliminates the possibility of fraudulent transactions.

Pseudo-anonymous: Bitcoin transactions are tied to addresses


that take the form of randomly generated alphanumeric strings.
HOW DO BITCOIN TRANSACTIONS
WORK?
Bitcoin transactions are digitally signed for security. Everyone on
the network gets to know about a transaction. Anyone can create a
bitcoin wallet by downloading the bitcoin program.
Each bitcoin wallet has two things:

Public key: It is like an address or an account number via which any user or account can
receive bitcoins.

Private key: It is like a digital signature via which anyone can send bitcoins.

The public key can be shared with anyone but the private key must be held by the owner. If
the private key gets hacked or stolen then bitcoin gets lost.
A bitcoin transaction contains three pieces of information:

Private key: The first part contains the bitcoin wallet address of the
sender i.e. the private key.

Amount of bitcoin to be transferred: The second part contains the


amount that has been sent.

Public key: The third part contains the bitcoin wallet address of the
recipient i.e. the public key.
How Do Bitcoins Come Into Market?

Bitcoins are a decentralized currency, they aren’t printed, like rupees, they’re produced by
people, and big companies, running computers all around the world, using software that
solves mathematical problems.

Bitcoins are mined using the computing power of the distributed network. This network
also processes transactions made using Bitcoin.

Bitcoins are mined on the basis of computing power, so they take time to be generated.

To keep it valuable, it has been stated that only 21 million bitcoins can be created by
miners. By the year 2140, all the bitcoins will be created.
HOW DO YOU BUY BITCOIN?
There are three ways to get a bitcoin:

Buying: Many marketplaces like Bitcoin exchanges allow users to buy or sell bitcoins using
different currencies. If one does not want to mine a bitcoin, it can be bought using a
cryptocurrency exchange. Most people will not be able to purchase the entire BTC due to its
price, so it is possible to buy portions of BTC on these exchanges in fiat currency like U.S.
Dollars.
The following steps can be followed to buy bitcoin outside the online exchanges:

Each person who joins the bitcoin network is issued a public key and a private key.
When a person buys a bitcoin or sends/receives it, the person will receive a public key.
The person can only access the bitcoin using the private key (it has) with the public key (it
received).
Mining: People on the bitcoin network compete among themselves
to mine bitcoins using computers to solve complex maths puzzles.
This is how bitcoins are created.

Transfer: Bitcoin can be transferred from one account to another


just like digital cash using mobile applications or computers.
BITCOIN KEY CONCEPTS
There are four key concepts in Bitcoin that are as follows-

1. Disintermediated
When users send money over the Internet, there is a need for a third party, such as a
bank, to manage all the transactions. However, in Bitcoin, transactions are made
directly over the Internet to another party. This transaction is carried out on the
Bitcoin network. This network is in charge of confirming and verifying that the two
parties actually exchanged value. This is known as disintermediation. The act of
removing the middleman is known as disintermediation. It is one of the key
components that make the blockchain so valuable because it eliminates the
unnecessary inefficiency that occurs when a third party is used to transfer value
between parties.
Distributed: The entire bitcoin network is powered by a network of
thousands of distributed computers that share the workload. As a result,
rather than having a single centralized computer handle the workload,
the workload is distributed across multiple computers. Because there is
no single point of failure, the distributed network is more reliable. The
workload is distributed across thousands of computers that are all
running and sharing the workload.
Decentralized: Bitcoin is a decentralized currency. It means that there is no central
command, no central data repository, and no middle management to oversee what
Bitcoin does. As a result, there isn’t a solitary point of failure.

Trustless: Bitcoin is called Trustless because no third party, such as a bank, is required
to certify and trust the entire transaction process. Instead, the blockchain and the way
Bitcoin processes transactions enable trust via Distributed Trustless Consensus, in which
all nodes agree that a transaction took place.
MERITS OF BITCOIN
User anonymity: Bitcoin users can have multiple public keys and are identified by
numerical codes. This ensures that the transactions cannot be traced back to the
user.

Transparency: Bitcoin transactions are recorded on the public ledger blockchain.


The transactions are permanently viewable, which gives transparency to the system
but they are secure and fraud-resistant at the same time due to blockchain
technology.
Accessibility: Bitcoin is a very versatile and accessible currency. It takes a few minutes
to transfer bitcoins to another user, so it can be used to buy goods and services from a
variety of places accepting bitcoins. This makes spending bitcoin easy in another
country with little or no fees applied.

Independence from central authority: Bitcoin is a decentralized currency, which


means there is no dependence on any single governing authority for verifying
transactions.

Low transaction fees: Standard wire transfers involve transaction fees and exchange
costs. Since bitcoin transactions do not involve any government authority so the
transaction fees are very low compared to bank transfers.
DEMERITS OF BITCOIN
Volatility: There are various factors that contribute to the bitcoin’s volatility like
uncertainty about its future value, security breaches, headline-making news, and one
of the most important reasons is the scarcity of bitcoins. It is known that there is a limit
of 21 million bitcoins that could ever exist which is why some regard bitcoin as a
scarce resource. This scarcity makes bitcoin’s price variable.

No government regulations: Unlike the investments that are done through central
banks, bitcoins transactions are not regulated by any central authority due to a
decentralized framework. This means that bitcoin’s transactions don’t come with legal
protection and are irreversible which makes them susceptible to crimes.
No buyer protection: If the goods are bought using bitcoins and the seller does not
send the promised goods then nothing can be done to reverse the transactions and since
there is no central authority so no legal protection can be provided in this case.

Not widely accepted: Bitcoins are still only accepted by a small group of online
merchants. This makes it unfeasible to rely completely on bitcoin as a currency and
replace it with traditional bank transactions.

Irreversible: There is a lack of security in bitcoin transactions due to the anonymous


and non-regulated nature of the bitcoin transactions. If the wrong amount is sent or the
amount is sent to the wrong recipient then nothing can be done to reverse the
transactions
FORKS AND SEGWITS
A fork in blockchain refers to a split in the blockchain network, creating two separate
chains.

Forks are classified as:


Hard fork
Soft fork
Hard forks require all participants to upgrade and can cause a permanent split.

A soft fork is a backward-compatible upgrade, meaning that non-upgraded nodes


will still recognize new blocks as valid.
Hard Fork
The users who are running the older version of the software in the Bitcoin network
needs to upgrade their software to recognize new blocks.

Soft Fork
The users who are running the older version of the software will still recognize new
blocks created by computers. It is called soft because both groups of users(old and
new users) will continue to mine new blocks on the same blockchain.
HARD FORK
Example: Bitcoin Cash (BCH) from Bitcoin (BTC)

In 2017, some people in the Bitcoin community wanted to increase the block size
limit to allow more transactions per block, making the network faster. They couldn't
reach an agreement with everyone else, so they created a new version of Bitcoin
called Bitcoin Cash with larger block sizes. This split, or "hard fork," created two
separate cryptocurrencies: Bitcoin and Bitcoin Cash. If you held Bitcoin before the
fork, you ended up with the same amount of Bitcoin Cash after the fork.
SOFT FORK
Example: Segregated Witness (SegWit) in Bitcoin

SegWit was introduced to Bitcoin in 2017 as an upgrade to improve transaction


efficiency and fix issues. Unlike a hard fork, a soft fork doesn’t require everyone to
upgrade right away. Those who upgrade follow the new rules but those who don’t
upgrade can still participate in the network.
The soft fork that was represented for segregated witness does not require upgrading to
remain on the blockchain. It means that if miners have not upgraded the segregated
witness can still remain on the blockchain. They won't have access all the functionality that
segregated witness can provide and also being able to participate in segregated witness
transaction. However, they would still be able to validate the block that does not include
the segregated witness information in them.
There are three main components of the bitcoin transaction. They are

Input:Where the coin/funds are coming from.


Amount: How many bitcoins are coming from the source.
Output: Where that bitcoin are actually headed.

A transaction is very similar to a bank check, which contains inputs, amount, and output. For
the transaction to happen, someone who has bitcoin needs to sign that transaction. The
signature makes sure that your bitcoin cannot be used by someone who is not authorized. It
is because you have the private keys that can be controlled by you only.
Now in SegWit transaction, the digital signature needs to be segregated from the
transaction data. It would increase the 1 MB limit for block sizes. The digital signature
freezes up about 60-65% of the space in a given transaction. SegWit transaction ignores
the data attached to a signature by pulled out the signature from within the input and
moving it to a structure towards the end of a transaction.
SENDING AND RECEIVING BITCOIN
Sending and receiving bitcoin is one of the core building blocks of any bitcoin
application. Sending and receiving bitcoins securely over the internet gives you a
bitcoin value. To send and receive bitcoin, you need to have a wallet where you need
to put the public address of the sender and recipient. The process of sending and
receiving bitcoin can differ between wallets to wallets, but the general steps are
given below.

Step-1 Log-in into your wallet.

Step-2 Go to Send and Receive icon.

Step-3 Choose whether you want to send or receive bitcoin.


Step-4 Send bitcoin: Enter the public address of the recipient and choose the amount
which you want to send. Once you decide the amount, confirm the amount to avoid
mistakes, then click on send transaction, and verify the transaction one last time for
confirming your public address and sender's public address.

Step-5 Receive bitcoin: To receive bitcoin, you need to share your public wallet address
with the sender.You can also do this by letting them scan a QR code.
For example:

A wants to send five bitcoins to Ben. She is sending five bitcoins because she may have
bought a product or paying him for services. For sending those five bitcoins, A needs to
have five bitcoins in her wallet, and can also be able to receive bitcoins in her wallet.
Now she could have bought bitcoins, or she could have received bitcoins as payment.

Here, we are assuming that A has 20 bitcoins in her wallet. When the wallet is created, it
assigns two keys. One is the public key which is used to receive bitcoins. And second is
the private key which is used to sign and authorize to send or spend those bitcoins to
other people. We know that A has the private key to her wallet, so she is able to spend
those bitcoins.

Ben can receive five bitcoins if he has a wallet of his own, which allows him to get
bitcoins from anyone else. Ben also has a private key for his wallet that will enable him to
spend those bitcoins that he has in his wallet. Ben's private key is completely different
from Alice's private key. Now, if Ben wants to receive five bitcoins from A, he needs to
provide his Bitcoin address to A.
The bitcoin address is used for receiving money, which is a hashed version of the public
key. Ben has the option to generate a new bitcoin address for every single transaction if
he wants. Creating the new bitcoin address for every transaction is a good security
recommendation in terms of privacy.

Ben can share his bitcoin address in two ways. He can share an alphanumeric code which
starts with the number one and ends in the letter H, and another one is the QR code. The
alphanumeric code is always different for every single bitcoin address, and these
addresses are typically between 26 to 35 characters in length. The bitcoin address which
you see numerically is the Ben address used to receive bitcoins from A.

Now, when A sends the five bitcoins to that address, she creates a transaction. She is able
to do this transaction because she can access the private key and can authorize to
transfer five bitcoins on Ben's bitcoin address. So, a new transaction shows that from A's
wallet, five bitcoins are being sent to Ben's wallet. The transaction at that point gets sent
out into the network, and the miners begin mining blocks. When the first block comes in
and includes that transaction in it, then the transaction is said to be confirmed.
HOW TO CHOOSE BITCOIN WALLET
If you want to involve in bitcoin, you need to have a wallet.
A wallet allows you to receive bitcoins, send bitcoins, store bitcoins.
Take an example of a page called bitcoin.org to choose the wallet

Bitcoin.org is a website that was developed by Satoshi Nakamoto and Martti Malmi.
It's an open-source project which is handled by a global community.

Bitcoin.org is a very good starting point to explain how to choose your wallet
because there is a lot of options available. In this page, we will go to an option
called Choose your wallet.
We can see that there are different types of wallets that you can choose, like Desktop
wallet, Mobile wallet, Web wallet, Hardware wallet, etc.
Mobile wallet
In the mobile wallet, you can run any type of application, whether it is on Android, iOS,
Windows
Popular Mobile wallets are Bitpay, BTC.com, Edge, Electrum, Mycelium, Bitcoin Wallet,
etc.
Desktop wallet
In the desktop wallet, you can run it on your desktop or laptop computer for Windows,
Mac, and Linux. Generally, they are secure, but sometimes they are vulnerable to various
malware and computer viruses.
Popular Desktop wallets are Bitcoin Core, Bitcoin Knots, mSIGNA, Armory, etc.
Hardware wallet
In a hardware wallet, there are devices which contain your private keys. The hardware
wallets are the most secure wallets, but it will also cost money.
Popular hardware wallets are BitBox, Keepkey, Trezor, Ledger Nano S, etc.
Web wallet

The web wallets are online wallets that are considered less secure than other types of
wallets, yet they can be highly convenient.

Popular web wallets are Guarda, Coinbase, GreenAddress, Binance, etc.


DIFFERENT WAYS TO CONVERT BITCOIN TO
FIAT CURRENCY
Bitcoin is basically a cryptocurrency that is stored in a virtual wallet. It is basically a
digital currency that is currently used as a form of payment. The transactions related
to bitcoins take place in the blockchain network. Every bitcoin is stored in a virtual
wallet and the transaction involves the transfer of bitcoin from one wallet to another.
Bitcoins can be sent from peer to peer irrespective of geographical location without
any intermediator in between. It works in a decentralized way, meaning nobody can
interfere with the digital money, only the concerned person is responsible for the
bitcoins.

Fiat currency is the currency that is issued by the government. in other terms. It is
the cash, coins we generally have, that is the physical form of currency. Fiat currency
ranges from USD, EUR, INR, GBP, etc.
There are many ways to convert bitcoin to fiat currency. The methods are listed
below
Cryptocurrency Exchanges: This is the most widely used method to convert bitcoin
to fiat currency. It is similar to a money exchange center which is needed when a
person moves from one country to another. Cryptocurrency exchanges basically
convert your cryptocurrency that is bitcoin into your local currency such as rupees,
US dollars, euros.
Cryptocurrency Exchanges have an inbuilt crypto converter feature that displays how
much fiat currency one could get with the bitcoins that person has. There are multiple
exchanges available like Gemini, coinbase, binance, etc. This has a user-friendly
interface that eases the whole process of bitcoin conversion

Coinbase seems a suitable option as it has improved over its downtime problem by
increasing the infrastructure capability. Coinbase exchange sends the converted fiat
money directly into your bank account without much hassle.
Bitcoin Debit Card: Possessing a Bitcoin Debit Card is the fastest way to convert bitcoin to
cash or fiat currency. The online website is provided as a user interface where the user
deposits the bitcoins and the website automatically converts those into required fiat
currency. Bitcoin debit cards are used wherever debit cards are accepted, the only
difference being, funds are transferred from a crypto wallet rather than from a bank
account

The main disadvantage is the providers of Bitcoin debit cards takes transaction charge on
every purchase and also limits the total amount of transaction per debit card.In order to
register for the Bitcoin debit cards, one needs to go to the bank and do KYC.
Peer-to-Peer Exchanges: It is known that bitcoin doesn’t have any centralized authority,
therefore any fund can be transferred from one peer to another. This basically involves
finding a buyer who will buy your bitcoins and in return, would give cash for that. But
one thing to be noted is that transactions in bitcoins are irreversible. So, choose a
trustworthy buyer on whom you are sure of getting the cash after a bitcoin transaction.

Bitcoin ATMs: It is also known as a Bitcoin Teller Machine (similar to ATM). BTM acts
similar to an ATM, allowing to withdraw cash. QR code and added security features like
text messages are there to ensure smooth and secure transactions. BTMs allow you to buy
as well as sell bitcoins.it provides a very fast and convenient way to take cash out of a
bitcoin wallet. BTMs are available in developed cities of the world and more are under
construction after the boom of the digital currency era. The drawback of BTMs is they
charge a heavy amount on conversion and also sets a maximum transaction limit.
Metal Pay: It is a money transfer app that allows cryptocurrency holders to cash out. The
need for this app is to complete KYC before filling up the bank details. After filling in bank
details, the customer can buy, sell, send, receive as well as convert cryptocurrencies. Metal
pay has the capability to convert at least 24 cryptocurrencies including bitcoins.

You might also like