SlideShare a Scribd company logo
Blockchain & Smart Contracts
E e n i n t r o d u c t i e
Kristof Verslype
Smals Onderzoek (smalsresearch.be)
www.cryptov.net
15 maart 2018 - Mechelen
2
Kristof Verslype
@KristofVerslype
kristof@cryptov.net
be.linkedin.com/in/verslype
www.cryptov.net
Doctor of Engineering (KU Leuven)
Researcher, advisor & speaker
in crypto, privacy & blockchain tech
www.smals.be
@Smals_ICT
www.smalsresearch.be
@SmalsResearch
W h o a m I ?
3
Heeft u een vraag? Stel ze!
AGENDA
4
Permissioned
1
Introduction
2
Bitcoin
7
Conclusions
3
Smart contracts
Blockchain gaat over Vertrouwen
Reductie afhankelijkheid centrale partijen (Disintermediatie)
4
Blockchain Netwerk
Bescherming data Afdwingen regels
Perspectief
5https://hbr.org/2017/01/the-truth-about-blockchain
“Hoewel de impact enorm zal zijn, zal het decennia
duren voor blockchain om in onze economische en
maatschappelijke structuren te sijpelen.”
Tijd nodig om economie te transformeren:
- TCP/IP: 30 jaar
- Elektriciteit: 20 jaar
Grondleggende technologie
Het heeft het potentieel om nieuwe fundamenten voor
ons economisch en sociaal systeem te creëren.
Toestand vandaag:
- 3-5 jaar eer volwassen
- 3% POCs in productie
Idee
6
Transactions
5,1 BTC →
0,7 BTC →
Transactions
5,1 BTC →
0,7 BTC →
Transactions
5,1 BTC →
0,7 BTC →
Transactions
5,1 BTC →
0,7 BTC →
Ik transfereer 0,4
BTC naar
Ok!
Ok!
Ok!
0,4 BTC →
Bob
Alice
Charlie
Dave
0,4 BTC →
0,4 BTC →
0,4 BTC →
Idea
7
Transactions
5,1 BTC →
0,7 BTC →
Transactions
5,1 BTC →
0,7 BTC →
Transactions
5,1 BTC →
0,7 BTC →
Transactions
5,1 BTC →
0,7 BTC →
I transfer
0,4 BTC to .
Ok!
Ok!
Ok!
0,4 BTC →
Bob
Alice
Charlie
Dave
0,4 BTC →
0,4 BTC →
0,4 BTC →
Blockchain
Atomisch
Iedereen schrijft de transactie in zijn/haar append-only spreadsheet
of niemand → Consensus mechanisme
Geldig
Enkel geldige transacties worden aanvaard door het netwerk
Vb. Bob is eigenaar / heeft het geld niet reeds eerder gespendeerd
Veilig en robuust
Systeem blijft correct werken, zelfs indien deel participanten offline of
kwaadaardig is
Relatief snel
Gedistribueerd
Blockchain
8
Aan vaste frequentie nieuwe blokken gecreëerd
met daarin de meest recente transacties
De blockchain bevat
alle transacties
Transacties in de blockchain
zijn onverwijderbaar
Blockchain = aaneenschakeling van
blokken, die transacties bevatten
Vele entiteiten bezitten dezelfde
kopie van de blockchain
Block 51
Header
Block 52
Header
Block 53
Header Header
Block 54
5,10 BTC →
0,70 BTC →
Blockchain specifiek: 10 minutes in
Bitcoin, 10 seconden in Ethereum,…
0,40 BTC →
Idee
10
Transactions
5,1 BTC →
0,7 BTC →
Transactions
5,1 BTC →
0,7 BTC →
Transactions
5,1 BTC →
0,7 BTC →
Transactions
5,1 BTC →
0,7 BTC →
0,4 BTC →
Bob
Alice
Charlie
Dave
0,4 BTC →
0,4 BTC →
0,4 BTC →
Bescherming Data
11
Transaction
0,01 BTC →
Vertrouwde
entiteit
Transaction
Data
Untamperable
(integrity)
Unremovable
(non-repudiability)
Timestamp
Eigenschappen van data in een blockchain
Transparent
(verifiable)
Authentic
Robust
(availability)
→ Applications other then cryptocurrencies
On existing or own blockchain
Application Domains
12
Diploma
Alice
Master in
Lego Design
KU Leuven
Registration
facts
Transfer
of assets
Streamlining
processes
Enforcement
of agreements
Protection data
Enforcement of rules
13
Registration Facts
Vaccination
IdentityDiplomaMarriage
Medical
records
TaxesSupply chain
Tracking
Driving license
Political
mandates
Official
documents
History /
overview
Will
Hash of records on blockchain
- Integrity
- Non-repudiability (completeness)
- Timestamp
Confidence in correctness
- Authenticity
- Integrity
- Timestamp
- Long term-validity
- Transparency
- Non-
repudiability (no
denial)
- Integrity
Logically centralising
dispersed data about
provenance in single
data structure (without
central authority)
14
Registration Facts
Alice
9AF
Employer
Alice does not need copy of blockchain
In reality usually more crypto
hashing, encryption, pseudonyms
Transaction 9AF
Diploma
Alice
Master in
Lego Design
KU Leuven
Alice
15
Registration Facts
Alice
9AF
Employer
Transaction 9AF
Diploma
Alice
Master in
Lego Design
KU Leuven
Diploma
Alice
Master in
Lego Design
KU Leuven
Best match with GDPR
Data potentially again spread over multiple servers…
Reduces potential of smart contracts
Verificatie Certificaten
16https://www.dnvgl.be/certificering/certificaten-in-de-blockchain.html?utm_source=be&utm_medium=persbericht&utm_campaign=be-persbericht-270917
17
Applications: Transfer Assets
Ticket
.bitDomain name
Copyrights
Bitcoin Monero Ethereum
Crypto
currencies
Untangible
assets
DiamondCar
Land register
Tangible
assets
Electricity
18
Transfer Assets
Transaction 23F
→
Transaction XP0
→ 9BG
Transaction 9BG
→ 23F
Authority
(Mortgage office)
The lawful
owner
is .
The lawful
owner
is .
Owner 1 (Bob) Owner 2 (Charlie)
The lawful
owner
is .
Only required for
initial registration
Full history on the
blockchain
Owner can prove (s)he
is the lawful owner
19
Transfer Assets
Transaction 23F
→
Authority
(Mortgage office)
Owner 1 (Bob) Owner 2 (Charlie)
Transaction 9BG
→ 23F
→
Transaction XP0
→ 9BG
→
Owner 3 (Alice)
Only if both & sign
transaction, it is valid No trusted intermediary
required to temporarily
hold funds
Extra rules possible
(Eg. valid soil certificate
or approval by notary)
Hide exact amount
Register renovation &
verification history
Streamlining Processes
Banks share blockchain
instead of all own DB
Citizen moves and
declares it once. All
stakeholders informed
(electricity provider,
post, municipalities, …)
Citizen declares birth once.
All stakeholders informed
(local administration,
childcare system , bank,
mutualities, insurance, …)
Processes between governmental
institutions (e.g. automatic
subsidies)
Advantages
- Reduced trust in central authority
- Robust (HA system with LA nodes)
- Unmodifiable audit trail
- Every step validated / according to the rules
- One data structure (consistency)
- Uniform data representation
(standardisation)
20
Enforcements of Agreements
21
Processing
medical prescriptions Elections
Flight Delay
Insurance
Blocking
rent guaranteeCrowdfundingApplication & Payment
of subsidies / benefits
Smart locks
Permissions
access PII
Transport
conditions
Auction
Central DB Vs. Blockchain
22
Central DB Blockchain
Disintermediation The essence of blockchain tech is
reducing reliance upon intermediaries /
authorities
Integrity / transparency /
verifiability
Blockchain is a tamper-proof history,
verified by multiple nodes.
Confidentiality Multiple nodes in network need access
to data to validate transactions and
update smart contract. Harder to have
flexible access control
Robustness High availability with low available
nodes. Geen SPOF / extreme fault
tolerance thanks to redundancy
Performance & speed Blockchain inherently less efficient: sig
creation & verification, data transfer,
consensus, storage, …
“If trust and robustness aren’t an issue, there’s nothing
a blockchain can do that a regular database cannot.”
Gideon Greenspan
https://www.multichain.com/blog/2016/03/blockchains-vs-centralized-databases/
23
Permissionless Permissioned
Toegang & gebruik door hele wereld Extra laag voor toegangscontrole
Volledig transparant Meer controle op wie ziet wat (vb. audit)
Meestal erg onefficiënt (PoW) Pakken efficiënter
Vertrouwen gedistribueerd Vertrouwen gedecentraliseerd
Cryptomunt vereist Cryptomunt niet steeds vereist
Public / open Enterprise / Consortium
24https://coinmarketcap.com/
2 types of forks
- Fork from a code base
(e.g. Litecoin)
- Fork from a blockchain
(e.g. Bitcoin Cash)
25
Heeft u een vraag? Stel ze!
AGENDA
4
Permissioned
1
Introduction
2
Bitcoin
7
Conclusions
3
Smart contracts
26http://uk.businessinsider.com/bitcoin-pizza-day-passes-2000-20-million-2017-5
Op 22 mei 2010 kocht een software
ontwikkelaar 2 pizza’s voor 10 000 bitcoin.
Vandaag zijn 10 000 bitcoins ongeveer 80
miljoen dollar waard
27
16 900 000 BTC in omloop
 Totale waarde: ± 135 miljard $
