Better
software,
faster
MEETUP 31 AUGUST
BLOCKCHAIN
IN ACTION
Disruptive technology under the loop
2
Roy Wasse / Twitter @roywasse
Encantado
◦ Roy Wasse
◦ Co-Founder OpenValue
◦ NLJUG Board member
◦ Blockchain & cryptocurrency fan 
3
Trust is obsolete
4
Evolution of digital cash
80’s 1st wave
• Digital Tokens
• Digicash
90’s 2nd wave
• E-gold
• Paypal
00’s 3rd wave
• Bitcoin & Blockchain
5
6
Two generals problem
7
Issues payment system w/o bank
How to guarantee
messages arrive at
destination
How to do prevent
manipulation
How to make sure
a coin is only spend
once!
8
Basic idea: don’t use messenger
◦ Image generals consult a nearby village
◦ 5% chance peasant from village gives wrong info
◦ Asks any 6 peasants, chance 4 giving incorrect information is
0,05 * 0.05 * 0.05 * 0.05 = 0,00000625%
◦ A malicious peasant will not be able to manipulate transaction
9
4 key
innovations
◦ Peer 2 Peer network
◦ Distributed Ledger
◦ Consensus mechanism
◦ Incentive to process
transactions through ‘proof
of work’
10
Blockchain structure
◦ Every node records all transactions / holds
copy
◦ Transactions are collected in a block
◦ Every block links to the previous block
◦ New block should be accepted by the majority
of the nodes
11
Size blockchain
12
https://blockchain.info/nl/charts/blocks-size
Blockchain deep
dive: Hash
◦ Input “Hashing is niet ingewikkeld”
◦ Take position in alphabet for each letter,
add it all together. :
8+1+19+8+9+14+7+0+9+19+0+14+9+5
+20+0+9+14+7+5+23+9+11+11+5+4 =
240
◦ Multiply by 1 million
◦ Divide it by Julian date 28 june 2017 =
2457932.922454)
◦ Uitkomst = 97,64302 = Hash
13
Original Hash
14
Buying a cup of coffee
with BTC
◦ Julian buys a cop of coffee from Bob the barista and pays
with BTC
◦ Bob has to publish his bitcoin address, Julian then signs a
transaction wit his private key and sends it over the
network and only Bob can redeem the bitcoins send.
15
16
17
18
19
Public/Private key encryption
◦ Encryption: Hello -> position + 1 -> Ifmmp
◦ Asymmetric encryption
◦ Key to read information not the same as one used to decrypt
◦ Elliptic Curve Multiplication used to derive Public key
◦ Lot safer than RSA, which is pretty safe
◦ y2 = x3 + ax + b
◦ Bitcoin address is SHA-256 hash from public key
◦ Base 58 encoded to make it (a bit) more readable
◦ Relatively safe for quantum computing
20
Simplified
Bitcoin
Transaction
◦ Sender should acquire public key hash (bitcoin
address) from recipient
◦ Sender signs the transaction with his private key and
sends it to nodes in the bitcoin network
◦ Network checks if sender is allowed to spent the
bitcoins involved
◦ Recipients wallet detects transaction, runs
unlockingscript with that proofs he has private key
related to public key hash
◦ Transaction is put in a block
◦ Once block is adopted by blockchain, transaction is
settled
21
22
Mining & Consensus
◦ Nodes in network are incentivized to process next blocks = mining
◦ Miner solves crypto puzzle to process block = Proof of Work
◦ Other miners check if puzzle is solved correctly
◦ Blockchain is eventually consistent
23
0
1 2 3
Concept of Proof of work
◦ “Hashing is niet ingewikkeld”
◦ For each letter, take position in alphabet and add:
8+1+19+8+9+14+7+0+9+19+0+14+9+5+20+0+9+14+7+5+23+9+11+11+5+4 = 240
◦ Multiply with one million
◦ Divide outcome by a missing number causing the result to start with 97 and end with 02:
◦ 240 * 1.000.000 / ? = 97,…02
◦ Now find ?
◦ If ? = Julian date 28 juni 2017 = 2457932.922454 a correct result is found: 97,64302
◦ Checking the outcome is easy, finding the missing parameter is hard
24
Proof of work for bitcoin
◦ Nodes are all trying to process the next block by solving crypto puzzle
= Finding correct proof of work hash = mining
◦ The solution must be set in Block Header Field Nonce
◦ This nonce is a SHA-256 hash
◦ Bitcoin protocol dictates required number of leading zero’s for this hash => sets difficulty
◦ Correct hash is based on transactions in the block and other info in the block
◦ Every node checks if proposed block has correct nonce
25
Exponential growth of Hashing power
26
27
Ethereum
28
Vitalik Buterin
◦ Son of Russian computer scientists
◦ In 2011 as a 15 yrs old started publishing about bitcoin
◦ Founder of Bitcoin magazine
◦ In 2013 financially secured for life
◦ 7 transaction per second doesn’t cut it
◦ Blockchain has more potential
29
Blockchain as platform
◦ Blockchain as distributed computer
◦ Founded in 2014, 30 juli 2015 operational
◦ Ether (ETH) instead of Bitcoin
◦ Then: 2000 ETH per BTC. Or $0,30 per ETH.
◦ Now: +/- 10 ETH per BTC. Or +/- $250 per ETH
◦ 12 seconds per block instead of 10 minutes
It’s all about smart contracts
30
Smart contracts
◦ Loop constructs
◦ Turing complete, Gas for transactions
◦ Every node in can execute a contract with the EVM
◦ Code your own (solidity)
◦ Still maturing
31
32
Just send ETHER
33
Or trigger another contract
34
Contract responds
35
Chain reaction
36
Multiple parties
37
Multiple contracts
38
Distributed Anonymous Organization
◦ 100% autonomous organization on the Ethereum blockchain
◦ Goal: Funding commercial & non profit organizations
How it works:
1. Anybody can exchange Ether for DAO token and become an investor
2. Everybody can do a business proposal
3. Investors vote for ideas with DAO token
4. Winning proposals get funding
5. Investors become shareholders and recieves share of profit
39
DAO (2)
◦ Written down in Smart Contracts
◦ In May 2016 $150 million was collected
◦ Unintended use of code in contract…$50 M was stolen
◦ Hard fork applied by Vitalik and core ethereum team
◦ 85% nodes joined.
◦ 15% did not. Went on and became Ethereum classic. Currently +/-
10% of Ether marketcap
40
Some Ethereum blockchain tokens
◦ TenX, Tokencard & Monacocard: Wallet with
cryptocurrency linked with VISA card
◦ Steem. Get paid for publishing content
◦ Trutheum. Marketplace for ‘truth requests’
◦ EthLance. Freelance opdrachten bemiddelen
◦ Augur. Factoring through blockchain
41
Altcoins
◦ LiteCoin. Based on BTC code, improved
performance
◦ Dash. BTC like. Instant payments, levels of
anonimity. Wallet accepted by Apple
◦ IOTA. No blockchain. No fees. Ideally
suited for IOT applications such as Drone
delivery
◦ RIPPLE. Centrally managed. Optimized for
financial institutions. No mining. Verify
transaction before its settled
42
43
Private blockchain
◦ As part of Public blockchain as a Sidechain (aka Off chain)
◦ Ethereum popular choice, but does this make sense?
◦ Ether, Gas & mining ‘hardcoded’ in system
◦ Maybe all you need is a distributed ledger
◦ Lots of other options for a private blockchain:
◦ OpenChain
◦ Hyperledger (IBM)
◦ Multichain
◦ Stratis
◦ NEO
◦ Azure BAAS / Coco
44
Example use cases
◦ Unilever, Nestle, Walmart, Tracking & tracing of food in logistic chain
◦ Bitnation. Record laws, regulations & jurisdictions and provide dispute resolution
◦ Swarm City. Peer2Peer sharing platform
◦ Guts tickets. Prevent theater tickets from being sold in black market.
◦ Land registry. Georgia records land ownership in blockchain.
◦ Rent out your house. In Singapore renting a house is possible though P2P blockchain
◦ Digital ownership. Who owns what music rights
◦ And digital currency. Senegal is considdering a national blockchain currency
◦ ….
45
“If there’s no central authority to go to, after
someone denies data recorded in the
blockchain is correct. What are you going to
do?”
46
When to use blockchain
◦ Cut out the middle man or regulator
◦ If central authority is missing, eg. free market trading
◦ Transactions that require audit trails: eg. supply chains
◦ Triggering of events without anyone being responsible.
◦ Guarantee anonimity (e.g. auction)
47
When not to use
◦If a regular database suffices
◦ Organization wants to have full control over their services and
data
◦ Performance is very important
◦ Continuous updating of software is needed
◦ Regulations require specific means of storage
48
BLOCKCHAIN in
your next
application?
And ready to invest in cryptocoins?
49

