SlideShare a Scribd company logo
3
Most read
4
Most read
12
Most read
Introduction
to Smart
Contracts
What Is A Blockchain?
● A blockchain is a ledger that keeps a shared record of all the transactions
distributed over a vast network of users.
● Key aspects of blockchain are-
○ Decentralization
○ Immutability
○ Trustless
○ Transparency
What are smart contracts?
● A smart contract is a program whose execution is
○ Decentralized
○ Immutable
○ Trustless
○ Transparent
● Analogous to traditional contracts,
○ A smart contract is an agreement that can be enforced through a blockchain.
● An example of a smart contract can send, receive and store money.
● It can also interact with other smart contracts or any computational systems
connected to the internet.
Traditional contract
Smart contract
Bitcoin also
supports smart contracts!
Smart contracts on bitcoin?!
● It's worth noting that bitcoin was the first to support basic smart contracts
○ network can transfer value from one person to another
○ network of nodes will only validate transactions if certain conditions are met.
● Multisig smart contracts, using features added to Bitcoin through
improvement proposals
● Smart contract functionality is not as programmable and extensible on Bitcoin
Intro to Ethereum
● Platform similar to Bitcoin but:
○ Ethereum uses Ethash(KECCAK-256) algorithm while bitcoin uses
sha256.
○ The block time is 12 seconds while in Bitcoin is 10 minutes.
○ Ethereum uses a Turing Complete programming language owing to
which almost any sort of algorithm can be written.
Ethereum Virtual Machine (EVM)
● Ethereum Virtual Machine is an environment which runs at an abstraction
layer straight above the underlying hardware.
● Ethereum uses its Turing Complete Virtual Machine for running and compiling
the codes.
● Any type of algorithm can be written in ethereum.
More examples of smart contracts
● Function as 'multi-signature' accounts, so that funds are spent only when a
required percentage of people agree
● Manage agreements between users, say, if one buys insurance from the
other.
● Provide utility to other contracts (similar to how a software library works)
● Store information about an application, such as domain registration
information or membership records.
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart Contracts

More Related Content

What's hot (20)

PPTX
Smart contract
Akhmad Daniel Sembiring
 
PDF
Introduction To Solidity
101 Blockchains
 
PDF
Blockchain and Smart Contracts (Series: Blockchain Basics)
Financial Poise
 
PDF
Introduction to Blockchain and Smart Contracts
Saad Zaher
 
PDF
An Introduction to Blockchain Technology
Niuversity
 
PPTX
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Simplilearn
 
PPTX
BLOCKCHAIN
Nitish sharma
 
PDF
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...
Edureka!
 
PDF
How To Get A Blockchain Job?
101 Blockchains
 
PDF
Ethereum-Cryptocurrency (All about Ethereum)
عطاءالمنعم اثیل شیخ
 
PDF
Examples of Smart Contracts
101 Blockchains
 
PPTX
Blockchain Technology
Remaisha Ali
 
PDF
How does blockchain work
Shishir Aryal
 
PDF
Introduction to Blockchain
Malak Abu Hammad
 
PPTX
Introduction to Blockchain
AIMDek Technologies
 
PDF
An Introduction to Blockchain
NexThoughts Technologies
 
PDF
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
Edureka!
 
PPTX
Basic introduction in blockchain, smart contracts, permissioned ledgers
Koen Vingerhoets
 
PDF
Blockchain Digital Transformation Presentation
101 Blockchains
 
PPTX
Creating Smart Contract
Deepak Aryal
 
Smart contract
Akhmad Daniel Sembiring
 
Introduction To Solidity
101 Blockchains
 
Blockchain and Smart Contracts (Series: Blockchain Basics)
Financial Poise
 
Introduction to Blockchain and Smart Contracts
Saad Zaher
 
An Introduction to Blockchain Technology
Niuversity
 
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Simplilearn
 
BLOCKCHAIN
Nitish sharma
 
Blockchain 101 | Blockchain Tutorial | Blockchain Smart Contracts | Blockchai...
Edureka!
 
