SlideShare a Scribd company logo
1 of 31
Download to read offline
INTRODUCTION TO BLOCKCHAIN
2
Agenda
1. What is a
Blockchain?
2. Introduction
to Ethereum
3
1. WHAT IS A BLOCKCHAIN?
4
FIRST, WHY
DO WE CARE ABOUT
BLOCKCHAINS?
A blockchain allows for trustless transactions
between multiple parties.
Or, more importantly, it allows transactions
without trust of a third party intermediary!
5
BLOCKCHAIN =
DISTRIBUTED LEDGER
+ CONSENSUS
6
BLOCKCHAIN =
DISTRIBUTED LEDGER
+ CONSENSUS
A list of transactions between accounts (a ledger)
are stored on distributed “nodes”. New
transactions are periodically added into a block.
Nodes use an agreed upon protocol to reach
consensus on when a new block is appended to
the chain of previous blocks.
7
A TRANSACTION THAT OCCURS BETWEEN
ACCOUNTS
Transaction #399
Account A Account B
E.g. Send 10 tokens
An example transaction could be:
Account A will send 10 tokens to Account B
8
A LEDGER IS A LIST OF TRANSACTIONS
(GROUPED INTO BLOCKS)
LEDGER
Block #100
Last Block: #99
Transaction #399
Transaction #400
Transaction #401
Block #97
Block #98
Block #99
9
BLOCKS ARE CHAINED TOGETHER
LEDGER
Block #100
Last Block: #99
Transaction #399
Transaction #400
Block #97 Block #98 Block #99
The ledger is a chain of blocks! Each block is
created with a pointer to the previous block
creating a blockchain!
The ledger is a chain of blocks! Each block is
created with a pointer to the previous block
creating a blockchain!
10
THE LEDGER IS COPIED AND
DISTRIBUTED AMONG NODES
�
�
�
� �
11
EACH NODE HAS A COPY OF THE LEDGER AND AT
LEAST ONE OF THEM WILL CREATE THE NEXT BLOCK!
�
�
� �
�
11
12
EXAMPLE
CONSENSUS
PROTOCOL:
PROOF OF
WORK
Different methods or protocols exist for
distributed nodes to reach consensus
13
NODES ATTEMPTING TO CREATE NEW
BLOCKS ARE USUALLY CALLED “MINERS”
�
�
�
� �The first Miner to solve
a hard math problem
creates the next block
and is rewarded
14
E.g. Bitcoin
Miners currently
receive 12.5 BTC
plus all included
transaction fees
New block:
Every ~10 minutes
THE MAJORITY OF PoW BLOCKCHAINS
INCENTIVIZE MINERS WITH REWARDS
E.g. Ethereum
Miners currently
receive 5 ETH plus
all included gas
fees (more on this
shortly)
New block:
Every ~15 seconds
15
A BRIEF HISTORY OF
BLOCKCHAINS
▸ 2008: Bitcoin and blockchain idea gifted to
world by “Satoshi Nakamoto”
▸ 2009: Bitcoin client released (open source)
▸ 2011: Litecoin, first “altcoin,” released (based
on bitcoin source code)
▸ 2014: Ethereum whitepaper
released/crowdsale
▸ 2015: Ethereum “Frontier” launched
16
2.
INTRODUCTION
TO ETHEREUM
17
WHAT IS ETHEREUM?
OPEN SOURCE
Like Bitcoin,
Ethereum is a
public blockchain
no one controls or
owns.
18
WHAT IS ETHEREUM?
OPEN SOURCE
Like Bitcoin,
Ethereum is a
public blockchain
no one controls or
owns.
PROOF OF
WORK
CONSENSUS
The Ethereum
Whitepaper
specifies the PoW
rules and 4+
major clients exist
and run the
“nodes”.
19
WHAT IS ETHEREUM?
OPEN SOURCE
Like Bitcoin,
Ethereum is a
public blockchain
no one controls or
owns.
PROOF OF
WORK
CONSENSUS
The Ethereum
Whitepaper
specifies the PoW
rules and 4+
major clients exist
and run the
“nodes”.
ETHEREUM
VIRTUAL
MACHINE (EVM)
Transactions are
more than just
values, but
“Turing” complete
programs that run
when blocks are
processed by
nodes.
20
ETHEREUM VIRTUAL MACHINE
General Purpose
Supports Bitcoin-
like value
transactions (e.g.
send 10 ETH from
account A to B) or
more complex
applications.
21
ETHEREUM VIRTUAL MACHINE
General Purpose
Supports Bitcoin-
like value
transactions (e.g.
send 10 ETH from
account A to B) or
more complex
applications.
Smart Contracts
Turing complete
languages (e.g.
Solidity) allow the
Ethereum
transactions to be
programmed to do
different
operations.
22
ETHEREUM VIRTUAL MACHINE
General Purpose
Supports Bitcoin-
like value
transactions (e.g.
send 10 ETH from
account A to B) or
more complex
applications.
Smart Contracts
Turing complete
languages (e.g.
Solidity) allow the
Ethereum
transactions to be
programmed to do
different
operations.
Decentralized
Apps (DApps)
GUIs for smart
contracts allow
users to interact
in ways similar to
web 2.0
(HTML/JS/CSS).
23
THINK:
WORLD
COMPUTER
The Ethereum blockchain is the first
“decentralized world computer” to ever
exist!
24
TRANSACTIONS AND CONTRACTS
Two types of Accounts
▸ Externally owned accounts (controlled by
people/keys similar to Bitcoin)
▸ Contract accounts (controlled by smart
contract code)
25
TRANSACTIONS AND CONTRACTS
Transactions can include more than just value
transfer; they can include programming or
bytecode that does things (smart contracts)
Transaction #3512
If (Account A == Member) && (Date >= 4Q):
Dividend = 25% the current value of Contract C:
Transaction:
Contract C Account A
Send Dividend
26
TRANSACTIONS AND CONTRACTS
Submitting transactions and contracts to the
blockchain has an associated “gas” cost paid
in Ether based on the complexity of the
operations.
Transaction #256
If (Account A == Member) && (Date >= 4Q):
Dividend = 50% the current value of Contract C:
Transaction:
Contract C
Send Dividend
IF +70 Gas
AND +30 Gas
EQUAL? +40 Gas
DIVIDE +120 Gas
SEND +20 Gas
TOTAL COST = 280 Gas
27
TRANSACTIONS AND CONTRACTS
LEDGER
Block #26
Last Block: #25
Transaction #256
Transaction #257
Transaction #258
Block #23
Block #24
Block #25
28
TRANSACTIONS AND CONTRACTS
Think of the
Ethereum
Ledger like a
SPREADSHEET
Cells can just have a
value or they can give
the result of a
macro/script.
Trans-
action
Account A Account B Account C
(Contract)
#256 10 10 0
#257 5 5 10
#258 10 5 Dividend(A)
29
THIS IS AN EXAMPLE SMART
CONTRACT WRITTEN IN SOLIDITY
contract MyToken {
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
/* Initializes contract with initial supply tokens to the creator of the contract */
function MyToken(
uint256 initialSupply
) {
balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens
}
/* Send coins */
function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough
if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows
balanceOf[msg.sender] -= _value; // Subtract from the sender
balanceOf[_to] += _value; // Add the same to the recipient
}
}
30
USE CASES FOR DAPPS AND
PROJECTS IN DEVELOPMENT
Decentralized
Exchange
Convert between
crypto-currencies and
tokens
EtherDelta, EtherEx
Prediction Market
Utilize the wisdom of
the crowd to predict
future events
Augur, Gnosis
Distributed
Computing
Enable users to lease
out spare compute
cycles (think: uber for
your computer, dAWS)
Golem
Identity Management
Retain ownership of
your online identity,
metadata, and
relationships.
uPort
Crowd Sale Platform
Create a custom token
for trade, payment,
customer loyalty, etc.
and take it to market.
Ethereum, Firstblood
Digital Asset
Management
Manage, buy, sell
physical objects
cryptographically tied to
digital tokens.
Digix
31
Thank you for your listening

