SlideShare a Scribd company logo
Building Apps with Ethereum Smart Contract
INTRODUCTION TO
ETHEREUM ECOSYSTEM
&
SMART CONTRACTS
NPD Meet @ Divum Corporate Services Pvt Ltd.
Jitendra Kumar.Balla & Vaideeswaran sethuraman
AGENDA
1. What is a
Blockchain?
2. Ethereum 3. Ethereum SMART
Contracts
CENTRALIZED
Issues:
Single point failure
Scaling
Inefficiency
All activities are managed by one
person/Organization
DECENTRALIZED
Solves:
Single point failure
Scaling
Inefficiency
Security and Transparency
Transaction time
INTRODUCTION TO
BLOCKCHAIN
BLOCKCHAIN
A blockchain allows for trustless transactions between
multiple parties. Or, more importantly, it allows transactions
without trust of a third party intermediary!
Decentralized system for an exchange a value/asserts
○ Distributed ledger
○ Immutability
○ Consensus
○ Security
LET’S START WITH A TRANSACTION
THAT OCCURS BETWEEN ACCOUNTS
Transaction #200
Account A Account B
E.g. Send 2 tokens
An example transaction could be:
Account A will send 1 tokens to Account B
A LEDGER IS A LIST OF TRANSACTIONS
(GROUPED INTO BLOCKS)
LEDGER
Block #100
Last Block: #99 (H)
Timestamp: TM,
Transaction #399
Transaction #400
Transaction #401
Block #97
Block #98
Block #99
Blocks
contain an
indeterminate
number of
transactions
BLOCKS ARE CHAINED TOGETHER
LEDGER
Block #100
Last Block: #99
Transaction #399
Transaction #400
Block #97 Block #98 Block #99
Blocks are
generated on a
time interval
(e.g. every 5
minutes)
The ledger is a chain of blocks! Each block is created
with a pointer to the previous block creating a
blockchain!
LEDGER
Distributed ledger = Distributed database
BLOCKCHAIN
Decentralized system for an exchange a value/asserts
○ Distributed ledger
○ Immutability
○ Consensus
○ Security
BLOCKCHAIN
Decentralized system for an exchange a value/asserts
○ Distributed ledger
○ Immutability
○ Consensus
○ Security
CONSENSUS
Consensus = Protocol by which peers agree on state of ledger
○ Ensure all peers in the network has exactly the same copy of
ledger
○ Fraudulent transactions kept out of the ledger
○ Guarantees to record transactions in chronological order
BLOCKCHAIN
Decentralized system for an exchange a value/asserts
○ Distributed ledger
○ Immutability
○ Consensus
○ Security
SECURITY
Building Apps with Ethereum Smart Contract
Wow!!, thats cool stuff
Bitcoin:
- Transfer money
- Fast transactions
- Less fee
- Transparent
Wow!!, thats cool stuff
Bitcoin:
- Transfer money
- Fast transactions
- Less fee
- Transparent
Great Technology:
- Launch my sub currency
- ICO (Crowdfunding)
- Managing digital assets
- Local laws
INTRODUCTION TO
ETHEREUM
ETHEREUM
Ethereum is an open blockchain platform that lets anyone
build and use decentralized applications that run on
blockchain technology.
Ethereum is world of computers
HOW DOES ETHEREUM WORK?
○ Ethereum’s basic unit is the account
○ State of every account
○ The Ethereum blockchain tracks the state of every account,
and all state transitions on the Ethereum blockchain are
transfers of value and information between accounts.
ETHEREUM ACCOUNTS:
There are two types of accounts:
○ Externally Owned Accounts (EOAs)
○ Contract Accounts, which are controlled by their
contract code and can only be “activated” by an EOA
ETHEREUM ACCOUNTS: Elliptic Curve
Digital Signature
Algorithm (ECDSA)
ETHEREUM ACCOUNTS:
○ Has an ether balance
○ Can send transactions (ether transfer or trigger
contract code), EOA
○ Bytecode
○ Nonce
SMART CONTRACTS
ETHER, EVM, GAS
ETHER
Ethereum value token is called Ether
Denominations:
Unit Wei Value Wei
wei 1 wei 1
Kwei (babbage) 1e3 wei 1,000
Mwei (lovelace) 1e6 wei 1,000,000
Gwei (shannon) 1e9 wei 1,000,000,000
microether (szabo) 1e12 wei 1,000,000,000,000
milliether (finney) 1e15 wei 1,000,000,000,000,000
ether 1e18 wei 1,000,000,000,000,000,000
ETHER SUPPLY
○ 48 days presale (July 2014): $ 60 M
○ 12M created to fund development
○ 5 Eth will created as rewarded for every block
○ 2-3 eths for non winning miners
○ Contract execution user pays Ether’s
ETHEREUM VIRTUAL MACHINE
○ Ethereum is “Turing complete”.
○ EVM will load bytecode and execute instructions
○ Every node will run eth client
GAS
○ Gas is the metering unit for use of the World Computer
○ Each operation in the EVM consumes gas
○ totalEstGas = startgas * gasprice
Transactions
0x60 0x01 0x60
0x02 0x01
Operation Name Gas Cost Remark
step 1 default amount per execution cycle
stop 0 free
suicide 0 free
sha3 20
sload 20 get from permanent storage
sstore 100 put into permanent storage
balance 20
create 100 contract creation
call 20 initiating a read-only call
memory 1 every additional word when expanding memory
txdata 5 every byte of data or code for a transaction
transaction 500 base fee transaction
contract creation 53000 changed in homestead from 21000
ETHEREUM TRANSACTIONS:
BITCOIN
● Transactions based
● Block creation ~10mins
● Less number of transactions
● Require high computation power
● Not stopping big miners
● Limited transaction based bitcoin
signature(128)
● Limited functions
● Peers can block list transaction
● SHA2 not so secure
● SHA256 is not ASIC resistance
● Account based
● Block creation ~12sec
● Mining algorithm based on
memory usage (Gas)
● Can decouple components
● Rich programing language for
contracts (Solidity)
● Uses SHA3
● Customize protocol based on local
law
● EthHash is ASIC resistance
ETHEREUM
INTRODUCTION TO
ETHEREUM DAPPS
○ Ethereum Client’s
○ Installation of Geth
○ Geth commands
○ Web3JS Apis
○ Solidity
○ Smart contracts
○ Deploying smart contracts
ETHEREUM CLIENTS
eth pyethapp geth ethereumjs-lib
3rd Party Impl
ethereumj ruby-ethereum ethereumjs-lib parity
SOLIDITY
SOLIDITY
Solidity is the most popular programming language
used to write smart contracts to run on the Ethereum
blockchain.
It is a high level language which when compiled gets
converted to EVM bytecode.
This is very similar to the world of Java where there are
JVM languages like Scala, Groovy, Clojure, JRuby etc.
SOLIDITY INTEGRATION TOOLS
IDE’s
- Remix
- IntelliJ IDEA plugin
- Visual Studio Extension
- Etheratom
- Solium
- Emacs Solidity
- Package for SublimeText — Solidity language syntax
SOLIDITY INTEGRATION TOOLS
Solidity Tools
- Dapp
Build tool, package manager, and deployment assistant
for Solidity.
- Solidity REPL
Instant command-line solidity console.
- solgraph
- Doxity
STRUCTURE OF A CONTRACT
- Types
- Operators
- Functions
- Function Modifiers
- Events
- Enum Types
- Types
Booleans
Integers
Address
String
Enums
- Function Types
public, private, internal, external
- Function Modifiers
STRUCTURE OF A CONTRACT
- Types
Booleans
Integers
Address
String
Enums
- Function Types
Public, private, internal
- Function Modifiers
STRUCTURE OF A CONTRACT
TRUFFLE/EMBARK
We have frameworks for web application development
such as Ruby on Rails, Python/Django etc, Truffle and
Embark are the two most popular frameworks used to
develop Dapps.
They abstract away lot of the complexities of compiling
and deploying your contract on the blockchain.
LET’S CODE….
Building Apps with Ethereum Smart Contract