Alle cryptomunten samen:
±316 miljard $
Traditionele Internationale Transactie
28
Bob Alice
Traditionele Internationale Transactie
29
Bob Alice
Is dit mogelijk zonder vertrouwde partij?
1e gedistribueerde cryptomunt (2009)
Schok doorheen de financiële wereld
Snel aandacht voor Bitcoin/blockchain vanuit de financiële wereld
Cryptocurrencies solve the double
spend problem with crypto and exist
since the eighies (David Chaum)
Pseudoniemen & Sleutels
30
0,40 BTC → 0,40 BTC →Niet maar
Blockchain
31
Block 51
Header
Block 52
Header
Block 53
Header Header
Block 54
5,10 BTC →
0,70 BTC →
0,40 BTC →
1Nf311Qb8rLDk
1F1tAaz5x1HUX
3BcMuv1VJqm Bob
Alice
Charlie
Dave
Transacties & UTXOs
32
Header
Block 51
Header
Block 52
Header
Block 53
Header
Block 54
Mijn bitcoins zijn verspreid in de blockchain over meerdere transacties
Transaction Z4R
0,01 BTC →
Transaction 06D
12,6 BTC →
Transaction 83F
1,2 BTC →
Transaction YC0
0,8 BTC →
0,4 BTC →
Output Addr BTC
Z4R[0] 0,01
06D[0] 12,6
83F[0] 1,2
Output Addr BTC
Z4R[0] 0,01
06D[0] 12,6
YCO[0] 0,8
YCO[1] 0,4
Most recent state,
derived from the
blockchain (history)
Bitcoin
34
Miner
Full node
Light node
Blockchain
append-only
Geschiedenis van Bitcoin
UTXO
Relevant info
Meest actuele status
UTXO
UTXO
UTXO
UTXO
UTXO
UTXO
UTXO
Mining & consensus
35
- Mining
36
‘Miners’ gaan in competitie met elkaar om als
eerste een rekenintensieve cryptografische
puzzel te vinden (per blok).
Bitcoin Mining
37
000000000000000002A386ADBAED073B0
2E66EE8A6A61FD83BA33DF434553671
Header
Hash
(fingerprint)
function
669831a3180f1e77e9e3c904b76d6254
03924303118ff97acff2d8599b9dc91b
bc9e7154309cdc81c5b6203b04531581
07e8d4c4cfe6eeb82fbaddefa345dc7b
015487950321
Eigenschappen
- Moeilijk te vinden
- Makkelijk te verifiëren
- Aanpasbare moeilijkheidsgraad
Winnaar beloond
- Nieuwe bitcoins
- Transactievergoedingen
Disclaimer: in werkelijkheid wordt enkel de header gehasht, die een fingerprint bevat van de transacties
38
Difficulty adjusted every 2 weeks (2016 blocks)
⟹ 26 335 883 TH/s
(26 335 883 000 000 000 000 H/s)
Higher prices → more mining power → higher difficulty
Ecological Impact
39https://digiconomist.net/bitcoin-energy-consumption
Electricity consumption per country
> 70% in China
Weak environmental laws
Electricity subsidized
Max. capaciteit
4 transactions / sec.
Mining
40
Gelijktijdige Blokcreatie
41
Wat gebeurt er indien twee miners ongeveer gelijktijdig een geldig blok vinden
Langste tak is diegene die aanvaard wordt
(correcter: tak met meeste ‘werk’)
Daarom best een aantal blokken wachten
vooralleer transactie als verwerkt te beschouwen
Consensus
Proof-of-Work
- x% resources → x% blokken
- Cryptografische puzzel
- Competitie
- Mining - Erg energieintensief
- Controle: > 50% rekenkracht
in unpermissioned blockchain netwerken
Proof-of-Stake
- x% stake (e.g. coins) → x% blokken
- Deterministisch algoritme voor
selectie participant die blok creëert
- Minting - Efficiënt
- Controle: > 50% stake (moeilijker)
- Incentive voor minter om
verschillende in stand te houden
=> Machtige participant kan blockchain controleren
(hybrid)
I s h e t v e i l i g ?
43
Veiligheid
44
Block 51
Header
Block 52
Header
5,10 BTC →
Header
Block 53
0,70 BTC →
Header
Block 54
0,40 BTC →
Header
Block 53
0,70 BTC →
Header
Block 52
Header
Block 54
0,40 BTC →
Hoe ouder de transactie, hoe beter beschermd
Want gevolgd door meer blokken
waarvoor cryptografische puzzel opnieuw opgelost moet worden
Veiligheid proportioneel tot de hoeveelheid rekenkracht
Veiligheid
Het bitcoin protocol is veilig zolang er geen participant meer dan
50% van de rekenkracht bezit (*)
(*) According to Decker and Wattenhofer 49,1% suffices due to stale blocks
Bitcoin is niet alleen een concept…
User Software Infrastructure
Loss
Theft
Abuse
James Howells, who works in IT, lost in 2013 7500 bitcoins by throwing
away by accident an old hard disk, which contained his secret key.
Nearly 4M Bitcoins Lost Forever
Source: chainalysis.com
Risico
46
Card Stop
Afhaallimiet
Terugbetaling
Centrale entiteit → individuele gebruiker
→ Soms zijn we blij dat er een centrale partij is
Omgaan met verlies
47https://www.wired.com/story/i-forgot-my-pin-an-epic-tale-of-losing-dollar30000-in-bitcoin/?mbid=nl_102917_daily_list1_p1
But don’t loose your PIN / Password!
Online Wallets
49
Online
wallet
Beheert jouw bitcoins
Volledig vertrouwen nodig
Enkele gehackte online wallets…
Klanten verloren cryptogeld
50https://www.theguardian.com/technology/2017/dec/07/bitcoin-64m-cryptocurrency-stolen-hack-attack-marketplace-nicehash-passwords
51
January 26, 2018
Privacy
52
Pseudoniemen
53
Fysieke wereld Bitcoin netwerk
1Nf311Qb8rLDkWTHrhpmNewZzkcWFYptfc
1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX
3BcMuv1VJqmwY5Wim8MPAzKAAiAKby9LcN
Charlie
Bob
Alice
54
Bitcoin & Anonimiteit
QR-code
- bevat pseudoniem
- Scan om te betalen
Alle transacties van en naar
dit pseudoniem zijn publiek
Meerdere pseudoniemen
- Minder praktisch
- Links nog steeds mogelijk
Tweerichtings
Subway kan ook jouw bitcoin
geschiedenis te weten komen
One-Time Pseudoniemen
55
Fysieke wereld Bitcoin netwerk
Transaction
0,8 BC →
0,4 BC →
Charlie
Bob
Alice
Bitcoin & Privacy
Fleder, Michael, Michael S. Kester, and Sudeep Pillai. MIT. "Bitcoin transaction graph analysis." arXiv preprint arXiv:1502.01657 (2015).
Goldfeder, Steven, et al. "When the cookie meets the blockchain: Privacy risks of web payments via cryptocurrencies." arXiv preprint arXiv:1708.04748 (2017)
https://bitcoin.nl/nieuws/bitcoin-privacy-173.
“Geïdentificeerde” personen gelinkt aan
“Op de meeste shop websites ontvangen third party
trackers informatie over aankopen van gebruikers. Dit
voor analyse- en reclamedoeleinden. Wij tonen aan dat
indien de gebruiker betaalt met een cryptomunt,
trackers typisch genoeg informatie hebben over de
aankoop om de transactie op de blockchain uniek te
identificeren, te linken aan de cookie van de gebruiker,
en verder aan de echte identiteit van de gebruiker.”
Graad van privacy op Bitcoin netwerk, maar verre van perfect
Usage
57
58
59
60
Why is Bitcoin Used?
61
Hard to find exact numbers
Illegal activities Gambling
Speculation Protection against
inflation/crash local
currency (e.g. Venezuela)
International
transactions
Transactions of small amounts sometimes very expensive
Average Transaction Fee in $
62https://bitinfocharts.com/comparison/bitcoin-transactionfees.html#1y
Volatile & unpredictable Based on supply & demand
Based on size (in bytes) of transaction, not on amount
Payed by the entity sending money
64
Tussenpartij of autoriteit elimineren
⇏
Efficienter en/of goedkoper
Bitcoin & Regulering
Wie bepaalt de regels?
65
Power to the People?
66
Core developers
Propose official Bitcoin client
Miners
Use proposed client
Process transactions
Bitcoin holders
Use proposed client
Centralisation of mining
> 50% of mining power
→ Rewrite the blockchain
Implement the
rules of the game
Afsplitsingen (Forks)
67
Maart ‘17
Aug. ‘17
Okt. ‘17
Bestaande munten splitsen mee
Periodic Table
79b
AUb
79c
AUc
(Table of Mendelejev)
79d
AUc
Bitcoins in Circulation
69
Total amount of bitcoins created
Blockchain.info
70
Schaalprobleem
- Alle transacties op blockchain
- 3 transacties / sec. ↔ Visa: 10 000 / sec.
- En blockchain toch al 120GB groot
Schaalprobleem
- Alle transacties in blockchain
- 4 transacties per seconde ↔ Visa: 65 000 / sec.
(Verhoogt geleidelijk danzij invoering SegWit)
- En reeds > 160 GB (excl. UTXO, SegWit))
Bitcoin Blockchain Grootte
blockchain.info/charts/blocks-size
Old Concepts
71
Concept Year
Stack-oriented programming language 1957 - GEORGE
Cryptographic hash function Late ‘70
Digital signatures 1977 (1973) - RSA
Merkle trees 1979
Shamir secret sharing 1979
Proof-of-Work 1993
Enkele Bedenkingen
72
Bitcoin is een eerste experiment
• Niet perfect en dat mogen we ook niet verwachten
• Gebruik van eenvoudige, oude crypto concepten (jaren ‘70)
• Interessante nieuwe concepten
Uitdagingen
• Technische: schaalbaarheid, privacy, transactiekosten, forks,
efficiëntie, …
• Niet-technisch: juridisch, maatschappelijk, risico,…
Idee distributie vertrouwen m.b.v. technologie
• “Alles dat met een vetrouwde autoriteit gedaan kan
worden, kan ook zonder” - D. Boneh, crypto prof. @ Stanford
• Niet enkel blockchain technologie
Have a look at
73
https://blockchain.info/
https://bitcoin.org/nl/download
74
Heeft u een vraag? Stel ze!
AGENDA
4
Permissioned
1
Introduction
2
Bitcoin
7
Conclusions
3
Smart contracts
Blockchain gaat over
Distributie van Vertrouwen
75
Blockchain Netwerk
Bescherming data Afdwingen regels
Smart Contracts (aka chaincode)
76
Regels zijn
- Hardgecodeerd in de
Bitcoin software
- Applicatiespecifiek
→ Niet flexibel
Code die uitgevoerd wordt op het blockchain netwerk, zonder centrale partij
Kan een blockchain netwerk ook op
een flexibele regels afdwingen voor
een diverse set van applicaties?
Smart Contracts (aka chaincode)
77
Regels zijn
- Hardgecodeerd in de
Bitcoin software
- Applicatiespecifiek
→ Niet flexibel
Code die uitgevoerd wordt op het blockchain netwerk, zonder centrale partij
- Smart contract = set
applicatiespecifieke regels
- Blockchain netwerk dwingt regels af,
zorgt voor correcte uitvoering
- Smart contracts kan cryptogeld
ontvangen, bijhouden en uitgeven
Verwerken
voorschriften
Verkiezingen Verzekeringen
Sterke toename potentieel blockchain technologie
Voorbeelden
78
http://dapps.ethercasts.com/
Smart locks (wagen, huis, …)
Blokkeren huurwaarborg
Verkiezingen
Veiling Crowdfunding
Afspraken tussen partijen die elkaar niet vertrouwen
Smart Contracts
79
Contract Auction{
function bid()
function end()
HighestBid: €
HighestBidder:
Beneficiary: Charlie
}
bid(), 20€
end()
bid(), 10€
20€
02010
Bob
Alice
Charlie
Alice
10€
Bob
Smart contract kan cryptogeld tijdelijk blokkeren
Niemand kan de correcte uitvoering beïnvloeden
Events in Smart Contracts
80
Contract{
function bid(){…}
function end(){…}
HighestBid: €
HighestBidder:
Beneficiary: Charlie
}
bid(...), 20€
end(...)
bid(...), 10€
20€
02010
Bob
Alice
Charlie
Alice
10€
Bob
bidEvent: 10€
bidEvent: 10€
bidEvent: 20€
bidEvent: 20€
Events informeren Charlie & Dave over nieuwe biedingen
Oude events zichtbaar: Charlie & Dave niet per se permanent online
Dave
Smart contract
Piece of code published on the blockhain and run
in a distributed way by the blockchain network
=> Not smart
=> Mostly not a (legal) contract
81
It is deaf & blind:
- It only knows its own status & the function parameters when a function is called
- It has no knowledge about anything else in the world / on the blockhain
It is reactive
- It will not do anything, unless a function is called
- This can result in a function call in another smart contract
It is distributed
- All full nodes know & execute the smart contract
- In some permissioned blockchains, this can be limited to a subset
Smart Contract Blockchain
82
contract c
Header
Block 51
c.bid(), 10€
Header
Block 52
Header
Block 53
c.bid(), 20€
Header
c.end()
Block 54Publiceren contract
(genesis transaction or
deploy transaction)
Oproepen functie
(invoke transaction)
Netwerk
83
Miner
Validating (full) node
Light node
Blockchain
append-only
Geschiedenis van smart contracts
Smart contract
Wijzigbaar door
oproepen van functies
Bitcoin
84
Miner
Full node
Light node
Blockchain
append-only
Geschiedenis van Bitcoin
UTXO
Relevant info
Meest actuele status
UTXO
UTXO
UTXO
UTXO
UTXO
UTXO
UTXO
85
contract SimpleAuction
{
address public beneficiary;
uint public auctionStart;
uint public biddingTime;
address public highestBidder;
uint public highestBid;
bool ended;
event HighestBidIncreased(address bidder, uint amount);
event AuctionEnded(address winner, uint amount);
function SimpleAuction(uint _biddingTime, address _beneficiary)
{
beneficiary = _beneficiary;
auctionStart = now;
biddingTime = _biddingTime;
}
function bid() payable
Smart Contract Code
Disclaimer: Een Ethereum exploit wordt genegeerd voor de eenvoud
http://solidity.readthedocs.io/en/develop/solidity-by-example.html
Doe dit NOOIT…
86
// Proof of Ownership contract
contract ProofOfOwnership{
mapping(bytes32=>bool) proofs;
//calculate and store the proof for a document
function notarize(string document){
var proof = sha256(document);
proofs[proof] = true;
}
// check if a document has been notarized
function checkDocument(string document) returns (bool){
var proof = calculateProof(document);
return proofs[proof];
}
}
Dit werd als ernstig voorbeeld gegeven op een seminarie door een expert
proofs: c0796844c3cbc… → true
5d5f4926be230… → true
c56d58202b0aa… → true
17f8f6699a8948… → true
…
document VOLLEDIG bewaard in transactie op blockchain
Orakels
87
En wat indien een orakel foute informatie aanlevert?
- Contract uitvoering kan niet teruggedraaid worden
- Meerdere oracles die stemmen?
Soms heeft een smart contract gegevens nodig uit de reële wereld
Compensatie Verzekering
Vertrouwde leverancier van gegevens uit de reële wereld
Orakel roept telkens contractfunctie aan → Transactie op blockchain
88
contract SimpleAuction
{
address public beneficiary;
uint public auctionStart;
uint public biddingTime;
address public highestBidder;
uint public highestBid;
bool ended;
event HighestBidIncreased(address bidder, uint amount);
event AuctionEnded(address winner, uint amount);
function SimpleAuction(uint _biddingTime, address _beneficiary)
{
beneficiary = _beneficiary;
auctionStart = now;
biddingTime = _biddingTime;
}
...
}
6060604052346100005760405161037c3803806
37c833981016040528080518201919050505b5b
3600060006101000a81548173fffffffffffffffffffffff
fffffffffffff021916908373ffffffffffffffffffffffffffffffff
ffff1602179055505b8060019080519060200190
805460018160011615610100020316600290049
600052602060002090601f01602090048101928
01f106100b557805160ff1916838001178555610
3565b828001600101855582156100e357918201
b828111156100e2578251825591602001919060
101906100c7565b5b50905061010891905b8082
1156101045760008160009055506001016100ec
5b5090565b50505b505b6102608061011c60003
6000f30060606040526000357c0100000000000
000000000000000000000000000000000000000
000900463ffffffff16806341c0e1b514610049578
3cfae321714610058575b610000565b34610000
6100566100ee565b005b3461000057610065610
82565b604051808060200182810382528381815
815260200191508051906020019080838360008
Ontwikkelomgeving
Programmeertaal: Solidity
Gecompileerde Ethereum
byte code op blockchain
Turing compleet (↔ Bitcoin scripts). Alles wat te berekenen is met
een computer kan ook in Solidity / Ethereum byte code
Difficult to interprete byte code: recompile source code & compare
Transaction Costs
89
contract demo{
mapping(bytes32=>bool) proofs;
function notarize(string doc){
var proof = sha256(document);
proofs[proof] = true;
}
function increment(string doc) returns uint{
return document.length;
}
function loop(string doc){
while(true){}
}
}
Transaction equally big,
but different consumption of resources (computation, storage)
→ Bitcoin’s pay-per-byte model insufficient
→ More resource intensive functions are more expensive
Transaction fee
Transaction
size
Smart contract
execution
Gas & Gasprice
90
Example: Hash 128 bytes of data
Gas price: 28 Gwei (= 0.000000028)
Price Ether: 980$
Gas: 30 + 4*6 = 54
Cost: 54 * 28 Gwei = 0,000001512 Ξ (0,0015$)
200 bytes tx: < 34600 gas = 0,0009688 Ξ (0,949$)
https://etherscan.io/chart/gasprice - https://etherscan.io/chart/gaslimit
Operation Gas
Transaction 21000
Transaction zero byte 4
Transaction non-zero byte 68
ADD 3
MULTIPLY 5
KECCAK256 (SHA3) 30
256 BITS KECCAK INPUT 6
… …
- Gas: Amount of required work to
execute code (unit of work)
- Gas Price: Compensation for the
miner per unit of work (gas)
Market (supply-demand) driven
- Miner’s fee: 𝑔𝑎𝑠 ∗ 𝑔𝑎𝑠𝑝𝑟𝑖𝑐𝑒
Incentive for efficient
smart contracts
- No byte limit (↔Bitcoin)
- Gas limit:moving,
currently 8M gas
Block limit
91
contract SimpleAuction
{
address public beneficiary;
uint public auctionStart;
uint public biddingTime;
address public highestBidder;
uint public highestBid;
bool ended;
event HighestBidIncreased(address bidder, uint amount);
event AuctionEnded(address winner, uint amount);
function SimpleAuction(uint _biddingTime, address _beneficiary){…}
function bid() payable {…}
function end() {…}
}
Smart Contract Code
Disclaimer: Een Ethereum exploit wordt genegeerd voor de eenvoud
http://solidity.readthedocs.io/en/develop/solidity-by-example.html
Real cost bid() function
Gas: 63230
Gasprice: 0.000000028 Ether
1 ether: 980$
=> 1,74$ (04/01/2018)
Doe dit NOOIT…
92
// Proof of Ownership contract
contract ProofOfOwnership{
mapping(bytes32=>bool) proofs;
//calculate and store the proof for a document
function notarize(string document){
var proof = sha256(document);
proofs[proof] = true;
}
// check if a document has been notarized
function checkDocument(string document) returns (bool){
var proof = calculateProof(document);
return proofs[proof];
}
}
Dit werd als ernstig voorbeeld gegeven op een seminarie door een expert
proofs: c0796844c3cbc… → true
5d5f4926be230… → true
c56d58202b0aa… → true
17f8f6699a8948… → true
…
document VOLLEDIG bewaard in transactie op blockchain
Hoge miner’s fee (1Mb => $1871)
- Mining
93
ASIC resistant
- Computation AND memory
required
- Ideal: less centralisation
- DAGs (Directed Acyclyc Graphs)
- DAG renewed every epoch (=
30000 blocks = 125 hours = ca. 5.2
days
Target: 1 block every 10 secs
Mining
94
4GB RAM
6x AMD Radeon RX 470/570
60GB SSD
Intel Celeron G1840
1000W
95
96
97
URL
Yellow paper http://gavwood.com/paper.pdf
Documentation http://www.ethdocs.org/en/latest/
Source code https://github.com/ethereum
Online IDE https://remix.ethereum.org
Explore the blockchain https://etherscan.io
Command-line client https://geth.ethereum.org/downloads/
MIST Browser https://github.com/ethereum/mist/releases
Have a look at
Transaction Limit: ± 25tx/sec.
98
3/12: accounting for 13 % of all gas use
99
1 Ether = $622
100
The DAO Hard Fork
101
The DAO
102
Investeerders transfereren Ether naar The
DAO and ontvangen daarvoor voting tokens
1
Contractors dienen investeringsvoorstellen in
2
Investeerders stemmen voor / tegen voorstel
3
Smartcontract transfereert al dan niet geld
4
Set van smart contracts gepubliceerd op Ethereum
Een aantal cijfers
$54m gelekt
naar aanvaller
18 000
investeerders
14% van
alle Ether
$168m
verzameld
Volledig transparant:
code, data & historiek public.
Iedereen kan audit doen
Bugs
- “Code is law”?
- Investeerders vertrouwen dat smart
contract doet wat ze verwachten
Ethereum Hard Fork
103
Decentralised Autonomous Organisation (DAO)
DAO verzamelde
$168M (Juni ‘16)
DAO bug exploit –
$54M in Ether lekt
weg (July ‘16)
Ethereum Hard Fork
104
Decentralised Autonomous Organisation (DAO)
DAO verzamelde
$168M (Juni ‘16)
DAO bug exploit –
$54M in Ether lekt
weg (July ‘16)
Verwachting/Hoop
(Steun voor) oude tak verdwijnt volledig
“The DAO bug exploit is nooit gebeurd”
Een deel van het verleden wordt collectief vergeten
Ethereum Hard Fork
105
Decentralised Autonomous Organisation (DAO)
DAO verzamelde
$168M (Juni ‘16)
DAO bug exploit –
$54M in Ether lekt
weg (July ‘16)
Realiteit: beide takken blijven naast elkaar
→ Replay attack mogelijk
Ethereum Hard Fork
106
Tamper-resistance
- Hoe onwijzigbaar is de blockchain?
Niet zo absoluut als beweerd wordt
- Nog aftakkingen (forks)?
Contract split
- Plots niet één, maar twee smart contracts. Welk is geldig? (finaliteit)
- Vb. Eén veiling, met twee verschillende winnaars
Lessons Learned
NIET correct:
Blockchain is onwijzigbaar
WEL correct:
Blockchain is niet eenzijdig wijzigbaar
(Gelijkaardig bij permissioned blockchains)
107
108https://www.theguardian.com/technology/2017/nov/08/cryptocurrency-300m-dollars-stolen-bug-ether
Myriad of attack vectors possible,
although cryptographically secure
blockchain technology is used
109
Smart Contracts - Samengevat
110
Automatiseren regels &
afdwingen afspraken
tussen partijen die elkaar niet 100%
hoeven te vertrouwen,
zonder daarbij afhankelijk te zijn
van een centrale partij.
(en pas op voor bugs!)
Smart Contracts - Samengevat
111
“A Distributed state machine
with money”
112
Heeft u een vraag? Stel ze!
AGENDA
4
Permissioned
1
Introduction
2
Bitcoin
7
Conclusions
3
Smart contracts
113
Permissionless Permissioned
Toegang & gebruik door hele wereld Extra laag voor toegangscontrole
Volledig transparant Meer controle op wie ziet wat (vb. audit)
Meestal erg onefficiënt (competitie) Pakken efficiënter (samenwerking)
Vertrouwen gedistribueerd Vertrouwen gedecentraliseerd
Cryptomunt vereist Cryptomunt niet steeds vereist
Public / open Enterprise / Consortium
Eg. Processing medical prescriptions
- Only accredited doctors can issue new
prescriptions
- Only RIZIV/INAMI can publish smart contracts
& determines what doctors are accredited
- 5/7 mutualities validate transactions
Twee Consortia
114
Fabric
Burrow
LINUX FOUNDATION
USES
entethalliance.org hyperledger.org
115
- Fork from Bitcoin code (06/2015)
- Version 2.0 coming soon
History
- Issue & transfer multiple asset types
- Publish data (data streams)
- Grant & revoke rights
- NO smart contracts
- Simple, easy to use, efficient
Functionality
Multisig
https://www.multichain.com/blog/2017/11/three-non-pointless-blockchains-production/
Transparency & auditability
in workflow management
Trading catastrophe bonds
without TTP (Euroclear)
Notarizing
e-commerce transactions
Real-world apllications
Mining
116
0 ≤ 𝑚𝑖𝑛𝑖𝑛𝑔 − 𝑑𝑖𝑣𝑒𝑟𝑠𝑖𝑡𝑦 ≤ 1
All miners allowed to mine next block
=> risk of forks, risk of mining starvation
A miner should wait untill all other
miners have created a block
 Blockchain halts when one miner
unavailable (robusness)
 Block not signed by right miner is
not accepted by network
A block is created by only one ‘miner’ who signs it.
Bob Charlie Alice Dave
Mining
117
0 ≤ 𝑚𝑖𝑛𝑖𝑛𝑔 − 𝑑𝑖𝑣𝑒𝑟𝑠𝑖𝑡𝑦 ≤ 1
𝑠𝑝𝑎𝑐𝑖𝑛𝑔 = 𝑚𝑖𝑛𝑖𝑛𝑔 − 𝑑𝑖𝑣𝑒𝑟𝑠𝑖𝑡𝑦 ∗ ( 𝑴𝒊𝒏𝒆𝒓𝒔 − 1)
Stochastic process
Two miners create block simultaneously: short-lived fork
Mining-diversity fixed at block-creation time
A sequence of blocks is signed by at least x miners
Bob Charlie Alice Dave
𝑚𝑖𝑛𝑖𝑛𝑔 − 𝑑𝑖𝑣𝑒𝑟𝑠𝑖𝑡𝑦 ∶ 0.75
𝑠𝑝𝑎𝑐𝑖𝑛𝑔 = 2
Consensus only undermined
if at least 75% of miners colluding
Setup phase
118
Setup phase
Some rules relaxed
- Admin can attribute and revoke rights without voting
- No mining order enforced
=> Allows the admin to set up the blockchain
Bob
Creates blockchain and
temporarily has unlimited rights
Charlie Alice
𝑠𝑒𝑡𝑢𝑝 − 𝑓𝑖𝑟𝑠𝑡 − 𝑏𝑙𝑜𝑐𝑘𝑠 = 4
𝑡𝑎𝑟𝑔𝑒𝑡 − 𝑏𝑙𝑜𝑐𝑘 − 𝑡𝑖𝑚𝑒 = 30
=> Bob has 120 seconds
Permisisons
119
- connect, mine,
- activate (connect, receive, issue), admin (other)
- send, receive, issue (assets)
- create (streams)
Blockchain specific
- write
- read (encryption)
Stream specific
- Proposal published on blockchain as transaction
- Votes published on blockchain as transaction
- Parameters
𝑎𝑑𝑚𝑖𝑛 − 𝑐𝑜𝑛𝑠𝑒𝑛𝑠𝑢𝑠 − 𝑚𝑖𝑛𝑒 = 0.5
𝑎𝑑𝑚𝑖𝑛 − 𝑐𝑜𝑛𝑠𝑒𝑛𝑠𝑢𝑠 − 𝑐𝑟𝑒𝑎𝑡𝑒 = 0.5
…
Granting rights
Some Parameters
• target-block-time = 15
• maximum-block-size = 8388608
• setup-first-blocks = 60
• mining-diversity = 0.75
• admin-consensus-mine = 0.5
• mine-empty-rounds = 10
• initial-block-reward = 0
• reward-halving-interval
• minimum-relay-fee (min. tx fee)
120
Multichain 1: Parameters cannot be changed after block creation
Multichain 2: Some parameters can be changed
Performance
121https://www.multichain.com/blog/2017/06/multichain-1-beta-2-roadmap/
Connecting your Application
122
let multichain = require("multichain-node")({
port: 6282,
host: '127.0.0.1',
user: “kristofrpc",
pass: "Jm2X9ojrczwghCQoieEncgQh4vc"
});
multichain.getAddresses(function(err, addresses){
if(!err) console.log(addresses);
})
multichain.issue({address: someAddress, asset: “cryptoFrank", qty:
50000, units: 0.01, details: {hello: "world"}}, function(err, res){
console.log(res)
})
multichain.sendAssetFrom({from: someAddress, to: someOtherAddress,
asset: “cryptoFrank", qty: 5}, function(err, tx) {
console.log(tx);
})
Getting Started
https://www.multichain.com/getting-started/
123
124
History
- June 2014: Launched
- Previously known as Eris (Renamed in 10/2016)
- March 2017, Monax joined Hyperledger project
Fork Ethereum code
- Supports smart contracts
- In Solidity, but compiles for you
- Tests during deploy time
Provenance of diamonds
Prototype to improve
electronic data interchange
between financial institutions.
Experiments by
DLT Consortium
of 60 > banks
Overview
125
BURROW - Version 0.16
- Consensus engine
(per block same ordered list of tx
- Efficient (< 2secs)
- Valid block signed by ≥ 2/3 of weight
- Version 0.17
- Node
- Executes smart contract
- Web server (JSON-RPC or REST)
- Smart contract off-chain test env.
- Storage, permissions
- Version 0.18
- Create & publish smart contracts
Does compilation for you
- Invoke & query smart contracts
- Blockchain management
Tendermint
126
Bob Charlie Alice Dave
30 20 35 15
Valid block signed by ≥ 2/3 of weight
Name registry
• Key-value store for bulk data off-chain.
• Regulated with tokens.
127
Storing 3 kb for 10 blocks
=> the total cost = 1*1*(3000 + 32)*10 = 30320 tokens
https://monax.io/docs/documentation/db/latest/specifications/api/#namereg
genesis.json{
…
"accounts": [
{
"address": "12A4B709AD2A24A72F4930221DCCF5C4675E048E",
"amount": 99999999999999,
"name": “testchain_kristof",
"permissions": {
"base": {
"perms": 16383,
"set": 16383
},
"roles": []
}
},
…
}
128
- All tokens generated in
genesis block
- User management
afterwards possible
Rights
129
https://github.com/tendermint/tendermint/wiki/Eris-Permissions
https://monax.io/docs/specs/jobs_specification/
Grouped in roles: administrator, validator, developer, participant, …
root full permissions. Use with care.
send permission to send TX.
call permission to call contracts.
name permission to add an entry in name registry.
create_contract permission to create contract.
create_account permission to create an account.
bond permission to send a bond TX allowing to be part of the
validator pool.
add_role permission to add roles to accounts.
has_role permission to query role of accounts.
rm_role permission to remove role from accounts.
set_base permission to set permissions.
unset_base permission to remove permissions.
has_base permission to query permissions of an account.
set_global permission to set burrow network parameters.
Getting Started
131
https://monax.io/docs/getting-started/
• Started as IBM project
• Smart contracts are called ‘chaincode’
132
FABRIC
Releases
- 16/09/2016: V0.6-preview
- 11/07/2017: V1.0
- 01/11/2017: V1.1-preview
Properties
- Modular, flexible
- Updatable chaincode
- Distinction of roles
- Not everyone can access all smart contracts,
not all validators runs all smart contracts
HL Fabric - Overview
133
Alice
API
Keys
Certs
Membership
Service
Blockchain
network
Register
Enroll
Deploy
Invoke
Query
Endorsement Policies
134
https://hyperledger-fabric.readthedocs.io/en/latest/arch-deep-dive.html#endorsement-policy-specification
http://hyperledger-fabric.readthedocs.io/en/latest/endorsement-policies.html
AND(‘Smals.member', ‘RSZ.member', ‘FodFin.member')
ESmals = {Alice, Bob}, ERSZ = {Charlie, Dave}, EFodFin = {Eve, Frank, George}
- Weight > 50
- Hyperledger Burrow (Monax): weight > 2/3 (fixed, global policy)
Weighted endorser set E =
{Alice=49, Bob=15, Charlie=15, Dave=10, Eve=7, Frank=3, George=1}
- (Alice OR Bob) AND (any two of: Charlie, Dave, Eve, Frank, George)
- 5 out of the 7
Set of Endorsers E = {Alice, Bob, Charlie, Dave, Eve, Frank, George}
Each smart contract has its own endorsement policy
In Hyperledger Fabric
Hyperledger Fabric
135
Endorser E1 Endorser E2 Endorser E3 Peer P1
Client
Transaction
Proposal
Transaction
Proposal
Transaction
Proposal
Transaction
Proposal
Orderer O1 Orderer O1
Ordering Service
Orderer O1 Orderer O1
Hyperledger Fabric
136
Endorser E1 Endorser E2 Endorser E3 Peer P1
Client
Transaction
Proposal
Transaction
Proposal
Orderer O1 Orderer O2
Ordering Service
Orderer O3 Orderer O4
Hyperledger Fabric
137
Endorser E1 Endorser E2 Endorser E3 Peer P1
Client
Transaction
Proposal
Orderer O1 Orderer O2
Ordering Service
Orderer O3 Orderer O4
Client
Invokes smart
contract code by
creating a
transactions,
collecting
endorsements
and sending it al
lto the ordering
service
Orderers
If endorsement policy met: include validated
transactions into block & distribute block
(Non-endorsing) Peer
Executes locally smart
contract code
Endorsers (Endorsing peers)
- Validates transaction proposals
- Executes locally smart contract code
Hyperledger Fabric
138
Endorser E1 Endorser E2 Endorser E3 Peer P1
Client
Transaction
Proposal
Orderer O1 Orderer O2
Ordering Service
Orderer O2 Orderer O4
Hyperledger Fabric - Channels
139
Endorser E1 Endorser E2 Endorser E3 Peer P1
data blue transactions / smart contracts
only visible for E1, E2, en P2
Peer P2 Peer P3
Orderer O1 Orderer O2
Orderer O3 Orderer O4
Ordering Service
One ordering service, but multiple
channels / blockchains
Cert. authority
Smals
RootCert
HyperLedger Fabric
140
Orderer O2
Endorser E2
ECert2
Federation of Notaries
Client C2
eBox @ Smals
Orderer O1 ECert1
Client C1
Orderer O3
Endorser E3
ECert3
Orde van Vlaamse Balies
Client C3
Membership Service Provider
141
Hierarchical, centralized top-down structure to protect a blockchain
142
Enrollment CA
Membership Service Provider
Transaction CA
Root CA
Long-term certificate
Alice
ECert
Two types of ECerts
1) signing
2) encryption
143
Enrollment CA
Membership Service Provider
Transaction CA
Root CA
Short term
Different TCerts not linkable
to each other or to Alice
=> privacy
Alice
ECert
ECert
TCert
TCert
TCert
Two types of TCerts
1) signing
2) encryption
Hyperledger Fabric
144
Endorser E1 Endorser E2 Endorser E3 Peer P1
Alice’s Client
Transaction
Proposal
Transaction
Proposal
Transaction
Proposal
Transaction
Proposal
Orderer O1 Orderer O1
Ordering Service
Orderer O1 Orderer O1
Cert Cert Cert
ECert or TCert
(depends upon smart
contract access rules)
All participants have known identities.
Every transaction can be linked to identity by MSP
SOLO or KAFKA
Summary
145
Heavy & complex solution
Not elegant
↔ Blockchain filosophy
(hacked CA = free access rights)
Flexible
Uses traditional crypto
=> There is still a lot of work to do
Very active community
Not mature yet
Not always a drama if you loose
your key
Getting Started
146
https://hyperledger-fabric.readthedocs.io/
Comparison
147
Multichain HL Burrow HL Fabric
Code fork from Bitcoin Ethereum From scratch
Complexity Low Medium High
Flexibility Low Medium High
Efficiency High Medium Low
Community Small Medium Large
Smart contracts No Yes Yes
Validation Chosen mining-
diversity
Tendermint
(>2/3)
Per-contract
policiy
Geen one-technology-fits-all
Keuze blockchain technologie/platform afhankelijk
van vereisten applicatie
148
Heeft u een vraag? Stel ze!
AGENDA
4
Permissioned
1
Introduction
2
Bitcoin
7
Conclusions
3
Smart contracts
The bigger picture
149
Blockchain Technology
Distributed Ledger Technology
Techology for distributed trust
Bitcoin
Hyperledger Fabric
Ethereum
Monero IOTA
CORDA
Multi-party computation
Zero-knowledge proofs
Homomorphic Encryption
…
…
…
Blockchain is één technologie.
Niet de eerste, en wellicht niet de laatste
Attribute-Based Credentials
IOTA (The Tangle)
150https://iota.org/IOTA_Whitepaper.pdf
Node valideert twee andere transactie om zelf transactie te kunnen creëren
Lost daartoe cryptografische puzzel op
Geen transaction fees (dus geen geldcreatie door minen)
Sneller & schaalbaarder dan blockchain
Doel: micropayments
Cummulative weigth
IOTA (The Tangle)
151https://iota.org/IOTA_Whitepaper.pdf
Node valideert twee andere transactie om zelf transactie te kunnen creëren
Lost daartoe cryptografische puzzel op
Geen transaction fees (dus geen geldcreatie door minen)
Sneller & schaalbaarder dan blockchain
Doel: micropayments
IOTA (The Tangle)
153
Low load and high load
Initial Coin Offerings (ICO)
154https://www.economist.com/news/finance-and-economics/21721425-it-may-also-spawn-valuable-innovations-market-initial-coin-offerings
Publicatie white paper
(Claims meestal niet geaudit)
ICO periode:
Investeerders kopen munten
Gewoonlijk aan vaste prijs
Meestal ongereguleerd
Business operationeel
Gebruik vereist munten
Munten verhandelbaar
Crowdfunding door lanceren nieuwe cryptomunt
Succesvol → meer vraag → hogere waarde
(beperkt aantal munten)
Manier om geld te verdienen aan gedistribueerde protocols
Gedecentraliseerd
platform voor
competitie online game
Gedecentraliseerde
cloud opslag
Conclusies
Het gaat over VERTROUWEN
• Veelbelovende technologie voor applicaties die
traditioneel vertrouwen vereisen in centrale partijen.
Geen oplossing voor alles
• Het is mogelijk met blockchain ≠ Blockchain is de
beste keuze
Uitdagingen
• Schaalbaarheid, sleutelbeheer, privacy, juridisch, …
• Veel onderzoek (MIT, KU Leuven, TU Delft, IBM, …)
155
Uitdagingen
=> Veel onderzoek om deze uitdagingen aan te pakken
Standaardisatie /
best practices
Sleutelbeheer &
bescherming end-
points
Rechsonzekerheid
Privacy &
confidentialiteit
Gebaseerd op
aantal aannames
Schaalbaarheid
Veiligheid Andere
Volatiliteit
wisselkoersen
156
Bugs in smart
contracts
157
POTENTIEEL
UITDAGINGEN
Perspectief
158https://hbr.org/2017/01/the-truth-about-blockchain
“Hoewel de impact enorm zal zijn, zal het decennia
duren voor blockchain om in onze economische en
maatschappelijke structuren te sijpelen.”
Tijd nodig om economie te transformeren:
- TCP/IP: 30 jaar
- Elektriciteit: 20 jaar
Grondleggende technologie
Het heeft het potentieel om nieuwe fundamenten voor
ons economisch en sociaal systeem te creëren.
Toestand vandaag:
- 3-5 jaar eer volwassen
- 3% POCs in productie
Hype
159
Conclusies
160
H Y P E H Y P EU i t d a g i n g e n
Erg jonge technologie, in volle ontwikkeling
161
Dr. Kristof Verslype
Researcher, advisor & speaker
in crypto, privacy & blockchain tech
Q u e s t i o n s & C o n t a c t
© Benjamin Reay
@KristofVerslype
kristof.verslype@smals.be
be.linkedin.com/in/verslype
www.cryptov.net
www.smalsresearch.be
@SmalsResearch
www.smals.be
@Smals_ICT
Personal

More Related Content

What's hot

2017 05-18 people's academy blockchain
2017 05-18 people's academy blockchain 2017 05-18 people's academy blockchain
2017 05-18 people's academy blockchain
Lykle de Vries
 
Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)
Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)
Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)
Digipolis Antwerpen
 
Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)
Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)
Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)
Digipolis Antwerpen
 
