Blockchain & Smart Contracts!
Introduction to Blockchain and Smart Contracts
Saad Zaher/ 21 March, 2018
Agenda
• What is a Blockchain ?
• Why do so many exist?
• Consensus Algorithms
• Smart Contracts
• Public vs Private
• Blockchain Generations
• Use Cases
• CIT and Blockchain
3
 Pointnext Consulting has 55+ team
members based in Galway working for
Hybrid Cloud as well as Network,
Mobility and Blockchain.
 Agile Service Delivery, Management
approach.
 Very strong Knowledge Sharing and
collaboration.
 Mix of Engineers, Developers,
consultant, Architects
 Working from the office culture.
Areas of Expertise
 Cloud Innovation Team
OpenStack and related cloud technologies. We
help customers deploy, automate and orchestrate
on premise Cloud solutions as well as integrate
them with Public Cloud resources when required.
 WW Blockchain Team for Pointnext Consulting.
Deliver blockchain based projects using the latest
blockchain and cloud based technologies.
 Network and Mobility
Application and Workplace Services:
 App Migration & Lifecycle Mgt.
 Image Build | O365
 Mobile App Development leveraging Aruba
 Meridian Asset Tracking and Location
 Application Development for Edge & IOT
People
Galway
Ireland
 Galway is an HPE site in the west of
Ireland with a focus on research and
development for organizations like EG
Product development, Cyber Security
and Pointnext Services and tools
(Support and Consulting).
 Collaboration across organizations is
fast and encouraged.
 Good track record on near shore and
effective delivery.
 Large R&D Lab
