[go: up one dir, main page]

0% found this document useful (0 votes)
67 views38 pages

Unit 1-Introduction To Blockchain

The document provides an introduction to blockchain technology, explaining its structure as a decentralized and distributed digital ledger that records transactions securely and immutably. It outlines the benefits of blockchain, such as eliminating intermediaries, enhancing transaction speeds, and ensuring transparency, while also discussing various types of blockchains, including public, private, and consortium blockchains. Additionally, it highlights the importance of consensus mechanisms and the role of nodes in maintaining the integrity of the blockchain network.

Uploaded by

Rethisha 2003
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)
67 views38 pages

Unit 1-Introduction To Blockchain

The document provides an introduction to blockchain technology, explaining its structure as a decentralized and distributed digital ledger that records transactions securely and immutably. It outlines the benefits of blockchain, such as eliminating intermediaries, enhancing transaction speeds, and ensuring transparency, while also discussing various types of blockchains, including public, private, and consortium blockchains. Additionally, it highlights the importance of consensus mechanisms and the role of nodes in maintaining the integrity of the blockchain network.

Uploaded by

Rethisha 2003
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/ 38

SITB3011 BLOCK CHAIN – UNIT 1

INTRODUCTION TO BLOCKCHAIN

1.1 Basics of Blockchain


“A blockchain is a continuously growing list of records, called blocks, which are linked and
secured using cryptography.” The concept is introduced by Satoshi Nakamoto 2009

Block
1. Data :“hello everyone”

2.Prev Hash:23432FRT123
3. Hash :123FFRE342

Blockchain

Figure 1.1. All blocks are cryptographically link together

Figure1.2 blockchain Features


Blockchain
➢ Blockchain is simply a data structure where each block is linked to another block in
a time- stamped chronological order

1
SITB3011 BLOCK CHAIN – UNIT 1

➢ It is a distributed digital ledger of an immutable public record of digital transactions.

➢ Every new record is validated across the distributed network before it is stored in a
block.

➢ All information once stored on the ledger is verifiable and auditable but not editable
.

➢ Each block is identified by its cryptographic signature.

➢ The first block of the blockchain is known as Genesis block

“To access data of the first ever created block ,you have to traverse from the last created
block to the first block”
How trading happens Using Current System

Figure 1.3 Traditional transactions


Ledger

A ledger is a record-keeping book that stores all the transactions of an organization.

Figure 1.4 Ledger


Problems with the current system
❑ Banks and other third parties take fees for transferring money

❑ Mediating costs increases transaction costs

❑ Minimum practical transaction size is limited;

❑ Financial exchanges are slow. Checking and low cost wire services take days to
complete

❑ System is opaque and lacks transparency and fairness

2
SITB3011 BLOCK CHAIN – UNIT 1

❑ Also, central authority in control can overuse the power and can create money as per
their own will

Figure 1.5 Traditional payments

We need a system which:


• Eliminates the need of middlemen or Third parties thereby making transaction costs
nil or negligible.

• Enhance transaction execution speeds and can facilitate instant reconciliation.

• Is transparent and tamper resistant in order to avoid manipulation or misuse.

• Currency creation is not in control of any central authority.

• Is regulated to maintain the value of the currency.

3
SITB3011 BLOCK CHAIN – UNIT 1

Distributed system attempt to solve the problem

Figure 1.6 Different network of systems


Distributed system enables a network of computers to maintain a collective
bookkeeping via internet this is open and is not in control of one party. it is available
in one ledger which is fully distributed across the network.

Figure 1.7 Centralized Vs Decentralized


• Most of the Internet applications we use every day are centralized, they are
owned by a particular company or person that provision and maintain the source
code toexecute on a computer, server or maybe even a cluster.

4
SITB3011 BLOCK CHAIN – UNIT 1

Decentralized Applications

Figure 1.8 Decentralized network


• Decentralized means no node is instructing any other node as to what to do.

• The code runs on a peer-to-peer network of nodes and no single node has control
over the dApp.

• Depending on the functionality of the dApp, different data structures can be used to
store the application data.

