SlideShare a Scribd company logo
Ethereum
History - how Ethereum come about....
● Started in October 2013, Vitalik Buterin visited Mastercoin team in Israel. He
suggested a few features, to make their protocol more generalized and support
more types of contracts. But Mastercoin has their own vision to move forward.
● December 2013, Vitalik published his first Ethereum protocol. Subsequently,
Gavin Wood joined to further refine the protocol and build the C++
implementation. At the same time, Jeffrey Wilcke lead to build the Go client.
● Source: https://vitalik.ca/general/2017/09/14/prehistory.html
● ...the scripting systems of Bitcoin, and even proto-cryptocurrency 2.0 alternatives like Ripple
and Mastercoin, are far too limited to allow the kind of arbitrarily complex computation
that "decentralized autonomous corporations"s require...take cryptocurrency 2.0, and
generalize it - create a fully-fledged, Turing-complete (but heavily fee-regulated)
cryptographic ledger that allows participants to encode arbitrarily complex contracts,
autonomous agents and relationships that will be mediated entirely by the
blockchain….become trivial to implement….
Evolution of blockchain
Bitcoin vs ethereum
Bitcoin Blockchain Ethereum Blockchain
Both powered by the principle of distributed ledgers and cryptography
Initial Distribution Mining ICO
Function as a cryptocurrency - transfer currency transfer currency and general program
application (decenrtalized smart contract)
Consensus Proof of Work, energy waste for security Proof of Work with later transition to Proof of
Stake, Casper Friendly Finality Gadget
Mining Hash Secure Hash Algorithm (SHA-256) ETHASH - require more memory to mine hence
harder to be mined with ASICs
Fee Fee based on transaction size Gas based on operation and usage of storage
Finality 6 block confirmations, average 60 mins. 12(25) block confirmations, average 3(6) min.
Extensibility hard, simple scripting language Turing Complete Language - smart contract
Scalability 3 Tx/s, Plan: payment channels (Lightning) 15 Tx/s, Plan: payment channels (Plasma),
sharding
Basic of ethereum
● has a built-in Turing-complete programming language used to create
"contracts"
● Similar to Bitcoin, Ethereum uses Blockchain as a globally shared transaction
database.
● Ethereum store these in the Blockchain
○ User accounts state (Eth balance)
○ Smart contract code
○ Smart contract state
● Transaction is the only thing that can trigger a change of states in Blockchain.
● Mining process is used to group and validate transactions in Block.
● Miner who can solve a mathematical puzzle quickest can propagate the block
to the network and claim mining reward.
Basic of ethereum - Account #1
Accounts
● Global state of Ethereum comprises of many ‘accounts’
● Two kinds of accounts:
○ Externally owned accounts(EOAs) - owned and controlled by users and have no code
associated with it. Owner has private key to access funds or contracts on the account.
○ Contract accounts - controlled by the associated contract code. The contract code is
executed through transactions sent by EOA’s or messages send by other contracts.
● Each account has a 20-byte address and a state associated with it.
● An EOA
○ can send messages to other EOA (ether transfer)
○ can send messages to other contract accounts (code invocation)
Basic of ethereum - Account #2
Source: https://www.coindesk.com/information/how-ethereum-works/
UTXO vs Account basedAccount object has 4 pieces of data:
• Nonce (replay protection)
• Balance
• Code hash (empty for EOA)
• Storage trie root
Source:https://medium.com/@darthrevan344/blockchain-ethereum-iot-poc-
machine-maintenance-part-i-272524c16edf
Basic of Ethereum - Transaction
Transaction
• Transactions are signed messages originated by an EOA.
• Transactions to an EOA is value transfer.
• Transactions to a contract resulted the code to be executed and the payload is
the input data.
• Transaction has the following data:
• nonce (replay attack protection)
• to (destination address)
• value (ETH amount to send)
• data (contract code)
• gas price (amount eth/unit gas)
• startgas (maximum gas consumable)
• v, r, s (ECDSA signature values)
Basic of Ethereum - Ether
Ether
• Native currency of the Ethereum blockchain.
• It is used as payment for using the network.
Unit Wei
Wei 1
Kwei 1,000
Mwei 1,000,000
Unit Wei
Gwei 1,000,000,000
Szabo 1,000,000,000,000
Ether
1,000,000,000,000,000,
000
Basic of ethereum - Gas #1
● Due to Turing-complete of Ethereum, Gas is used as a workaround for Halting
Problem.
● A unit of measurement of the computation work of running transactions in the
Ethereum network.
● This is similar to the using of kilowatts to measure electricity.
● Used to decouple the ETH and the unit of computational measurement. Thus,
avoiding the situation in which an increase in the price of ETH resulting changes
to all gas prices.
● Different kinds of transaction require a different amount of gas. For example:
○ Sending Ether between accounts typically cost 21,000 Gas
○ Using store OPS code in smart contract is more than 20,000 Gas
Basic of ethereum - Gas #2
● How much does it cost?
● Each transaction sender define price of
Gas Price (Gwei) and Gas Limit.
● Miner then execute transactions with the
highest gas price first. Thus low price gas
might end up taking longer time to
process (e.g. during CryptoKitties)
● How much to pay?
● Refer to statistics on average Gas price
e.g. GasStation/Etherscan.
Source: etherscan.com
Source: ethgasstation.info
Flow of a Transaction to Block
demo
● Transfer of Ether
● Hello World Smart Contract
Source: https://ethereum.stackexchange.com/questions/268/ethereum-block-architecture
Source: https://medium.com/@micheledaliessi/how-does-ethereum-work-8244b6f55297
• DApps definition (https://en.wikipedia.org/wiki/Decentralized_application):
“is an application that is run by many users on a decentralized network with trustless
protocols. They are designed to avoid any single point of failure. They typically have
tokens to reward users for providing computing power.”
Layers of Ethereum Platform
State of Decentralized Application
Source:https://www.stateofthedapps.com/stats
(Jul2018)
Programming languages for smart contracts
● A few programming languages for smart contracts:
○ Solidity: a high-level language. JavaScript like syntax and is the flagship language for
programming Smart Contract in Ethereum due to good documentation and support.
○ Serpent: One of the earliest smart contract programming language. Based on Python.
○ Lisp-Like-Language, LLL: a lower-level language than Solidity (i.e. direct access to
memory and storage, direct usage of EVM opcodes. Based on Lisp.
○ Vyper: an experimental programming language. Based on Python. Currently it is
under development.
Tools for Development of Smart Contract
• User Interface
• Metamask
• Mist
• Remix
• MyEtherWallet
• Any Javascript Framework + Web3JS
• Development Environment
• Truffle
• Remix
• Embark
• Blockchain Environment
• Testnet (Ropsten, Rinkeby, Kovan)
• Private Ethereum Blockchain
• Ganache
• Remix (Javascript VM)
• Library
• OpenZeppelin
Solidity
Write and Deploy contract
● Write smart contract in Solidity
● Compile Solidity using Solidity Compiler(Solc) into EVM bytecode (bin)
and interface (abi).
● Deploy compiled contract to Ethereum network i.e. blockchain.
Deployment require payment in ether.
● Once contract has successfully been included in blockchain, the
contract address will be returned.
Source: https://blockgeeks.com/guides/smart-contract-development/
Smart Contract - Development to Deployment
Source: http://pospi.spadgos.com/2016/10/01/solidity-smart-contracts-primer/
Solidity - code example
Solidity
Invocation of deployed contract - transactions vs calls
Calls
● A local invocation of a contract function. It does not yield publication on
blockchain. It is read-only operation and free of Ether to run.
● Return value of the contract function returned immediately.
● Create an instance of the contract object using deployed contract address and
ABI.
● Use web3js.API web3.eth.call or JSON-RPC eth_call.
Transactions
● A transaction is a call on contract function that will be published on blockchain. It is
a write-operation that will affect state of the blockchain and consume Ether.
● Use web3js.API web3.eth.sendTransaction or JSON-RPC eth_transaction.
Web3JS - Invocation of contract
ERC 20 - Token Standard
ERC 20 - Using OpenZeppelin Library
Remix
Remix is a suite of tools to interact with the Ethereum blockchain in order to debug
transactions. Remix IDE is an IDE for Solidity dApp developers. Online version is available at
https://remix.ethereum.org. Source: https://blockgeeks.com/guides/smart-contract-development/
Remix
Contract Deployment
Contract
Invocation
Source: https://techburst.io/solidity-101-intro-to-ethereum-smart-contracts-and-solidity-82e9889b1736
Mist
Source: https://blog.abuiles.com/blog/2017/06/13/smart-contracts-for-the-impatient/
Mist is the browser for decentralized web apps. What Mozilla Firefox or
Google Chrome are for the Web 2.0, the Mist Browser will be for the Web 3.0
Future - Proof of Stake (Casper)
● Instead of miner uses validator to create and validate
blocks.
● How it works?
○ Interested validators will stake their Ethereum for
eligibility to validate.
○ Validator discover block and place a bet on it. If block
gets appended, validators get a reward proportionate
to their bets.
○ If validator acts maliciously, stake is being slashed.
● 2 versions of Casper in research and development
○ Casper Friendly Finality Gadget (FFG)
■ Hybrid of PoW and PoS
○ Casper Friendly GHOST Correct-by-Construction (CBC)
■ Fully PoS
■ Instead of fully specifying the protocol, provides
ability to specify properties and work backward to
derive the protocol.
Source: https://blockgeeks.com/guides/ethereum-mining-
proof-stake

More Related Content

What's hot

Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Simplilearn
 
How does blockchain work
How does blockchain workHow does blockchain work
How does blockchain work
Shishir Aryal
 
Ethereum
EthereumEthereum
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
Edureka!
 
Smart Contract & Ethereum
Smart Contract & EthereumSmart Contract & Ethereum
Smart Contract & Ethereum
Akshay Singh
 
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsIntroduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart Contracts
Techracers
 
Blockchain
BlockchainBlockchain
Blockchain
Amit Kumar
 
What's cryptocurrency ?
What's cryptocurrency ?What's cryptocurrency ?
What's cryptocurrency ?
Everythingcrypto
 
Bitcoin
BitcoinBitcoin
Bitcoin
Noopur Singh
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
Malak Abu Hammad
 
Smart contracts
Smart contractsSmart contracts
Smart contracts
Philippe Camacho, Ph.D.
 
Blockchain Tokenization
Blockchain TokenizationBlockchain Tokenization
Blockchain Tokenization
Bellaj Badr
 
Blockchain
BlockchainBlockchain
Blockchain
ChrisSwanson37
 
Blockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for DummiesBlockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for Dummies
Narudom Roongsiriwong, CISSP
 
Asset Tokenization - An Introduction and Overview, Guest Lecture at SMU
Asset Tokenization - An Introduction and Overview, Guest Lecture at SMU Asset Tokenization - An Introduction and Overview, Guest Lecture at SMU
Asset Tokenization - An Introduction and Overview, Guest Lecture at SMU
Patrick Schueffel
 
Solidity
SoliditySolidity
Solidity
gavofyork
 
Blockchain Technology Fundamentals
Blockchain Technology FundamentalsBlockchain Technology Fundamentals
Blockchain Technology Fundamentals
Experfy
 
Bitcoin, Cryptocurrency, & Blockchain Presentation
Bitcoin, Cryptocurrency, & Blockchain PresentationBitcoin, Cryptocurrency, & Blockchain Presentation
Bitcoin, Cryptocurrency, & Blockchain Presentation
MaxWheelock
 
BITCOIN EXPLAINED
BITCOIN EXPLAINEDBITCOIN EXPLAINED
BITCOIN EXPLAINED
Murlidhar Sarda
 

What's hot (20)

Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
Ethereum Tutorial - Ethereum Explained | What is Ethereum? | Ethereum Explain...
 
How does blockchain work
How does blockchain workHow does blockchain work
How does blockchain work
 
Ethereum
EthereumEthereum
Ethereum
 
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
Blockchain Explained | Blockchain Simplified | Blockchain Technology | Blockc...
 
Smart Contract & Ethereum
Smart Contract & EthereumSmart Contract & Ethereum
Smart Contract & Ethereum
 
Introduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart ContractsIntroduction to Blockchain and Smart Contracts
Introduction to Blockchain and Smart Contracts
 
Blockchain
BlockchainBlockchain
Blockchain
 
What's cryptocurrency ?
What's cryptocurrency ?What's cryptocurrency ?
What's cryptocurrency ?
 
Bitcoin
BitcoinBitcoin
Bitcoin
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Smart contracts
Smart contractsSmart contracts
Smart contracts
 
Blockchain Tokenization
Blockchain TokenizationBlockchain Tokenization
Blockchain Tokenization
 
Blockchain
BlockchainBlockchain
Blockchain
 
Blockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for DummiesBlockchain and Cryptocurrency for Dummies
Blockchain and Cryptocurrency for Dummies
 
Blockchain
BlockchainBlockchain
Blockchain
 
Asset Tokenization - An Introduction and Overview, Guest Lecture at SMU
Asset Tokenization - An Introduction and Overview, Guest Lecture at SMU Asset Tokenization - An Introduction and Overview, Guest Lecture at SMU
Asset Tokenization - An Introduction and Overview, Guest Lecture at SMU
 
Solidity
SoliditySolidity
Solidity
 
Blockchain Technology Fundamentals
Blockchain Technology FundamentalsBlockchain Technology Fundamentals
Blockchain Technology Fundamentals
 
Bitcoin, Cryptocurrency, & Blockchain Presentation
Bitcoin, Cryptocurrency, & Blockchain PresentationBitcoin, Cryptocurrency, & Blockchain Presentation
Bitcoin, Cryptocurrency, & Blockchain Presentation
 
BITCOIN EXPLAINED
BITCOIN EXPLAINEDBITCOIN EXPLAINED
BITCOIN EXPLAINED
 

Similar to Ethereum

Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart Contract
Vaideeswaran Sethuraman
 
Ethereum Block Chain
Ethereum Block ChainEthereum Block Chain
Ethereum Block Chain
SanatPandoh
 
Block chain - Smart contacts.pptx
Block chain - Smart contacts.pptxBlock chain - Smart contacts.pptx
Block chain - Smart contacts.pptx
shraddhaphirke1
 
Evaluation of Ethereum
Evaluation of Ethereum Evaluation of Ethereum
Evaluation of Ethereum
Giuseppe Andreetti
 
What is ethereum
What is ethereumWhat is ethereum
What is ethereum
Celine George
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
AvinashChoure2
 
Ethereum Solidity Fundamentals
Ethereum Solidity FundamentalsEthereum Solidity Fundamentals
Ethereum Solidity Fundamentals
Eno Bassey
 
How to design, code, deploy and execute a smart contract
How to design, code, deploy and execute a smart contractHow to design, code, deploy and execute a smart contract
How to design, code, deploy and execute a smart contract
Joseph Holbrook, Chief Learning Officer (CLO)
 
Exploring ethereum
Exploring ethereumExploring ethereum
Exploring ethereum
Nikhil Krishna Nair
 
Ethereum vs fabric vs corda
Ethereum vs fabric vs cordaEthereum vs fabric vs corda
Ethereum vs fabric vs corda
Jean-Christophe Busnel
 
Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contracts
Gautam Anand
 
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Codemotion
 
Ethereum Block Chain
Ethereum Block ChainEthereum Block Chain
Ethereum Block Chain
SanatPandoh
 
How to Write & Deploy a Smart Contract
How to Write & Deploy a Smart ContractHow to Write & Deploy a Smart Contract
How to Write & Deploy a Smart Contract
All Things Open
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Codemotion
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Codemotion
 
Smart contracts in Solidity
Smart contracts in SoliditySmart contracts in Solidity
Smart contracts in Solidity
Felix Crisan
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)
Tomoaki Sato
 
Programming Decentralized Application
Programming Decentralized ApplicationProgramming Decentralized Application
Programming Decentralized Application
Bambang Purnomosidi D. P.
 
Top open source blockchain platforms of 2018
Top open source blockchain platforms of 2018Top open source blockchain platforms of 2018
Top open source blockchain platforms of 2018
Parangat Technologies
 

Similar to Ethereum (20)

Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart Contract
 
Ethereum Block Chain
Ethereum Block ChainEthereum Block Chain
Ethereum Block Chain
 
Block chain - Smart contacts.pptx
Block chain - Smart contacts.pptxBlock chain - Smart contacts.pptx
Block chain - Smart contacts.pptx
 
Evaluation of Ethereum
Evaluation of Ethereum Evaluation of Ethereum
Evaluation of Ethereum
 
What is ethereum
What is ethereumWhat is ethereum
What is ethereum
 
Chapter 3.pptx
Chapter 3.pptxChapter 3.pptx
Chapter 3.pptx
 
Ethereum Solidity Fundamentals
Ethereum Solidity FundamentalsEthereum Solidity Fundamentals
Ethereum Solidity Fundamentals
 
How to design, code, deploy and execute a smart contract
How to design, code, deploy and execute a smart contractHow to design, code, deploy and execute a smart contract
How to design, code, deploy and execute a smart contract
 
Exploring ethereum
Exploring ethereumExploring ethereum
Exploring ethereum
 
Ethereum vs fabric vs corda
Ethereum vs fabric vs cordaEthereum vs fabric vs corda
Ethereum vs fabric vs corda
 
Best practices to build secure smart contracts
Best practices to build secure smart contractsBest practices to build secure smart contracts
Best practices to build secure smart contracts
 
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
Stefano Maestri - Blockchain and smart contracts, what they are and why you s...
 
Ethereum Block Chain
Ethereum Block ChainEthereum Block Chain
Ethereum Block Chain
 
How to Write & Deploy a Smart Contract
How to Write & Deploy a Smart ContractHow to Write & Deploy a Smart Contract
How to Write & Deploy a Smart Contract
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
 
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
Jerome de Tychey - Building Web3.0 with Ethereum - Codemotion Berlin 2018
 
Smart contracts in Solidity
Smart contracts in SoliditySmart contracts in Solidity
Smart contracts in Solidity
 
Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)Ethereum Devcon1 Report (summary writing)
Ethereum Devcon1 Report (summary writing)
 
