blockchain & smart contracts under the hood...blockchain & smart contracts under the hood...

24
Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be www.cryptov.net Overheidscongres – 15 mei 2018 – Brussel

Upload: others

Post on 10-Sep-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

B lockcha in & Smar t Cont rac t s Under The Hood

KristofVerslypeSmalsResearch-smalsresearch.be

www.cryptov.net

Overheidscongres–15mei2018–Brussel

Page 2: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

BlockchainisaboutTrust

2

BlockchainNetwork

RegistraEonoffacts EnforcementofrulesTransferofassets

Page 3: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

Idea

3

TransacEons

5,1BTC→

0,7BTC→

TransacEons

5,1BTC→

0,7BTC→

TransacEons

5,1BTC→

0,7BTC→

TransacEons

5,1BTC→

0,7BTC→

Itransfer0,4BTCto

Ok!

Ok!

Ok!

0,4BTC→Bob

Alice

Charlie

Dave

0,4BTC→

0,4BTC→

0,4BTC→

Page 4: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

Idea

4

TransacEons

5,1BTC→

0,7BTC→

TransacEons

5,1BTC→

0,7BTC→

TransacEons

5,1BTC→

0,7BTC→

TransacEons

5,1BTC→

0,7BTC→

Itransfer0,4BTCto

Ok!

Ok!

Ok!

0,4BTC→Bob

Alice

Charlie

Dave

0,4BTC→

0,4BTC→

0,4BTC→

Blockchain

AtomicEveryonewritestransacKoninhis/herappend-onlyspreadsheetornoone→Consensusmechanism

ValidOnlyvalidtransacKonsacceptedbythenetworkE.g.bobownsthemoney&didnotyetspentitpreviously

Secure&robustSystemsfuncKons,evenifpartofmembersofflineormalicious

RelaEvelyfast

Distributed

Page 5: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

Blockchain

5

AtpredeterminedfrequencynewblockappendedwithmostrecenttransacKons

TransacKoninblockchaincannotberemoved

blockchaincontainsALLtransacKons

Blockchain=concatenaKonofblocks,whichcontaintransacKons

ManyenKKespossessthesamecopyoftheblockchain

Block51

Header

Block52

Header

Block53

Header Header

Block54

5,10BTC→

0,70BTC→

0,40BTC→

Page 6: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

Idea

6

TransacEons

5,1BTC→

0,7BTC→

TransacEons

5,1BTC→

0,7BTC→

TransacEons

5,1BTC→

0,7BTC→

TransacEons

5,1BTC→

0,7BTC→

0,4BTC→Bob

Alice

Charlie

Dave

0,4BTC→

0,4BTC→

0,4BTC→

Page 7: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

Pseudonyms&Keys

7

0,40BTC→ 0,40BTC→Not but

RequiredtodigitallysignatransacKoninthenameofthecorrespondingpseudonym

Page 8: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

Network

8

BlockcreatorFullnodeLightnode

Blockchain

append-onlyBitcoinhistory

UTXO

RelevantinfoMostrecentstate

UTXO

UTXO

UTXO

UTXO

UTXOUTXO

UTXO

Page 9: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

9

Permissionless Permissioned

Accessible&usablebywholeworld Extralayerforaccesscontrol

OLerveryinefficient Muchmoreefficient

Trustdistributed Trustdecentralized

Cryptocurrencyrequired Nocryptocurrencyrequired

Publ i c / open Enterpr i se / ConsorEum

Slower Faster(moretx/s,moreblocks/s)

Page 10: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

BlockchainisaboutTrust

10

BlockchainNetwork

RegistraEonoffacts EnforcementofrulesTransferofassets

Page 11: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

11

RegistraKonofFacts

VaccinaEon

IdenEtyDiplomaMarriage

Medicalrecords

TaxesSupplychainTracking

Drivinglicense

PoliEcalmandates

(Official)documents

History/Overview

Will

5f3bfa419c63be2a3a09adbd0630c51f645eb03abafcd5f2ad39637a306b4177

Will

Page 12: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

12

RegistraKonofFacts

Will

Block51

Header

Block52

Header

Block53

Header Header

Block54

Page 13: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

13

TransferofAssets

Tickets.bitDomainnames

Copyright

Bitcoin Monero Ethereum

Cryptocurrencies(Virtueleassets)

Untangibleassets

DiamondsCarsLandregistry

Tangibleassets

Electricity

Page 14: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