• Bitcoin uses a blockchain decentralized ledger of transactions.

5
SITB3011 BLOCK CHAIN – UNIT 1

Distributed Applications

Figure 1.9 Distributed applications


• Applications in which computation is distributed across components, communicate
and coordinate their actions by passing messages. The components interact with each
other in order to achieve a common goal.

• Some distributed applications examples are:

• CDN

• AWS

• Cloud Instances

• Google, Facebook, Netflix, etc Distributed system

Figure 1.10 Distributed system

6
SITB3011 BLOCK CHAIN – UNIT 1

• A System where two or more nodes work with each other in a coordinated fashion
in order to achieve a common outcome

• It’s modeled in such a way that end users see it as a single logical platform.
What is a node ?
• A node can be defined as an individual processing unit in a distributed system

• All nodes are capable of sending and receiving messages to and from each other.

Introduction – Blockchain
Blockchain technology is a distributed ledger technology originally proposed for the
crypto-currency Bitcoin.

FEATURES
– Immutable and tamper-proof data store

– Sequential Chain with Cryptographic hashing

– Trust-free Consensus-based transactions

– Decentralized peer-to-peer network

– Distributed shared ledger

What is Blockchain?
A blockchain is a decentralized, distributed public ledger where all transactions are
verified and recorded.
Blockchain is a system comprised of.
Transactions
Immutable ledgers
Decentralized peers
Encryption processes
Consensus mechanisms
Optional Smart Contracts

Transactions
As with enterprise transactions today, Blockchain is a historical archive of decisions and
actions taken
Proof of history, provides provenance

7
SITB3011 BLOCK CHAIN – UNIT 1

Immutable
As with existing databases, Blockchain retains data via transactions.
The difference is that once written to the chain, the blocks can be changed, but it is extremely
difficult to do so. Requiring rework on all subsequent blocks and consensus of each.
The transaction is, immutable, or indelible
In DBA terms, Blockchains are Write and Read only
Like a ledger written in ink, an error would be resolved with another entry.
Decentralized Peers

Rather than the centralized “Hub and Spoke” type of network, Blockchain is a
decentralized peer to peer network. Where each NODE has a copy of the ledger.
Legacy Network Blockchain Network Centralized DB Distributed
Ledgers

Figure 1.11 Legacy network Vs blockchain network


Encryption
Standard encryption practices.

Some Blockchains allow for “BYOE” (Bring Your Own Encryption)


All blocks are encrypted
Some Blockchains are public, some are private
Public Blockchains are still encrypted, but are viewable to the public, e.g.
https://www.blocktrail.com/BTC

8
SITB3011 BLOCK CHAIN – UNIT 1

Private Blockchains employ user rights for visibility, e.g.


Customer – Writes and views all data
Auditors – View all transactions
Supplier A – Writes and views Partner A data
Supplier B – Writes and views Partner B data
Consensus
Ensures that the next block in a blockchain is the one and only version of the
truth. Keeps powerful adversaries from derailing the system and successfully
forking the chain consensus algorithm is a process in computer science used to
achieve agreement on some information among the distributed systems.
The consensus algorithm was designed for the blockchain technology to achieve
reliability in a blockchain network having multiple nodes.

Figure 1.12 Consensus mechanism


Smart Contracts
Computer code
Provides business logic layer prior to block submission.
How Blockchain Works?

9
SITB3011 BLOCK CHAIN – UNIT 1

Figure 1.13 Blockchain working model

Figure 1.14 Blockchain Flow diagram


Elements of blockchain
• blockchain has five elements: Distribution, encryption, immutability,
tokenization and decentralization.

10
SITB3011 BLOCK CHAIN – UNIT 1

Figure 1.15 Features of blockchain


• Distribution: Blockchain participants are located physically apart from each
other and each node copy of a ledger that updates with new transactions as they
occur.

• Encryption: Blockchain uses technologies such as public and private keys to


record the data in the blocks securely.

• Immutability: Completed transactions are cryptographically signed, time-


stamped and sequentially added to the ledger.