More Related Content

What's hot

Payment Protocols - Block Chain & Beyond
Payment Protocols - Block Chain & BeyondPayment Protocols - Block Chain & Beyond
Payment Protocols - Block Chain & Beyond
Alexander Kiriakou
 
Blockchain-intro (2)
Blockchain-intro (2)Blockchain-intro (2)
Blockchain-intro (2)
Zakir Hoosen
 

What's hot (20)

Blockchain, Ethereum and Business Applications
Blockchain, Ethereum and Business ApplicationsBlockchain, Ethereum and Business Applications
Blockchain, Ethereum and Business Applications
 
Blockchain Basics
Blockchain BasicsBlockchain Basics
Blockchain Basics
 
Blockchain - Presentacion Betabeers Galicia 10/12/2014
Blockchain - Presentacion Betabeers Galicia 10/12/2014Blockchain - Presentacion Betabeers Galicia 10/12/2014
Blockchain - Presentacion Betabeers Galicia 10/12/2014
 
Blockchain, cryptography, and consensus
Blockchain, cryptography, and consensusBlockchain, cryptography, and consensus
Blockchain, cryptography, and consensus
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Session 3 introduction blockchain by franco 22 januari
Session 3   introduction blockchain by franco 22 januariSession 3   introduction blockchain by franco 22 januari
Session 3 introduction blockchain by franco 22 januari
 
