SlideShare a Scribd company logo
GITATHON
1.0
Unit-1 Introduction to blockchain
technology
Index
• THEORY: Introduction to Blockchain Technology , History and evolution of Blockchain , Key concepts:
decentralization, consensus mechanisms - cryptographic hashing - Types of Blockchains , Public vs.
private blockchains , Permissioned vs. permissionless blockchains , Hybrid blockchains - Use Cases
and Applications of Blockchain , Cryptocurrencies and digital assets , Smart contracts and
decentralized applications (DApps) , Supply chain management, healthcare, finance, etc.
• PROGRAM : Solidity: Introduction to Solidity - Syntax and Data Types - Variables and Data Structures
- Functions and Function Modifiers, Smart Contracts Development - Writing simple smart contracts -
Events and Error Handling - Introduction to Remix IDE
• PRACTICAL: Solidity Syntax and Data Types - Smart Contract Development with Remix IDE
Experiment 1: Write a Solidity contract that defines variables of different data types (uint, string,
address, etc.) and performs basic operations on them, such as arithmetic operations and
concatenation. Experiment 2: Develop a simple smart contract using Remix IDE that implements a
basic voting system. Deploy the contract on a local Ethereum test network using Remix and interact
with it through the Remix interface.
Introduction
• Blockchain technology, originally
introduced through the creation of Bitcoin
in 2008 by an anonymous person or group
of people using the pseudonym Satoshi
Nakamoto, has since evolved into a
revolutionary concept with far-reaching
implications across various industries. At its
core, blockchain is a decentralized,
distributed ledger technology that enables
secure and transparent peer-to-peer
transactions without the need for
intermediaries.
Key concepts of blockchain
1.Decentralization: Blockchain operates on a decentralized network of computers (nodes), where each
node stores a copy of the entire blockchain. This decentralization ensures that there is no single point of
failure, making the system more resilient and tamper-resistant.
2.Cryptography: Cryptography is used to secure the transactions and control the creation of new units. It
ensures that only authorized parties can access and modify the data on the blockchain. Public and
private cryptographic keys are used to authenticate identities and validate transactions.
3.Immutability: Once recorded on the blockchain, transactions cannot be altered or deleted. This
immutability ensures the integrity of the data and provides a reliable record of transactions.
4.Consensus Mechanisms: Blockchain networks rely on consensus mechanisms to validate and confirm
transactions. Different consensus algorithms, such as Proof of Work (PoW) and Proof of Stake (PoS),
govern how nodes agree on the validity of transactions and maintain the integrity of the blockchain.
Types of Blockchain
• Public Blockchain
A public blockchain is one where anyone is free to join and
participate in the core activities of the blockchain network.
Anyone can read, write, and audit the ongoing activities on a
public blockchain network, which helps achieve the self-
governed, decentralized nature often touted when blockchain is
discussed
Advantages and disadvantages
A public network operates on an incentivizing scheme that
encourages new participants to join and keep the network agile.
Public blockchains offer a particularly valuable solution from the
point of view of a truly decentralized, democratized, and
authority-free operation.
The primary disadvantage to secured public blockchains is the
heavy energy consumption required to maintain them. The
concern is a consensus mechanism that requires participants to
compete to validate the information and receive a reward for
letting the network use their processing power.
Private blockchain
• Participants can join a private blockchain network only
through an invitation where their identity or other
required information is authentic and verified. The
validation is done by the network operator(s) or by a
clearly defined set protocol implemented by the
network through smart contracts or other automated
approval methods.
• Advantages and disadvantages
A private blockchain is not decentralized. It is a distributed
ledger that operates as a closed database secured with
cryptographic concepts and the organization's needs. Only those
with permission can run a full node, make transactions, or
validate/authenticate the blockchain changes.
While purposefully designed for enterprise applications, private
blockchains lose out on many of the valuable attributes of
permissionless systems simply because they are not widely
applicable. They are instead built to accomplish specific tasks and
functions.
In this respect, private blockchains are susceptible to data
breaches and other security threats.
Permissionless
vs
Permissioned
blockchain
Hybrid Blockchain
• A hybrid blockchain combines the features of both public and private blockchains, offering a flexible and
customizable approach to meet the diverse needs of businesses and organizations. In a hybrid blockchain, certain
data and transactions are accessible to the public, while others are restricted to authorized participants.
• Key Characteristics of Hybrid Blockchain:
• 1Public/Private Integration: Hybrid blockchains allow for the integration of public and private networks, enabling
organizations to leverage the benefits of both models. This integration facilitates interoperability and data sharing
while maintaining privacy and control.
• 2.Customization: Organizations can customize the level of decentralization, privacy, and accessibility according to
their specific requirements. This flexibility makes hybrid blockchains suitable for a wide range of applications, from
supply chain management to financial services.
• 3.Scalability: Hybrid blockchains can scale more efficiently than traditional public blockchains, as they can offload
certain transactions to private networks while still benefiting from the security and transparency of the public
blockchain.
Use Cases
• Blockchain can also be used to reduce fraud and other trust-related issues in digital ad buying.
Blockchain has a wide range of applications in healthcare, including improving payment
processing, electronic medical records, provider directories, and data security and exchange.
On a blockchain-based platform, artists can upload original works, self-publish, control
licensing options, and manage distributions.
• 1. Money transfers The original concept behind the invention of blockchain technology is still
a great application. Money transfers using blockchain can be less expensive and faster than
using existing money transfer services. This is especially true of cross-border transactions,
which are often slow and expensive
• 2. Financial exchanges Many companies have popped up over the past few years offering
decentralized cryptocurrency exchanges. Using blockchain for exchanges allows for faster and
less expensive transactions
• 3. Insurance Using smart contracts on a blockchain can provide greater transparency for
customers and insurance providers. Recording all claims on a blockchain would keep
customers from making duplicate claims for the same event.
• 4.Voting If personal identity information is held on a blockchain, that puts us just one step
away from also being able to vote using blockchain technology
• 5.Non-fungible tokens Non-fungible tokens, or NFTs, are commonly thought of as ways to
own the rights to digital art. Since the blockchain prevents data from existing in two places,
putting an NFT on the blockchain guarantees that only a single copy of a piece of digital art
exists
Applications
CRYPTOCURRENCY AND DIGITAL
ASSETS
• Cryptocurrency is like digital money that exists only on computers and is not
controlled by any government or bank. It's made possible by a technology
called blockchain, which keeps track of all transactions securely. People can
use cryptocurrency to buy things online, invest, or send money to others, just
like regular money, but it's all digital and decentralized. Popular examples
include Bitcoin and Ethereum.
• Digital assets refer to any form of content or data that exists in a digital
format and has economic value. These assets can include various types of
files such as images, videos, audio recordings, documents, software, and
even virtual currencies like cryptocurrencies. Digital assets can be owned,
bought, sold, and traded similarly to physical assets, but they exist solely in
digital form and are often stored or transferred electronically. Examples of
digital assets include digital art, music downloads, e-books, domain names,
online subscriptions, and more. Digital assets like cryptocurrencies, NFTs and
other tokens are past "emerging" - they're here to stay
Smart
Contracts
• Blockchain technology has a wide range of use cases and applications
across various industries. Here are some notable ones: Smart
Contracts- Blockchain enables the execution of smart contracts,
which are selfexecuting contracts with the terms of the agreement
directly written into code. These contracts automatically enforce and
execute themselves when predefined conditions are met, without the
need for intermediaries. A smart contract is an electronic contract
that can be executed automatically. Smart contracts use blockchain
technology and can be programmed to execute when-and only when-
specific conditions are met. Smart contracts, once published to a
blockchain, are immutable and always visible to all participants in the
blockchain.
• These are some of the use cases for smart contracts:
• Automate workflows
• Record property ownership
• Make elections more efficient
• Reduce or eliminate legal fees
• Reduce insurance fraud
• Protect sensitive medical information
Decentralized Applications
• If you understand smart contracts, it's easier to understand
decentralized applications (dApps). Decentralized apps
frequently use blockchain technology in two ways:
• To support features. Decentralized apps can use smart
contracts to support their core features.
• To decentralize control. Creators of a dApp may deploy the
entire set of code to the blockchain, totally relinquishing
control to the community that uses it. No single individual
controls this type of dApp, including it's developer #How
decentralized applications work How can a project function if
its management is completely decentralized? An app with
decentralized governance uses a predetermined consensus
mechanism, such as proof of stake or proof of work, to create
a technologically automated process for decision making.
Examples of decentralized apps:
• BitTorrent: Perhaps among the best-known dApp platforms,
this decentralized application supports peer-to-peer file
sharing. BitTorrent is integrated with the TRON (TRX)
blockchain.
• Aave: Aave is a decentralized liquidity platform that uses
blockchain-based protocols to operate. Aave users can lend,
borrow, and stake cryptocurrency, plus earn interest on
deposits
Supply Chain
Management
• Supply chain management using blockchain involves using blockchain
technology to enhance the efficiency, transparency, and security of
supply chain processes. Here's how it works:
• 1. Transparency-Blockchain provides a transparent and immutable
ledger where all transactions and events related to the supply chain
are recorded. Each participant in the supply chain, such as
manufacturers, suppliers, distributors, and retailers, can view and
verify the information recorded on the blockchain, leading to greater
transparency and trust.
• 2. Traceability- With blockchain, every step of the supply chain can be
traced back to its origin. Each product or component is assigned a
unique digital identifier, which is recorded on the blockchain along
with relevant information such as its source, manufacturing date,
location, and ownership history. This enables quick and accurate
traceability in case of recalls, quality issues, or compliance
requirements.
• 3. Security - Blockchain's decentralized and cryptographic nature
ensures that data stored on the blockchain is tamper-proof and
resistant to unauthorized alterations. This enhances the security of
sensitive supply chain information, such as product specifications,
contracts, and payment records, reducing the risk of fraud,
counterfeiting, and data breaches.
• 4. Efficiency- By streamlining data sharing and eliminating
intermediaries, blockchain can improve the efficiency of supply chain
processes. Smart contracts, which are self-executing contracts with
predefined rules encoded on the blockchain, can automate and
enforce agreements between parties, such as payment terms, delivery
schedules, and compliance requirements, reducing paperwork,
delays, and disputes.
• 5.Collaboration- Blockchain facilitates greater collaboration and
coordination among supply chain participants by providing a single
source of truth that is accessible to all authorized parties in real-time.
This enables better communication, coordination, and decision-
making across the entire supply chain network, leading to improved
inventory management, production planning, and customer service.
In Healthcare
Healthcare in blockchain involves using blockchain
technology to improve various aspects of the healthcare
industry, including patient data management,
interoperability, drug traceability, and medical research.
Here's how it works:
1.Patient Data Management- Blockchain enables secure
and decentralized storage of patient health records. Each
patient has their own encrypted digital identity on the
blockchain, and their medical records are linked to this
identity. Patients have control over who can access their
data, ensuring privacy and security.
2. Interoperability- Blockchain facilitates the exchange of
healthcare data between different healthcare providers,
systems, and organizations. It allows for seamless
sharing of patient information while maintaining data
integrity and security. This interoperability improves care
coordination and enables better healthcare outcomes.
3. Drug Traceability- Blockchain can be used to track the
entire lifecycle of pharmaceutical products, from
manufacturing to distribution to consumption. Each drug
is assigned a unique digital identifier, and its journey
through the supply chain is recorded on the blockchain.
This ensures transparency, authenticity, and safety of
medications, helping to prevent counterfeit drugs and
improve patient safety
Healthcare
In Finance
• Finance in blockchain means using blockchain technology to make financial transactions faster, more secure,
and more transparent. Here's how it works:
• 1. Fast Transactions- Blockchain allows people to send money or make transactions directly to each other
without needing a bank or other middlemen. Transactions can happen quickly because blockchain operates
24/7 and doesn't depend on traditional banking hours.
• 2. Secure Transactions- Blockchain uses cryptography to secure transactions, making them almost impossible
to tamper with. Each transaction is recorded in a digital ledger that's distributed across many computers, so
even if one computer fails or gets hacked, the information remains safe and accessible.
• 3. Transparency- Blockchain provides a transparent record of all transactions. Anyone can view the
transaction history, but personal information remains private and encrypted. This transparency helps build
trust in financial transactions and reduces the risk of fraud.
• 4.Decentralization- Blockchain is decentralized, meaning there's no single authority or institution controlling
it. Instead, transactions are verified and recorded by a network of computers, making it resilient to
censorship and manipulation.
Solidity
• Introduction to Solidity
• Solidity is a high-level programming
language used for writing smart contracts
on blockchain platforms, notably
Ethereum. Introduced in 2014 by Gavin
Wood, it's specifically designed for creating
decentralized applications (DApps) and
executing smart contracts. Solidity
resembles JavaScript and is known for its
simplicity and suitability for blockchain
development. It allows developers to
define data structures, functions, and logic
to govern how smart contracts behave on
the blockchain. Smart contracts written in
Solidity are executed on the Ethereum
Virtual Machine (EVM), enabling trustless
and immutable execution of code.
Syntax and Data Types
• Boolean :The Boolean data type returns ‘1' when the condition is true and ‘0'
when it is false, depending on the status of the condition.
• Integer : You can sign or unsign integer values in Solidity. It also supports runtime
exceptions and the ‘uint8' and ‘uint256' keywords.
• String :Single or double quotes can denote a string.
• Modifier :Before executing the code for a smart contract, a modifier often
verifies that any condition is rational.
• Array :The syntax of Solidity programming is like that of other OOP languages,
and it supports both single and multidimensional arrays.
Variables
• Solidity supports three types of variables.
• State Variables − Variables whose values are permanently stored in a contract storage.
• Local Variables − Variables whose values are present till function is executing.
• Global Variables − Special variables exists in the global namespace used to get information
about the blockchain.
• Solidity is a statically typed language, which means that the state or local variable type
needs to be specified during declaration. Each declared variable always have a default value
based on its type. There is no concept of "undefined" or "null".
Structure
• There are different basic data types available in Solidity such as
uint(unsigned Integers, bool, array, and string. But as a blockchain
developer, you may need a flexible data type that you can define by
yourself. A struct is a data structure format in Solidity where variables of
diverse data types can be bundled into one variable or a custom-made
type. Once the data types are grouped into a struct data type, the struct
name represents the subsets of variables present in it.
• Defining a Struct
• To define a Struct, you must have to use the struct keyword. The struct
keyword defines a user-defined data type, with more than one member.
The format of the struct statement is given as follows:
• Syntax
• struct struct_name {
type1 type_name_1;
type2 type_name_2;
type3 type_name_3;
}
Function and function
modifiers
• In Solidity, functions are the basic units of code
that perform specific tasks or operations. They
can be defined within contracts to encapsulate
functionality.
• Function modifiers are special code snippets in
Solidity that can be used to add behavior to
functions. They allow you to define conditions
that must be met before a function can be
executed, such as checking permissions or
validating inputs.
Smart Contracts Development
• Smart contracts development in
Solidity involves writing code in the
Solidity programming language to
create self-executing contracts that
automatically enforce the terms of an
agreement when certain conditions are
met. These contracts are deployed on
blockchain platforms like Ethereum and
enable decentralized applications
(DApps) to run autonomously without
the need for intermediaries.
Simple Smart Contract
• This simple smart contract allows for
depositing and withdrawing funds. It stores an
owner's address and a value, allowing the
owner to deposit and withdraw funds. You can
deploy this contract on the Ethereum
blockchain and interact with it using functions
like deposit and withdraw.
Events and Error Handling
• Events in programming refer to actions or
occurrences detected by the program that
may require a response. Error handling, on
the other hand, deals with managing
unexpected or erroneous situations that
occur during program execution, ensuring
the program can gracefully recover or
terminate without causing further issues.
Introduction to Remix
IDE
• Remix IDE is a web-based integrated
development environment (IDE) for
Ethereum smart contract development.
It offers features like code editing,
debugging, testing, and deployment, all
within a browser interface. With Remix,
developers can efficiently build, test,
and deploy smart contracts on the
Ethereum blockchain.
Experiment 1: Write a Solidity contract that defines variables of different
data types (uint, string, address, etc.) and performs basic operations on
them, such as arithmetic operations and concatenation
• This contract defines three variables: myUint, myString,
and myAddress. The myUint variable is of type uint, which is a
256-bit unsigned integer. The myString variable is of
type string, which is a variable-length
string. The myAddress variable is of type address, which is a
20-byte value that represents an Ethereum address.
• The contract also defines two
functions: addUint() and concatenateString(). The addUint() fu
nction takes two uint values as input and returns their
sum. The concatenateString() function takes two string values
as input and returns their concatenation.
• Finally, the contract defines two functions that call the basic
operations
functions: addMyUints() and concatenateMyStrings(). The add
MyUints() function simply calls the addUint() function with
the myUint variable and the value 1 as
input. The concatenateMyStrings() function simply calls
the concatenateString() function with the myString variable
and the value "!" as input.
• To use this contract, you would first need to compile it and
deploy it to the Ethereum blockchain. Once the contract is
deployed, you can call
Experiment 2: Develop a simple smart contract
using Remix IDE that implements a basic voting
system. Deploy the contract on a local Ethereum
test network using. Remix and interact with it
through the Remix interface.
• Steps to deploy and interact with the contract using Remix IDE:
• Open Remix IDE (https://remix.ethereum.org/).
• Create a new file named VotingSystem.sol.
• Paste the above code into the editor.
• Compile the contract by selecting the Solidity compiler version and
clicking on the "Compile" tab.
• Deploy the contract by selecting the "Deploy & Run Transactions" tab.
• Under the "Environment" dropdown, select "Injected Web3" to connect
to your local Ethereum test network (e.g., Ganache).
• Click on the "Deploy" button to deploy the contract.
• Once the contract is deployed, you can interact with it through the Remix
interface.
• To vote, call the vote() function with the desired option as the parameter.
• To close the voting, call the closeVoting() function (only the contract
owner can do this)

More Related Content

PPTX
Blockchain
PPTX
Blockchain Technology Unit 4.pptxmmmmmmmmm
PPTX
A Comprehensive Overview of Blockchain Technology and Its Various Types
PDF
Blockchain-Technology (2).pdf cryptocurrency
PPTX
Foundation to blockchain - A guide to Blockchain Tech
PDF
Notes_1164_UNIT-2parent) block in the chain. Timestamp: It is a system th...
PDF
Notes_116es_116es_116es_116es_1163_UNIT1.pdf
PPTX
Block chain Technology with digital and social impacts.pptx
Blockchain
Blockchain Technology Unit 4.pptxmmmmmmmmm
A Comprehensive Overview of Blockchain Technology and Its Various Types
Blockchain-Technology (2).pdf cryptocurrency
Foundation to blockchain - A guide to Blockchain Tech
Notes_1164_UNIT-2parent) block in the chain. Timestamp: It is a system th...
Notes_116es_116es_116es_116es_1163_UNIT1.pdf
Block chain Technology with digital and social impacts.pptx