• Tokenization: Transactions and other interactions in a blockchain involve the


secure exchange of value.

• Decentralization: Both network information and the rules for how the network
operates are maintained by nodes due to consensus mechanism.

11
SITB3011 BLOCK CHAIN – UNIT 1

Benefit of blockchain

Figure 1.16 Benefits of blockchain

Trustless: The blockchain is immutable and automates trusted transactions between


counterparties who do not need to know each other. Transactions are only executed
when programmed conditions are met by both parties.

Unstoppable: Once the conditions programmed into a blockchain protocol are met,
an initiated transaction cannot be undone, changed, or stopped. It’s going to execute
and nothing – no bank, government, or third party – can stop it.

Immutable: Records on a blockchain cannot be changed or tampered.

A new block of transactions is only added after a complex mathematical problem is


solved and verified by a consensus mechanism. Each new block has a unique
cryptographic key resulting from the previous block’s information and key being
added into a formula.

Decentralized: No single entity maintains the network. Unlike centralized banks,


decisions on the blockchain are made via consensus. Decentralization is essential
because it ensures people can easily access and build on the platform.

12
SITB3011 BLOCK CHAIN – UNIT 1

Lower Cost: In the traditional finance system, you pay third parties like banks to
process transactions. The blockchain eliminates these intermediaries and reduces
fees, with some systems returning fees to miners and stakes.

Peer-to-Peer: Cryptocurrencies like Bitcoin, let you send money directly to anyone,
anywhere in the world, without an intermediary like a bank charging transaction or
handling fees.

Transparent: Public blockchains are open-source software, so anyone can access


them to view transactions and their source code. They can even use the code to build
new applications and suggest improvements to the code. Suggestions are accepted or
rejected via consensus.

Universal Banking: anyone can access the blockchain to store money, it’s a great way to
protect against theft that can happen due to holding cash in physical locations.

Use cases

• Dubai has been able to integrate blockchain into eight industry sectors

• Real estate

• Tourism

• Security

• Transportation

• Finance

• Health

• Education.

• The end result is to become the world’s first blockchain city.

Cryptocurrency

• Cryptocurrency is a form of currency that exists solely in digital form.

• Cryptocurrency can be used to pay for purchases online without going through an
intermediary, such as a bank, or it can be held as an investment.

• Example: Bitcoin, Ethereum etc

13
SITB3011 BLOCK CHAIN – UNIT 1

How Do You Buy Crypto?

• You can buy cryptocurrencies through crypto exchanges, such as Coinbase, Kraken
or Gemini. In addition, some brokerages, such as WeBull and Robinhood, also allow
consumers to buy cryptocurrencies.

Example Cryptocurrencies

Blockchain Evolution

14
SITB3011 BLOCK CHAIN – UNIT 1

Figure 1.18 Evolution of blockchain

1.2 Public Ledger

Shared Ledger

Figure 1.19 Ledger

• Records all transactions across business network

• Shared between participants

• Participants have own copy through replication

• Permissioned, so participants see only appropriate transactions

• It is the shared system of record.

15
SITB3011 BLOCK CHAIN – UNIT 1

Figure 1.20 Features of Distributed Ledger

1.2 Blockchain as public ledger

How Distributed Ledgers

Work

Figure 1.21 illustration of distributed ledger

• Distributed ledgers are held, reorganized, and controlled by individuals called nodes.

• The database is constructed independently by each node.

16
SITB3011 BLOCK CHAIN – UNIT 1

• Every transaction occurring on the network is processed, and a conclusion on the


development of the database is created by each node.
• Based on the transaction, voting is carried out on the changes completed on the
database. All nodes participate in the voting, and if at least 51% of them agree, the
new transaction is accepted on the database.

• Afterward, the nodes update the versions of the database so that all the devices or
nodes will be of the same version.

• The new transaction is written onto a block on the blockchain.

• Nodes in Proof-of-Work blockchain are also called miners.

• When a miner successfully puts a new transaction into a block, they receive a reward.

• It requires a dedicated 24×7 computer power.

• It is the responsibility of miners to compute the cryptographic hash for new blocks.