More Related Content

PDF
Writing smart contracts
PPTX
Ethereum Smart contract
PPTX
Introduction to Blockchain and Smart Contracts
PPTX
Smart Contract & Ethereum
PPTX
Creating Smart Contract
PDF
Bitcoin and Ethereum
PPTX
Introduction to Corda Blockchain for Developers
 
PDF
Ethereum-Cryptocurrency (All about Ethereum)
Writing smart contracts
Ethereum Smart contract
Introduction to Blockchain and Smart Contracts
Smart Contract & Ethereum
Creating Smart Contract
Bitcoin and Ethereum
Introduction to Corda Blockchain for Developers
 
Ethereum-Cryptocurrency (All about Ethereum)

What's hot (20)

PPTX
Write smart contract with solidity on Ethereum
PDF
How To Mint An NFT?
PDF
List of 10 Most Expensive NFTs Ever Sold
PDF
Examples of Smart Contracts
PPTX
Blockchain Solution for the Global Bond Markets
PPTX
Hyperledger
PDF
Blockchain Technology Fundamentals
PDF
MobiliteaTime #7 : Blockchain
PDF
Nft for beginners the perfect basic guide to learn everything about non fungi...
PPTX
Blockchain in FinTech
PDF
Blockchain: The New Technology and Its Applications for Libraries
PPTX
Smart contract
PPTX
BLOCKCHAIN
PPTX
What is A Smart Contract? | Smart Contracts Tutorial | Smart Contracts in Blo...
PDF
Blockchain Presentation
PDF
Ethereum Solidity Fundamentals
PDF
What is an nft the informative guide for beginners in 2022
PPT
The blockchain technology
PDF
What are NFT's, anyhow?
Write smart contract with solidity on Ethereum
How To Mint An NFT?
List of 10 Most Expensive NFTs Ever Sold
Examples of Smart Contracts
Blockchain Solution for the Global Bond Markets
Hyperledger
Blockchain Technology Fundamentals
MobiliteaTime #7 : Blockchain
Nft for beginners the perfect basic guide to learn everything about non fungi...
Blockchain in FinTech
Blockchain: The New Technology and Its Applications for Libraries
Smart contract
BLOCKCHAIN
What is A Smart Contract? | Smart Contracts Tutorial | Smart Contracts in Blo...
Blockchain Presentation
Ethereum Solidity Fundamentals
What is an nft the informative guide for beginners in 2022
The blockchain technology
What are NFT's, anyhow?
Ad