Blockchain talk open value meetup 31-8-17

  • 1.
  • 2.
    BLOCKCHAIN IN ACTION Disruptive technologyunder the loop 2 Roy Wasse / Twitter @roywasse
  • 3.
    Encantado ◦ Roy Wasse ◦Co-Founder OpenValue ◦ NLJUG Board member ◦ Blockchain & cryptocurrency fan  3
  • 4.
  • 5.
    Evolution of digitalcash 80’s 1st wave • Digital Tokens • Digicash 90’s 2nd wave • E-gold • Paypal 00’s 3rd wave • Bitcoin & Blockchain 5
  • 6.
  • 7.
  • 8.
    Issues payment systemw/o bank How to guarantee messages arrive at destination How to do prevent manipulation How to make sure a coin is only spend once! 8
  • 9.
    Basic idea: don’tuse messenger ◦ Image generals consult a nearby village ◦ 5% chance peasant from village gives wrong info ◦ Asks any 6 peasants, chance 4 giving incorrect information is 0,05 * 0.05 * 0.05 * 0.05 = 0,00000625% ◦ A malicious peasant will not be able to manipulate transaction 9
  • 10.
    4 key innovations ◦ Peer2 Peer network ◦ Distributed Ledger ◦ Consensus mechanism ◦ Incentive to process transactions through ‘proof of work’ 10
  • 11.
    Blockchain structure ◦ Everynode records all transactions / holds copy ◦ Transactions are collected in a block ◦ Every block links to the previous block ◦ New block should be accepted by the majority of the nodes 11
  • 12.
  • 13.
    Blockchain deep dive: Hash ◦Input “Hashing is niet ingewikkeld” ◦ Take position in alphabet for each letter, add it all together. : 8+1+19+8+9+14+7+0+9+19+0+14+9+5 +20+0+9+14+7+5+23+9+11+11+5+4 = 240 ◦ Multiply by 1 million ◦ Divide it by Julian date 28 june 2017 = 2457932.922454) ◦ Uitkomst = 97,64302 = Hash 13 Original Hash
  • 14.
  • 15.
    Buying a cupof coffee with BTC ◦ Julian buys a cop of coffee from Bob the barista and pays with BTC ◦ Bob has to publish his bitcoin address, Julian then signs a transaction wit his private key and sends it over the network and only Bob can redeem the bitcoins send. 15
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
    Public/Private key encryption ◦Encryption: Hello -> position + 1 -> Ifmmp ◦ Asymmetric encryption ◦ Key to read information not the same as one used to decrypt ◦ Elliptic Curve Multiplication used to derive Public key ◦ Lot safer than RSA, which is pretty safe ◦ y2 = x3 + ax + b ◦ Bitcoin address is SHA-256 hash from public key ◦ Base 58 encoded to make it (a bit) more readable ◦ Relatively safe for quantum computing 20
  • 21.
    Simplified Bitcoin Transaction ◦ Sender shouldacquire public key hash (bitcoin address) from recipient ◦ Sender signs the transaction with his private key and sends it to nodes in the bitcoin network ◦ Network checks if sender is allowed to spent the bitcoins involved ◦ Recipients wallet detects transaction, runs unlockingscript with that proofs he has private key related to public key hash ◦ Transaction is put in a block ◦ Once block is adopted by blockchain, transaction is settled 21
  • 22.
  • 23.
    Mining & Consensus ◦Nodes in network are incentivized to process next blocks = mining ◦ Miner solves crypto puzzle to process block = Proof of Work ◦ Other miners check if puzzle is solved correctly ◦ Blockchain is eventually consistent 23 0 1 2 3
  • 24.
    Concept of Proofof work ◦ “Hashing is niet ingewikkeld” ◦ For each letter, take position in alphabet and add: 8+1+19+8+9+14+7+0+9+19+0+14+9+5+20+0+9+14+7+5+23+9+11+11+5+4 = 240 ◦ Multiply with one million ◦ Divide outcome by a missing number causing the result to start with 97 and end with 02: ◦ 240 * 1.000.000 / ? = 97,…02 ◦ Now find ? ◦ If ? = Julian date 28 juni 2017 = 2457932.922454 a correct result is found: 97,64302 ◦ Checking the outcome is easy, finding the missing parameter is hard 24
  • 25.
    Proof of workfor bitcoin ◦ Nodes are all trying to process the next block by solving crypto puzzle = Finding correct proof of work hash = mining ◦ The solution must be set in Block Header Field Nonce ◦ This nonce is a SHA-256 hash ◦ Bitcoin protocol dictates required number of leading zero’s for this hash => sets difficulty ◦ Correct hash is based on transactions in the block and other info in the block ◦ Every node checks if proposed block has correct nonce 25
  • 26.
    Exponential growth ofHashing power 26
  • 27.
  • 28.
  • 29.
    Vitalik Buterin ◦ Sonof Russian computer scientists ◦ In 2011 as a 15 yrs old started publishing about bitcoin ◦ Founder of Bitcoin magazine ◦ In 2013 financially secured for life ◦ 7 transaction per second doesn’t cut it ◦ Blockchain has more potential 29
  • 30.
    Blockchain as platform ◦Blockchain as distributed computer ◦ Founded in 2014, 30 juli 2015 operational ◦ Ether (ETH) instead of Bitcoin ◦ Then: 2000 ETH per BTC. Or $0,30 per ETH. ◦ Now: +/- 10 ETH per BTC. Or +/- $250 per ETH ◦ 12 seconds per block instead of 10 minutes It’s all about smart contracts 30
  • 31.
    Smart contracts ◦ Loopconstructs ◦ Turing complete, Gas for transactions ◦ Every node in can execute a contract with the EVM ◦ Code your own (solidity) ◦ Still maturing 31
  • 32.
  • 33.
  • 34.
    Or trigger anothercontract 34
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
    Distributed Anonymous Organization ◦100% autonomous organization on the Ethereum blockchain ◦ Goal: Funding commercial & non profit organizations How it works: 1. Anybody can exchange Ether for DAO token and become an investor 2. Everybody can do a business proposal 3. Investors vote for ideas with DAO token 4. Winning proposals get funding 5. Investors become shareholders and recieves share of profit 39
  • 40.
    DAO (2) ◦ Writtendown in Smart Contracts ◦ In May 2016 $150 million was collected ◦ Unintended use of code in contract…$50 M was stolen ◦ Hard fork applied by Vitalik and core ethereum team ◦ 85% nodes joined. ◦ 15% did not. Went on and became Ethereum classic. Currently +/- 10% of Ether marketcap 40
  • 41.
    Some Ethereum blockchaintokens ◦ TenX, Tokencard & Monacocard: Wallet with cryptocurrency linked with VISA card ◦ Steem. Get paid for publishing content ◦ Trutheum. Marketplace for ‘truth requests’ ◦ EthLance. Freelance opdrachten bemiddelen ◦ Augur. Factoring through blockchain 41
  • 42.
    Altcoins ◦ LiteCoin. Basedon BTC code, improved performance ◦ Dash. BTC like. Instant payments, levels of anonimity. Wallet accepted by Apple ◦ IOTA. No blockchain. No fees. Ideally suited for IOT applications such as Drone delivery ◦ RIPPLE. Centrally managed. Optimized for financial institutions. No mining. Verify transaction before its settled 42
  • 43.
  • 44.
    Private blockchain ◦ Aspart of Public blockchain as a Sidechain (aka Off chain) ◦ Ethereum popular choice, but does this make sense? ◦ Ether, Gas & mining ‘hardcoded’ in system ◦ Maybe all you need is a distributed ledger ◦ Lots of other options for a private blockchain: ◦ OpenChain ◦ Hyperledger (IBM) ◦ Multichain ◦ Stratis ◦ NEO ◦ Azure BAAS / Coco 44
  • 45.
    Example use cases ◦Unilever, Nestle, Walmart, Tracking & tracing of food in logistic chain ◦ Bitnation. Record laws, regulations & jurisdictions and provide dispute resolution ◦ Swarm City. Peer2Peer sharing platform ◦ Guts tickets. Prevent theater tickets from being sold in black market. ◦ Land registry. Georgia records land ownership in blockchain. ◦ Rent out your house. In Singapore renting a house is possible though P2P blockchain ◦ Digital ownership. Who owns what music rights ◦ And digital currency. Senegal is considdering a national blockchain currency ◦ …. 45
  • 46.
    “If there’s nocentral authority to go to, after someone denies data recorded in the blockchain is correct. What are you going to do?” 46
  • 47.
    When to useblockchain ◦ Cut out the middle man or regulator ◦ If central authority is missing, eg. free market trading ◦ Transactions that require audit trails: eg. supply chains ◦ Triggering of events without anyone being responsible. ◦ Guarantee anonimity (e.g. auction) 47
  • 48.
    When not touse ◦If a regular database suffices ◦ Organization wants to have full control over their services and data ◦ Performance is very important ◦ Continuous updating of software is needed ◦ Regulations require specific means of storage 48
  • 49.
    BLOCKCHAIN in your next application? Andready to invest in cryptocoins? 49