Introduction to blockchain Session @ Tie Pune
Introduction to blockchain Session @ Tie Pune Introduction to blockchain Session @ Tie Pune
Introduction to blockchain Session @ Tie Pune
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
How does a blockchain work?
How does a blockchain work?How does a blockchain work?
How does a blockchain work?
 
What to expect from Blockchain in 2019?
What to expect from Blockchain in 2019?What to expect from Blockchain in 2019?
What to expect from Blockchain in 2019?
 
Payment Protocols - Block Chain & Beyond
Payment Protocols - Block Chain & BeyondPayment Protocols - Block Chain & Beyond
Payment Protocols - Block Chain & Beyond
 
Bitcoin & Blockchain Basics
Bitcoin & Blockchain BasicsBitcoin & Blockchain Basics
Bitcoin & Blockchain Basics
 
Block chain introduction
Block chain introductionBlock chain introduction
Block chain introduction
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Blockchain-intro (2)
Blockchain-intro (2)Blockchain-intro (2)
Blockchain-intro (2)
 
Introduction to Blockchain Development
Introduction to Blockchain DevelopmentIntroduction to Blockchain Development
Introduction to Blockchain Development
 
An Introduction to Blockchain
An Introduction to BlockchainAn Introduction to Blockchain
An Introduction to Blockchain
 
The Blockchain - The Technology behind Bitcoin
The Blockchain - The Technology behind Bitcoin The Blockchain - The Technology behind Bitcoin
The Blockchain - The Technology behind Bitcoin
 
Blockchain, working [blockchain vs bitcoin] pros and cons
Blockchain, working [blockchain vs bitcoin] pros and consBlockchain, working [blockchain vs bitcoin] pros and cons
Blockchain, working [blockchain vs bitcoin] pros and cons
 
BLOCKCHAIN
BLOCKCHAINBLOCKCHAIN
BLOCKCHAIN
 

Similar to Grokking TechTalk #17: Introduction to blockchain

Similar to Grokking TechTalk #17: Introduction to blockchain (20)

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
 
BLOCKCHAIN PPT.pptx
BLOCKCHAIN PPT.pptxBLOCKCHAIN PPT.pptx
BLOCKCHAIN PPT.pptx
 
Banking on blockchains
Banking on blockchainsBanking on blockchains
Banking on blockchains
 
Ethereum Block Chain
Ethereum Block ChainEthereum Block Chain
Ethereum Block Chain
 
Building Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart ContractBuilding Apps with Ethereum Smart Contract
Building Apps with Ethereum Smart Contract
 
Paradigm shift: from the bitcoin Blockchain to Networked Computing
Paradigm shift: from the bitcoin Blockchain to Networked ComputingParadigm shift: from the bitcoin Blockchain to Networked Computing
Paradigm shift: from the bitcoin Blockchain to Networked Computing
 
Bitcoin and Blockchain
Bitcoin and BlockchainBitcoin and Blockchain
Bitcoin and Blockchain
 