Similar to Introduction to blockchain technology and its applications (20)

PPTX
BLOCKCHAIN presentaion in computer application.pptx
PPTX
blockchaintechnology.pptxdfgfgfgfdgfdfdgfdg
PDF
Blockchain for Enterprise
PPTX
Blockchain (Apisha) types of blockchain.
PPTX
Blockchain Technology project .pptx
PPTX
Blockchain and Bitcoin
PDF
Blockchain and BPM - Reflections on Four Years of Research and Applications
PDF
Custom Blockchain App Development_ A Comprehensive Guide for 2024.pdf
PPTX
Block chauin techncology by engineer saniya samreen
PPTX
blockchaintechnologypptproject-221208214159-86e2bd7c.pptx
PPTX
Blockchain Technology brief ppt project.pptx
PPTX
MBA_MIS_YEAR 1_SEM 2_BLOCK CHAIN NOTES_AKTU
PPTX
Blockchain Basics
PDF
Blockchain notes b tech aktu by krazy kreation (kulbhushan)
DOCX
Blockchain technology.docx
PPTX
mukund.pptx
PPTX
Lecture 8 - BlockChain for ug students.pptx
PPTX
Overview-of-Blockchain-Technology-and-Ethereum.pptx
PPT
Blockchian introduction
PDF
Blockchain Technology | A Comprehensive Guide by Webtrack Technologies
BLOCKCHAIN presentaion in computer application.pptx
blockchaintechnology.pptxdfgfgfgfdgfdfdgfdg
Blockchain for Enterprise
Blockchain (Apisha) types of blockchain.
Blockchain Technology project .pptx
Blockchain and Bitcoin
Blockchain and BPM - Reflections on Four Years of Research and Applications
Custom Blockchain App Development_ A Comprehensive Guide for 2024.pdf
Block chauin techncology by engineer saniya samreen
blockchaintechnologypptproject-221208214159-86e2bd7c.pptx
Blockchain Technology brief ppt project.pptx
MBA_MIS_YEAR 1_SEM 2_BLOCK CHAIN NOTES_AKTU
Blockchain Basics
Blockchain notes b tech aktu by krazy kreation (kulbhushan)
Blockchain technology.docx
mukund.pptx
Lecture 8 - BlockChain for ug students.pptx
Overview-of-Blockchain-Technology-and-Ethereum.pptx
Blockchian introduction
Blockchain Technology | A Comprehensive Guide by Webtrack Technologies
Ad