• Whoever, among the miners, successfully finds the hash first, gets the reward.

• Miners dedicating more computational power to find the hash will be more
successful.

• However, as blocks keep generating, it becomes more difficult to find subsequent


hash scales.

• The goal is to keep a constant speed of generating the blocks.

Benefits of Distributed Ledgers

• Highly transparent, secure, tamper-proof, and immutable. After records are


written into distributed ledgers, they cannot be altered by any other party.

• The need for a third party is eliminated

• Inherently decentralized

• Highly transparent

Advantages of Distributed Ledgers

● It is secure because there is no third-party intervention.

17
SITB3011 BLOCK CHAIN – UNIT 1

● It is immutable once recorded cannot be intervened.

● The data is distributed so it is tamper-proof.


Disadvantages of Distributed ledger:

● The distributed ledger is spread along with the nodes so making it vulnerable to
attack.

● The transaction cost is high because of a larger network.

● The transaction speed is low because of the operation of a large number of nodes.

1.4 Types of blockchain


1. Public Blockchains

2. Private Blockchains

3. Consortiums Blockchains

4. Hybrid Blockchains

Public Blockchains

• Public blockchains are open, decentralized networks of computers accessible to


anyone wanting to request or validate a transaction (check for accuracy).

• Those (miners) who validate transactions receive rewards.

• Public blockchains use proof-of-work or proof-of-stake consensus.

• permission-less distributed ledger system.

• Anyone who has access to the internet can sign in on a blockchain platform to
become an authorized node and be a part of the blockchain network.

• Example: Bitcoin and Ethereum (ETH) blockchains.

18
SITB3011 BLOCK CHAIN – UNIT 1

Figure 1.22 public blockchain

A public blockchain has some characteristic features:

• Write-only, immutable, transparent data storage.


• It brings trust among the whole community of users

• Decentralized, no need for intermediaries.

• Consistent state across all participants.

• Resistant against malicious participants.

• Anyone can join the public blockchain.

Disadvantages

• They suffer from a lack of transaction speed.

Private Blockchains

• A Private Blockchain is just like a relational database i.e. fully centralized and owned
by a single organization.

• Private blockchains are not open, they have access restrictions.

• People who want to join require permission from the system administrator.

• They are typically governed by one entity, meaning they’re centralized.

• For example, Hyperledger is a private, permissioned blockchain.

Figure 1.23 private blockchain

19
SITB3011 BLOCK CHAIN – UNIT 1

Consortiums blockchain

Figure 1.24 Consortium blockchain

• Validation is conducted by known and identified members of the limited network of


nodes

• greater privacy since the information from verified blocks is not exposed to the
public.

• There are no transaction fees

• consensus is reached by a relatively small number of nodes in accordance to the


governance scheme.

• Increased scalability - Bitcoin’s block transmits only up to 1 Mb* (from 1500 to 2700
transactions) per 10 minutes, when a consortium blockchain can optimize it to 1000
and more transactions per second.

• A consortium platform is more flexible.

• voting-based system, it ensures low latency and superb speed.

Hybrid Blockchain

• like a consortium blockchain, but it is not.

20
SITB3011 BLOCK CHAIN – UNIT 1

• Hybrid blockchain is best defined as a combination of a private and public


blockchain.

• It has use-cases in an organization that neither wants to deploy a private blockchain


nor public blockchain and simply wants to deploy both worlds’ best.

• Example of Hybrid Blockchain: Dragonchain, XinFin’s Hybrid blockchain

Advantages

• Works in a closed ecosystem without the need to make everything public.

• Rules can be changed according to the needs.

• Hybrid networks are also immune to 51% attacks.

• It offers privacy while still connected with a public network.

• It offers good scalability compared to the public network.

Disadvantages

• Not completely transparent.

• Upgrading to the hybrid blockchain can be a challenge.

• There is no incentive for participating and contributing to the network.

Table 1.2 Types of blockchain

Public Private Hybrid

The hybrid blockchain is