The Bitcoin Rocketship @ BTC Miami 2015
The Bitcoin Rocketship @ BTC Miami 2015The Bitcoin Rocketship @ BTC Miami 2015
The Bitcoin Rocketship @ BTC Miami 2015
 
Introduction to Blockchain and Ethereum
Introduction to Blockchain and EthereumIntroduction to Blockchain and Ethereum
Introduction to Blockchain and Ethereum
 
Blockchain, smart contracts - introduction
Blockchain, smart contracts - introductionBlockchain, smart contracts - introduction
Blockchain, smart contracts - introduction
 
Intro to blockchain
Intro to blockchainIntro to blockchain
Intro to blockchain
 
Blockchain an introduction_n_li
Blockchain an introduction_n_liBlockchain an introduction_n_li
Blockchain an introduction_n_li
 
An Introduction to Blockchains
An Introduction to BlockchainsAn Introduction to Blockchains
An Introduction to Blockchains
 
Token Systems, Payment Channels, and Corporate Currencies
Token Systems, Payment Channels, and Corporate CurrenciesToken Systems, Payment Channels, and Corporate Currencies
Token Systems, Payment Channels, and Corporate Currencies
 
Hello world contract
Hello world contractHello world contract
Hello world contract
 
Blockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on AzureBlockchain Essentials and Blockchain on Azure
Blockchain Essentials and Blockchain on Azure
 
Ethereum Mining How To
Ethereum Mining How ToEthereum Mining How To
Ethereum Mining How To
 
Click Ventures Blockchain Ecosystem Report 2018
Click Ventures Blockchain Ecosystem Report 2018Click Ventures Blockchain Ecosystem Report 2018
Click Ventures Blockchain Ecosystem Report 2018
 
Cryptocurrencies and the Blockchain
Cryptocurrencies and the BlockchainCryptocurrencies and the Blockchain
Cryptocurrencies and the Blockchain
 

More from Grokking VN

Grokking Techtalk #46: Lessons from years hacking and defending Vietnamese banks
Grokking Techtalk #46: Lessons from years hacking and defending Vietnamese banksGrokking Techtalk #46: Lessons from years hacking and defending Vietnamese banks
Grokking Techtalk #46: Lessons from years hacking and defending Vietnamese banks
Grokking VN
 
Grokking Techtalk #45: First Principles Thinking
Grokking Techtalk #45: First Principles ThinkingGrokking Techtalk #45: First Principles Thinking
Grokking Techtalk #45: First Principles Thinking
Grokking VN
 
Grokking Techtalk #43: Payment gateway demystified
Grokking Techtalk #43: Payment gateway demystifiedGrokking Techtalk #43: Payment gateway demystified
Grokking Techtalk #43: Payment gateway demystified
Grokking VN
 
Grokking Techtalk #34: K8S On-premise: Incident & Lesson Learned ZaloPay Mer...
 Grokking Techtalk #34: K8S On-premise: Incident & Lesson Learned ZaloPay Mer... Grokking Techtalk #34: K8S On-premise: Incident & Lesson Learned ZaloPay Mer...
Grokking Techtalk #34: K8S On-premise: Incident & Lesson Learned ZaloPay Mer...
Grokking VN
 

More from Grokking VN (20)

Grokking Techtalk #46: Lessons from years hacking and defending Vietnamese banks
Grokking Techtalk #46: Lessons from years hacking and defending Vietnamese banksGrokking Techtalk #46: Lessons from years hacking and defending Vietnamese banks
Grokking Techtalk #46: Lessons from years hacking and defending Vietnamese banks
 
Grokking Techtalk #45: First Principles Thinking
Grokking Techtalk #45: First Principles ThinkingGrokking Techtalk #45: First Principles Thinking
Grokking Techtalk #45: First Principles Thinking
 
Grokking Techtalk #42: Engineering challenges on building data platform for M...
Grokking Techtalk #42: Engineering challenges on building data platform for M...Grokking Techtalk #42: Engineering challenges on building data platform for M...
Grokking Techtalk #42: Engineering challenges on building data platform for M...
 