EnforcementsofAgreements

14

ProcessingmedicalprescripEons

ElecEons

BlockingrentguaranteeCrowdfundingApplicaEon&Payment

ofsubsidies/benefits

SmartlocksTransportcondiEons

AgreementsbetweenparKesthatdonottrust eachother, withouttrusted intermediary

FlightDelayInsurance

PermissionsaccessPIIAucEon

Page 15: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

SmartContracts

15

ContractAucKon{funcKonbid()funcKongetMoney()

HighestBid:ΞHighestBidder:Beneficiary:Charlie} bid(),20Ξ

getMoney()

bid(),10Ξ

20Ξ

02010

Bob

Alice

Charlie

Alice10Ξ

Bob

Canreceive,blockandspentvalue

NosingleenKtycaninfluencecorrectfuncKoning Deafandblind

ReacKve

Ether(Ξ)isthecryptocurrencyonEthereum

Page 16: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

SmartContractBlockchain

16

contractc

Header

Block51

c.bid(),10Ξ

Header

Block52

Header

Block53

c.bid(),20Ξ

Header

c.getMoney()

Block54

ContractdeploytransacKon FuncKoninvoke

transacKon

Page 17: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

Network

17

BlockcreatorValidaKng(full)nodeLightnode

Blockchain

Append-onlyHistoryofsmartcontracts

Smartcontract

ChangeablebyfuncKoncallsActualstateofsmartcontract

Page 18: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

SmartContracts-Summarized

18

AutomaEngrules&enforcementofagreements

BetweenparEesthatdonotneedtotrusteachother100%

Withoutdependencyonasingle,intermediateparty

Page 19: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

Privacy&ConfidenKality

19

Permissionless Permissioned

ParEcipantsonlyknownunderpseudonymOneparKcipantcanhavemulKplepseudonyms

Publ ic / open Enterpr i se / ConsorEum

OnlyparEcipantshaveaccesstoblockchain

EncrypEoncanhidedataintransacEons&smartcontractsforpartofthenetwork

Tradepla`ormswillbeobligedbyEuropetostronglylinkpseudonymstoidenEtyof

theircustomers.Youneedcryptocurrenciestopublishasmartcontractortointeractwithit

Everyonecaninspecttheblockchain

AccesscontrollayercanidenEfypseudonyms

DataintransacEons&smartcontractsforeveryonereadable

Notalldatanecessarilystoredontheblockchainitself

Remark:TheparKcipantsthatcollecKvelysecureasmartcontract,needaccesstothissmartcontractstate&codeandtotherelevanttransacKons

Page 20: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

20hjps://www.theguardian.com/technology/2017/nov/08/cryptocurrency-300m-dollars-stolen-bug-ether

Page 21: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

21

Permissionless PermissionedPubl ic / open Enterpr i se / ConsorEum

Howtoreducerisk?-  Developersneedproperbackground

Smartcontractcodelooksfamiliar,butbehavessomewhatdifferently.-  Minimizesmartcontractcode-  TesEngencodeverificaEon

FutureformalverificaKon

BugsinSmartContracts

SmartcontractmoreeasilyupdatableHard/impossibletoupdatesmartcontract

AbackercanbeeasilyidenEfiedHardertoidenEfyabacker

Page 22: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

FutureFuncKonality

22hjp://www.the-blockchain.com/docs/Hyperledger%20Whitepaper.pdf

BlockchaininteracEon“HyperledgersKllrequiresanaddressingsystemthatallowstransacKonsononeledger to discover and uKlize appropriate transacKons and smart contracts(chaincode)onotherledgers.” FABRIC

BlockchaintruncaEonAper a voKng round, theoldest part of theblockchain that hasbecomedeadweight, can be collecKvely forgojen. This feature will help to keep theblockchainmanageable.

Twoexamplesofusefulfeaturesthatdonotyetexistincurrentblockchainpla`orms.However,theblockchaincommunityisworkingonit.

Page 23: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel
Page 24: Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof Verslype Smals Research - smalsresearch.be Overheidscongres – 15 mei 2018 – Brussel

24

Dr.KristofVerslype

Researcher, advisor&speakerincrypto, privacy&blockchaintech

Qu e s E o n s & C o n t a c t

©BenjaminReay

@KristofVerslype

[email protected]

be.linkedin.com/in/verslype

www.cryptov.net

www.smalsresearch.be

@SmalsResearch

www.smals.be

@Smals_ICT

Personal