Waarom Blockchain een revolutie is voor de samenleving
Waarom Blockchain een revolutie is voor de samenlevingWaarom Blockchain een revolutie is voor de samenleving
Waarom Blockchain een revolutie is voor de samenleving
Lykle de Vries
 
2017 10-18 staffing force blockchain
2017 10-18 staffing force blockchain2017 10-18 staffing force blockchain
2017 10-18 staffing force blockchain
Lykle de Vries
 
Caesar blockchain whitepaper blockchain de hype voorbij v1.0 - online print
Caesar blockchain whitepaper   blockchain de hype voorbij v1.0 - online printCaesar blockchain whitepaper   blockchain de hype voorbij v1.0 - online print
Caesar blockchain whitepaper blockchain de hype voorbij v1.0 - online print
Rick Bouter
 
PDMA seminar blockchain - Nanning de Jong Berenschot 20171107
PDMA seminar blockchain - Nanning de Jong Berenschot 20171107PDMA seminar blockchain - Nanning de Jong Berenschot 20171107
PDMA seminar blockchain - Nanning de Jong Berenschot 20171107
N de Jong
 
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
kennissessie blockchain -  Wat is Blockchain en smart contracts @Conclusion kennissessie blockchain -  Wat is Blockchain en smart contracts @Conclusion
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
Getting value from IoT, Integration and Data Analytics
 