Grokking Techtalk #43: Payment gateway demystified
Grokking Techtalk #43: Payment gateway demystifiedGrokking Techtalk #43: Payment gateway demystified
Grokking Techtalk #43: Payment gateway demystified
 
Grokking Techtalk #40: Consistency and Availability tradeoff in database cluster
Grokking Techtalk #40: Consistency and Availability tradeoff in database clusterGrokking Techtalk #40: Consistency and Availability tradeoff in database cluster
Grokking Techtalk #40: Consistency and Availability tradeoff in database cluster
 
Grokking Techtalk #40: AWS’s philosophy on designing MLOps platform
Grokking Techtalk #40: AWS’s philosophy on designing MLOps platformGrokking Techtalk #40: AWS’s philosophy on designing MLOps platform
Grokking Techtalk #40: AWS’s philosophy on designing MLOps platform
 
Grokking Techtalk #39: Gossip protocol and applications
Grokking Techtalk #39: Gossip protocol and applicationsGrokking Techtalk #39: Gossip protocol and applications
Grokking Techtalk #39: Gossip protocol and applications
 
Grokking Techtalk #39: How to build an event driven architecture with Kafka ...
 Grokking Techtalk #39: How to build an event driven architecture with Kafka ... Grokking Techtalk #39: How to build an event driven architecture with Kafka ...
Grokking Techtalk #39: How to build an event driven architecture with Kafka ...
 
Grokking Techtalk #38: Escape Analysis in Go compiler
 Grokking Techtalk #38: Escape Analysis in Go compiler Grokking Techtalk #38: Escape Analysis in Go compiler
Grokking Techtalk #38: Escape Analysis in Go compiler
 
Grokking Techtalk #37: Data intensive problem
 Grokking Techtalk #37: Data intensive problem Grokking Techtalk #37: Data intensive problem
Grokking Techtalk #37: Data intensive problem
 
Grokking Techtalk #37: Software design and refactoring
 Grokking Techtalk #37: Software design and refactoring Grokking Techtalk #37: Software design and refactoring
Grokking Techtalk #37: Software design and refactoring
 
Grokking TechTalk #35: Efficient spellchecking
Grokking TechTalk #35: Efficient spellcheckingGrokking TechTalk #35: Efficient spellchecking
Grokking TechTalk #35: Efficient spellchecking
 
Grokking Techtalk #34: K8S On-premise: Incident & Lesson Learned ZaloPay Mer...
 Grokking Techtalk #34: K8S On-premise: Incident & Lesson Learned ZaloPay Mer... Grokking Techtalk #34: K8S On-premise: Incident & Lesson Learned ZaloPay Mer...
Grokking Techtalk #34: K8S On-premise: Incident & Lesson Learned ZaloPay Mer...
 
Grokking TechTalk #33: High Concurrency Architecture at TIKI
Grokking TechTalk #33: High Concurrency Architecture at TIKIGrokking TechTalk #33: High Concurrency Architecture at TIKI
Grokking TechTalk #33: High Concurrency Architecture at TIKI
 
Grokking TechTalk #33: Architecture of AI-First Systems - Engineering for Big...
Grokking TechTalk #33: Architecture of AI-First Systems - Engineering for Big...Grokking TechTalk #33: Architecture of AI-First Systems - Engineering for Big...
Grokking TechTalk #33: Architecture of AI-First Systems - Engineering for Big...
 
SOLID & Design Patterns
SOLID & Design PatternsSOLID & Design Patterns
SOLID & Design Patterns
 
Grokking TechTalk #31: Asynchronous Communications
Grokking TechTalk #31: Asynchronous CommunicationsGrokking TechTalk #31: Asynchronous Communications
Grokking TechTalk #31: Asynchronous Communications
 
Grokking TechTalk #30: From App to Ecosystem: Lessons Learned at Scale
Grokking TechTalk #30: From App to Ecosystem: Lessons Learned at ScaleGrokking TechTalk #30: From App to Ecosystem: Lessons Learned at Scale
Grokking TechTalk #30: From App to Ecosystem: Lessons Learned at Scale
 
Grokking TechTalk #29: Building Realtime Metrics Platform at LinkedIn
Grokking TechTalk #29: Building Realtime Metrics Platform at LinkedInGrokking TechTalk #29: Building Realtime Metrics Platform at LinkedIn
Grokking TechTalk #29: Building Realtime Metrics Platform at LinkedIn
 