Programming Decentralized Application
Programming Decentralized ApplicationProgramming Decentralized Application
Programming Decentralized Application
 
Top open source blockchain platforms of 2018
Top open source blockchain platforms of 2018Top open source blockchain platforms of 2018
Top open source blockchain platforms of 2018
 

Recently uploaded

De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 

Recently uploaded (20)

De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 

Ethereum

  • 2. History - how Ethereum come about.... ● Started in October 2013, Vitalik Buterin visited Mastercoin team in Israel. He suggested a few features, to make their protocol more generalized and support more types of contracts. But Mastercoin has their own vision to move forward. ● December 2013, Vitalik published his first Ethereum protocol. Subsequently, Gavin Wood joined to further refine the protocol and build the C++ implementation. At the same time, Jeffrey Wilcke lead to build the Go client. ● Source: https://vitalik.ca/general/2017/09/14/prehistory.html ● ...the scripting systems of Bitcoin, and even proto-cryptocurrency 2.0 alternatives like Ripple and Mastercoin, are far too limited to allow the kind of arbitrarily complex computation that "decentralized autonomous corporations"s require...take cryptocurrency 2.0, and generalize it - create a fully-fledged, Turing-complete (but heavily fee-regulated) cryptographic ledger that allows participants to encode arbitrarily complex contracts, autonomous agents and relationships that will be mediated entirely by the blockchain….become trivial to implement….
  • 4. Bitcoin vs ethereum Bitcoin Blockchain Ethereum Blockchain Both powered by the principle of distributed ledgers and cryptography Initial Distribution Mining ICO Function as a cryptocurrency - transfer currency transfer currency and general program application (decenrtalized smart contract) Consensus Proof of Work, energy waste for security Proof of Work with later transition to Proof of Stake, Casper Friendly Finality Gadget Mining Hash Secure Hash Algorithm (SHA-256) ETHASH - require more memory to mine hence harder to be mined with ASICs Fee Fee based on transaction size Gas based on operation and usage of storage Finality 6 block confirmations, average 60 mins. 12(25) block confirmations, average 3(6) min. Extensibility hard, simple scripting language Turing Complete Language - smart contract Scalability 3 Tx/s, Plan: payment channels (Lightning) 15 Tx/s, Plan: payment channels (Plasma), sharding
  • 5. Basic of ethereum ● has a built-in Turing-complete programming language used to create "contracts" ● Similar to Bitcoin, Ethereum uses Blockchain as a globally shared transaction database. ● Ethereum store these in the Blockchain ○ User accounts state (Eth balance) ○ Smart contract code ○ Smart contract state ● Transaction is the only thing that can trigger a change of states in Blockchain. ● Mining process is used to group and validate transactions in Block. ● Miner who can solve a mathematical puzzle quickest can propagate the block to the network and claim mining reward.
  • 6. Basic of ethereum - Account #1 Accounts ● Global state of Ethereum comprises of many ‘accounts’ ● Two kinds of accounts: ○ Externally owned accounts(EOAs) - owned and controlled by users and have no code associated with it. Owner has private key to access funds or contracts on the account. ○ Contract accounts - controlled by the associated contract code. The contract code is executed through transactions sent by EOA’s or messages send by other contracts. ● Each account has a 20-byte address and a state associated with it. ● An EOA ○ can send messages to other EOA (ether transfer) ○ can send messages to other contract accounts (code invocation)
  • 7. Basic of ethereum - Account #2 Source: https://www.coindesk.com/information/how-ethereum-works/ UTXO vs Account basedAccount object has 4 pieces of data: • Nonce (replay protection) • Balance • Code hash (empty for EOA) • Storage trie root Source:https://medium.com/@darthrevan344/blockchain-ethereum-iot-poc- machine-maintenance-part-i-272524c16edf
  • 8. Basic of Ethereum - Transaction Transaction • Transactions are signed messages originated by an EOA. • Transactions to an EOA is value transfer. • Transactions to a contract resulted the code to be executed and the payload is the input data. • Transaction has the following data: • nonce (replay attack protection) • to (destination address) • value (ETH amount to send) • data (contract code) • gas price (amount eth/unit gas) • startgas (maximum gas consumable) • v, r, s (ECDSA signature values)
  • 9. Basic of Ethereum - Ether Ether • Native currency of the Ethereum blockchain. • It is used as payment for using the network. Unit Wei Wei 1 Kwei 1,000 Mwei 1,000,000 Unit Wei Gwei 1,000,000,000 Szabo 1,000,000,000,000 Ether 1,000,000,000,000,000, 000
  • 10. Basic of ethereum - Gas #1 ● Due to Turing-complete of Ethereum, Gas is used as a workaround for Halting Problem. ● A unit of measurement of the computation work of running transactions in the Ethereum network. ● This is similar to the using of kilowatts to measure electricity. ● Used to decouple the ETH and the unit of computational measurement. Thus, avoiding the situation in which an increase in the price of ETH resulting changes to all gas prices. ● Different kinds of transaction require a different amount of gas. For example: ○ Sending Ether between accounts typically cost 21,000 Gas ○ Using store OPS code in smart contract is more than 20,000 Gas
  • 11. Basic of ethereum - Gas #2 ● How much does it cost? ● Each transaction sender define price of Gas Price (Gwei) and Gas Limit. ● Miner then execute transactions with the highest gas price first. Thus low price gas might end up taking longer time to process (e.g. during CryptoKitties) ● How much to pay? ● Refer to statistics on average Gas price e.g. GasStation/Etherscan. Source: etherscan.com Source: ethgasstation.info
  • 12. Flow of a Transaction to Block
  • 13. demo ● Transfer of Ether ● Hello World Smart Contract
  • 15. Source: https://medium.com/@micheledaliessi/how-does-ethereum-work-8244b6f55297 • DApps definition (https://en.wikipedia.org/wiki/Decentralized_application): “is an application that is run by many users on a decentralized network with trustless protocols. They are designed to avoid any single point of failure. They typically have tokens to reward users for providing computing power.” Layers of Ethereum Platform
  • 16. State of Decentralized Application Source:https://www.stateofthedapps.com/stats (Jul2018)
  • 17. Programming languages for smart contracts ● A few programming languages for smart contracts: ○ Solidity: a high-level language. JavaScript like syntax and is the flagship language for programming Smart Contract in Ethereum due to good documentation and support. ○ Serpent: One of the earliest smart contract programming language. Based on Python. ○ Lisp-Like-Language, LLL: a lower-level language than Solidity (i.e. direct access to memory and storage, direct usage of EVM opcodes. Based on Lisp. ○ Vyper: an experimental programming language. Based on Python. Currently it is under development.
  • 18. Tools for Development of Smart Contract • User Interface • Metamask • Mist • Remix • MyEtherWallet • Any Javascript Framework + Web3JS • Development Environment • Truffle • Remix • Embark • Blockchain Environment • Testnet (Ropsten, Rinkeby, Kovan) • Private Ethereum Blockchain • Ganache • Remix (Javascript VM) • Library • OpenZeppelin
  • 19. Solidity Write and Deploy contract ● Write smart contract in Solidity ● Compile Solidity using Solidity Compiler(Solc) into EVM bytecode (bin) and interface (abi). ● Deploy compiled contract to Ethereum network i.e. blockchain. Deployment require payment in ether. ● Once contract has successfully been included in blockchain, the contract address will be returned. Source: https://blockgeeks.com/guides/smart-contract-development/
  • 20. Smart Contract - Development to Deployment Source: http://pospi.spadgos.com/2016/10/01/solidity-smart-contracts-primer/
  • 21. Solidity - code example
  • 22. Solidity Invocation of deployed contract - transactions vs calls Calls ● A local invocation of a contract function. It does not yield publication on blockchain. It is read-only operation and free of Ether to run. ● Return value of the contract function returned immediately. ● Create an instance of the contract object using deployed contract address and ABI. ● Use web3js.API web3.eth.call or JSON-RPC eth_call. Transactions ● A transaction is a call on contract function that will be published on blockchain. It is a write-operation that will affect state of the blockchain and consume Ether. ● Use web3js.API web3.eth.sendTransaction or JSON-RPC eth_transaction.
  • 23. Web3JS - Invocation of contract
  • 24. ERC 20 - Token Standard
  • 25. ERC 20 - Using OpenZeppelin Library
  • 26. Remix Remix is a suite of tools to interact with the Ethereum blockchain in order to debug transactions. Remix IDE is an IDE for Solidity dApp developers. Online version is available at https://remix.ethereum.org. Source: https://blockgeeks.com/guides/smart-contract-development/
  • 28. Mist Source: https://blog.abuiles.com/blog/2017/06/13/smart-contracts-for-the-impatient/ Mist is the browser for decentralized web apps. What Mozilla Firefox or Google Chrome are for the Web 2.0, the Mist Browser will be for the Web 3.0
  • 29. Future - Proof of Stake (Casper) ● Instead of miner uses validator to create and validate blocks. ● How it works? ○ Interested validators will stake their Ethereum for eligibility to validate. ○ Validator discover block and place a bet on it. If block gets appended, validators get a reward proportionate to their bets. ○ If validator acts maliciously, stake is being slashed. ● 2 versions of Casper in research and development ○ Casper Friendly Finality Gadget (FFG) ■ Hybrid of PoW and PoS ○ Casper Friendly GHOST Correct-by-Construction (CBC) ■ Fully PoS ■ Instead of fully specifying the protocol, provides ability to specify properties and work backward to derive the protocol. Source: https://blockgeeks.com/guides/ethereum-mining- proof-stake

Editor's Notes

  1. The halting problem is to never be sure if a transaction will complete without actually running it, so it is very important for the protocol to provide runtime workarounds.
  2. Gas limit — that’s the maximum amount of Gas that user commits to the transaction. If transaction will need more Gas than it was defined in Gas limit, transaction will fail with “out of Gas” status Gas used by transaction — that’s actual amount of Gas that was used during execution. Gas price — that’s the Gas price in ETH that sender defined at transaction creation Actual Tx Cost — gas used by transaction * gas price (in ETH) Cumulative gas used — The total amount of gas used when this transaction was executed in the block (gas used by previous transactions and this one together)
  3. an ABI tells us the specifications that are needed to interact with the smart contract. It tells us of the various ways in which this contract can be called from an external source (like web3 in our case)
  4. Nothing at Stake issue with PoS - in which as no physical resources to waste (as in compare to POW the CPU), when there is a fork, a validator would stake at each of the fork so not to lose out (so regardless of the final outcome the validator will win). Advantage of PoS . more environmentally friendly - as no energy consumption . stronger alignment of incentives - PoW interest of miners may not align with coin holders, e.g. miner sell coin they mine as they only care about short term. Another issue is the ability to lease hashrate, with the lesee having no economic interest in the long term prospect of the system. . Mining centralisation and ASICs - improving decentralisation. ASIC are expensive hence only mid-size and above company can operate, many aspects of mining cn have economies of scale, such as maintenance costs and energy cost.