DEVNET-3626 Who wants to be a millionaire? A class in creating your own cryptocurrency Tom Davies, Sr. Manager, DevNet Sandbox Vallard Benincosa, Software Engineer
Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 1. Find this session in the Cisco Live Mobile App 2. Click Join the Discussion 3. Install Spark or go directly to the space 4. Enter messages/questions in the space cs.co/ciscolivebot#devnet-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Disclaimer! This isn t just an introductory session. We re going to rattle through the fundamentals pretty quickly So we can get on to the code. We love us some code. DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 4
Agenda Blockchain - Technical Fundamentals Becoming a millionaire Creating Your Own Currency Blockchain@Cisco
Technical Fundamentals
What is a blockchain? A transactional database! Everyone has a full copy No one entity controls it or the transactions Cryptographically secure - trustless Transactions > Blocks -> Chain DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 7
Alice Bitcoin Balance: 3 BTC ~ $30,000 1AHw1E7L2tNxj29wtEATPEMc1Mj77F22Yt Alice has a public and private key A transaction to send 0.00025 bitcoins is signed with Alice s private key and the coffee shop s public key Coffee Shop Bitcoin Address: 1KfDuF4g5k8oTbvamp9BYzPLKrYbnpyT3m Coffee shop advertises public key DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
Transaction is broadcast to bockchain network Alice Bitcoin Address: 1AHw1E7L2tNxj29wtEATPEMc1Mj77F22Yt 0.00051 BTC Coffee Shop Bitcoin Address: 1KfDuF4g5k8oTbvamp9BYzPLKrYbnpyT3m DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 9
Blocks are simply a ledger of transactions A block is a list of transactions that are collected by the peer 2 peer network 1AHw1E7L2tNxj29wtEATPEMc1Mj77F22Yt TPEMc1Mj77F22YtwtEA HudeW7OoXane3zeeaeyoh3Laayei6Bi ephahs9gejohyej1oyeec1he5seam3quitub1eizomo7eebieiepohcu7mei0ohghahsee9eepohb1bohcoa2bi2giez ei3sozaithoo9tod4dahsiazahf3ixei3maibroutei9uchaht0juioch2gahpetie0ahgahiex2vaiph7yohca0ain6 Account uquoosh2uuu5xah0oohp0ahnadie8li2vxo2taiquiekeema2ohk3eewicoghe9ieooy5vo7juyei9airao8mufohieg aib3aeefe4iexdiuf7eiluijeipe9eegh4ohpiog1daihahf1lu0zgied2zoowobaeth4ieh9iecaiuch4eedeavei3e NSeihae3vShaefae9ai9uzooNIej7ohyeque9TaifseeFie3nau2EiroueeV0kiChahc7Dahszu4fee0AeiXee0TuAWa iv5siiqu0queieasee4xooowosh6oohngaeh5eexahz7ijoo3io3hquaiqu4efiwoo7neaseuch1aaroh0weelavaes3 ExeePei9nEeyahp7Jve4yeBaeEeCaF2aeaXiF9feunooN0oshvaK1Cahnthohg1BoaiF4ahG6EiXi6CeinahX6oofxe6 Ti0ovxah5QuaeUo5Thei6Bea8ahshaiQuiG6Areiw5jiYPhahxoo7aiGh0chiDie0iQuaIuk1eiphKiiphe4eeeCa3ka ereh2jai6xuvai1huohz6eeciahde8oa7shohcor6pon1roo7ietho6aechoa8ou6chais6iece0vuoyeeer6nie3noo 0.00051 BTC 7seePGeuph2ivAis4xeivjooM5wooteeN3xooov4thaeJOodah3uuob4In1oceiL9QuebohM7Jah1deJoo1WoDun3se8 okae7eexahadu9eilzuofi8ohiew8esopohn3ahquphe1xaetsu9athieoubees8uawu0zeejahvie1lovahngai8xae 7FieGthu4aTh7Phahkae9sifu9Niprae1Coofmohh1eeSzuNgoh3yEeGh1aj4Choh2iLuEighae2aEij3kohhEezou6E ieisee3wood8iuh3xphe9paecup4duvieneera0kout1eipiajoh3iet7ohd9bophgoop5eeweechah6lwohpoh5aoot Alice s Account Coffee Shop DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 10
How do you stop abuse & double spend? Miners! Race to create the next block in a blockchain New bitcoin block is created every 10 minutes DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 11
Proof of Work A Hash is a one way function Nearly impossible to guess Easy to verify Header Hash must be less than a specified target value (e.g.: begins with x amount of 0 s.) Nonce is only part that can change to get value. Must iterate to find value Block Header ( 80 bytes ) 32 bytes of previous block hash 32 bytes of Merkle root hash Timestamp Nonce Block Body 1AHw1E7L2tNxj29wtEATPEMc1Mj77F22Yt TPEMc1Mj77F22YtwtEA HudeW7OoXane3zeeaeyoh3Laayei6Bi ephahs9gejohyej1oyeec1he5seam3quitub1eizomo7eebieiepohcu7mei0ohghahsee9eepohb1bohcoa2b i2giezei3sozaithoo9tod4dahsiazahf3ixei3maibroutei9uchaht0juioch2gahpetie0ahgahiex2vaip h7yohca0ain6uquoosh2uuu5xah0oohp0ahnadie8li2vxo2taiquiekeema2ohk3eewicoghe9ieooy5vo7ju yei9airao8mufohiegaib3aeefe4iexdiuf7eiluijeipe9eegh4ohpiog1daihahf1lu0zgied2zoowobaeth 4ieH9iecaiuch4Eedeavei3eNSeihae3vShaefae9ai9uzooNIej7ohyeque9TaifseeFie3nau2EiroueeV0k ichahc7dahszu4fee0aeixee0tuawaiv5siiqu0queieasee4xooowosh6oohngaeh5eexahz7ijoo3io3hqua iqu4efiwoo7neaseuch1aaroh0weelavaes3exeepei9neeyahp7jve4yebaeeecaf2aeaxif9feunoon0oshv ak1cahnthohg1boaif4ahg6eixi6ceinahx6oofxe6ti0ovxah5quaeuo5thei6bea8ahshaiquig6areiw5ji YPhahxoo7aiGh0chiDie0iQuaIuk1eiphKiiphe4eeeCa3kaereh2Jai6Xuvai1huohz6EeciahDe8oa7shohC or6pon1roo7ietho6aechoa8ou6chais6iece0vuoyeeer6nie3noo7seepgeuph2ivais4xeivjoom5wootee N3xooov4thaeJOodah3uuob4In1oceiL9QuebohM7Jah1deJoo1WoDun3se8oKae7eeXahaDu9eiLzuoFi8ohi ew8esopohn3ahquphe1xaetsu9athieoubees8uawu0zeejahvie1lovahngai8xae7fiegthu4ath7phahkae 9sifu9Niprae1Coofmohh1eeSzuNgoh3yEeGh1aj4Choh2iLuEighae2aEij3kohhEezou6Eieisee3WooD8iu H3xphe9PaecUp4duvieNeera0kout1EipiaJoh3iet7ohd9Bophgoop5EewEechah6lWohpoh5aooT DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 12
Block is broadcast to Bitcoin P2P network DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 13
Blockchain Blockchain means that each block header refers back to the previous block. Consensus comes by the longest block chain Only one winner encourages hashing pools Works as long as 51% of network arrives to consensus Encourages compute resources to be honest In Bitcoin only 21 million coins will ever be created. 75% of all coins that will ever be created have already been mined. Last coin estimated in 2140. DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
There s more than just the bitcoin blockchain! Ethereum Bitcoin allows scripting but not Turing complete Ethereum adds ability to run code in blockchain Smart contracts create a state machine Large ecosystem of tools and projects DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 15
How do blockchains work? Smart Contracts Triggers DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 16
Smart Contracts Stored Procedures Can cause massive problems! DOA lost 3.6 million ether! Tooling is rapidly developing. Many platforms to run on How expensive is it to run on Ethereum? Anyone can make their own currency! DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 17
Distributed Applications (DApps) Architecture Application UI Smart Contracts (Application Logic) Database (Decentralised Compute / Storage) DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
A Note On Blockchain Types Public Private Community Non-Permissioned Permissioned DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 19
Becoming a Crypto Millionaire
DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 21
Lots of Crypto currencies! https://coinmarketcap.com/ DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 22
Let s create our own token The DevNet ICO! (Initial Coin Offering) DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 23
Let s create our own token ICO Details 20 Million ERC20 Standard Our Symbol: VXT * 1 ETH = 100 DevCoin Val Tom 5 Million 5 Million You Guys 10 Million Does this sound like a good ICO? YES if you re Val or Tom. * https://theethereum.wiki/w/index.php/erc20_token_standard DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 24
Tools to use to become millionaires Ethereum Ecosystem Contracts Writing IDEs for writing our Smart Contracts Deploying Deploying Contracts / Buying & Sending Ether Platform Blockchains for testing and finally releasing our contracts DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
Toolchains: IDE, Deployment Tool, Test Network Command Solidity IDE Contract Deployment Funds / Deployment Test Network (Ethereum Based) Line contract Inspect Contract ID Solidity IDE Contract Deployment Funds / Deployment Test Network (Ethereum Based) UI Based contract Inspect Contract ID DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 26
Smart Contract Language - Solidity The Ethereum Contract Programming Language Used to write Smart Contracts Contract Orientated Used on other blockchains as well as Ethereum Fun Fact: Contracts can create new contracts! http://solidity.readthedocs.io/en/develop/contracts.html DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 27
Show me a Solidity Contract Val
Toolchain: IDE, Deployment Tool, Test Network Solidity IDE Contract Deployment Funds / Deployment Test Network (Ethereum Based) contract Inspect Contract ID DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 29
Why use a blockchain test network? Ether, used to pay for executing code, is expensive: 878 -> 1ETH Instead: Chose a test network to experiment Kovan: https://github.com/kovan-testnet/proposal Rinkeby: https://gist.github.com/cryptogoth/10a98e8078cfd69f7ca892ddbdcf26bc Create Account / Address Use https://www.myetherwallet.com or Metamask Browser plugin Select correct network Visit Faucet addresses to get Ether in your account Kovan: https://gitter.im/kovan-testnet/faucet Rinkeby: https://faucet.rinkeby.io/ Get funded with test ether! DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 32
Show me a Deploying a Contract Val
Toolchain: IDE, Deployment Tool, Test Network Solidity IDE Contract Deployment Funds / Deployment Test Network (Ethereum Based) contract Inspect Contract ID DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 34
Contract Observability DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 35
Show me how to inspect the blockchain Val
Toolchain: IDE, Deployment Tool, Test Network Solidity IDE Contract Deployment Funds / Deployment Test Network (Ethereum Based) contract Inspect Contract ID DevNet Coin is Live! www.devnetcoin.com DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 37
Show US ALL how to buy some, Val!
Get Tokens - Example Create account with Metamask / MyEtherWallet on KOVAN network Copy address into https://gitter.im/kovan-testnet/faucet Don t be greedy DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 39
Buy DevNetCoin! DevNetCoin Contract Address -------> DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 40
Try it out! Buy some DevNet Coin!
Okay, okay. That was cool. But how do you really create value?
Coins / Tokens Creating Value Exchanges Platform Utility Coin ICO https://www.icoalert.com/ DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 43
Blockchain@Cisco
Cisco@Blockchain DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 45
DevNet Sandbox developer.cisco.com/sandbox DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 47
What did we cover? Blockchain - Technical Fundamentals Becoming a millionaire Creating Your Own Currency Blockchain@Cisco
Cisco Spark How Questions? Use Cisco Spark to communicate with the speaker after the session 1. Find this session in the Cisco Live Mobile App 2. Click Join the Discussion 3. Install Spark or go directly to the space 4. Enter messages/questions in the space cs.co/ciscolivebot#devnet-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Please complete your Online Session Evaluations after each session Complete 4 Session Evaluations & the Overall Conference Evaluation (available from Thursday) to receive your Cisco Live T-shirt All surveys can be completed via the Cisco Live Mobile App or the Communication Stations Complete Your Online Session Evaluation Don t forget: Cisco Live sessions will be available for viewing on-demand after the event at www.ciscolive.com/global/on-demand-library/. 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public
Continue Your Education Demos in the Cisco campus Walk-in Self-Paced Labs Tech Circle Meet the Engineer 1:1 meetings Related sessions DEVNET-3626 2018 Cisco and/or its affiliates. All rights reserved. Cisco Public 51
Thank you