Technology update: Blockchain Presentatie Aaron van Wirdum
Technology update: Blockchain Presentatie Aaron van WirdumTechnology update: Blockchain Presentatie Aaron van Wirdum
Technology update: Blockchain Presentatie Aaron van Wirdum
Media Perspectives
 
Gemeentelijke Blockchain pilots - lessons learned - Nanning de Jong Berenscho...
Gemeentelijke Blockchain pilots - lessons learned - Nanning de Jong Berenscho...Gemeentelijke Blockchain pilots - lessons learned - Nanning de Jong Berenscho...
Gemeentelijke Blockchain pilots - lessons learned - Nanning de Jong Berenscho...
N de Jong
 
170928 fex - de geheimen van een praktische blockchain toepassing - valid
170928   fex - de geheimen van een praktische blockchain toepassing - valid170928   fex - de geheimen van een praktische blockchain toepassing - valid
170928 fex - de geheimen van een praktische blockchain toepassing - valid
Flevum
 
20161219 blockchain
20161219 blockchain20161219 blockchain
20161219 blockchain
eddyvds
 
meetup 11102018 - Waardepapieren in Blockchain
meetup 11102018 - Waardepapieren in Blockchainmeetup 11102018 - Waardepapieren in Blockchain
meetup 11102018 - Waardepapieren in Blockchain
VNG Realisatie
 
Bitcoin bluffer of blijver
Bitcoin bluffer of blijverBitcoin bluffer of blijver
Bitcoin bluffer of blijver
Avansacademielezing
 
Is het een blockchain, of niet? tweakers meetup 2017 06-29
Is het een blockchain, of niet? tweakers meetup 2017 06-29Is het een blockchain, of niet? tweakers meetup 2017 06-29
Is het een blockchain, of niet? tweakers meetup 2017 06-29
Lykle de Vries
 
2016 11-01 provincie drenthe Idee101
2016 11-01 provincie drenthe Idee1012016 11-01 provincie drenthe Idee101
2016 11-01 provincie drenthe Idee101
Lykle de Vries
 
Blokchain
BlokchainBlokchain
Blokchain
maximevarendonck
 
2017 10-04 becis
2017 10-04 becis2017 10-04 becis
2017 10-04 becis
Lykle de Vries
 
Christian Schouten
Christian SchoutenChristian Schouten
Christian Schouten
bcined
 
Blockchain by Sophie Vercruysse
Blockchain by Sophie VercruysseBlockchain by Sophie Vercruysse
Blockchain by Sophie Vercruysse
SophieVercruysse1
 

What's hot (20)

2017 05-18 people's academy blockchain
2017 05-18 people's academy blockchain 2017 05-18 people's academy blockchain
2017 05-18 people's academy blockchain
 
Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)
Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)
Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)
 
Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)
Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)
Meetup 24/5/2018 - Digitale identiteit op blockchain (Self-Sovereign Identity)
 
Waarom Blockchain een revolutie is voor de samenleving
Waarom Blockchain een revolutie is voor de samenlevingWaarom Blockchain een revolutie is voor de samenleving
Waarom Blockchain een revolutie is voor de samenleving
 
2017 10-18 staffing force blockchain
2017 10-18 staffing force blockchain2017 10-18 staffing force blockchain
2017 10-18 staffing force blockchain
 
Caesar blockchain whitepaper blockchain de hype voorbij v1.0 - online print
Caesar blockchain whitepaper   blockchain de hype voorbij v1.0 - online printCaesar blockchain whitepaper   blockchain de hype voorbij v1.0 - online print
Caesar blockchain whitepaper blockchain de hype voorbij v1.0 - online print
 
PDMA seminar blockchain - Nanning de Jong Berenschot 20171107
PDMA seminar blockchain - Nanning de Jong Berenschot 20171107PDMA seminar blockchain - Nanning de Jong Berenschot 20171107
PDMA seminar blockchain - Nanning de Jong Berenschot 20171107
 
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
kennissessie blockchain -  Wat is Blockchain en smart contracts @Conclusion kennissessie blockchain -  Wat is Blockchain en smart contracts @Conclusion
kennissessie blockchain - Wat is Blockchain en smart contracts @Conclusion
 
Technology update: Blockchain Presentatie Aaron van Wirdum
Technology update: Blockchain Presentatie Aaron van WirdumTechnology update: Blockchain Presentatie Aaron van Wirdum
Technology update: Blockchain Presentatie Aaron van Wirdum
 
Gemeentelijke Blockchain pilots - lessons learned - Nanning de Jong Berenscho...
Gemeentelijke Blockchain pilots - lessons learned - Nanning de Jong Berenscho...Gemeentelijke Blockchain pilots - lessons learned - Nanning de Jong Berenscho...
Gemeentelijke Blockchain pilots - lessons learned - Nanning de Jong Berenscho...
 
170928 fex - de geheimen van een praktische blockchain toepassing - valid
170928   fex - de geheimen van een praktische blockchain toepassing - valid170928   fex - de geheimen van een praktische blockchain toepassing - valid
170928 fex - de geheimen van een praktische blockchain toepassing - valid
 
20161219 blockchain
20161219 blockchain20161219 blockchain
20161219 blockchain
 
meetup 11102018 - Waardepapieren in Blockchain
meetup 11102018 - Waardepapieren in Blockchainmeetup 11102018 - Waardepapieren in Blockchain
meetup 11102018 - Waardepapieren in Blockchain
 
Bitcoin bluffer of blijver
Bitcoin bluffer of blijverBitcoin bluffer of blijver
Bitcoin bluffer of blijver
 
Is het een blockchain, of niet? tweakers meetup 2017 06-29
Is het een blockchain, of niet? tweakers meetup 2017 06-29Is het een blockchain, of niet? tweakers meetup 2017 06-29
Is het een blockchain, of niet? tweakers meetup 2017 06-29
 
2016 11-01 provincie drenthe Idee101
2016 11-01 provincie drenthe Idee1012016 11-01 provincie drenthe Idee101
2016 11-01 provincie drenthe Idee101
 
Blokchain
BlokchainBlokchain
Blokchain
 
2017 10-04 becis
2017 10-04 becis2017 10-04 becis
2017 10-04 becis
 
Christian Schouten
Christian SchoutenChristian Schouten
Christian Schouten
 
Blockchain by Sophie Vercruysse
Blockchain by Sophie VercruysseBlockchain by Sophie Vercruysse
Blockchain by Sophie Vercruysse
 

Similar to Slides blockchain sessies Kristof verslype

2017 09-09 - Blockchain @ Zaandam Valley (ah)
2017 09-09 - Blockchain @ Zaandam Valley (ah) 2017 09-09 - Blockchain @ Zaandam Valley (ah)
2017 09-09 - Blockchain @ Zaandam Valley (ah)
Lykle de Vries
 