Grokking TechTalk #27: Optimal Binary Search Tree
Grokking TechTalk #27: Optimal Binary Search TreeGrokking TechTalk #27: Optimal Binary Search Tree
Grokking TechTalk #27: Optimal Binary Search Tree
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Grokking TechTalk #17: Introduction to blockchain

  • 2. 2 Agenda 1. What is a Blockchain? 2. Introduction to Ethereum
  • 3. 3 1. WHAT IS A BLOCKCHAIN?
  • 4. 4 FIRST, WHY DO WE CARE ABOUT BLOCKCHAINS? A blockchain allows for trustless transactions between multiple parties. Or, more importantly, it allows transactions without trust of a third party intermediary!
  • 6. 6 BLOCKCHAIN = DISTRIBUTED LEDGER + CONSENSUS A list of transactions between accounts (a ledger) are stored on distributed “nodes”. New transactions are periodically added into a block. Nodes use an agreed upon protocol to reach consensus on when a new block is appended to the chain of previous blocks.
  • 7. 7 A TRANSACTION THAT OCCURS BETWEEN ACCOUNTS Transaction #399 Account A Account B E.g. Send 10 tokens An example transaction could be: Account A will send 10 tokens to Account B
  • 8. 8 A LEDGER IS A LIST OF TRANSACTIONS (GROUPED INTO BLOCKS) LEDGER Block #100 Last Block: #99 Transaction #399 Transaction #400 Transaction #401 Block #97 Block #98 Block #99
  • 9. 9 BLOCKS ARE CHAINED TOGETHER LEDGER Block #100 Last Block: #99 Transaction #399 Transaction #400 Block #97 Block #98 Block #99 The ledger is a chain of blocks! Each block is created with a pointer to the previous block creating a blockchain! The ledger is a chain of blocks! Each block is created with a pointer to the previous block creating a blockchain!
  • 10. 10 THE LEDGER IS COPIED AND DISTRIBUTED AMONG NODES � � � � �
  • 11. 11 EACH NODE HAS A COPY OF THE LEDGER AND AT LEAST ONE OF THEM WILL CREATE THE NEXT BLOCK! � � � � � 11
  • 12. 12 EXAMPLE CONSENSUS PROTOCOL: PROOF OF WORK Different methods or protocols exist for distributed nodes to reach consensus
  • 13. 13 NODES ATTEMPTING TO CREATE NEW BLOCKS ARE USUALLY CALLED “MINERS” � � � � �The first Miner to solve a hard math problem creates the next block and is rewarded
  • 14. 14 E.g. Bitcoin Miners currently receive 12.5 BTC plus all included transaction fees New block: Every ~10 minutes THE MAJORITY OF PoW BLOCKCHAINS INCENTIVIZE MINERS WITH REWARDS E.g. Ethereum Miners currently receive 5 ETH plus all included gas fees (more on this shortly) New block: Every ~15 seconds
  • 15. 15 A BRIEF HISTORY OF BLOCKCHAINS ▸ 2008: Bitcoin and blockchain idea gifted to world by “Satoshi Nakamoto” ▸ 2009: Bitcoin client released (open source) ▸ 2011: Litecoin, first “altcoin,” released (based on bitcoin source code) ▸ 2014: Ethereum whitepaper released/crowdsale ▸ 2015: Ethereum “Frontier” launched
  • 17. 17 WHAT IS ETHEREUM? OPEN SOURCE Like Bitcoin, Ethereum is a public blockchain no one controls or owns.
  • 18. 18 WHAT IS ETHEREUM? OPEN SOURCE Like Bitcoin, Ethereum is a public blockchain no one controls or owns. PROOF OF WORK CONSENSUS The Ethereum Whitepaper specifies the PoW rules and 4+ major clients exist and run the “nodes”.
  • 19. 19 WHAT IS ETHEREUM? OPEN SOURCE Like Bitcoin, Ethereum is a public blockchain no one controls or owns. PROOF OF WORK CONSENSUS The Ethereum Whitepaper specifies the PoW rules and 4+ major clients exist and run the “nodes”. ETHEREUM VIRTUAL MACHINE (EVM) Transactions are more than just values, but “Turing” complete programs that run when blocks are processed by nodes.
  • 20. 20 ETHEREUM VIRTUAL MACHINE General Purpose Supports Bitcoin- like value transactions (e.g. send 10 ETH from account A to B) or more complex applications.
  • 21. 21 ETHEREUM VIRTUAL MACHINE General Purpose Supports Bitcoin- like value transactions (e.g. send 10 ETH from account A to B) or more complex applications. Smart Contracts Turing complete languages (e.g. Solidity) allow the Ethereum transactions to be programmed to do different operations.
  • 22. 22 ETHEREUM VIRTUAL MACHINE General Purpose Supports Bitcoin- like value transactions (e.g. send 10 ETH from account A to B) or more complex applications. Smart Contracts Turing complete languages (e.g. Solidity) allow the Ethereum transactions to be programmed to do different operations. Decentralized Apps (DApps) GUIs for smart contracts allow users to interact in ways similar to web 2.0 (HTML/JS/CSS).
  • 23. 23 THINK: WORLD COMPUTER The Ethereum blockchain is the first “decentralized world computer” to ever exist!
  • 24. 24 TRANSACTIONS AND CONTRACTS Two types of Accounts ▸ Externally owned accounts (controlled by people/keys similar to Bitcoin) ▸ Contract accounts (controlled by smart contract code)
  • 25. 25 TRANSACTIONS AND CONTRACTS Transactions can include more than just value transfer; they can include programming or bytecode that does things (smart contracts) Transaction #3512 If (Account A == Member) && (Date >= 4Q): Dividend = 25% the current value of Contract C: Transaction: Contract C Account A Send Dividend
  • 26. 26 TRANSACTIONS AND CONTRACTS Submitting transactions and contracts to the blockchain has an associated “gas” cost paid in Ether based on the complexity of the operations. Transaction #256 If (Account A == Member) && (Date >= 4Q): Dividend = 50% the current value of Contract C: Transaction: Contract C Send Dividend IF +70 Gas AND +30 Gas EQUAL? +40 Gas DIVIDE +120 Gas SEND +20 Gas TOTAL COST = 280 Gas
  • 27. 27 TRANSACTIONS AND CONTRACTS LEDGER Block #26 Last Block: #25 Transaction #256 Transaction #257 Transaction #258 Block #23 Block #24 Block #25
  • 28. 28 TRANSACTIONS AND CONTRACTS Think of the Ethereum Ledger like a SPREADSHEET Cells can just have a value or they can give the result of a macro/script. Trans- action Account A Account B Account C (Contract) #256 10 10 0 #257 5 5 10 #258 10 5 Dividend(A)
  • 29. 29 THIS IS AN EXAMPLE SMART CONTRACT WRITTEN IN SOLIDITY contract MyToken { /* This creates an array with all balances */ mapping (address => uint256) public balanceOf; /* Initializes contract with initial supply tokens to the creator of the contract */ function MyToken( uint256 initialSupply ) { balanceOf[msg.sender] = initialSupply; // Give the creator all initial tokens } /* Send coins */ function transfer(address _to, uint256 _value) { if (balanceOf[msg.sender] < _value) throw; // Check if the sender has enough if (balanceOf[_to] + _value < balanceOf[_to]) throw; // Check for overflows balanceOf[msg.sender] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient } }
  • 30. 30 USE CASES FOR DAPPS AND PROJECTS IN DEVELOPMENT Decentralized Exchange Convert between crypto-currencies and tokens EtherDelta, EtherEx Prediction Market Utilize the wisdom of the crowd to predict future events Augur, Gnosis Distributed Computing Enable users to lease out spare compute cycles (think: uber for your computer, dAWS) Golem Identity Management Retain ownership of your online identity, metadata, and relationships. uPort Crowd Sale Platform Create a custom token for trade, payment, customer loyalty, etc. and take it to market. Ethereum, Firstblood Digital Asset Management Manage, buy, sell physical objects cryptographically tied to digital tokens. Digix
  • 31. 31 Thank you for your listening