Similar to Building Apps with Ethereum Smart Contract (20)

PPTX
Ethereum
PDF
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
PDF
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
PPTX
Understanding Ethereum: The Future of Blockchain Technology
PDF
Blockchain for Notaries
PPTX
Blockchain, smart contracts - introduction
ODP
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
PPTX
The Foundation of Smart Contract Development on Ethereum
PDF
Smart contracts in Solidity
DOCX
Blockchain & decentralized finance (defi) | How blockchain technology is coup...
PPTX
Introduction to Solidity and Smart Contract Development (9).pptx
PDF
Ethereum in a nutshell
PDF
Ethereum bxl
PPTX
Ethereum Block Chain
PPTX
Block chain - Smart contacts.pptx
PPTX
Chapter 3.pptx
PPTX
What is ethereum
PDF
Blockchain Basics
PDF
Fluent destry saul
PDF
Part 4: Understanding the working of Smart Contracts
Ethereum
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Understanding Ethereum: The Future of Blockchain Technology
Blockchain for Notaries
Blockchain, smart contracts - introduction
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
The Foundation of Smart Contract Development on Ethereum
Smart contracts in Solidity
Blockchain & decentralized finance (defi) | How blockchain technology is coup...
Introduction to Solidity and Smart Contract Development (9).pptx
Ethereum in a nutshell
Ethereum bxl
Ethereum Block Chain
Block chain - Smart contacts.pptx
Chapter 3.pptx
What is ethereum
Blockchain Basics
Fluent destry saul
Part 4: Understanding the working of Smart Contracts
Ad

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Big Data Technologies - Introduction.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
KodekX | Application Modernization Development
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Empathic Computing: Creating Shared Understanding
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Modernizing your data center with Dell and AMD
Spectral efficient network and resource selection model in 5G networks
Big Data Technologies - Introduction.pptx
MYSQL Presentation for SQL database connectivity
Digital-Transformation-Roadmap-for-Companies.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
A Presentation on Artificial Intelligence
Unlocking AI with Model Context Protocol (MCP)
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation_ Review paper, used for researhc scholars
KodekX | Application Modernization Development
The Rise and Fall of 3GPP – Time for a Sabbatical?
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
NewMind AI Weekly Chronicles - August'25 Week I
Empathic Computing: Creating Shared Understanding
Advanced methodologies resolving dimensionality complications for autism neur...
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
NewMind AI Monthly Chronicles - July 2025
Modernizing your data center with Dell and AMD