Presentatie Blockchain
Presentatie BlockchainPresentatie Blockchain
Presentatie Blockchain
Emiel Knepper
 
VUSO Steenwijk: KENNISMAKEN MET BITCOIN EN BLOKCHAIN
VUSO Steenwijk: KENNISMAKEN MET BITCOIN EN BLOKCHAINVUSO Steenwijk: KENNISMAKEN MET BITCOIN EN BLOKCHAIN
VUSO Steenwijk: KENNISMAKEN MET BITCOIN EN BLOKCHAIN
Lykle de Vries
 
Block chain
Block chainBlock chain
Block chain
Jordy Van Meenen
 
2017 01-26 schiphol thirstday blockchain
2017 01-26 schiphol thirstday blockchain2017 01-26 schiphol thirstday blockchain
2017 01-26 schiphol thirstday blockchain
Lykle de Vries
 
Bitcoin, blockchain, distributed ledger, 10 februari 2016
Bitcoin, blockchain, distributed ledger, 10 februari 2016Bitcoin, blockchain, distributed ledger, 10 februari 2016
Bitcoin, blockchain, distributed ledger, 10 februari 2016
Alphons Ranner
 
Bitcoin, blockchain, distributed ledger, 10 februari 2016
Bitcoin, blockchain, distributed ledger, 10 februari 2016Bitcoin, blockchain, distributed ledger, 10 februari 2016
Bitcoin, blockchain, distributed ledger, 10 februari 2016
Alphons Ranner
 
2017 05-31 meimaand matchmaand - blockchain
2017 05-31 meimaand matchmaand - blockchain2017 05-31 meimaand matchmaand - blockchain
2017 05-31 meimaand matchmaand - blockchain
Lykle de Vries
 
Blockchain
Blockchain Blockchain
Blockchain
Lalievdv
 
20190329 leveranciersbijeenkomst Blockchain
20190329 leveranciersbijeenkomst Blockchain20190329 leveranciersbijeenkomst Blockchain
20190329 leveranciersbijeenkomst Blockchain
VNG Realisatie
 
Kennisfestival 2018 blockchain workshop augustus 2018
Kennisfestival 2018 blockchain workshop augustus 2018 Kennisfestival 2018 blockchain workshop augustus 2018
Kennisfestival 2018 blockchain workshop augustus 2018
01Ram
 
2018 01-12 Blockchain bij Schoenen-Zaken en The Smooth Brothers
2018 01-12 Blockchain bij Schoenen-Zaken en The Smooth Brothers2018 01-12 Blockchain bij Schoenen-Zaken en The Smooth Brothers
2018 01-12 Blockchain bij Schoenen-Zaken en The Smooth Brothers
Lykle de Vries
 
Learning days 25_02_2024 - Emerging Tech.pptx
Learning days 25_02_2024 - Emerging Tech.pptxLearning days 25_02_2024 - Emerging Tech.pptx
Learning days 25_02_2024 - Emerging Tech.pptx
Filip Smet
 
3. blockchain cryptoplatform voor een frictieloze economie d2 d - design-to...
3. blockchain cryptoplatform voor een frictieloze economie   d2 d - design-to...3. blockchain cryptoplatform voor een frictieloze economie   d2 d - design-to...
3. blockchain cryptoplatform voor een frictieloze economie d2 d - design-to...
Rick Bouter
 
Blockchain en smart contracts #pbdag 8 2016 06-27
Blockchain en smart contracts #pbdag 8 2016 06-27Blockchain en smart contracts #pbdag 8 2016 06-27
Blockchain en smart contracts #pbdag 8 2016 06-27
Lykle de Vries
 
181023 fdc - presentatie blockchain, from proof of concept to real world so...
181023   fdc - presentatie blockchain, from proof of concept to real world so...181023   fdc - presentatie blockchain, from proof of concept to real world so...
181023 fdc - presentatie blockchain, from proof of concept to real world so...
Flevum
 
De blockchain
De blockchainDe blockchain
De blockchain
Casper De Weirdt
 
Een transparante supply chain dankzij blockchain technologie
Een transparante supply chain dankzij blockchain technologieEen transparante supply chain dankzij blockchain technologie
Een transparante supply chain dankzij blockchain technologie
Wouter Verbeek
 
Bitcoins: instappen of wegblijven ?
Bitcoins: instappen of wegblijven ?Bitcoins: instappen of wegblijven ?
Bitcoins: instappen of wegblijven ?
Simon Lelieveldt
 

Similar to Slides blockchain sessies Kristof verslype (19)

2017 09-09 - Blockchain @ Zaandam Valley (ah)
2017 09-09 - Blockchain @ Zaandam Valley (ah) 2017 09-09 - Blockchain @ Zaandam Valley (ah)
2017 09-09 - Blockchain @ Zaandam Valley (ah)
 
Presentatie Blockchain
Presentatie BlockchainPresentatie Blockchain
Presentatie Blockchain
 
VUSO Steenwijk: KENNISMAKEN MET BITCOIN EN BLOKCHAIN
VUSO Steenwijk: KENNISMAKEN MET BITCOIN EN BLOKCHAINVUSO Steenwijk: KENNISMAKEN MET BITCOIN EN BLOKCHAIN
VUSO Steenwijk: KENNISMAKEN MET BITCOIN EN BLOKCHAIN
 
Block chain
Block chainBlock chain
Block chain
 
2017 01-26 schiphol thirstday blockchain
2017 01-26 schiphol thirstday blockchain2017 01-26 schiphol thirstday blockchain
2017 01-26 schiphol thirstday blockchain
 
Bitcoin, blockchain, distributed ledger, 10 februari 2016
Bitcoin, blockchain, distributed ledger, 10 februari 2016Bitcoin, blockchain, distributed ledger, 10 februari 2016
Bitcoin, blockchain, distributed ledger, 10 februari 2016
 
Bitcoin, blockchain, distributed ledger, 10 februari 2016
Bitcoin, blockchain, distributed ledger, 10 februari 2016Bitcoin, blockchain, distributed ledger, 10 februari 2016
Bitcoin, blockchain, distributed ledger, 10 februari 2016
 
2017 05-31 meimaand matchmaand - blockchain
2017 05-31 meimaand matchmaand - blockchain2017 05-31 meimaand matchmaand - blockchain
2017 05-31 meimaand matchmaand - blockchain
 
Blockchain
Blockchain Blockchain
Blockchain
 
20190329 leveranciersbijeenkomst Blockchain
20190329 leveranciersbijeenkomst Blockchain20190329 leveranciersbijeenkomst Blockchain
20190329 leveranciersbijeenkomst Blockchain
 
Kennisfestival 2018 blockchain workshop augustus 2018
Kennisfestival 2018 blockchain workshop augustus 2018 Kennisfestival 2018 blockchain workshop augustus 2018
Kennisfestival 2018 blockchain workshop augustus 2018
 
2018 01-12 Blockchain bij Schoenen-Zaken en The Smooth Brothers
2018 01-12 Blockchain bij Schoenen-Zaken en The Smooth Brothers2018 01-12 Blockchain bij Schoenen-Zaken en The Smooth Brothers
2018 01-12 Blockchain bij Schoenen-Zaken en The Smooth Brothers
 
Learning days 25_02_2024 - Emerging Tech.pptx
Learning days 25_02_2024 - Emerging Tech.pptxLearning days 25_02_2024 - Emerging Tech.pptx
Learning days 25_02_2024 - Emerging Tech.pptx
 
3. blockchain cryptoplatform voor een frictieloze economie d2 d - design-to...
3. blockchain cryptoplatform voor een frictieloze economie   d2 d - design-to...3. blockchain cryptoplatform voor een frictieloze economie   d2 d - design-to...
3. blockchain cryptoplatform voor een frictieloze economie d2 d - design-to...
 
Blockchain en smart contracts #pbdag 8 2016 06-27
Blockchain en smart contracts #pbdag 8 2016 06-27Blockchain en smart contracts #pbdag 8 2016 06-27
Blockchain en smart contracts #pbdag 8 2016 06-27
 
181023 fdc - presentatie blockchain, from proof of concept to real world so...
181023   fdc - presentatie blockchain, from proof of concept to real world so...181023   fdc - presentatie blockchain, from proof of concept to real world so...
181023 fdc - presentatie blockchain, from proof of concept to real world so...
 
De blockchain
De blockchainDe blockchain
De blockchain
 
Een transparante supply chain dankzij blockchain technologie
Een transparante supply chain dankzij blockchain technologieEen transparante supply chain dankzij blockchain technologie
Een transparante supply chain dankzij blockchain technologie
 
Bitcoins: instappen of wegblijven ?
Bitcoins: instappen of wegblijven ?Bitcoins: instappen of wegblijven ?
Bitcoins: instappen of wegblijven ?
 

More from Axxes IT Consultancy

Modernizing PowerShell Scripts
Modernizing PowerShell ScriptsModernizing PowerShell Scripts
Modernizing PowerShell Scripts
Axxes IT Consultancy
 
Axxes tax hackers
Axxes tax hackersAxxes tax hackers
Axxes tax hackers
Axxes IT Consultancy
 
Security Basics - Internet Safety
Security Basics - Internet SafetySecurity Basics - Internet Safety
Security Basics - Internet Safety
Axxes IT Consultancy
 
Futureproof angular 1.x applications - yannick houbrix
Futureproof angular 1.x  applications - yannick houbrixFutureproof angular 1.x  applications - yannick houbrix
Futureproof angular 1.x applications - yannick houbrix
Axxes IT Consultancy
 
Pitfalls in Performance Testing AxxesCC 06/2015
Pitfalls in Performance Testing AxxesCC 06/2015Pitfalls in Performance Testing AxxesCC 06/2015
Pitfalls in Performance Testing AxxesCC 06/2015
Axxes IT Consultancy
 
Axxes software development traineeship
Axxes software development traineeshipAxxes software development traineeship
Axxes software development traineeship
Axxes IT Consultancy
 

More from Axxes IT Consultancy (6)

Modernizing PowerShell Scripts
Modernizing PowerShell ScriptsModernizing PowerShell Scripts
Modernizing PowerShell Scripts
 
Axxes tax hackers
Axxes tax hackersAxxes tax hackers
Axxes tax hackers
 
Security Basics - Internet Safety
Security Basics - Internet SafetySecurity Basics - Internet Safety
Security Basics - Internet Safety
 
Futureproof angular 1.x applications - yannick houbrix
Futureproof angular 1.x  applications - yannick houbrixFutureproof angular 1.x  applications - yannick houbrix
Futureproof angular 1.x applications - yannick houbrix
 
Pitfalls in Performance Testing AxxesCC 06/2015
Pitfalls in Performance Testing AxxesCC 06/2015Pitfalls in Performance Testing AxxesCC 06/2015
Pitfalls in Performance Testing AxxesCC 06/2015
 
Axxes software development traineeship
Axxes software development traineeshipAxxes software development traineeship
Axxes software development traineeship
 

