Blockchains and Smart Contracts for the Internet of Things Konstantinos Christidis and Michael Devetsikiotis IEEE Special Selection on the Plethora of Research in IOT May 2016 Presented by: Chris Corsi
Blockchains
What is a blockchain? Distributed data structure that is replicated and shared among the members of a network
4 Core Components of a Blockchain Network Public / Private Key Set Distributed Open Ledger Miners Consensus Mining Algorithm (PoW & PoS) Miners – Validate and put in ledger Purpose is to establish consensus on the block chain – agree on state of BC
Consensus Mining Algorithm: Proof of Work Computationally heavy High electrical costs Very hard to guess right answer, but very easy to verify right answer Need specialized hardware or graphics cards (most hashing power wins!) Turning electricity into coins
Consensus Algorithms: PoW ( Proof of block ????? Hashes of Transactions within block ) Known Answer Hash Difficulty increases by adding 0s to beginning of answer
Consensus Algorithms: PoS You are taking “Stake” in the verification Lock up stake until block is validated If you have a lot of money in the network - don’t damage the network If you are a malicious validator or forge a transaction you lose your stake coins Less energy – not solving hashes Turning coins into more coins Casper
Consensus Algorithms: Proof of Stake Validator 1 20 Coins 20% Validator 3 45 Coins 45% Validator 2 10 Coins 10% Validator 4 25 coins 25%
Example Chain Mary Tom $5 Tom: $10 Mary: $5 Tom: $10 Mary: $5 $20 Mary -> Tom $5 Jane Tom: $10 Mary: $5 Tom -> Jane $20 Mary -> Tom $5
Smart Contract “A computerized transaction protocol that executes the terms of a contract” $3 10 kw Mary Tom $1 10 kw $3 Smart Contract: $1 = 5kw 10 kw Deposit Withdraw Trade
Sybil attack PT 1 Mary Tom Tom: $10 Mary: $5 Tom: $10 Mary: $5 Jane Tom: $10 Mary: $5 Tom -> Jane $10 Tom -> Mary $5
…… …… 51% Sybil attack PT 2 Tom: $10 Mary: $5 Jane: $100 1) Jane -> Mary $10 2) Tom -> Mary $5 1) Tom -> Mary $5 2) Jane - > Mary $10 1) Jane - > Tom $5 2) Jane -> Mary $5 …… Tom: $10 Mary: $5 Jane: $100 1) Jane -> Mary $10 2) Tom -> Mary $5 1) Jane -> Mary $5 2) Jane - > Mary $10 1) Tom - > Jane $5 2) Jane -> Mary $5 1) Mary - > Tom $5 2) Jane -> Tom $85 …… Tom already received the kw of energy at this point Mary never gets her $5 51% One way cryptographic hash we can easily tell if a nodes answer to the POW is correct.
Byzantine Fault Tolerance Practical Byzantine Fault Tolerance 1/3 or less Unique Node Lists 1/5 or less are faulty 13 mins PBFT: 3f + 1 UNL: 5f + 1
Why Blockchain? eliminates intermediaries reduces fraud increases efficiency and speed increases revenue and savings Transparency Immutability Highly available
Blockchain Taxtonomy Who has access to the network? Who can transact or mine? UTXO model or Smart Contracts? Public Private Public Private UTXO SC Sybil Attack No Sybil Attacks More restricted access Multi-step processes No Multi-step processes Lower Throughput Higher Throughput Higher Throughput Lower Throughput More Energy Consumption Lower Energy Consumption 18 mins
Potential Use Cases Finance Healthcare Utilities Real Estate Government sector Supply chain
IOT-a-size Blockchain
Example: Software Updates Sensor Update Sensor Factory Request Update Smart Contract: Request updates on PK X Update Update
Solar Panel - > Mary: 40 kw Example: Power Sales Mary Mary: 10kw Tom: 0kw Tom Solar Panel - > Mary: 40 kw $100 Smart Contract: $2 = 1kw 50 kw
Example: Slock.it
Example: Supply Chain Transaction 1: Transaction 2: UTXO in “I received the container” (b) UTXO out “I received the container” token (a) A signs returns to B B signs – added to the chain Transaction 1: UTXO in “I have the container” (a) UTXO out “I have the container” (b) 26 mins
Deployment Considerations BC vs Central Database Lower throughput Higher latencies No parallel task execution No sharding Security Open ledger shows all PK Could predict who owns network Lack of transactional privacy Other Miner set (miner censorship) Legal enforceability Expected value of tokenized assets Double-edged sword of smart contracts
Thank you! Q & A Image citations: https://www.flaticon.com/authors/eucalyp https://www.flaticon.com/authors/roundicons https://www.flaticon.com/authors/smashicons https://www.flaticon.com/authors/good-ware https://www.flaticon.com/authors/vectors-market