Building Apps with Ethereum Smart Contract

  • 2. INTRODUCTION TO ETHEREUM ECOSYSTEM & SMART CONTRACTS NPD Meet @ Divum Corporate Services Pvt Ltd. Jitendra Kumar.Balla & Vaideeswaran sethuraman
  • 3. AGENDA 1. What is a Blockchain? 2. Ethereum 3. Ethereum SMART Contracts
  • 4. CENTRALIZED Issues: Single point failure Scaling Inefficiency All activities are managed by one person/Organization
  • 7. BLOCKCHAIN A blockchain allows for trustless transactions between multiple parties. Or, more importantly, it allows transactions without trust of a third party intermediary! Decentralized system for an exchange a value/asserts ○ Distributed ledger ○ Immutability ○ Consensus ○ Security
  • 8. LET’S START WITH A TRANSACTION THAT OCCURS BETWEEN ACCOUNTS Transaction #200 Account A Account B E.g. Send 2 tokens An example transaction could be: Account A will send 1 tokens to Account B
  • 9. A LEDGER IS A LIST OF TRANSACTIONS (GROUPED INTO BLOCKS) LEDGER Block #100 Last Block: #99 (H) Timestamp: TM, Transaction #399 Transaction #400 Transaction #401 Block #97 Block #98 Block #99 Blocks contain an indeterminate number of transactions
  • 10. BLOCKS ARE CHAINED TOGETHER LEDGER Block #100 Last Block: #99 Transaction #399 Transaction #400 Block #97 Block #98 Block #99 Blocks are generated on a time interval (e.g. every 5 minutes) The ledger is a chain of blocks! Each block is created with a pointer to the previous block creating a blockchain!
  • 11. LEDGER Distributed ledger = Distributed database
  • 12. BLOCKCHAIN Decentralized system for an exchange a value/asserts ○ Distributed ledger ○ Immutability ○ Consensus ○ Security
  • 13. BLOCKCHAIN Decentralized system for an exchange a value/asserts ○ Distributed ledger ○ Immutability ○ Consensus ○ Security
  • 14. CONSENSUS Consensus = Protocol by which peers agree on state of ledger ○ Ensure all peers in the network has exactly the same copy of ledger ○ Fraudulent transactions kept out of the ledger ○ Guarantees to record transactions in chronological order
  • 15. BLOCKCHAIN Decentralized system for an exchange a value/asserts ○ Distributed ledger ○ Immutability ○ Consensus ○ Security
  • 18. Wow!!, thats cool stuff Bitcoin: - Transfer money - Fast transactions - Less fee - Transparent
  • 19. Wow!!, thats cool stuff Bitcoin: - Transfer money - Fast transactions - Less fee - Transparent Great Technology: - Launch my sub currency - ICO (Crowdfunding) - Managing digital assets - Local laws
  • 21. ETHEREUM Ethereum is an open blockchain platform that lets anyone build and use decentralized applications that run on blockchain technology. Ethereum is world of computers
  • 22. HOW DOES ETHEREUM WORK? ○ Ethereum’s basic unit is the account ○ State of every account ○ The Ethereum blockchain tracks the state of every account, and all state transitions on the Ethereum blockchain are transfers of value and information between accounts.
  • 23. ETHEREUM ACCOUNTS: There are two types of accounts: ○ Externally Owned Accounts (EOAs) ○ Contract Accounts, which are controlled by their contract code and can only be “activated” by an EOA
  • 24. ETHEREUM ACCOUNTS: Elliptic Curve Digital Signature Algorithm (ECDSA)
  • 25. ETHEREUM ACCOUNTS: ○ Has an ether balance ○ Can send transactions (ether transfer or trigger contract code), EOA ○ Bytecode ○ Nonce
  • 28. ETHER Ethereum value token is called Ether Denominations: Unit Wei Value Wei wei 1 wei 1 Kwei (babbage) 1e3 wei 1,000 Mwei (lovelace) 1e6 wei 1,000,000 Gwei (shannon) 1e9 wei 1,000,000,000 microether (szabo) 1e12 wei 1,000,000,000,000 milliether (finney) 1e15 wei 1,000,000,000,000,000 ether 1e18 wei 1,000,000,000,000,000,000
  • 29. ETHER SUPPLY ○ 48 days presale (July 2014): $ 60 M ○ 12M created to fund development ○ 5 Eth will created as rewarded for every block ○ 2-3 eths for non winning miners ○ Contract execution user pays Ether’s
  • 30. ETHEREUM VIRTUAL MACHINE ○ Ethereum is “Turing complete”. ○ EVM will load bytecode and execute instructions ○ Every node will run eth client
  • 31. GAS ○ Gas is the metering unit for use of the World Computer ○ Each operation in the EVM consumes gas ○ totalEstGas = startgas * gasprice Transactions 0x60 0x01 0x60 0x02 0x01
  • 32. Operation Name Gas Cost Remark step 1 default amount per execution cycle stop 0 free suicide 0 free sha3 20 sload 20 get from permanent storage sstore 100 put into permanent storage balance 20 create 100 contract creation call 20 initiating a read-only call memory 1 every additional word when expanding memory txdata 5 every byte of data or code for a transaction transaction 500 base fee transaction contract creation 53000 changed in homestead from 21000
  • 34. BITCOIN ● Transactions based ● Block creation ~10mins ● Less number of transactions ● Require high computation power ● Not stopping big miners ● Limited transaction based bitcoin signature(128) ● Limited functions ● Peers can block list transaction ● SHA2 not so secure ● SHA256 is not ASIC resistance ● Account based ● Block creation ~12sec ● Mining algorithm based on memory usage (Gas) ● Can decouple components ● Rich programing language for contracts (Solidity) ● Uses SHA3 ● Customize protocol based on local law ● EthHash is ASIC resistance ETHEREUM
  • 36. ○ Ethereum Client’s ○ Installation of Geth ○ Geth commands ○ Web3JS Apis ○ Solidity ○ Smart contracts ○ Deploying smart contracts
  • 37. ETHEREUM CLIENTS eth pyethapp geth ethereumjs-lib 3rd Party Impl ethereumj ruby-ethereum ethereumjs-lib parity
  • 39. SOLIDITY Solidity is the most popular programming language used to write smart contracts to run on the Ethereum blockchain. It is a high level language which when compiled gets converted to EVM bytecode. This is very similar to the world of Java where there are JVM languages like Scala, Groovy, Clojure, JRuby etc.
  • 40. SOLIDITY INTEGRATION TOOLS IDE’s - Remix - IntelliJ IDEA plugin - Visual Studio Extension - Etheratom - Solium - Emacs Solidity - Package for SublimeText — Solidity language syntax
  • 41. SOLIDITY INTEGRATION TOOLS Solidity Tools - Dapp Build tool, package manager, and deployment assistant for Solidity. - Solidity REPL Instant command-line solidity console. - solgraph - Doxity
  • 42. STRUCTURE OF A CONTRACT - Types - Operators - Functions - Function Modifiers - Events - Enum Types
  • 43. - Types Booleans Integers Address String Enums - Function Types public, private, internal, external - Function Modifiers STRUCTURE OF A CONTRACT
  • 44. - Types Booleans Integers Address String Enums - Function Types Public, private, internal - Function Modifiers STRUCTURE OF A CONTRACT
  • 45. TRUFFLE/EMBARK We have frameworks for web application development such as Ruby on Rails, Python/Django etc, Truffle and Embark are the two most popular frameworks used to develop Dapps. They abstract away lot of the complexities of compiling and deploying your contract on the blockchain.