![Page 1: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/1.jpg)
Ethereum underthehood
![Page 2: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/2.jpg)
Whoarewe?
• Joris Bontje• @mids106• http://OneUp.Company
• PascalVanHecke• @vanheckeinfo• http://Tokenengineers.com
![Page 3: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/3.jpg)
Whoarewe?
• Joris Bontje• @mids106• http://OneUp.Company
• PascalVanHecke• @vanheckeinfo• http://Tokenengineers.com
![Page 4: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/4.jpg)
Ethereum forBitcoiners
![Page 5: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/5.jpg)
ProgramminginBitcoin
• Containsadeliberatelysimplescriptinglanguage• Atransaction=lockingBitcoinanddescribinghowitcanbeunlocked• Examples:
• Multisig:multiplesignaturesareneededtounlock• CheckLocktimeVerify:Bitcoinonlyspendableatsomepointinfuture• ….
![Page 6: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/6.jpg)
![Page 7: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/7.jpg)
ProgramminginBitcoin
• Containsarelativelysimplescriptinglanguage• Atransaction=lockingBitcoinanddescribinghowitcanbeunlocked• Examples:
• Multisig:multiplesignaturesareneededtounlock• CheckLocktimeVerify:Bitcoinonlyspendableatsomepointinfuture• ….
More”opcodes”,morefunctionality
Altcoin/Metacoin X
![Page 8: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/8.jpg)
![Page 9: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/9.jpg)
Ethereum:anythingisprogrammable“Classic“blockchains
• Addresses
• Balancewith“native”coin
• Transactionsandblocks
Ethereum:
• Addresses• …• …
• BalancewithEther• …
• Transactionsandblocks• …• …
![Page 10: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/10.jpg)
Ethereum:anythingisprogrammable“Classic“blockchains
• Addresses
• Balancewith“native”coin
• Transactionsandblocks
Ethereum:
• Addresses• +datastorage• +code
• BalancewithEther• …
• Transactionsandblocks• …• …
![Page 11: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/11.jpg)
![Page 12: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/12.jpg)
![Page 13: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/13.jpg)
![Page 14: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/14.jpg)
Ethereum:anythingisprogrammable“Classic“blockchains
• Addresses
• Balancewith“native”coin
• Transactionsandblocks
Ethereum:
• Addresses• +datastorage• +code
• BalancewithEther• …
• Transactionsandblocks• …• …
![Page 15: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/15.jpg)
![Page 16: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/16.jpg)
Ethereum:anythingisprogrammable“Classic“blockchains
• Addresses
• Balancewith“native”coin
• Transactionsandblocks
Ethereum:
• Addresses• +datastorage• +code
• BalancewithEther• +application-specifictokens
withspecificbehaviour
• Transactionsandblocks• …• …
![Page 17: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/17.jpg)
Ethereum:anythingisprogrammable“Classic“blockchains
• Addresses
• Balancewith“native”coin
• Transactionsandblocks
Ethereum:
• Addresses• +datastorage• +code
• BalancewithEther• +application-specifictokens
withspecificbehaviour
• Transactionsandblocks• +creationofcontractcode• +callingcontractcode
![Page 18: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/18.jpg)
![Page 19: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/19.jpg)
![Page 20: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/20.jpg)
Slowandprimitive,but…Promise:
A15-yearoldcandeploybusinesslogicthatis:
• Verifiable• Immutable• Untamperable• Untouchable
![Page 21: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/21.jpg)
![Page 22: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/22.jpg)
![Page 23: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/23.jpg)
![Page 24: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/24.jpg)
![Page 25: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/25.jpg)
Smartcontractpattern1Lockthingofvalueincontract
2Contractcodedeterminesredistribution
3Basedoninformationthatisnotyetknown
![Page 26: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/26.jpg)
Smartcontractpattern1Lockthingofvalueincontract• Nativecrypto• Tokensrepresentingvalue…orabilities
2Contractcodedeterminesredistribution
3Basedoninformationthatisnotyetknown
![Page 27: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/27.jpg)
Smartcontractpattern1Lockthingofvalueincontract• Nativecrypto• Tokensrepresentingvalue…orabilities
2Contractcodedeterminesredistribution
3Basedoninformationthatisnotyetknown• Randomness• Actor• “Oracle”
![Page 28: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/28.jpg)
Solidity
![Page 29: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/29.jpg)
Solidity
Contract-oriented,highlevellanguagefortheEVMStaticallytyped,inheritance,librariesandsyntaxsugar
ContractsarelikeclassinstancesPublicfunctionsaretheAPIContractstatelocallyavailableonallnodes
![Page 30: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/30.jpg)
Javascript likelanguage
![Page 31: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/31.jpg)
![Page 32: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/32.jpg)
CompilestoEVMbytecode
TXVALUE PUSH 25 PUSH 10 PUSH 18 EXP MUL LE NOT PUSH 34 JMPI STOP PUSH 34 JMP PUSH 0 TXDATA SLOAD NOT PUSH 0 TXDATA PUSH 1000 LT NOT MUL NOT NOT PUSH 34 JMPI STOP PUSH 1 TXDATA PUSH 0 TXDATA SSTORE
![Page 33: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/33.jpg)
![Page 34: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/34.jpg)
![Page 35: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/35.jpg)
![Page 36: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/36.jpg)
![Page 37: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/37.jpg)
https://ethereum.github.io/browser-solidity/
![Page 38: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/38.jpg)
![Page 39: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/39.jpg)
https://solidity.readthedocs.io
![Page 40: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/40.jpg)
web3
![Page 41: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/41.jpg)
![Page 42: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/42.jpg)
web3- Javascript API// creation of contract objectvar MyContract = web3.eth.contract(abi);
// initiate contract for an addressvar myContractInstance =MyContract.at('0x78e97bcc5b5dd9ed228fed7a4887c0d7287344a9');
var result = myContractInstance.myConstantMethod('myParam');console.log(result) // '0x25434534534’
myContractInstance.myStateChangingMethod('someParam1', 23,{value: 200, gas: 2000}, function(err, result){ ... });
![Page 43: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/43.jpg)
![Page 44: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/44.jpg)
DevelopmentTools
![Page 45: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/45.jpg)
![Page 46: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/46.jpg)
![Page 47: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/47.jpg)
![Page 48: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/48.jpg)
![Page 49: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/49.jpg)
Clients
![Page 50: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/50.jpg)
![Page 51: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/51.jpg)
![Page 52: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/52.jpg)
![Page 53: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/53.jpg)
![Page 54: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/54.jpg)
![Page 55: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/55.jpg)
![Page 56: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/56.jpg)
Resources
![Page 57: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/57.jpg)
![Page 58: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/58.jpg)
Whathavepeoplebuiltsofar?
![Page 59: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/59.jpg)
![Page 60: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/60.jpg)
![Page 61: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/61.jpg)
![Page 62: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/62.jpg)
Permissionedorpublic?
![Page 63: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/63.jpg)
![Page 64: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/64.jpg)
![Page 65: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/65.jpg)
![Page 66: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/66.jpg)
![Page 67: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/67.jpg)
![Page 68: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/68.jpg)
![Page 69: Ethereum under the Hood, intro for developers as preparation for Blockchain Hackathon (Delft, December 7th 2016)](https://reader031.vdocuments.us/reader031/viewer/2022030307/58e5ae011a28ab85798b47f3/html5/thumbnails/69.jpg)