Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof...
Transcript of Blockchain & Smart Contracts Under The Hood...Blockchain & Smart Contracts Under The Hood Kristof...
B lockcha in & Smar t Cont rac t s Under The Hood
KristofVerslypeSmalsResearch-smalsresearch.be
www.cryptov.net
Overheidscongres–15mei2018–Brussel
BlockchainisaboutTrust
2
BlockchainNetwork
RegistraEonoffacts EnforcementofrulesTransferofassets
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→
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
Blockchain
5
AtpredeterminedfrequencynewblockappendedwithmostrecenttransacKons
TransacKoninblockchaincannotberemoved
blockchaincontainsALLtransacKons
Blockchain=concatenaKonofblocks,whichcontaintransacKons
ManyenKKespossessthesamecopyoftheblockchain
Block51
Header
Block52
Header
Block53
Header Header
Block54
5,10BTC→
0,70BTC→
0,40BTC→
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→
Pseudonyms&Keys
7
0,40BTC→ 0,40BTC→Not but
RequiredtodigitallysignatransacKoninthenameofthecorrespondingpseudonym
Network
8
BlockcreatorFullnodeLightnode
Blockchain
append-onlyBitcoinhistory
UTXO
RelevantinfoMostrecentstate
UTXO
UTXO
UTXO
UTXO
UTXOUTXO
UTXO
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)
BlockchainisaboutTrust
10
BlockchainNetwork
RegistraEonoffacts EnforcementofrulesTransferofassets
11
RegistraKonofFacts
VaccinaEon
IdenEtyDiplomaMarriage
Medicalrecords
TaxesSupplychainTracking
Drivinglicense
PoliEcalmandates
(Official)documents
History/Overview
Will
5f3bfa419c63be2a3a09adbd0630c51f645eb03abafcd5f2ad39637a306b4177
Will
12
RegistraKonofFacts
Will
Block51
Header
Block52
Header
Block53
Header Header
Block54
13
TransferofAssets
Tickets.bitDomainnames
Copyright
Bitcoin Monero Ethereum
Cryptocurrencies(Virtueleassets)
Untangibleassets
DiamondsCarsLandregistry
Tangibleassets
Electricity
EnforcementsofAgreements
14
ProcessingmedicalprescripEons
ElecEons
BlockingrentguaranteeCrowdfundingApplicaEon&Payment
ofsubsidies/benefits
SmartlocksTransportcondiEons
AgreementsbetweenparKesthatdonottrust eachother, withouttrusted intermediary
FlightDelayInsurance
PermissionsaccessPIIAucEon
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
SmartContractBlockchain
16
contractc
Header
Block51
c.bid(),10Ξ
Header
Block52
Header
Block53
c.bid(),20Ξ
Header
c.getMoney()
Block54
ContractdeploytransacKon FuncKoninvoke
transacKon
Network
17
BlockcreatorValidaKng(full)nodeLightnode
Blockchain
Append-onlyHistoryofsmartcontracts
Smartcontract
ChangeablebyfuncKoncallsActualstateofsmartcontract
SmartContracts-Summarized
18
AutomaEngrules&enforcementofagreements
BetweenparEesthatdonotneedtotrusteachother100%
Withoutdependencyonasingle,intermediateparty
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
20hjps://www.theguardian.com/technology/2017/nov/08/cryptocurrency-300m-dollars-stolen-bug-ether
21
Permissionless PermissionedPubl ic / open Enterpr i se / ConsorEum
Howtoreducerisk?- Developersneedproperbackground
Smartcontractcodelooksfamiliar,butbehavessomewhatdifferently.- Minimizesmartcontractcode- TesEngencodeverificaEon
FutureformalverificaKon
BugsinSmartContracts
SmartcontractmoreeasilyupdatableHard/impossibletoupdatesmartcontract
AbackercanbeeasilyidenEfiedHardertoidenEfyabacker
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.
24
Dr.KristofVerslype
Researcher, advisor&speakerincrypto, privacy&blockchaintech
Qu e s E o n s & C o n t a c t
©BenjaminReay
@KristofVerslype
be.linkedin.com/in/verslype
www.cryptov.net
www.smalsresearch.be
@SmalsResearch
www.smals.be
@Smals_ICT
Personal