Site
Success
Delivered
Hybrid Cloud & Network and MobilityHPE Pointnext Consulting Galway
Expertize
5
Development Databases Virtualization
Messaging BrokerContainersAutomationBlockchain
“The blockchain is the most important
technology since the internet itself.”
6
Mark Andreessen: Cofounder of Netscape
Board of Directors of: Facebook, eBay, & HPE
World Wide Web Hall of Fame Member
What is a Blockchain ?
7
Blockchain
8
“A blockchain is a decentralized, “public” database/ledger that can record transactions in a verifiable and
permanent way in a trustless environment.” Sutardja Center Berkeley Engineering
Blockchain
“A blockchain is a decentralized, “public” database/ledger that can record transactions in a verifiable and
permanent way in a trustless environment.” Sutardja Center Berkeley Engineering
9
Peer to peer network of nodes without
central authority
Blockchain
“A blockchain is a decentralized, “public” database/ledger that can record transactions in a verifiable and
permanent way in a trustless environment.” Sutardja Center Berkeley Engineering
10
Every participant of a blockchain network can obtain
a copy of all data in the blockchain
Blockchain
“A blockchain is a decentralized, public database/ledger that can record transactions in a verifiable and
permanent way in a trustless environment.” Sutardja Center Berkeley Engineering
11
TX 1
TX 2
TX 3
TX 4
TX 5
TX 6
Blockchain
“A blockchain is a decentralized, public database/ledger that can record transactions in a verifiable and
permanent way in a trustless environment.” Sutardja Center Berkeley Engineering
12
Miners verify the transactions and use a consensus
algorithm to agree on the state of the system
Miners usually get paid a fee for their work
“Why do we have so many blockchains ?”
13
What is different
14
What is different
15
Consensus Algorithms
Proof of Work (PoW)
– Is the validation of the work that happened and proving it is
correct.
– Nodes should provide not only the correct answer to a
certain math problem but also a proof of steps
– Prevents DDoS attacks (very expensive to attack the
network)
– Problems:
– Requires more electric power (more cost)
– High computing power hardware is expensive
– Miners could move to a different coin if the reward is higher or
better
Proof of Stake (PoS)
– It will pick the validator based on the amount of stake
(coin) they have and the respective age of the stake.
– It you move your coin from one address/wallet to another
the aging gets reset
– The amount of stake is like a security deposit
– Way more efficient than PoW
– More greener (energy saver) and cheaper distributed
form of consensus.
– Forging
– Problems:
– Safety
– Cheaper to attack
16
Blockchains
Public
– Publicly available
– Based on proof of work, proof of stake or other consensus
algorithms
– Anyone can participate
– Bitcoin, Litecoin, Ethereum, Monero
– Slower due to large network
– Identity mostly anonymous
Private
– Private property of an individual or an organization
– Write permissions are kept centralized to one
organization.
– Read permissions may be public or restricted.
– It has some security advantages
– Pre-approved participants
– Faster
– Known identities
– Any asset
17
Blockchain 1.0
Public Blockchains
18
Blockchain 1.0
First Generation Blockchain
19
++
• Specific use-cases:
• Cryptocurrency (Bitcoin)
• Decentralized DNS (NameCoin)
• Public irreversible database (ColoredCoin)
Bitcoin
– Decentralized Digital Currency
– A peer to peer electronic cash system that enables online cryptocurrency payments
– Created in 2009 by an unidentified entity under the pseudonym Satoshi Nakamoto
– As of today all bitcoins in existence are worth $150+ Billion
– Can be traded for real cash at online exchanges
– Major companies (Microsoft, Virgin etc.) accept bitcoins as payment
– Bitcoin is transaction centric and largely stateless and that makes it difficult to build real world applications
20
Bitcoin
21
Blockchain 2.0
Smart Contracts!
22
Blockchain 2.0
Second Generation Blockchain
23
++
• Ethereum
• Corda
• Hyperledger
+
Smart Contracts!
24
What is a Smart Contract?
– Smart contracts help you exchange “money”, property, shares or anything of value in a transparent,
conflict-free way while avoiding the services of a middleman.
– Pre-written logic in the form of computer code
– Stored and replicated on the blockchain
– Executed and run by the network of computers running the blockchain
– Can result in updates to accounts on the ledger i.e. (payment for an executed contract)
25
How Smart Contracts work?
26
Mutually agreed
upon conditions
for execution “if
this, then that”
Send 5 ETH if
contract is
executed
Uses code and
math to decide if
contract conditions
are met, if so funds
are transferred
automatically Receives 5 ETH
if contract is
executed
Benefits of Smart Contracts
– Autonomy: There is no need to rely on third parties, which could be biased or not have your interests at heart.
– Trust: Your documents are encrypted on a shared ledger and all parties can have access to them
– Redundancy: Documents are duplicated many times over the blockchain and can’t ever be lost.
– Safety: Documents are encrypted, making them near-impenetrable by hackers.
– Speed: Smart contracts are automatically self-execute, saving you time.
– Savings: Smart contracts save you money by taking out the middleman.
– Precision: Smart contracts execute the exact code provided, ensuring zero errors.
– Transparency: Smart contracts could add another level of transparency to dealings.
27
Smart Contracts Resources
– Solidity
– Blockapps Strato
– Cakeshop JP Mogran Chase
– State of the Dapps
– Etherparty
– OpenZeppelin
– Truffle
28
CakeShop
Successful Smart Contracts (Dapps)
29
Successful Smart Contracts (Dapps)
30
Successful Smart Contracts (Dapps)
31
Blockchain 3.0
???
32
Smart Economy: NEO
– NEO is a non-profit community-based blockchain project that utilizes blockchain technology and digital identity to
digitize assets, to automate the management of digital assets using smart contracts, and to realize a "smart
economy" with a distributed network.
– Digital Assets + Digital Identity + Smart Contracts = Smart Economy
– In Neo 2.0:
– Cross-chain protocol
– Quantum-resistant cryptography
– Distributed storage protocol
– Secure communication protocol.
33
Use Cases
34
35
36
CIT Blockchain Projects
37
Catena
Blockchain as a Service
38
Catena: Blockchain as a service
– Opensource!
• A framework that simplifies the deployment and usage of private blockchains on cloud platforms
• Currently supported Cloud platforms:
• Azure
• OpenStack
• Docker containers
• Supports Ethereum
• Ethereum Proof of Work
• Ethereum Proof of Stack
• What it does
• Automate the deployment of blockchains
• Automate the configuration of blockchains
• Scale your blockchain (add/remove nodes to the chain)
• Dashboards and monitoring tools
39
Catena: Blockchain as a service
40
Catena: Blockchain as a service
41
iRobot
– POC for monetizing pay-as-you-go services using Blockchain
– Presentation and interactive demo delivered at HPE Discover 2017 in Las Vegas
– Deliver end-to-end experience and functionality using Ethereum, Azure and IOT to transform traditional
services business to the services of the future
– Provide visual appealing environment for all parties involved to interact, participate and manage the
platform
– Technologies used:
– Ethereum
– Blockchain as a Service on Microsoft Azure
– Smart Contracts, Proof of Authority Consensus
– Roomba iRobot with built in IOT device for data collection, monitoring and interacting with the environment
42
iRobot
43
Request
Cleaning Schedule Job
Notify Job Done
Request
Electricity
Release payment to Electricity
Provider
Charge
Completed
Recharge
Release payment to provider
Charge Battery
Activate Power
Socket
Drive to
room and
clean
Drive to the hub
to charge
End User Smart Contract Cleaning Robot Smart Socket Electricity
Provider
Service
Provider
IoT: Rewards for sharing sensor and driving data
44
Primary Actor
- Car sensors
- Driver
- Data buyer (e.g. for deep learning,
advertisement, etc.)
Goal in Context
- Driver controlled sharing of sensor and driving
data with rewards
Scope
- Collect as much as possible sensor and driving
data
- Store data on Blockchain
- Agree via Smart Contract to share data to
interested data buyers and get rewarded in
return
Stakeholders and Interests
- Drivers
- Fleets
- Data collectors
- Advertisers
Precondition
- Access to car sensor data (e.g. rain sensor,
GPS, etc.) and driving behavior measurement
(e.g. acceleration, speed, etc.)
- Blockchain node in the car
- Upload and data replication function via internet
- Possibility to show information on car-display to
show rewards
Minimal Guarantees
- Sensor data can be sold via Smart Contract
and rewards are earned
Success Guarantees
- Showcase is demonstrably on events like
HPE Discover without driving
Trigger
- Ignition is switched
Basic Flow
- Ignition is switched on
- Display asked drive whether she wants to
share upcoming trip-data and get rewarded
- After accepting, data is collected and sold
- Earned rewards are shown on display
Extensions
- Data buying platform with bid-function
Technology & Data Variations List
- Tbd.
Time to implement
- Tbd.
Architecture
45
Client Blockchain (Baas) Car (including Edgeline)
Web3/Ethjs
Interface (index.js)
Website
(index.html
including
required scripts)
Metamask
(localhost)
Geth
Smart
Contract
Factory
(RaindataFact
ory.sol)
Smart Contract
(RainDataMoneti
zer.sol)
Sensor and
CANBus
Shared Memory
Web3
(carsensor.js)
Tools
46
Please give us your feedback!
iOS Android
Thank you
Saad Zaher
saad.zaher@hpe.com
eng.szaher@gmail.com
48