The public a combination of the
Private blockchain is
blockchain is open public and private
controlled by owners
Definition to everyone where blockchain. This means
and access is limited
anyone can that some process is kept
to certain users.
participate. private and others
public.
The public The private blockchain Hybrid blockchain
blockchain is is only transparent to transparency depends on
Transparency completely the users who are how the owners set the
transparent. granted access. rules.

21
SITB3011 BLOCK CHAIN – UNIT 1

Public blockchain The private blockchain


incentivizes is limited and hence Hybrid blockchain can
Incentive participants for have no similar opt to incentivize users
growing the network. incentive as that of a if they want to.
public blockchain.
Can be used in Hybrid is best suited for
Private blockchain is
almost every projects that can neither
great for organization
industry. Good for go private or public and
blockchain
public projects. It is have a lack of trust. The
Use-case implementation as they
also good for supply chain is a great
require complete
creating example. It is also
control over their
cryptocurrency for effective in banking,
workflow.
commercial use. finance, IoT, and others.

Bitcoin, Litecoin,
Example Ripple, Corda Hyperledger
Ethereum

KYC needed No Yes Yes

Transactional
Costly Not so costly Not so costly
Cost

Carries basic
property of Yes Yes Yes
blockchain

1.5 Pillars of Blockchain

Figure 1.25 Pillars of blockchain

• Every Blockchain can be rated on the basis of 3 components: Decentralization,


Scalability, and Security.

22
SITB3011 BLOCK CHAIN – UNIT 1

• It is a challenge to keep all of these three components in balance. Usually, one of them
is partly sacrificed to get the other two.

• Scalability

• Decentralization (censorship resistance)

• Security

• security, scalability, and decentralization. These are among the most prominent
driving factors in ongoing development (privacy/anonymity is another contender).

Security:

• The network is secure from both internal and external flaws.

• Security is the most crucial concept, and without it, the technology would be unusable.

• Security is the most important of them all, as no one would use banks or Bitcoin without
it. For example, we could say the lack of security in has stopped us in adopting that
scalability solution.

Scalability:

• The technology must be able to grow to and handle a commercially viable scale. •

Scalability is required for the technology to gain broad adoption

Decentralization:

• The network must not, in practice, be vulnerable to control by a few entities.

• Decentralization is necessary to cut costs (middlemen) and to build trust.

23
SITB3011 BLOCK CHAIN – UNIT 1

1.6 Government Initiatives of Block Chain

Figure 1.26 Government Initiatives of Block Chain

Why Use Blockchain in Government Processes?

24
SITB3011 BLOCK CHAIN – UNIT 1

Figure 1.27 Benefits of Blockchain Government Initiatives

Blockchain Government
Use Cases e-Estonia digital
ID, e-tax, i-voting Georgia –
Land Registry

The project supplements the traditional land registry protocol with


Blockchain.
Malta – Academic Record
Using the Blockcerts app, the citizen enlists their academic institution as an issuer of
certificates.
Switzerland – Decentralized Identity
limited to residential proof in its first phase
Blockchain for Government – The Obstacles
Scalability
Risk of private-key theft and the consequent data
breach Lack of Blockchain awareness

25
SITB3011 BLOCK CHAIN – UNIT 1

The ideal case blockchain implementation - India

Figure 1.28 blockchain initiatives

1.7 Bitcoin
• Released in 2008 by Satoshi Nakamoto.

• Focus on crypto-currencies and micro-payments

• Proof of Work Consensus

Bitcoin vs.

bitcoins

Bitcoin is

the system

bitcoins are

the units

What is Bitcoin?

• A peer-to-peer internet currency that allows decentralized transfers of value


between individuals and businesses.

26
SITB3011 BLOCK CHAIN – UNIT 1

Before Bitcoin

• DigiCash (1989): The 1st Electronic Cash System


- David Chaum’s company, featuring ecash (1983)

- Ecash notes backed by fiat from bank

- Relied on blind signatures

• The idea was published in 2009 by an pseudonymous person/group of people, named


Satoshi Nakamoto.

Goal with Bitcoin was:

- To create a trustless system, using cryptography