Slides blockchain sessies Kristof verslype

  • 1. Blockchain & Smart Contracts E e n i n t r o d u c t i e Kristof Verslype Smals Onderzoek (smalsresearch.be) www.cryptov.net 15 maart 2018 - Mechelen
  • 2. 2 Kristof Verslype @KristofVerslype kristof@cryptov.net be.linkedin.com/in/verslype www.cryptov.net Doctor of Engineering (KU Leuven) Researcher, advisor & speaker in crypto, privacy & blockchain tech www.smals.be @Smals_ICT www.smalsresearch.be @SmalsResearch W h o a m I ?
  • 3. 3 Heeft u een vraag? Stel ze! AGENDA 4 Permissioned 1 Introduction 2 Bitcoin 7 Conclusions 3 Smart contracts
  • 4. Blockchain gaat over Vertrouwen Reductie afhankelijkheid centrale partijen (Disintermediatie) 4 Blockchain Netwerk Bescherming data Afdwingen regels
  • 5. Perspectief 5https://hbr.org/2017/01/the-truth-about-blockchain “Hoewel de impact enorm zal zijn, zal het decennia duren voor blockchain om in onze economische en maatschappelijke structuren te sijpelen.” Tijd nodig om economie te transformeren: - TCP/IP: 30 jaar - Elektriciteit: 20 jaar Grondleggende technologie Het heeft het potentieel om nieuwe fundamenten voor ons economisch en sociaal systeem te creëren. Toestand vandaag: - 3-5 jaar eer volwassen - 3% POCs in productie
  • 6. Idee 6 Transactions 5,1 BTC → 0,7 BTC → Transactions 5,1 BTC → 0,7 BTC → Transactions 5,1 BTC → 0,7 BTC → Transactions 5,1 BTC → 0,7 BTC → Ik transfereer 0,4 BTC naar Ok! Ok! Ok! 0,4 BTC → Bob Alice Charlie Dave 0,4 BTC → 0,4 BTC → 0,4 BTC →
  • 7. Idea 7 Transactions 5,1 BTC → 0,7 BTC → Transactions 5,1 BTC → 0,7 BTC → Transactions 5,1 BTC → 0,7 BTC → Transactions 5,1 BTC → 0,7 BTC → I transfer 0,4 BTC to . Ok! Ok! Ok! 0,4 BTC → Bob Alice Charlie Dave 0,4 BTC → 0,4 BTC → 0,4 BTC → Blockchain Atomisch Iedereen schrijft de transactie in zijn/haar append-only spreadsheet of niemand → Consensus mechanisme Geldig Enkel geldige transacties worden aanvaard door het netwerk Vb. Bob is eigenaar / heeft het geld niet reeds eerder gespendeerd Veilig en robuust Systeem blijft correct werken, zelfs indien deel participanten offline of kwaadaardig is Relatief snel Gedistribueerd
  • 8. Blockchain 8 Aan vaste frequentie nieuwe blokken gecreëerd met daarin de meest recente transacties De blockchain bevat alle transacties Transacties in de blockchain zijn onverwijderbaar Blockchain = aaneenschakeling van blokken, die transacties bevatten Vele entiteiten bezitten dezelfde kopie van de blockchain Block 51 Header Block 52 Header Block 53 Header Header Block 54 5,10 BTC → 0,70 BTC → Blockchain specifiek: 10 minutes in Bitcoin, 10 seconden in Ethereum,… 0,40 BTC →
  • 9. Idee 10 Transactions 5,1 BTC → 0,7 BTC → Transactions 5,1 BTC → 0,7 BTC → Transactions 5,1 BTC → 0,7 BTC → Transactions 5,1 BTC → 0,7 BTC → 0,4 BTC → Bob Alice Charlie Dave 0,4 BTC → 0,4 BTC → 0,4 BTC →
  • 10. Bescherming Data 11 Transaction 0,01 BTC → Vertrouwde entiteit Transaction Data Untamperable (integrity) Unremovable (non-repudiability) Timestamp Eigenschappen van data in een blockchain Transparent (verifiable) Authentic Robust (availability) → Applications other then cryptocurrencies On existing or own blockchain
  • 11. Application Domains 12 Diploma Alice Master in Lego Design KU Leuven Registration facts Transfer of assets Streamlining processes Enforcement of agreements Protection data Enforcement of rules
  • 12. 13 Registration Facts Vaccination IdentityDiplomaMarriage Medical records TaxesSupply chain Tracking Driving license Political mandates Official documents History / overview Will Hash of records on blockchain - Integrity - Non-repudiability (completeness) - Timestamp Confidence in correctness - Authenticity - Integrity - Timestamp - Long term-validity - Transparency - Non- repudiability (no denial) - Integrity Logically centralising dispersed data about provenance in single data structure (without central authority)
  • 13. 14 Registration Facts Alice 9AF Employer Alice does not need copy of blockchain In reality usually more crypto hashing, encryption, pseudonyms Transaction 9AF Diploma Alice Master in Lego Design KU Leuven Alice
  • 14. 15 Registration Facts Alice 9AF Employer Transaction 9AF Diploma Alice Master in Lego Design KU Leuven Diploma Alice Master in Lego Design KU Leuven Best match with GDPR Data potentially again spread over multiple servers… Reduces potential of smart contracts
  • 16. 17 Applications: Transfer Assets Ticket .bitDomain name Copyrights Bitcoin Monero Ethereum Crypto currencies Untangible assets DiamondCar Land register Tangible assets Electricity
  • 17. 18 Transfer Assets Transaction 23F → Transaction XP0 → 9BG Transaction 9BG → 23F Authority (Mortgage office) The lawful owner is . The lawful owner is . Owner 1 (Bob) Owner 2 (Charlie) The lawful owner is . Only required for initial registration Full history on the blockchain Owner can prove (s)he is the lawful owner
  • 18. 19 Transfer Assets Transaction 23F → Authority (Mortgage office) Owner 1 (Bob) Owner 2 (Charlie) Transaction 9BG → 23F → Transaction XP0 → 9BG → Owner 3 (Alice) Only if both & sign transaction, it is valid No trusted intermediary required to temporarily hold funds Extra rules possible (Eg. valid soil certificate or approval by notary) Hide exact amount Register renovation & verification history
  • 19. Streamlining Processes Banks share blockchain instead of all own DB Citizen moves and declares it once. All stakeholders informed (electricity provider, post, municipalities, …) Citizen declares birth once. All stakeholders informed (local administration, childcare system , bank, mutualities, insurance, …) Processes between governmental institutions (e.g. automatic subsidies) Advantages - Reduced trust in central authority - Robust (HA system with LA nodes) - Unmodifiable audit trail - Every step validated / according to the rules - One data structure (consistency) - Uniform data representation (standardisation) 20
  • 20. Enforcements of Agreements 21 Processing medical prescriptions Elections Flight Delay Insurance Blocking rent guaranteeCrowdfundingApplication & Payment of subsidies / benefits Smart locks Permissions access PII Transport conditions Auction
  • 21. Central DB Vs. Blockchain 22 Central DB Blockchain Disintermediation The essence of blockchain tech is reducing reliance upon intermediaries / authorities Integrity / transparency / verifiability Blockchain is a tamper-proof history, verified by multiple nodes. Confidentiality Multiple nodes in network need access to data to validate transactions and update smart contract. Harder to have flexible access control Robustness High availability with low available nodes. Geen SPOF / extreme fault tolerance thanks to redundancy Performance & speed Blockchain inherently less efficient: sig creation & verification, data transfer, consensus, storage, … “If trust and robustness aren’t an issue, there’s nothing a blockchain can do that a regular database cannot.” Gideon Greenspan https://www.multichain.com/blog/2016/03/blockchains-vs-centralized-databases/
  • 22. 23 Permissionless Permissioned Toegang & gebruik door hele wereld Extra laag voor toegangscontrole Volledig transparant Meer controle op wie ziet wat (vb. audit) Meestal erg onefficiënt (PoW) Pakken efficiënter Vertrouwen gedistribueerd Vertrouwen gedecentraliseerd Cryptomunt vereist Cryptomunt niet steeds vereist Public / open Enterprise / Consortium
  • 23. 24https://coinmarketcap.com/ 2 types of forks - Fork from a code base (e.g. Litecoin) - Fork from a blockchain (e.g. Bitcoin Cash)
  • 24. 25 Heeft u een vraag? Stel ze! AGENDA 4 Permissioned 1 Introduction 2 Bitcoin 7 Conclusions 3 Smart contracts
  • 25. 26http://uk.businessinsider.com/bitcoin-pizza-day-passes-2000-20-million-2017-5 Op 22 mei 2010 kocht een software ontwikkelaar 2 pizza’s voor 10 000 bitcoin. Vandaag zijn 10 000 bitcoins ongeveer 80 miljoen dollar waard
  • 26. 27 16 900 000 BTC in omloop  Totale waarde: ± 135 miljard $ Alle cryptomunten samen: ±316 miljard $
  • 28. Traditionele Internationale Transactie 29 Bob Alice Is dit mogelijk zonder vertrouwde partij? 1e gedistribueerde cryptomunt (2009) Schok doorheen de financiële wereld Snel aandacht voor Bitcoin/blockchain vanuit de financiële wereld Cryptocurrencies solve the double spend problem with crypto and exist since the eighies (David Chaum)
  • 29. Pseudoniemen & Sleutels 30 0,40 BTC → 0,40 BTC →Niet maar
  • 30. Blockchain 31 Block 51 Header Block 52 Header Block 53 Header Header Block 54 5,10 BTC → 0,70 BTC → 0,40 BTC → 1Nf311Qb8rLDk 1F1tAaz5x1HUX 3BcMuv1VJqm Bob Alice Charlie Dave
  • 31. Transacties & UTXOs 32 Header Block 51 Header Block 52 Header Block 53 Header Block 54 Mijn bitcoins zijn verspreid in de blockchain over meerdere transacties Transaction Z4R 0,01 BTC → Transaction 06D 12,6 BTC → Transaction 83F 1,2 BTC → Transaction YC0 0,8 BTC → 0,4 BTC → Output Addr BTC Z4R[0] 0,01 06D[0] 12,6 83F[0] 1,2 Output Addr BTC Z4R[0] 0,01 06D[0] 12,6 YCO[0] 0,8 YCO[1] 0,4 Most recent state, derived from the blockchain (history)
  • 32. Bitcoin 34 Miner Full node Light node Blockchain append-only Geschiedenis van Bitcoin UTXO Relevant info Meest actuele status UTXO UTXO UTXO UTXO UTXO UTXO UTXO
  • 34. - Mining 36 ‘Miners’ gaan in competitie met elkaar om als eerste een rekenintensieve cryptografische puzzel te vinden (per blok).
  • 35. Bitcoin Mining 37 000000000000000002A386ADBAED073B0 2E66EE8A6A61FD83BA33DF434553671 Header Hash (fingerprint) function 669831a3180f1e77e9e3c904b76d6254 03924303118ff97acff2d8599b9dc91b bc9e7154309cdc81c5b6203b04531581 07e8d4c4cfe6eeb82fbaddefa345dc7b 015487950321 Eigenschappen - Moeilijk te vinden - Makkelijk te verifiëren - Aanpasbare moeilijkheidsgraad Winnaar beloond - Nieuwe bitcoins - Transactievergoedingen Disclaimer: in werkelijkheid wordt enkel de header gehasht, die een fingerprint bevat van de transacties
  • 36. 38 Difficulty adjusted every 2 weeks (2016 blocks) ⟹ 26 335 883 TH/s (26 335 883 000 000 000 000 H/s) Higher prices → more mining power → higher difficulty
  • 37. Ecological Impact 39https://digiconomist.net/bitcoin-energy-consumption Electricity consumption per country > 70% in China Weak environmental laws Electricity subsidized Max. capaciteit 4 transactions / sec.
  • 39. Gelijktijdige Blokcreatie 41 Wat gebeurt er indien twee miners ongeveer gelijktijdig een geldig blok vinden Langste tak is diegene die aanvaard wordt (correcter: tak met meeste ‘werk’) Daarom best een aantal blokken wachten vooralleer transactie als verwerkt te beschouwen
  • 40. Consensus Proof-of-Work - x% resources → x% blokken - Cryptografische puzzel - Competitie - Mining - Erg energieintensief - Controle: > 50% rekenkracht in unpermissioned blockchain netwerken Proof-of-Stake - x% stake (e.g. coins) → x% blokken - Deterministisch algoritme voor selectie participant die blok creëert - Minting - Efficiënt - Controle: > 50% stake (moeilijker) - Incentive voor minter om verschillende in stand te houden => Machtige participant kan blockchain controleren (hybrid)
  • 41. I s h e t v e i l i g ? 43
  • 42. Veiligheid 44 Block 51 Header Block 52 Header 5,10 BTC → Header Block 53 0,70 BTC → Header Block 54 0,40 BTC → Header Block 53 0,70 BTC → Header Block 52 Header Block 54 0,40 BTC → Hoe ouder de transactie, hoe beter beschermd Want gevolgd door meer blokken waarvoor cryptografische puzzel opnieuw opgelost moet worden Veiligheid proportioneel tot de hoeveelheid rekenkracht
  • 43. Veiligheid Het bitcoin protocol is veilig zolang er geen participant meer dan 50% van de rekenkracht bezit (*) (*) According to Decker and Wattenhofer 49,1% suffices due to stale blocks Bitcoin is niet alleen een concept… User Software Infrastructure Loss Theft Abuse James Howells, who works in IT, lost in 2013 7500 bitcoins by throwing away by accident an old hard disk, which contained his secret key. Nearly 4M Bitcoins Lost Forever Source: chainalysis.com
  • 44. Risico 46 Card Stop Afhaallimiet Terugbetaling Centrale entiteit → individuele gebruiker → Soms zijn we blij dat er een centrale partij is Omgaan met verlies
  • 46. Online Wallets 49 Online wallet Beheert jouw bitcoins Volledig vertrouwen nodig Enkele gehackte online wallets… Klanten verloren cryptogeld
  • 50. Pseudoniemen 53 Fysieke wereld Bitcoin netwerk 1Nf311Qb8rLDkWTHrhpmNewZzkcWFYptfc 1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX 3BcMuv1VJqmwY5Wim8MPAzKAAiAKby9LcN Charlie Bob Alice
  • 51. 54 Bitcoin & Anonimiteit QR-code - bevat pseudoniem - Scan om te betalen Alle transacties van en naar dit pseudoniem zijn publiek Meerdere pseudoniemen - Minder praktisch - Links nog steeds mogelijk Tweerichtings Subway kan ook jouw bitcoin geschiedenis te weten komen
  • 52. One-Time Pseudoniemen 55 Fysieke wereld Bitcoin netwerk Transaction 0,8 BC → 0,4 BC → Charlie Bob Alice
  • 53. Bitcoin & Privacy Fleder, Michael, Michael S. Kester, and Sudeep Pillai. MIT. "Bitcoin transaction graph analysis." arXiv preprint arXiv:1502.01657 (2015). Goldfeder, Steven, et al. "When the cookie meets the blockchain: Privacy risks of web payments via cryptocurrencies." arXiv preprint arXiv:1708.04748 (2017) https://bitcoin.nl/nieuws/bitcoin-privacy-173. “Geïdentificeerde” personen gelinkt aan “Op de meeste shop websites ontvangen third party trackers informatie over aankopen van gebruikers. Dit voor analyse- en reclamedoeleinden. Wij tonen aan dat indien de gebruiker betaalt met een cryptomunt, trackers typisch genoeg informatie hebben over de aankoop om de transactie op de blockchain uniek te identificeren, te linken aan de cookie van de gebruiker, en verder aan de echte identiteit van de gebruiker.” Graad van privacy op Bitcoin netwerk, maar verre van perfect
  • 55. 58
  • 56. 59
  • 57. 60
  • 58. Why is Bitcoin Used? 61 Hard to find exact numbers Illegal activities Gambling Speculation Protection against inflation/crash local currency (e.g. Venezuela) International transactions Transactions of small amounts sometimes very expensive
  • 59. Average Transaction Fee in $ 62https://bitinfocharts.com/comparison/bitcoin-transactionfees.html#1y Volatile & unpredictable Based on supply & demand Based on size (in bytes) of transaction, not on amount Payed by the entity sending money
  • 60.
  • 61. 64 Tussenpartij of autoriteit elimineren ⇏ Efficienter en/of goedkoper
  • 62. Bitcoin & Regulering Wie bepaalt de regels? 65
  • 63. Power to the People? 66 Core developers Propose official Bitcoin client Miners Use proposed client Process transactions Bitcoin holders Use proposed client Centralisation of mining > 50% of mining power → Rewrite the blockchain Implement the rules of the game
  • 64. Afsplitsingen (Forks) 67 Maart ‘17 Aug. ‘17 Okt. ‘17 Bestaande munten splitsen mee
  • 66. Bitcoins in Circulation 69 Total amount of bitcoins created
  • 67. Blockchain.info 70 Schaalprobleem - Alle transacties op blockchain - 3 transacties / sec. ↔ Visa: 10 000 / sec. - En blockchain toch al 120GB groot Schaalprobleem - Alle transacties in blockchain - 4 transacties per seconde ↔ Visa: 65 000 / sec. (Verhoogt geleidelijk danzij invoering SegWit) - En reeds > 160 GB (excl. UTXO, SegWit)) Bitcoin Blockchain Grootte blockchain.info/charts/blocks-size
  • 68. Old Concepts 71 Concept Year Stack-oriented programming language 1957 - GEORGE Cryptographic hash function Late ‘70 Digital signatures 1977 (1973) - RSA Merkle trees 1979 Shamir secret sharing 1979 Proof-of-Work 1993
  • 69. Enkele Bedenkingen 72 Bitcoin is een eerste experiment • Niet perfect en dat mogen we ook niet verwachten • Gebruik van eenvoudige, oude crypto concepten (jaren ‘70) • Interessante nieuwe concepten Uitdagingen • Technische: schaalbaarheid, privacy, transactiekosten, forks, efficiëntie, … • Niet-technisch: juridisch, maatschappelijk, risico,… Idee distributie vertrouwen m.b.v. technologie • “Alles dat met een vetrouwde autoriteit gedaan kan worden, kan ook zonder” - D. Boneh, crypto prof. @ Stanford • Niet enkel blockchain technologie
  • 70. Have a look at 73 https://blockchain.info/ https://bitcoin.org/nl/download
  • 71. 74 Heeft u een vraag? Stel ze! AGENDA 4 Permissioned 1 Introduction 2 Bitcoin 7 Conclusions 3 Smart contracts
  • 72. Blockchain gaat over Distributie van Vertrouwen 75 Blockchain Netwerk Bescherming data Afdwingen regels
  • 73. Smart Contracts (aka chaincode) 76 Regels zijn - Hardgecodeerd in de Bitcoin software - Applicatiespecifiek → Niet flexibel Code die uitgevoerd wordt op het blockchain netwerk, zonder centrale partij Kan een blockchain netwerk ook op een flexibele regels afdwingen voor een diverse set van applicaties?
  • 74. Smart Contracts (aka chaincode) 77 Regels zijn - Hardgecodeerd in de Bitcoin software - Applicatiespecifiek → Niet flexibel Code die uitgevoerd wordt op het blockchain netwerk, zonder centrale partij - Smart contract = set applicatiespecifieke regels - Blockchain netwerk dwingt regels af, zorgt voor correcte uitvoering - Smart contracts kan cryptogeld ontvangen, bijhouden en uitgeven Verwerken voorschriften Verkiezingen Verzekeringen Sterke toename potentieel blockchain technologie
  • 75. Voorbeelden 78 http://dapps.ethercasts.com/ Smart locks (wagen, huis, …) Blokkeren huurwaarborg Verkiezingen Veiling Crowdfunding Afspraken tussen partijen die elkaar niet vertrouwen
  • 76. Smart Contracts 79 Contract Auction{ function bid() function end() HighestBid: € HighestBidder: Beneficiary: Charlie } bid(), 20€ end() bid(), 10€ 20€ 02010 Bob Alice Charlie Alice 10€ Bob Smart contract kan cryptogeld tijdelijk blokkeren Niemand kan de correcte uitvoering beïnvloeden
  • 77. Events in Smart Contracts 80 Contract{ function bid(){…} function end(){…} HighestBid: € HighestBidder: Beneficiary: Charlie } bid(...), 20€ end(...) bid(...), 10€ 20€ 02010 Bob Alice Charlie Alice 10€ Bob bidEvent: 10€ bidEvent: 10€ bidEvent: 20€ bidEvent: 20€ Events informeren Charlie & Dave over nieuwe biedingen Oude events zichtbaar: Charlie & Dave niet per se permanent online Dave
  • 78. Smart contract Piece of code published on the blockhain and run in a distributed way by the blockchain network => Not smart => Mostly not a (legal) contract 81 It is deaf & blind: - It only knows its own status & the function parameters when a function is called - It has no knowledge about anything else in the world / on the blockhain It is reactive - It will not do anything, unless a function is called - This can result in a function call in another smart contract It is distributed - All full nodes know & execute the smart contract - In some permissioned blockchains, this can be limited to a subset
  • 79. Smart Contract Blockchain 82 contract c Header Block 51 c.bid(), 10€ Header Block 52 Header Block 53 c.bid(), 20€ Header c.end() Block 54Publiceren contract (genesis transaction or deploy transaction) Oproepen functie (invoke transaction)
  • 80. Netwerk 83 Miner Validating (full) node Light node Blockchain append-only Geschiedenis van smart contracts Smart contract Wijzigbaar door oproepen van functies
  • 81. Bitcoin 84 Miner Full node Light node Blockchain append-only Geschiedenis van Bitcoin UTXO Relevant info Meest actuele status UTXO UTXO UTXO UTXO UTXO UTXO UTXO
  • 82. 85 contract SimpleAuction { address public beneficiary; uint public auctionStart; uint public biddingTime; address public highestBidder; uint public highestBid; bool ended; event HighestBidIncreased(address bidder, uint amount); event AuctionEnded(address winner, uint amount); function SimpleAuction(uint _biddingTime, address _beneficiary) { beneficiary = _beneficiary; auctionStart = now; biddingTime = _biddingTime; } function bid() payable Smart Contract Code Disclaimer: Een Ethereum exploit wordt genegeerd voor de eenvoud http://solidity.readthedocs.io/en/develop/solidity-by-example.html
  • 83. Doe dit NOOIT… 86 // Proof of Ownership contract contract ProofOfOwnership{ mapping(bytes32=>bool) proofs; //calculate and store the proof for a document function notarize(string document){ var proof = sha256(document); proofs[proof] = true; } // check if a document has been notarized function checkDocument(string document) returns (bool){ var proof = calculateProof(document); return proofs[proof]; } } Dit werd als ernstig voorbeeld gegeven op een seminarie door een expert proofs: c0796844c3cbc… → true 5d5f4926be230… → true c56d58202b0aa… → true 17f8f6699a8948… → true … document VOLLEDIG bewaard in transactie op blockchain
  • 84. Orakels 87 En wat indien een orakel foute informatie aanlevert? - Contract uitvoering kan niet teruggedraaid worden - Meerdere oracles die stemmen? Soms heeft een smart contract gegevens nodig uit de reële wereld Compensatie Verzekering Vertrouwde leverancier van gegevens uit de reële wereld Orakel roept telkens contractfunctie aan → Transactie op blockchain
  • 85. 88 contract SimpleAuction { address public beneficiary; uint public auctionStart; uint public biddingTime; address public highestBidder; uint public highestBid; bool ended; event HighestBidIncreased(address bidder, uint amount); event AuctionEnded(address winner, uint amount); function SimpleAuction(uint _biddingTime, address _beneficiary) { beneficiary = _beneficiary; auctionStart = now; biddingTime = _biddingTime; } ... } 6060604052346100005760405161037c3803806 37c833981016040528080518201919050505b5b 3600060006101000a81548173fffffffffffffffffffffff fffffffffffff021916908373ffffffffffffffffffffffffffffffff ffff1602179055505b8060019080519060200190 805460018160011615610100020316600290049 600052602060002090601f01602090048101928 01f106100b557805160ff1916838001178555610 3565b828001600101855582156100e357918201 b828111156100e2578251825591602001919060 101906100c7565b5b50905061010891905b8082 1156101045760008160009055506001016100ec 5b5090565b50505b505b6102608061011c60003 6000f30060606040526000357c0100000000000 000000000000000000000000000000000000000 000900463ffffffff16806341c0e1b514610049578 3cfae321714610058575b610000565b34610000 6100566100ee565b005b3461000057610065610 82565b604051808060200182810382528381815 815260200191508051906020019080838360008 Ontwikkelomgeving Programmeertaal: Solidity Gecompileerde Ethereum byte code op blockchain Turing compleet (↔ Bitcoin scripts). Alles wat te berekenen is met een computer kan ook in Solidity / Ethereum byte code Difficult to interprete byte code: recompile source code & compare
  • 86. Transaction Costs 89 contract demo{ mapping(bytes32=>bool) proofs; function notarize(string doc){ var proof = sha256(document); proofs[proof] = true; } function increment(string doc) returns uint{ return document.length; } function loop(string doc){ while(true){} } } Transaction equally big, but different consumption of resources (computation, storage) → Bitcoin’s pay-per-byte model insufficient → More resource intensive functions are more expensive Transaction fee Transaction size Smart contract execution
  • 87. Gas & Gasprice 90 Example: Hash 128 bytes of data Gas price: 28 Gwei (= 0.000000028) Price Ether: 980$ Gas: 30 + 4*6 = 54 Cost: 54 * 28 Gwei = 0,000001512 Ξ (0,0015$) 200 bytes tx: < 34600 gas = 0,0009688 Ξ (0,949$) https://etherscan.io/chart/gasprice - https://etherscan.io/chart/gaslimit Operation Gas Transaction 21000 Transaction zero byte 4 Transaction non-zero byte 68 ADD 3 MULTIPLY 5 KECCAK256 (SHA3) 30 256 BITS KECCAK INPUT 6 … … - Gas: Amount of required work to execute code (unit of work) - Gas Price: Compensation for the miner per unit of work (gas) Market (supply-demand) driven - Miner’s fee: 𝑔𝑎𝑠 ∗ 𝑔𝑎𝑠𝑝𝑟𝑖𝑐𝑒 Incentive for efficient smart contracts - No byte limit (↔Bitcoin) - Gas limit:moving, currently 8M gas Block limit
  • 88. 91 contract SimpleAuction { address public beneficiary; uint public auctionStart; uint public biddingTime; address public highestBidder; uint public highestBid; bool ended; event HighestBidIncreased(address bidder, uint amount); event AuctionEnded(address winner, uint amount); function SimpleAuction(uint _biddingTime, address _beneficiary){…} function bid() payable {…} function end() {…} } Smart Contract Code Disclaimer: Een Ethereum exploit wordt genegeerd voor de eenvoud http://solidity.readthedocs.io/en/develop/solidity-by-example.html Real cost bid() function Gas: 63230 Gasprice: 0.000000028 Ether 1 ether: 980$ => 1,74$ (04/01/2018)
  • 89. Doe dit NOOIT… 92 // Proof of Ownership contract contract ProofOfOwnership{ mapping(bytes32=>bool) proofs; //calculate and store the proof for a document function notarize(string document){ var proof = sha256(document); proofs[proof] = true; } // check if a document has been notarized function checkDocument(string document) returns (bool){ var proof = calculateProof(document); return proofs[proof]; } } Dit werd als ernstig voorbeeld gegeven op een seminarie door een expert proofs: c0796844c3cbc… → true 5d5f4926be230… → true c56d58202b0aa… → true 17f8f6699a8948… → true … document VOLLEDIG bewaard in transactie op blockchain Hoge miner’s fee (1Mb => $1871)
  • 90. - Mining 93 ASIC resistant - Computation AND memory required - Ideal: less centralisation - DAGs (Directed Acyclyc Graphs) - DAG renewed every epoch (= 30000 blocks = 125 hours = ca. 5.2 days Target: 1 block every 10 secs
  • 91. Mining 94 4GB RAM 6x AMD Radeon RX 470/570 60GB SSD Intel Celeron G1840 1000W
  • 92. 95
  • 93. 96
  • 94. 97 URL Yellow paper http://gavwood.com/paper.pdf Documentation http://www.ethdocs.org/en/latest/ Source code https://github.com/ethereum Online IDE https://remix.ethereum.org Explore the blockchain https://etherscan.io Command-line client https://geth.ethereum.org/downloads/ MIST Browser https://github.com/ethereum/mist/releases Have a look at
  • 95. Transaction Limit: ± 25tx/sec. 98 3/12: accounting for 13 % of all gas use
  • 96. 99 1 Ether = $622
  • 97. 100
  • 98. The DAO Hard Fork 101
  • 99. The DAO 102 Investeerders transfereren Ether naar The DAO and ontvangen daarvoor voting tokens 1 Contractors dienen investeringsvoorstellen in 2 Investeerders stemmen voor / tegen voorstel 3 Smartcontract transfereert al dan niet geld 4 Set van smart contracts gepubliceerd op Ethereum Een aantal cijfers $54m gelekt naar aanvaller 18 000 investeerders 14% van alle Ether $168m verzameld Volledig transparant: code, data & historiek public. Iedereen kan audit doen Bugs - “Code is law”? - Investeerders vertrouwen dat smart contract doet wat ze verwachten
  • 100. Ethereum Hard Fork 103 Decentralised Autonomous Organisation (DAO) DAO verzamelde $168M (Juni ‘16) DAO bug exploit – $54M in Ether lekt weg (July ‘16)
  • 101. Ethereum Hard Fork 104 Decentralised Autonomous Organisation (DAO) DAO verzamelde $168M (Juni ‘16) DAO bug exploit – $54M in Ether lekt weg (July ‘16) Verwachting/Hoop (Steun voor) oude tak verdwijnt volledig “The DAO bug exploit is nooit gebeurd” Een deel van het verleden wordt collectief vergeten
  • 102. Ethereum Hard Fork 105 Decentralised Autonomous Organisation (DAO) DAO verzamelde $168M (Juni ‘16) DAO bug exploit – $54M in Ether lekt weg (July ‘16) Realiteit: beide takken blijven naast elkaar → Replay attack mogelijk
  • 103. Ethereum Hard Fork 106 Tamper-resistance - Hoe onwijzigbaar is de blockchain? Niet zo absoluut als beweerd wordt - Nog aftakkingen (forks)? Contract split - Plots niet één, maar twee smart contracts. Welk is geldig? (finaliteit) - Vb. Eén veiling, met twee verschillende winnaars
  • 104. Lessons Learned NIET correct: Blockchain is onwijzigbaar WEL correct: Blockchain is niet eenzijdig wijzigbaar (Gelijkaardig bij permissioned blockchains) 107
  • 106. Myriad of attack vectors possible, although cryptographically secure blockchain technology is used 109
  • 107. Smart Contracts - Samengevat 110 Automatiseren regels & afdwingen afspraken tussen partijen die elkaar niet 100% hoeven te vertrouwen, zonder daarbij afhankelijk te zijn van een centrale partij. (en pas op voor bugs!)
  • 108. Smart Contracts - Samengevat 111 “A Distributed state machine with money”
  • 109. 112 Heeft u een vraag? Stel ze! AGENDA 4 Permissioned 1 Introduction 2 Bitcoin 7 Conclusions 3 Smart contracts
  • 110. 113 Permissionless Permissioned Toegang & gebruik door hele wereld Extra laag voor toegangscontrole Volledig transparant Meer controle op wie ziet wat (vb. audit) Meestal erg onefficiënt (competitie) Pakken efficiënter (samenwerking) Vertrouwen gedistribueerd Vertrouwen gedecentraliseerd Cryptomunt vereist Cryptomunt niet steeds vereist Public / open Enterprise / Consortium Eg. Processing medical prescriptions - Only accredited doctors can issue new prescriptions - Only RIZIV/INAMI can publish smart contracts & determines what doctors are accredited - 5/7 mutualities validate transactions
  • 112. 115 - Fork from Bitcoin code (06/2015) - Version 2.0 coming soon History - Issue & transfer multiple asset types - Publish data (data streams) - Grant & revoke rights - NO smart contracts - Simple, easy to use, efficient Functionality Multisig https://www.multichain.com/blog/2017/11/three-non-pointless-blockchains-production/ Transparency & auditability in workflow management Trading catastrophe bonds without TTP (Euroclear) Notarizing e-commerce transactions Real-world apllications
  • 113. Mining 116 0 ≤ 𝑚𝑖𝑛𝑖𝑛𝑔 − 𝑑𝑖𝑣𝑒𝑟𝑠𝑖𝑡𝑦 ≤ 1 All miners allowed to mine next block => risk of forks, risk of mining starvation A miner should wait untill all other miners have created a block  Blockchain halts when one miner unavailable (robusness)  Block not signed by right miner is not accepted by network A block is created by only one ‘miner’ who signs it. Bob Charlie Alice Dave
  • 114. Mining 117 0 ≤ 𝑚𝑖𝑛𝑖𝑛𝑔 − 𝑑𝑖𝑣𝑒𝑟𝑠𝑖𝑡𝑦 ≤ 1 𝑠𝑝𝑎𝑐𝑖𝑛𝑔 = 𝑚𝑖𝑛𝑖𝑛𝑔 − 𝑑𝑖𝑣𝑒𝑟𝑠𝑖𝑡𝑦 ∗ ( 𝑴𝒊𝒏𝒆𝒓𝒔 − 1) Stochastic process Two miners create block simultaneously: short-lived fork Mining-diversity fixed at block-creation time A sequence of blocks is signed by at least x miners Bob Charlie Alice Dave 𝑚𝑖𝑛𝑖𝑛𝑔 − 𝑑𝑖𝑣𝑒𝑟𝑠𝑖𝑡𝑦 ∶ 0.75 𝑠𝑝𝑎𝑐𝑖𝑛𝑔 = 2 Consensus only undermined if at least 75% of miners colluding
  • 115. Setup phase 118 Setup phase Some rules relaxed - Admin can attribute and revoke rights without voting - No mining order enforced => Allows the admin to set up the blockchain Bob Creates blockchain and temporarily has unlimited rights Charlie Alice 𝑠𝑒𝑡𝑢𝑝 − 𝑓𝑖𝑟𝑠𝑡 − 𝑏𝑙𝑜𝑐𝑘𝑠 = 4 𝑡𝑎𝑟𝑔𝑒𝑡 − 𝑏𝑙𝑜𝑐𝑘 − 𝑡𝑖𝑚𝑒 = 30 => Bob has 120 seconds
  • 116. Permisisons 119 - connect, mine, - activate (connect, receive, issue), admin (other) - send, receive, issue (assets) - create (streams) Blockchain specific - write - read (encryption) Stream specific - Proposal published on blockchain as transaction - Votes published on blockchain as transaction - Parameters 𝑎𝑑𝑚𝑖𝑛 − 𝑐𝑜𝑛𝑠𝑒𝑛𝑠𝑢𝑠 − 𝑚𝑖𝑛𝑒 = 0.5 𝑎𝑑𝑚𝑖𝑛 − 𝑐𝑜𝑛𝑠𝑒𝑛𝑠𝑢𝑠 − 𝑐𝑟𝑒𝑎𝑡𝑒 = 0.5 … Granting rights
  • 117. Some Parameters • target-block-time = 15 • maximum-block-size = 8388608 • setup-first-blocks = 60 • mining-diversity = 0.75 • admin-consensus-mine = 0.5 • mine-empty-rounds = 10 • initial-block-reward = 0 • reward-halving-interval • minimum-relay-fee (min. tx fee) 120 Multichain 1: Parameters cannot be changed after block creation Multichain 2: Some parameters can be changed
  • 119. Connecting your Application 122 let multichain = require("multichain-node")({ port: 6282, host: '127.0.0.1', user: “kristofrpc", pass: "Jm2X9ojrczwghCQoieEncgQh4vc" }); multichain.getAddresses(function(err, addresses){ if(!err) console.log(addresses); }) multichain.issue({address: someAddress, asset: “cryptoFrank", qty: 50000, units: 0.01, details: {hello: "world"}}, function(err, res){ console.log(res) }) multichain.sendAssetFrom({from: someAddress, to: someOtherAddress, asset: “cryptoFrank", qty: 5}, function(err, tx) { console.log(tx); })
  • 121. 124 History - June 2014: Launched - Previously known as Eris (Renamed in 10/2016) - March 2017, Monax joined Hyperledger project Fork Ethereum code - Supports smart contracts - In Solidity, but compiles for you - Tests during deploy time Provenance of diamonds Prototype to improve electronic data interchange between financial institutions. Experiments by DLT Consortium of 60 > banks
  • 122. Overview 125 BURROW - Version 0.16 - Consensus engine (per block same ordered list of tx - Efficient (< 2secs) - Valid block signed by ≥ 2/3 of weight - Version 0.17 - Node - Executes smart contract - Web server (JSON-RPC or REST) - Smart contract off-chain test env. - Storage, permissions - Version 0.18 - Create & publish smart contracts Does compilation for you - Invoke & query smart contracts - Blockchain management
  • 123. Tendermint 126 Bob Charlie Alice Dave 30 20 35 15 Valid block signed by ≥ 2/3 of weight
  • 124. Name registry • Key-value store for bulk data off-chain. • Regulated with tokens. 127 Storing 3 kb for 10 blocks => the total cost = 1*1*(3000 + 32)*10 = 30320 tokens https://monax.io/docs/documentation/db/latest/specifications/api/#namereg
  • 125. genesis.json{ … "accounts": [ { "address": "12A4B709AD2A24A72F4930221DCCF5C4675E048E", "amount": 99999999999999, "name": “testchain_kristof", "permissions": { "base": { "perms": 16383, "set": 16383 }, "roles": [] } }, … } 128 - All tokens generated in genesis block - User management afterwards possible
  • 126. Rights 129 https://github.com/tendermint/tendermint/wiki/Eris-Permissions https://monax.io/docs/specs/jobs_specification/ Grouped in roles: administrator, validator, developer, participant, … root full permissions. Use with care. send permission to send TX. call permission to call contracts. name permission to add an entry in name registry. create_contract permission to create contract. create_account permission to create an account. bond permission to send a bond TX allowing to be part of the validator pool. add_role permission to add roles to accounts. has_role permission to query role of accounts. rm_role permission to remove role from accounts. set_base permission to set permissions. unset_base permission to remove permissions. has_base permission to query permissions of an account. set_global permission to set burrow network parameters.
  • 128. • Started as IBM project • Smart contracts are called ‘chaincode’ 132 FABRIC Releases - 16/09/2016: V0.6-preview - 11/07/2017: V1.0 - 01/11/2017: V1.1-preview Properties - Modular, flexible - Updatable chaincode - Distinction of roles - Not everyone can access all smart contracts, not all validators runs all smart contracts
  • 129. HL Fabric - Overview 133 Alice API Keys Certs Membership Service Blockchain network Register Enroll Deploy Invoke Query
  • 130. Endorsement Policies 134 https://hyperledger-fabric.readthedocs.io/en/latest/arch-deep-dive.html#endorsement-policy-specification http://hyperledger-fabric.readthedocs.io/en/latest/endorsement-policies.html AND(‘Smals.member', ‘RSZ.member', ‘FodFin.member') ESmals = {Alice, Bob}, ERSZ = {Charlie, Dave}, EFodFin = {Eve, Frank, George} - Weight > 50 - Hyperledger Burrow (Monax): weight > 2/3 (fixed, global policy) Weighted endorser set E = {Alice=49, Bob=15, Charlie=15, Dave=10, Eve=7, Frank=3, George=1} - (Alice OR Bob) AND (any two of: Charlie, Dave, Eve, Frank, George) - 5 out of the 7 Set of Endorsers E = {Alice, Bob, Charlie, Dave, Eve, Frank, George} Each smart contract has its own endorsement policy In Hyperledger Fabric
  • 131. Hyperledger Fabric 135 Endorser E1 Endorser E2 Endorser E3 Peer P1 Client Transaction Proposal Transaction Proposal Transaction Proposal Transaction Proposal Orderer O1 Orderer O1 Ordering Service Orderer O1 Orderer O1
  • 132. Hyperledger Fabric 136 Endorser E1 Endorser E2 Endorser E3 Peer P1 Client Transaction Proposal Transaction Proposal Orderer O1 Orderer O2 Ordering Service Orderer O3 Orderer O4
  • 133. Hyperledger Fabric 137 Endorser E1 Endorser E2 Endorser E3 Peer P1 Client Transaction Proposal Orderer O1 Orderer O2 Ordering Service Orderer O3 Orderer O4
  • 134. Client Invokes smart contract code by creating a transactions, collecting endorsements and sending it al lto the ordering service Orderers If endorsement policy met: include validated transactions into block & distribute block (Non-endorsing) Peer Executes locally smart contract code Endorsers (Endorsing peers) - Validates transaction proposals - Executes locally smart contract code Hyperledger Fabric 138 Endorser E1 Endorser E2 Endorser E3 Peer P1 Client Transaction Proposal Orderer O1 Orderer O2 Ordering Service Orderer O2 Orderer O4
  • 135. Hyperledger Fabric - Channels 139 Endorser E1 Endorser E2 Endorser E3 Peer P1 data blue transactions / smart contracts only visible for E1, E2, en P2 Peer P2 Peer P3 Orderer O1 Orderer O2 Orderer O3 Orderer O4 Ordering Service One ordering service, but multiple channels / blockchains
  • 136. Cert. authority Smals RootCert HyperLedger Fabric 140 Orderer O2 Endorser E2 ECert2 Federation of Notaries Client C2 eBox @ Smals Orderer O1 ECert1 Client C1 Orderer O3 Endorser E3 ECert3 Orde van Vlaamse Balies Client C3
  • 137. Membership Service Provider 141 Hierarchical, centralized top-down structure to protect a blockchain
  • 138. 142 Enrollment CA Membership Service Provider Transaction CA Root CA Long-term certificate Alice ECert Two types of ECerts 1) signing 2) encryption
  • 139. 143 Enrollment CA Membership Service Provider Transaction CA Root CA Short term Different TCerts not linkable to each other or to Alice => privacy Alice ECert ECert TCert TCert TCert Two types of TCerts 1) signing 2) encryption
  • 140. Hyperledger Fabric 144 Endorser E1 Endorser E2 Endorser E3 Peer P1 Alice’s Client Transaction Proposal Transaction Proposal Transaction Proposal Transaction Proposal Orderer O1 Orderer O1 Ordering Service Orderer O1 Orderer O1 Cert Cert Cert ECert or TCert (depends upon smart contract access rules) All participants have known identities. Every transaction can be linked to identity by MSP SOLO or KAFKA
  • 141. Summary 145 Heavy & complex solution Not elegant ↔ Blockchain filosophy (hacked CA = free access rights) Flexible Uses traditional crypto => There is still a lot of work to do Very active community Not mature yet Not always a drama if you loose your key
  • 143. Comparison 147 Multichain HL Burrow HL Fabric Code fork from Bitcoin Ethereum From scratch Complexity Low Medium High Flexibility Low Medium High Efficiency High Medium Low Community Small Medium Large Smart contracts No Yes Yes Validation Chosen mining- diversity Tendermint (>2/3) Per-contract policiy Geen one-technology-fits-all Keuze blockchain technologie/platform afhankelijk van vereisten applicatie
  • 144. 148 Heeft u een vraag? Stel ze! AGENDA 4 Permissioned 1 Introduction 2 Bitcoin 7 Conclusions 3 Smart contracts
  • 145. The bigger picture 149 Blockchain Technology Distributed Ledger Technology Techology for distributed trust Bitcoin Hyperledger Fabric Ethereum Monero IOTA CORDA Multi-party computation Zero-knowledge proofs Homomorphic Encryption … … … Blockchain is één technologie. Niet de eerste, en wellicht niet de laatste Attribute-Based Credentials
  • 146. IOTA (The Tangle) 150https://iota.org/IOTA_Whitepaper.pdf Node valideert twee andere transactie om zelf transactie te kunnen creëren Lost daartoe cryptografische puzzel op Geen transaction fees (dus geen geldcreatie door minen) Sneller & schaalbaarder dan blockchain Doel: micropayments Cummulative weigth
  • 147. IOTA (The Tangle) 151https://iota.org/IOTA_Whitepaper.pdf Node valideert twee andere transactie om zelf transactie te kunnen creëren Lost daartoe cryptografische puzzel op Geen transaction fees (dus geen geldcreatie door minen) Sneller & schaalbaarder dan blockchain Doel: micropayments
  • 148. IOTA (The Tangle) 153 Low load and high load
  • 149. Initial Coin Offerings (ICO) 154https://www.economist.com/news/finance-and-economics/21721425-it-may-also-spawn-valuable-innovations-market-initial-coin-offerings Publicatie white paper (Claims meestal niet geaudit) ICO periode: Investeerders kopen munten Gewoonlijk aan vaste prijs Meestal ongereguleerd Business operationeel Gebruik vereist munten Munten verhandelbaar Crowdfunding door lanceren nieuwe cryptomunt Succesvol → meer vraag → hogere waarde (beperkt aantal munten) Manier om geld te verdienen aan gedistribueerde protocols Gedecentraliseerd platform voor competitie online game Gedecentraliseerde cloud opslag
  • 150. Conclusies Het gaat over VERTROUWEN • Veelbelovende technologie voor applicaties die traditioneel vertrouwen vereisen in centrale partijen. Geen oplossing voor alles • Het is mogelijk met blockchain ≠ Blockchain is de beste keuze Uitdagingen • Schaalbaarheid, sleutelbeheer, privacy, juridisch, … • Veel onderzoek (MIT, KU Leuven, TU Delft, IBM, …) 155
  • 151. Uitdagingen => Veel onderzoek om deze uitdagingen aan te pakken Standaardisatie / best practices Sleutelbeheer & bescherming end- points Rechsonzekerheid Privacy & confidentialiteit Gebaseerd op aantal aannames Schaalbaarheid Veiligheid Andere Volatiliteit wisselkoersen 156 Bugs in smart contracts
  • 153. Perspectief 158https://hbr.org/2017/01/the-truth-about-blockchain “Hoewel de impact enorm zal zijn, zal het decennia duren voor blockchain om in onze economische en maatschappelijke structuren te sijpelen.” Tijd nodig om economie te transformeren: - TCP/IP: 30 jaar - Elektriciteit: 20 jaar Grondleggende technologie Het heeft het potentieel om nieuwe fundamenten voor ons economisch en sociaal systeem te creëren. Toestand vandaag: - 3-5 jaar eer volwassen - 3% POCs in productie
  • 155. Conclusies 160 H Y P E H Y P EU i t d a g i n g e n Erg jonge technologie, in volle ontwikkeling
  • 156. 161 Dr. Kristof Verslype Researcher, advisor & speaker in crypto, privacy & blockchain tech Q u e s t i o n s & C o n t a c t © Benjamin Reay @KristofVerslype kristof.verslype@smals.be be.linkedin.com/in/verslype www.cryptov.net www.smalsresearch.be @SmalsResearch www.smals.be @Smals_ICT Personal