Share
Embed
Transcript
27 slides
-
@ a l e x g o m e s
d e v A l e x a n d r e G o m e s @ D e v C o n f C Z 2 0 1 8 - B r n o Web3 Blockchain magic in the browser -
@ a l e x g o m e s
d e v • Ditched the Eiffel Tower for Karluv Most • Self-taught web developer @ Showmax • Passionate about building performant UIs • Also, a decentralisation nerd Ahoj! I’m Alexandre Gomes • Also, it’s my first talk -
@ a l e x g o m e s
d e v But first, a bit of history… -
@ a l e x g o m e s
d e v • Sharing files in a P2P network is easy: I share the file, we both have it • Building P2P money is fundamentally different • I give you cash, you have it, I don’t have it anymore • Seemingly impossible to do digitally before Bitcoin Money !== Files The context -
@ a l e x g o m e s
d e v Decentralised Immutable Trustless All of that thanks to blockchain The solution: Blockchain (10 years ago ) -
@ a l e x g o m e s
d e v Blockchain : A way to achieve consensus -
@ a l e x g o m e s
d e v Merkle Trees P2P Native Currency The solution: Blockchain (10 years ago ) -
@ a l e x g o m e s
d e v Merkle Trees • Specific form of binary trees • Verifying a hash = easy, don’t need to go through all the leaves • Actually calculating it = hard (Hashing) -
@ a l e x g o m e s
d e v P2P • The network grows more secure as more users are running nodes • Makes censorship impossible • Makes the system decentralised and trustless -
@ a l e x g o m e s
d e v Native Currency • What makes Bitcoin “money” is the addition of a native currency -
@ a l e x g o m e s
d e v There is a way to use this technology not only to create a monetary system, but decentralised applications ? What if I told you -
@ a l e x g o m e s
d e v Ethereum -
@ a l e x g o m e s
d e v “Ethereum is a change in the way we interact with each other. Bitcoin was for money, Ethereum for digitally enforceable agreements” “ Vitalik Buterin -
@ a l e x g o m e s
d e v Ethereum, the “world computer” • Invented by Vitalik Buterin, went live in 2015 • “Consensus, but not just for money” • Decentralised, just like Bitcoin • Has a native currency to pay for the computational power • Part of a stack called “web3” • Uses Blockchain to run “smart contracts” on the EVM -
@ a l e x g o m e s
d e v Smart contracts • On a higher level: Digitally enforceable contracts to perform transactions, with no third party • Code running on the Ethereum Virtual Machine (Bytecode compiled from solidity/vyper or maybe another language someday because of ewasm) -
@ a l e x g o m e s
d e v Smart Contract - Usages • Usages : • Building DAOs (Aragon, The DAO) • Creating supply chains (Carrefour tracks their chicken this way) • Identity verification (uPort, Civic, Estonia e-residency..) • Trading cute unique kittens (CryptoKitties) • Trading digital assets (DEXs powered by 0x) • Voting, and much more ! -
@ a l e x g o m e s
d e v Just the consensus layer • Computation on the blockchain is ~1M x slower than typical systems • Soon to be “only” 1000x slower • Extremely expensive to run code - Put on the blockchain what absolutely needs to be there - Leave you business logic for your “classical” FE and BE -
@ a l e x g o m e s
d e v CryptoKitties Smart Contracts -
@ a l e x g o m e s
d e v The web3 • The idea of a decentralised web • Data is in the hands of users • Change of paradigm : Fully decentralised apps Whisper Messaging Ethereum Consensus Swarm Storage + Additional services e.g ENS -
@ a l e x g o m e s
d e v layer of the web3 Ethereum is just the consensus -
@ a l e x g o m e s
d e v Browser magic web3.js - Client to interact with the Ethereum blockchain - Can be used on the browser, or with Node.JS - Async (promise-based), fits perfectly with react, vue, or any modern SPA framework -
@ a l e x g o m e s
d e v - Status.im, Cipher, Trust wallet … - Most popular Implementation of web3 - Can be installed on Chrome - Installed by default on Brave Metamask Browser magic Mobile browsers -
@ a l e x g o m e s
d e v Demo Time https://git.io/fhoH2 -
@ a l e x g o m e s
d e v -
@ a l e x g o m e s
d e v Browser magic -
@ a l e x g o m e s
d e v Explore further • Vitalik Buterin talks/interviews • Blockgeeks - Blockchain courses (Subscription) • Stephen Grider’s course on Udemy • Solidity docs • Gitcoin - Work on open-source blockchain projects, get paid with crypto -
@ a l e x g o m e s
d e v Come and discuss with me after the talk, or find me on twitter ! Any questions? Thank you!