How To Get A Blockchain Job?
101 Blockchains
 
Ethereum-Cryptocurrency (All about Ethereum)
عطاءالمنعم اثیل شیخ
 
Examples of Smart Contracts
101 Blockchains
 
Blockchain Technology
Remaisha Ali
 
How does blockchain work
Shishir Aryal
 
Introduction to Blockchain
Malak Abu Hammad
 
Introduction to Blockchain
AIMDek Technologies
 
An Introduction to Blockchain
NexThoughts Technologies
 
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
Edureka!
 
Basic introduction in blockchain, smart contracts, permissioned ledgers
Koen Vingerhoets
 
Blockchain Digital Transformation Presentation
101 Blockchains
 
Creating Smart Contract
Deepak Aryal
 

Similar to Introduction to Blockchain and Smart Contracts (20)

PDF
Smart contracts in Solidity
Felix Crisan
 
PPTX
Understanding Ethereum: The Future of Blockchain Technology
Intelisync
 
PDF
Building Apps with Ethereum Smart Contract
Vaideeswaran Sethuraman
 
PPTX
Introduction to Solidity and Smart Contract Development (9).pptx
Gene Leybzon
 
PDF
Smart contracts using web3.js
Felix Crisan
 
PDF
Blockchain Basics
Ali Ayyash
 
PPTX
Distributed Ledgers, Blockchains, and Smart Contracts
Dusan Andric
 
PDF
Fluent destry saul
Destry Saul
 
PPTX
Chapter 3.pptx
AvinashChoure2
 
PPTX
Ethereum
Brian Yap
 
PDF
EcoSummit 2016 in Berlin Presentation - ConsenSys / RWE
John Lilic
 
PDF
Implementing the business logic as a decentralized Smart Contracts
Digital Currency Summit
 
PPTX
The Foundation of Smart Contract Development on Ethereum
NAtional Institute of TEchnology Rourkela , Galgotias University
 
PDF
Blockchain & Insurance
Ankur Nandwani
 
PPTX
North Atlanta Blockchain - Hyperledger A Brief Overview
Prasadh Kannan
 
PDF
Interesting Facts About Ethereum Smart contract Development
Developcoins
 
PPTX
How to design, code, deploy and execute a smart contract
Joseph Holbrook, Chief Learning Officer (CLO)
 
PDF
Blockchain in a Nutshell
Shermin Voshmgir
 
PDF
Blockchain and cryptocurrency
Abhishek Kori
 
PPTX
Smart contract yo_Anuj thakur B-47.pptx
rvufgr
 
Smart contracts in Solidity
Felix Crisan
 
Understanding Ethereum: The Future of Blockchain Technology
Intelisync
 
Building Apps with Ethereum Smart Contract
Vaideeswaran Sethuraman
 
Introduction to Solidity and Smart Contract Development (9).pptx
Gene Leybzon
 
Smart contracts using web3.js
Felix Crisan
 
Blockchain Basics
Ali Ayyash
 
Distributed Ledgers, Blockchains, and Smart Contracts
Dusan Andric
 
Fluent destry saul
Destry Saul
 
Chapter 3.pptx
AvinashChoure2
 
Ethereum
Brian Yap
 
EcoSummit 2016 in Berlin Presentation - ConsenSys / RWE
John Lilic
 
Implementing the business logic as a decentralized Smart Contracts
Digital Currency Summit
 
The Foundation of Smart Contract Development on Ethereum
NAtional Institute of TEchnology Rourkela , Galgotias University
 
Blockchain & Insurance
Ankur Nandwani
 
North Atlanta Blockchain - Hyperledger A Brief Overview
Prasadh Kannan
 
Interesting Facts About Ethereum Smart contract Development
Developcoins
 
How to design, code, deploy and execute a smart contract
Joseph Holbrook, Chief Learning Officer (CLO)
 
Blockchain in a Nutshell
Shermin Voshmgir
 
Blockchain and cryptocurrency
Abhishek Kori
 
Smart contract yo_Anuj thakur B-47.pptx
rvufgr
 
Ad

Recently uploaded (20)

PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Ad

Introduction to Blockchain and Smart Contracts

  • 2. What Is A Blockchain? ● A blockchain is a ledger that keeps a shared record of all the transactions distributed over a vast network of users. ● Key aspects of blockchain are- ○ Decentralization ○ Immutability ○ Trustless ○ Transparency
  • 3. What are smart contracts? ● A smart contract is a program whose execution is ○ Decentralized ○ Immutable ○ Trustless ○ Transparent ● Analogous to traditional contracts, ○ A smart contract is an agreement that can be enforced through a blockchain. ● An example of a smart contract can send, receive and store money. ● It can also interact with other smart contracts or any computational systems connected to the internet.
  • 7. Smart contracts on bitcoin?! ● It's worth noting that bitcoin was the first to support basic smart contracts ○ network can transfer value from one person to another ○ network of nodes will only validate transactions if certain conditions are met. ● Multisig smart contracts, using features added to Bitcoin through improvement proposals ● Smart contract functionality is not as programmable and extensible on Bitcoin
  • 8. Intro to Ethereum ● Platform similar to Bitcoin but: ○ Ethereum uses Ethash(KECCAK-256) algorithm while bitcoin uses sha256. ○ The block time is 12 seconds while in Bitcoin is 10 minutes. ○ Ethereum uses a Turing Complete programming language owing to which almost any sort of algorithm can be written.
  • 9. Ethereum Virtual Machine (EVM) ● Ethereum Virtual Machine is an environment which runs at an abstraction layer straight above the underlying hardware. ● Ethereum uses its Turing Complete Virtual Machine for running and compiling the codes. ● Any type of algorithm can be written in ethereum.
  • 10. More examples of smart contracts ● Function as 'multi-signature' accounts, so that funds are spent only when a required percentage of people agree ● Manage agreements between users, say, if one buys insurance from the other. ● Provide utility to other contracts (similar to how a software library works) ● Store information about an application, such as domain registration information or membership records.

Editor's Notes

  • #10: A computer is Turing complete if it can solve any problem that a Turing machine can, given an appropriate algorithm and the necessary time and memory. Informally, however, calling something Turing complete means that it can execute any algorithm
  • #13: The first line specifies the compiler version for which the contract code is written. Carrot signifies that code is written for version 0.4.0 or any newer version that does not break functionality i.e upto 0.5.0. The smart contract will be compiled to bytecode. Bytecode is stored on the ethereum ledger along with this initial state of the contract is also set up as per the constructor code by the Ethereum Virtual Machine. Contract keyword simply defines a class. Here name of class is simple storage. Here no constructor and so the state, here it is stored data will be set to zero. There are mainly two types of functions read functions and write functions. set() function here is a write function because it updates the state of the contract. get() function is a read function as it is just returning the variable without changing any state.
  • #14: Address is a type like uint and stores ethereum address of size 160 bits. Mapping keyword refers to the type hashmap, here balances mapping stores coin balance corresponding to an address. Public keyword makes these variables readable from outside i.e a getter function is automatically compiled. For eg: anyone from outside can simply call the minter() function and that will return the current minter address. Events allow the convenient usage of the logging facilities. Here Sent event is defined which logs the address of sender receiver and the number of coins transacted. When send function is called it updates the state and also emits the sent event which can be listened by the user interface of a javascript dApp. “msg” is a global magic variable that stores properties such as the transaction sender’s address, function identifier, calldata, ether value sent to the contract. Here msg.sender refers to the transaction sender’s address. Different type of function modifiers are public - all can access external - Cannot be accessed internally, only externally internal - only this contract and contracts deriving from it can access private - can be accessed only from this contract Constructor sets up the minter variable value equal to the address of account that deployed this smart contract. Mint function can mint coins to a receiver address. If anyone could call this function that will be a problem. We add a condition such that only the smart contract owner can call this function. Send function simply transfers coins from sender’s address to the receivers address. Sender can send only if he has that many tokens in his account . This transaction has to be atomic i.e it is either complete or if there is any issue at third line the complete state would revert.