Introduction to Blockchain and Smart Contracts

  • 2.
    Blockchain & SmartContracts! Introduction to Blockchain and Smart Contracts Saad Zaher/ 21 March, 2018
  • 3.
    Agenda • What isa Blockchain ? • Why do so many exist? • Consensus Algorithms • Smart Contracts • Public vs Private • Blockchain Generations • Use Cases • CIT and Blockchain 3
  • 4.
     Pointnext Consultinghas 55+ team members based in Galway working for Hybrid Cloud as well as Network, Mobility and Blockchain.  Agile Service Delivery, Management approach.  Very strong Knowledge Sharing and collaboration.  Mix of Engineers, Developers, consultant, Architects  Working from the office culture. Areas of Expertise  Cloud Innovation Team OpenStack and related cloud technologies. We help customers deploy, automate and orchestrate on premise Cloud solutions as well as integrate them with Public Cloud resources when required.  WW Blockchain Team for Pointnext Consulting. Deliver blockchain based projects using the latest blockchain and cloud based technologies.  Network and Mobility Application and Workplace Services:  App Migration & Lifecycle Mgt.  Image Build | O365  Mobile App Development leveraging Aruba  Meridian Asset Tracking and Location  Application Development for Edge & IOT People Galway Ireland  Galway is an HPE site in the west of Ireland with a focus on research and development for organizations like EG Product development, Cyber Security and Pointnext Services and tools (Support and Consulting).  Collaboration across organizations is fast and encouraged.  Good track record on near shore and effective delivery.  Large R&D Lab Site Success Delivered Hybrid Cloud & Network and MobilityHPE Pointnext Consulting Galway
  • 5.
  • 6.
    “The blockchain isthe most important technology since the internet itself.” 6 Mark Andreessen: Cofounder of Netscape Board of Directors of: Facebook, eBay, & HPE World Wide Web Hall of Fame Member
  • 7.
    What is aBlockchain ? 7
  • 8.
    Blockchain 8 “A blockchain isa decentralized, “public” database/ledger that can record transactions in a verifiable and permanent way in a trustless environment.” Sutardja Center Berkeley Engineering
  • 9.
    Blockchain “A blockchain isa decentralized, “public” database/ledger that can record transactions in a verifiable and permanent way in a trustless environment.” Sutardja Center Berkeley Engineering 9 Peer to peer network of nodes without central authority
  • 10.
    Blockchain “A blockchain isa decentralized, “public” database/ledger that can record transactions in a verifiable and permanent way in a trustless environment.” Sutardja Center Berkeley Engineering 10 Every participant of a blockchain network can obtain a copy of all data in the blockchain
  • 11.
    Blockchain “A blockchain isa decentralized, public database/ledger that can record transactions in a verifiable and permanent way in a trustless environment.” Sutardja Center Berkeley Engineering 11 TX 1 TX 2 TX 3 TX 4 TX 5 TX 6
  • 12.
    Blockchain “A blockchain isa decentralized, public database/ledger that can record transactions in a verifiable and permanent way in a trustless environment.” Sutardja Center Berkeley Engineering 12 Miners verify the transactions and use a consensus algorithm to agree on the state of the system Miners usually get paid a fee for their work
  • 13.
    “Why do wehave so many blockchains ?” 13
  • 14.
  • 15.
  • 16.
    Consensus Algorithms Proof ofWork (PoW) – Is the validation of the work that happened and proving it is correct. – Nodes should provide not only the correct answer to a certain math problem but also a proof of steps – Prevents DDoS attacks (very expensive to attack the network) – Problems: – Requires more electric power (more cost) – High computing power hardware is expensive – Miners could move to a different coin if the reward is higher or better Proof of Stake (PoS) – It will pick the validator based on the amount of stake (coin) they have and the respective age of the stake. – It you move your coin from one address/wallet to another the aging gets reset – The amount of stake is like a security deposit – Way more efficient than PoW – More greener (energy saver) and cheaper distributed form of consensus. – Forging – Problems: – Safety – Cheaper to attack 16
  • 17.
    Blockchains Public – Publicly available –Based on proof of work, proof of stake or other consensus algorithms – Anyone can participate – Bitcoin, Litecoin, Ethereum, Monero – Slower due to large network – Identity mostly anonymous Private – Private property of an individual or an organization – Write permissions are kept centralized to one organization. – Read permissions may be public or restricted. – It has some security advantages – Pre-approved participants – Faster – Known identities – Any asset 17
  • 18.
  • 19.
    Blockchain 1.0 First GenerationBlockchain 19 ++ • Specific use-cases: • Cryptocurrency (Bitcoin) • Decentralized DNS (NameCoin) • Public irreversible database (ColoredCoin)
  • 20.
    Bitcoin – Decentralized DigitalCurrency – A peer to peer electronic cash system that enables online cryptocurrency payments – Created in 2009 by an unidentified entity under the pseudonym Satoshi Nakamoto – As of today all bitcoins in existence are worth $150+ Billion – Can be traded for real cash at online exchanges – Major companies (Microsoft, Virgin etc.) accept bitcoins as payment – Bitcoin is transaction centric and largely stateless and that makes it difficult to build real world applications 20
  • 21.
  • 22.
  • 23.
    Blockchain 2.0 Second GenerationBlockchain 23 ++ • Ethereum • Corda • Hyperledger +
  • 24.
  • 25.
    What is aSmart Contract? – Smart contracts help you exchange “money”, property, shares or anything of value in a transparent, conflict-free way while avoiding the services of a middleman. – Pre-written logic in the form of computer code – Stored and replicated on the blockchain – Executed and run by the network of computers running the blockchain – Can result in updates to accounts on the ledger i.e. (payment for an executed contract) 25
  • 26.
    How Smart Contractswork? 26 Mutually agreed upon conditions for execution “if this, then that” Send 5 ETH if contract is executed Uses code and math to decide if contract conditions are met, if so funds are transferred automatically Receives 5 ETH if contract is executed
  • 27.
    Benefits of SmartContracts – Autonomy: There is no need to rely on third parties, which could be biased or not have your interests at heart. – Trust: Your documents are encrypted on a shared ledger and all parties can have access to them – Redundancy: Documents are duplicated many times over the blockchain and can’t ever be lost. – Safety: Documents are encrypted, making them near-impenetrable by hackers. – Speed: Smart contracts are automatically self-execute, saving you time. – Savings: Smart contracts save you money by taking out the middleman. – Precision: Smart contracts execute the exact code provided, ensuring zero errors. – Transparency: Smart contracts could add another level of transparency to dealings. 27
  • 28.
    Smart Contracts Resources –Solidity – Blockapps Strato – Cakeshop JP Mogran Chase – State of the Dapps – Etherparty – OpenZeppelin – Truffle 28 CakeShop
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
    Smart Economy: NEO –NEO is a non-profit community-based blockchain project that utilizes blockchain technology and digital identity to digitize assets, to automate the management of digital assets using smart contracts, and to realize a "smart economy" with a distributed network. – Digital Assets + Digital Identity + Smart Contracts = Smart Economy – In Neo 2.0: – Cross-chain protocol – Quantum-resistant cryptography – Distributed storage protocol – Secure communication protocol. 33
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
    Catena: Blockchain asa service – Opensource! • A framework that simplifies the deployment and usage of private blockchains on cloud platforms • Currently supported Cloud platforms: • Azure • OpenStack • Docker containers • Supports Ethereum • Ethereum Proof of Work • Ethereum Proof of Stack • What it does • Automate the deployment of blockchains • Automate the configuration of blockchains • Scale your blockchain (add/remove nodes to the chain) • Dashboards and monitoring tools 39
  • 40.
  • 41.
  • 42.
    iRobot – POC formonetizing pay-as-you-go services using Blockchain – Presentation and interactive demo delivered at HPE Discover 2017 in Las Vegas – Deliver end-to-end experience and functionality using Ethereum, Azure and IOT to transform traditional services business to the services of the future – Provide visual appealing environment for all parties involved to interact, participate and manage the platform – Technologies used: – Ethereum – Blockchain as a Service on Microsoft Azure – Smart Contracts, Proof of Authority Consensus – Roomba iRobot with built in IOT device for data collection, monitoring and interacting with the environment 42
  • 43.
    iRobot 43 Request Cleaning Schedule Job NotifyJob Done Request Electricity Release payment to Electricity Provider Charge Completed Recharge Release payment to provider Charge Battery Activate Power Socket Drive to room and clean Drive to the hub to charge End User Smart Contract Cleaning Robot Smart Socket Electricity Provider Service Provider
  • 44.
    IoT: Rewards forsharing sensor and driving data 44 Primary Actor - Car sensors - Driver - Data buyer (e.g. for deep learning, advertisement, etc.) Goal in Context - Driver controlled sharing of sensor and driving data with rewards Scope - Collect as much as possible sensor and driving data - Store data on Blockchain - Agree via Smart Contract to share data to interested data buyers and get rewarded in return Stakeholders and Interests - Drivers - Fleets - Data collectors - Advertisers Precondition - Access to car sensor data (e.g. rain sensor, GPS, etc.) and driving behavior measurement (e.g. acceleration, speed, etc.) - Blockchain node in the car - Upload and data replication function via internet - Possibility to show information on car-display to show rewards Minimal Guarantees - Sensor data can be sold via Smart Contract and rewards are earned Success Guarantees - Showcase is demonstrably on events like HPE Discover without driving Trigger - Ignition is switched Basic Flow - Ignition is switched on - Display asked drive whether she wants to share upcoming trip-data and get rewarded - After accepting, data is collected and sold - Earned rewards are shown on display Extensions - Data buying platform with bid-function Technology & Data Variations List - Tbd. Time to implement - Tbd.
  • 45.
    Architecture 45 Client Blockchain (Baas)Car (including Edgeline) Web3/Ethjs Interface (index.js) Website (index.html including required scripts) Metamask (localhost) Geth Smart Contract Factory (RaindataFact ory.sol) Smart Contract (RainDataMoneti zer.sol) Sensor and CANBus Shared Memory Web3 (carsensor.js)
  • 46.
  • 47.
    Please give usyour feedback! iOS Android
  • 48.