- Solve double-spending problem of previous digital currencies

- Create digital assets that can be owned, with proof of ownership

Creating a currency from scratch

• Motivation

• Distrust of financial institutions

• Transaction costs

• Primary concerns

• Transaction security

• Double spends

Distrust of financial institutions

• Any noncash transaction requires a trusted third-party administrator—commonly a


bank or financial service provider.

• The system forces participants to trust financial institutions that are not always
trustworthy.

Transaction security

• Two levels of verification

• Source is legitimate

27
SITB3011 BLOCK CHAIN – UNIT 1

• Coins are legitimate

• Public/private key verification ensures the legitimacy


Double spends

• If the money is just digital codes, why not copy and paste to make more money?

• Timestamps

• Hashes

• Block chain

• Timestamp

• Each transaction is packaged and publicly recorded in the order it was carried out.

• Hash

• The time-stamped group of transactions are given a unique algorithmically derived


number

Bitcoin

• Bitcoin is the official first cryptocurrency that had been released in 2009. It is
basically a digital currency and only exists electronically.

• Bitcoin is the first successful electronic cash system and coincidentally, the first
instance of a successful Blockchain.

• Secure, trustless, borderless

• No bank needed to authorize/process transactions

• Transactions are stored on a distributed ledger

Bitcoin introduced the concept of cryptocurrency; decentralized digital money secured by


cryptography, and used to create valuable digital assets that cannot be counterfeited.

Bitcoin transactions are authorized in a peer-to-peer network.

• Each node stores the history of the chain of blocks, containing validated transactions

• Counterfeiting is impossible because if one node’s history is corrupted the others


stay the same, and no central authority (i.e. bank) needs to confirm; this is called
decentralization

28
SITB3011 BLOCK CHAIN – UNIT 1

• Unlike previous P2P network models, members of the Bitcoin network are
incentivized to participate through cryptocurrency.

• Specifically, the incentive is for the people who mint (create) Bitcoin, called miners.

Figure 1.28 before and after bitcoin

Bitcoin Properties

• Bitcoins can be possessed.

• Bitcoins can be transferred.

• Bitcoins are impossible to copy.

Mining bitcoins

• Miners solve complicated algorithms to find a solution called a hash.

• Finding a hash creates a block that is used to process transactions.

• Each new block is added to the block chain.

• Until there are 21 million bitcoins, miners are paid for finding a hash in new coin.

• After 21 million, miners will charge transaction fees for creating a new block.

• The amount paid per hash goes down by half about every 4 years.

29
SITB3011 BLOCK CHAIN – UNIT 1

Owning bitcoins
• Users create accounts called wallets.

• Wallets are secured using passwords and contain the private keys used for
transferring bitcoins.

Wallets

• A wallet is a combination of public address and private key.

Figure 1.30 botcoin wallets

Hardware wallets

• Most popular hardware wallets are Ledger Nano S and Trezor.

Figure 1.31 Hardware Walet

• Hardware wallets are hardware devices that individually handle public addresses and
keys.

30
SITB3011 BLOCK CHAIN – UNIT 1

• It looks like a USB with OLED screen and side buttons.

• when you open a wallet (in the hardware wallet or software wallet) you are provided
with 2 pair of keys (sometimes more).

• Public key and the private key.

• public key is used to generate the public cryptocurrency address you can use to
receive the cryptocurrency,

• the private key is used to sign the transactions confirming your ownership over it. •

This is a reason why private key must be kept secret

Paper Wallets

• It is a physically printed QR coded form wallet.

• Some wallets allow downloading the code to generate new addresses offline.

Figure 1.32 Paper Wallet

Desktop Wallet

• Desktop wallets are programs that store and manage the private key for your
Bitcoins on your computer’s hard drive.

31
SITB3011 BLOCK CHAIN – UNIT 1

Figure 1.33 Desktop Wallet

Mobile wallets

• A mobile wallet is a virtual wallet that stores payment card information on a mobile
device.

• They are quite convenient as it uses QR codes for transactions • Some mobile

wallets are Coinomi and Mycelium