Recently uploaded (20)

PDF
Approach and Philosophy of On baking technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
KodekX | Application Modernization Development
PDF
Machine learning based COVID-19 study performance prediction
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Modernizing your data center with Dell and AMD
PPTX
A Presentation on Artificial Intelligence
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
NewMind AI Monthly Chronicles - July 2025
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Approach and Philosophy of On baking technology
The Rise and Fall of 3GPP – Time for a Sabbatical?
Review of recent advances in non-invasive hemoglobin estimation
Reach Out and Touch Someone: Haptics and Empathic Computing
KodekX | Application Modernization Development
Machine learning based COVID-19 study performance prediction
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
NewMind AI Weekly Chronicles - August'25 Week I
Encapsulation_ Review paper, used for researhc scholars
Modernizing your data center with Dell and AMD
A Presentation on Artificial Intelligence
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Big Data Technologies - Introduction.pptx
Spectral efficient network and resource selection model in 5G networks
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Understanding_Digital_Forensics_Presentation.pptx
NewMind AI Monthly Chronicles - July 2025
The AUB Centre for AI in Media Proposal.docx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Ad

Introduction to blockchain technology and its applications

  • 1. GITATHON 1.0 Unit-1 Introduction to blockchain technology
  • 2. Index • THEORY: Introduction to Blockchain Technology , History and evolution of Blockchain , Key concepts: decentralization, consensus mechanisms - cryptographic hashing - Types of Blockchains , Public vs. private blockchains , Permissioned vs. permissionless blockchains , Hybrid blockchains - Use Cases and Applications of Blockchain , Cryptocurrencies and digital assets , Smart contracts and decentralized applications (DApps) , Supply chain management, healthcare, finance, etc. • PROGRAM : Solidity: Introduction to Solidity - Syntax and Data Types - Variables and Data Structures - Functions and Function Modifiers, Smart Contracts Development - Writing simple smart contracts - Events and Error Handling - Introduction to Remix IDE • PRACTICAL: Solidity Syntax and Data Types - Smart Contract Development with Remix IDE Experiment 1: Write a Solidity contract that defines variables of different data types (uint, string, address, etc.) and performs basic operations on them, such as arithmetic operations and concatenation. Experiment 2: Develop a simple smart contract using Remix IDE that implements a basic voting system. Deploy the contract on a local Ethereum test network using Remix and interact with it through the Remix interface.
  • 3. Introduction • Blockchain technology, originally introduced through the creation of Bitcoin in 2008 by an anonymous person or group of people using the pseudonym Satoshi Nakamoto, has since evolved into a revolutionary concept with far-reaching implications across various industries. At its core, blockchain is a decentralized, distributed ledger technology that enables secure and transparent peer-to-peer transactions without the need for intermediaries.
  • 4. Key concepts of blockchain 1.Decentralization: Blockchain operates on a decentralized network of computers (nodes), where each node stores a copy of the entire blockchain. This decentralization ensures that there is no single point of failure, making the system more resilient and tamper-resistant. 2.Cryptography: Cryptography is used to secure the transactions and control the creation of new units. It ensures that only authorized parties can access and modify the data on the blockchain. Public and private cryptographic keys are used to authenticate identities and validate transactions. 3.Immutability: Once recorded on the blockchain, transactions cannot be altered or deleted. This immutability ensures the integrity of the data and provides a reliable record of transactions. 4.Consensus Mechanisms: Blockchain networks rely on consensus mechanisms to validate and confirm transactions. Different consensus algorithms, such as Proof of Work (PoW) and Proof of Stake (PoS), govern how nodes agree on the validity of transactions and maintain the integrity of the blockchain.
  • 5. Types of Blockchain • Public Blockchain A public blockchain is one where anyone is free to join and participate in the core activities of the blockchain network. Anyone can read, write, and audit the ongoing activities on a public blockchain network, which helps achieve the self- governed, decentralized nature often touted when blockchain is discussed Advantages and disadvantages A public network operates on an incentivizing scheme that encourages new participants to join and keep the network agile. Public blockchains offer a particularly valuable solution from the point of view of a truly decentralized, democratized, and authority-free operation. The primary disadvantage to secured public blockchains is the heavy energy consumption required to maintain them. The concern is a consensus mechanism that requires participants to compete to validate the information and receive a reward for letting the network use their processing power.
  • 6. Private blockchain • Participants can join a private blockchain network only through an invitation where their identity or other required information is authentic and verified. The validation is done by the network operator(s) or by a clearly defined set protocol implemented by the network through smart contracts or other automated approval methods. • Advantages and disadvantages A private blockchain is not decentralized. It is a distributed ledger that operates as a closed database secured with cryptographic concepts and the organization's needs. Only those with permission can run a full node, make transactions, or validate/authenticate the blockchain changes. While purposefully designed for enterprise applications, private blockchains lose out on many of the valuable attributes of permissionless systems simply because they are not widely applicable. They are instead built to accomplish specific tasks and functions. In this respect, private blockchains are susceptible to data breaches and other security threats.
  • 8. Hybrid Blockchain • A hybrid blockchain combines the features of both public and private blockchains, offering a flexible and customizable approach to meet the diverse needs of businesses and organizations. In a hybrid blockchain, certain data and transactions are accessible to the public, while others are restricted to authorized participants. • Key Characteristics of Hybrid Blockchain: • 1Public/Private Integration: Hybrid blockchains allow for the integration of public and private networks, enabling organizations to leverage the benefits of both models. This integration facilitates interoperability and data sharing while maintaining privacy and control. • 2.Customization: Organizations can customize the level of decentralization, privacy, and accessibility according to their specific requirements. This flexibility makes hybrid blockchains suitable for a wide range of applications, from supply chain management to financial services. • 3.Scalability: Hybrid blockchains can scale more efficiently than traditional public blockchains, as they can offload certain transactions to private networks while still benefiting from the security and transparency of the public blockchain.
  • 9. Use Cases • Blockchain can also be used to reduce fraud and other trust-related issues in digital ad buying. Blockchain has a wide range of applications in healthcare, including improving payment processing, electronic medical records, provider directories, and data security and exchange. On a blockchain-based platform, artists can upload original works, self-publish, control licensing options, and manage distributions. • 1. Money transfers The original concept behind the invention of blockchain technology is still a great application. Money transfers using blockchain can be less expensive and faster than using existing money transfer services. This is especially true of cross-border transactions, which are often slow and expensive • 2. Financial exchanges Many companies have popped up over the past few years offering decentralized cryptocurrency exchanges. Using blockchain for exchanges allows for faster and less expensive transactions • 3. Insurance Using smart contracts on a blockchain can provide greater transparency for customers and insurance providers. Recording all claims on a blockchain would keep customers from making duplicate claims for the same event. • 4.Voting If personal identity information is held on a blockchain, that puts us just one step away from also being able to vote using blockchain technology • 5.Non-fungible tokens Non-fungible tokens, or NFTs, are commonly thought of as ways to own the rights to digital art. Since the blockchain prevents data from existing in two places, putting an NFT on the blockchain guarantees that only a single copy of a piece of digital art exists
  • 11. CRYPTOCURRENCY AND DIGITAL ASSETS • Cryptocurrency is like digital money that exists only on computers and is not controlled by any government or bank. It's made possible by a technology called blockchain, which keeps track of all transactions securely. People can use cryptocurrency to buy things online, invest, or send money to others, just like regular money, but it's all digital and decentralized. Popular examples include Bitcoin and Ethereum. • Digital assets refer to any form of content or data that exists in a digital format and has economic value. These assets can include various types of files such as images, videos, audio recordings, documents, software, and even virtual currencies like cryptocurrencies. Digital assets can be owned, bought, sold, and traded similarly to physical assets, but they exist solely in digital form and are often stored or transferred electronically. Examples of digital assets include digital art, music downloads, e-books, domain names, online subscriptions, and more. Digital assets like cryptocurrencies, NFTs and other tokens are past "emerging" - they're here to stay
  • 12. Smart Contracts • Blockchain technology has a wide range of use cases and applications across various industries. Here are some notable ones: Smart Contracts- Blockchain enables the execution of smart contracts, which are selfexecuting contracts with the terms of the agreement directly written into code. These contracts automatically enforce and execute themselves when predefined conditions are met, without the need for intermediaries. A smart contract is an electronic contract that can be executed automatically. Smart contracts use blockchain technology and can be programmed to execute when-and only when- specific conditions are met. Smart contracts, once published to a blockchain, are immutable and always visible to all participants in the blockchain. • These are some of the use cases for smart contracts: • Automate workflows • Record property ownership • Make elections more efficient • Reduce or eliminate legal fees • Reduce insurance fraud • Protect sensitive medical information
  • 13. Decentralized Applications • If you understand smart contracts, it's easier to understand decentralized applications (dApps). Decentralized apps frequently use blockchain technology in two ways: • To support features. Decentralized apps can use smart contracts to support their core features. • To decentralize control. Creators of a dApp may deploy the entire set of code to the blockchain, totally relinquishing control to the community that uses it. No single individual controls this type of dApp, including it's developer #How decentralized applications work How can a project function if its management is completely decentralized? An app with decentralized governance uses a predetermined consensus mechanism, such as proof of stake or proof of work, to create a technologically automated process for decision making. Examples of decentralized apps: • BitTorrent: Perhaps among the best-known dApp platforms, this decentralized application supports peer-to-peer file sharing. BitTorrent is integrated with the TRON (TRX) blockchain. • Aave: Aave is a decentralized liquidity platform that uses blockchain-based protocols to operate. Aave users can lend, borrow, and stake cryptocurrency, plus earn interest on deposits
  • 14. Supply Chain Management • Supply chain management using blockchain involves using blockchain technology to enhance the efficiency, transparency, and security of supply chain processes. Here's how it works: • 1. Transparency-Blockchain provides a transparent and immutable ledger where all transactions and events related to the supply chain are recorded. Each participant in the supply chain, such as manufacturers, suppliers, distributors, and retailers, can view and verify the information recorded on the blockchain, leading to greater transparency and trust. • 2. Traceability- With blockchain, every step of the supply chain can be traced back to its origin. Each product or component is assigned a unique digital identifier, which is recorded on the blockchain along with relevant information such as its source, manufacturing date, location, and ownership history. This enables quick and accurate traceability in case of recalls, quality issues, or compliance requirements. • 3. Security - Blockchain's decentralized and cryptographic nature ensures that data stored on the blockchain is tamper-proof and resistant to unauthorized alterations. This enhances the security of sensitive supply chain information, such as product specifications, contracts, and payment records, reducing the risk of fraud, counterfeiting, and data breaches. • 4. Efficiency- By streamlining data sharing and eliminating intermediaries, blockchain can improve the efficiency of supply chain processes. Smart contracts, which are self-executing contracts with predefined rules encoded on the blockchain, can automate and enforce agreements between parties, such as payment terms, delivery schedules, and compliance requirements, reducing paperwork, delays, and disputes. • 5.Collaboration- Blockchain facilitates greater collaboration and coordination among supply chain participants by providing a single source of truth that is accessible to all authorized parties in real-time. This enables better communication, coordination, and decision- making across the entire supply chain network, leading to improved inventory management, production planning, and customer service.
  • 15. In Healthcare Healthcare in blockchain involves using blockchain technology to improve various aspects of the healthcare industry, including patient data management, interoperability, drug traceability, and medical research. Here's how it works: 1.Patient Data Management- Blockchain enables secure and decentralized storage of patient health records. Each patient has their own encrypted digital identity on the blockchain, and their medical records are linked to this identity. Patients have control over who can access their data, ensuring privacy and security. 2. Interoperability- Blockchain facilitates the exchange of healthcare data between different healthcare providers, systems, and organizations. It allows for seamless sharing of patient information while maintaining data integrity and security. This interoperability improves care coordination and enables better healthcare outcomes. 3. Drug Traceability- Blockchain can be used to track the entire lifecycle of pharmaceutical products, from manufacturing to distribution to consumption. Each drug is assigned a unique digital identifier, and its journey through the supply chain is recorded on the blockchain. This ensures transparency, authenticity, and safety of medications, helping to prevent counterfeit drugs and improve patient safety
  • 17. In Finance • Finance in blockchain means using blockchain technology to make financial transactions faster, more secure, and more transparent. Here's how it works: • 1. Fast Transactions- Blockchain allows people to send money or make transactions directly to each other without needing a bank or other middlemen. Transactions can happen quickly because blockchain operates 24/7 and doesn't depend on traditional banking hours. • 2. Secure Transactions- Blockchain uses cryptography to secure transactions, making them almost impossible to tamper with. Each transaction is recorded in a digital ledger that's distributed across many computers, so even if one computer fails or gets hacked, the information remains safe and accessible. • 3. Transparency- Blockchain provides a transparent record of all transactions. Anyone can view the transaction history, but personal information remains private and encrypted. This transparency helps build trust in financial transactions and reduces the risk of fraud. • 4.Decentralization- Blockchain is decentralized, meaning there's no single authority or institution controlling it. Instead, transactions are verified and recorded by a network of computers, making it resilient to censorship and manipulation.
  • 18. Solidity • Introduction to Solidity • Solidity is a high-level programming language used for writing smart contracts on blockchain platforms, notably Ethereum. Introduced in 2014 by Gavin Wood, it's specifically designed for creating decentralized applications (DApps) and executing smart contracts. Solidity resembles JavaScript and is known for its simplicity and suitability for blockchain development. It allows developers to define data structures, functions, and logic to govern how smart contracts behave on the blockchain. Smart contracts written in Solidity are executed on the Ethereum Virtual Machine (EVM), enabling trustless and immutable execution of code.
  • 19. Syntax and Data Types • Boolean :The Boolean data type returns ‘1' when the condition is true and ‘0' when it is false, depending on the status of the condition. • Integer : You can sign or unsign integer values in Solidity. It also supports runtime exceptions and the ‘uint8' and ‘uint256' keywords. • String :Single or double quotes can denote a string. • Modifier :Before executing the code for a smart contract, a modifier often verifies that any condition is rational. • Array :The syntax of Solidity programming is like that of other OOP languages, and it supports both single and multidimensional arrays.
  • 20. Variables • Solidity supports three types of variables. • State Variables − Variables whose values are permanently stored in a contract storage. • Local Variables − Variables whose values are present till function is executing. • Global Variables − Special variables exists in the global namespace used to get information about the blockchain. • Solidity is a statically typed language, which means that the state or local variable type needs to be specified during declaration. Each declared variable always have a default value based on its type. There is no concept of "undefined" or "null".
  • 21. Structure • There are different basic data types available in Solidity such as uint(unsigned Integers, bool, array, and string. But as a blockchain developer, you may need a flexible data type that you can define by yourself. A struct is a data structure format in Solidity where variables of diverse data types can be bundled into one variable or a custom-made type. Once the data types are grouped into a struct data type, the struct name represents the subsets of variables present in it. • Defining a Struct • To define a Struct, you must have to use the struct keyword. The struct keyword defines a user-defined data type, with more than one member. The format of the struct statement is given as follows: • Syntax • struct struct_name { type1 type_name_1; type2 type_name_2; type3 type_name_3; }
  • 22. Function and function modifiers • In Solidity, functions are the basic units of code that perform specific tasks or operations. They can be defined within contracts to encapsulate functionality. • Function modifiers are special code snippets in Solidity that can be used to add behavior to functions. They allow you to define conditions that must be met before a function can be executed, such as checking permissions or validating inputs.
  • 23. Smart Contracts Development • Smart contracts development in Solidity involves writing code in the Solidity programming language to create self-executing contracts that automatically enforce the terms of an agreement when certain conditions are met. These contracts are deployed on blockchain platforms like Ethereum and enable decentralized applications (DApps) to run autonomously without the need for intermediaries.
  • 24. Simple Smart Contract • This simple smart contract allows for depositing and withdrawing funds. It stores an owner's address and a value, allowing the owner to deposit and withdraw funds. You can deploy this contract on the Ethereum blockchain and interact with it using functions like deposit and withdraw.
  • 25. Events and Error Handling • Events in programming refer to actions or occurrences detected by the program that may require a response. Error handling, on the other hand, deals with managing unexpected or erroneous situations that occur during program execution, ensuring the program can gracefully recover or terminate without causing further issues.
  • 26. Introduction to Remix IDE • Remix IDE is a web-based integrated development environment (IDE) for Ethereum smart contract development. It offers features like code editing, debugging, testing, and deployment, all within a browser interface. With Remix, developers can efficiently build, test, and deploy smart contracts on the Ethereum blockchain.
  • 27. Experiment 1: Write a Solidity contract that defines variables of different data types (uint, string, address, etc.) and performs basic operations on them, such as arithmetic operations and concatenation • This contract defines three variables: myUint, myString, and myAddress. The myUint variable is of type uint, which is a 256-bit unsigned integer. The myString variable is of type string, which is a variable-length string. The myAddress variable is of type address, which is a 20-byte value that represents an Ethereum address. • The contract also defines two functions: addUint() and concatenateString(). The addUint() fu nction takes two uint values as input and returns their sum. The concatenateString() function takes two string values as input and returns their concatenation. • Finally, the contract defines two functions that call the basic operations functions: addMyUints() and concatenateMyStrings(). The add MyUints() function simply calls the addUint() function with the myUint variable and the value 1 as input. The concatenateMyStrings() function simply calls the concatenateString() function with the myString variable and the value "!" as input. • To use this contract, you would first need to compile it and deploy it to the Ethereum blockchain. Once the contract is deployed, you can call
  • 28. Experiment 2: Develop a simple smart contract using Remix IDE that implements a basic voting system. Deploy the contract on a local Ethereum test network using. Remix and interact with it through the Remix interface. • Steps to deploy and interact with the contract using Remix IDE: • Open Remix IDE (https://remix.ethereum.org/). • Create a new file named VotingSystem.sol. • Paste the above code into the editor. • Compile the contract by selecting the Solidity compiler version and clicking on the "Compile" tab. • Deploy the contract by selecting the "Deploy & Run Transactions" tab. • Under the "Environment" dropdown, select "Injected Web3" to connect to your local Ethereum test network (e.g., Ganache). • Click on the "Deploy" button to deploy the contract. • Once the contract is deployed, you can interact with it through the Remix interface. • To vote, call the vote() function with the desired option as the parameter. • To close the voting, call the closeVoting() function (only the contract owner can do this)