32
SITB3011 BLOCK CHAIN – UNIT 1

Figure 1.34 Mobile Wallet

Web Wallets

• These wallets are accessed by internet browsers.

• They are the least secure wallets.

• They are not the same as hot wallets.

• They are ideal for small investments and allow quick transactions.

• Some of these are MetaMask and Coinbase.

Figure 1.35 Web Wallet

33
SITB3011 BLOCK CHAIN – UNIT 1

Bitcoin Transactions

Figure 1.36 Bitcoin Transactions

• A full node is basically an electronic bookkeeper, and anybody in the world can set up
and run one.

Each node has a complete copy of the public ledger – that’s a record of every Bitcoin
transaction

The Bitcoin lifecycle

• Sender wants to send 1 Bitcoin to Receiver. This is what is going to happen:

34
SITB3011 BLOCK CHAIN – UNIT 1

Figure 1.38 Bitcoin Life cycle

1. Sender creates a transaction.


2. Sender's bitcoin wallet validates the transaction.

3. The transaction is sent to Mempool.

4. Miners get the transaction from Mempool and start mining the block using a
consensus algorithm.

5. After the block is fully mined, it is added to the network.

6. The chain validates the new block and every peer in the network will get the
blockchain with the new block added.

7. Finally, the Receiver get your BTCs

Mempool

• The Mempool (Shortcut for Memory Pool) is where the transactions stay until the
miner is ready to get them.

• In the bitcoin's blockchain, the miner prioritizes the biggest transactions over the
smallest ones.

• This happens because here is where the miner makes money.

35
SITB3011 BLOCK CHAIN – UNIT 1

• Miner "mine" the block through the consensus algorithm.

1.8 Smart Contract


• A smart contract is a self-executing contract with the terms of the agreement between
buyer and seller being directly written into lines of code.

• The code and the agreements contained therein exist across a distributed,
decentralized blockchain network.

• The code controls the execution, and transactions are trackable and irreversible.

Figure 1.41 illustration of Smart contract

• Smart contracts work by following simple “if/when…then…” statements that are


written into code on a blockchain.

• A network of computers executes the actions when predetermined conditions have


been met and verified.

• These actions could include releasing funds to the appropriate parties, registering a
vehicle, sending notifications, or issuing a ticket.

• The blockchain is then updated when the transaction is completed.

36
SITB3011 BLOCK CHAIN – UNIT 1

• That means the transaction cannot be changed, and only parties who have been
granted permission can see the results.

• Within a smart contract, there can be as many stipulations as needed to satisfy the
participants that the task will be completed satisfactorily.

• Participants must determine how transactions and their data are represented on the
blockchain.

• Participants agree on the “if/when...then…” rules that govern those transactions,


explore all possible exceptions, and define a framework for resolving disputes.
• The smart contract can be programmed by a developer.

organizations that use blockchain for business provide templates, web interfaces,
and other online tools to simplify structuring smart contracts.

Benefits of smart contracts

Speed, efficiency and accuracy

Once a condition is met, the contract is executed immediately. Because smart contracts are
digital and automated, there’s no paperwork to process. No time spent reconciling errors
that often result from manually filling in documents.

Trust and transparency

Because there’s no third party involved, and because encrypted records of


transactions are shared across participants, there’s no need to question whether
information has been altered for personal benefit.

Security

Blockchain transaction records are encrypted, which makes them very hard to hack.

Moreover, because each record is connected to the previous and subsequent records on a
distributed ledger, hackers would have to alter the entire chain to change a single record.

Savings

Smart contracts remove the need for intermediaries to handle transactions and, by
extension, their associated time delays and fees.

Applications of smart contracts

37
SITB3011 BLOCK CHAIN – UNIT 1

Smart contracts can be used across industries to streamline and automate doing business
around the world.

Government - voting system

Management single ledger as a source of trust, accuracy, transparency, and

automated system

Supply chain automates tasks and payment

Automobile with the help of smart contract insurance company

can be connected for claim

Real Estate

No need of Brokers, real estate agents

38

You might also like