 Hi everyone, my name is Axon Gomez. I am a web developer from Paris located in Czech Republic and working for Showmax where I do front-end development. So we have an SDOD service for South Africa, basically catered for the specific needs of the region, mainly the fact that internet there is not unlimited, it's not cheap and we have a service that's adapted for that. Also I'm self-taught, so if you have any questions on what it's like being self-taught developer, you can talk to me after the talk. There's lots of specifics to that and also when I'm not at work, I like to know that about decentralization and that's actually why I'm here today. But first I need to give you a bit of context. So imagine it's 2007, 2008, you have that big global crisis with the subprimes started in the US and it spread out in the whole world and people were fed up by banks. They were fed up by the current economical system at the time and you had a few people that wanted to create an alternative system which would be decentralized. The problem is fundamentally this is really, really, really hard because money is not files. So if we have a file system in peer to peer, I show you a file, so I have the file, you have the file, we both have it, it's not a problem. Now imagine we want to do the same with money, that's fundamentally different because if I give you cash, I'm not supposed to have the cash anymore. So there's this whole notion of memory, you want to avoid double spend, you want to track where the money is going and with computers that's actually really hard because computers seemingly cannot do that and that's why people are relying on third parties. So either banks or PayPal, they have their own proprietary system that takes care of that in some way, we don't know how, but they handle that. And the solution to that was actually blockchain with Bitcoin, so it celebrated its 10 years recently, and it had three characteristics. It was decentralized, immutable, and it was also trustless. And that's what made blockchain, blockchain and that's what made digital money possible. So I want you to actually understand something, is that blockchain and Bitcoin was not about money. I know that everyone would be, wow, that's money revolution, and it was money revolution, but it was mainly a revolution in consensus, which is something that actually never, ever, ever existed with computers as far as I know. Correct me if I'm wrong, but before blockchain, there was no way to achieve consensus in peer-to-peer networks. And so the solution was actually three components, miracle trees, peer-to-peer and a native currency. So miracle trees, they're a very specific form of binary trees, which is basically a hash table. Again, I'm not a computer science guy, so I won't be able to tell you more into details what a miracle tree is, unfortunately, but I can tell you that verifying a hash in miracle trees is very easy. So you basically go through only the leaves that you need to verify, and it makes the verification of a hash easy. However, if you want to calculate what's in the Bitcoin and blockchain system, it's called magic number. It's really, really, really hard to do, and that's called hashing or mining, and that's the notion of proof of work that you have in blockchain systems. Then you have peer-to-peer, which makes the network more secure. As my users are running nodes, censorship is impossible. The whole system is decentralized and is trustless, and it's 100% resilient. So there is zero downtime in these systems. And of course, there is also this native currency notion, and that's what makes Bitcoin money. It's because there is Bitcoin, which is the native currency of Bitcoin as a system. Now, what if I told you that it's actually possible to use this technology not only for money, but for decentralized applications? And that's actually what Ethereum is about. So to quote Vitalik Buterin, the creator of Ethereum, Ethereum is a change in the way we interact with each other. So Bitcoin was actually a revolution for money, and Ethereum intended to be a revolution in digitally enforceable agreements. So it was invented by this guy, Vitalik Buterin. It went live in 2015. This guy was actually very, very active in the Bitcoin community, in the forums. He was invested in it. And at the time, Bitcoin was just Bitcoin, meaning that there were maybe a few folks with change of difficulty. But that was it. He didn't have much more to it. And this guy was like, wait, we have this amazing system. Why should we just do money with it? There's no point in that. And so he had this idea that you could do consensus for everything, anything you can think about. So it's decentralized, the same way Bitcoin is. It has also a native currency, the same way that Bitcoin has, except here it's really a way to pay for computational power. It's not revolving around money, if you will. It's part of a grander thing, grandestack, called a wet tree. I'll talk to you about that later. And it uses blockchain to run so-called smart contracts on their EVM, Ethereum virtual machine, which is a distributed virtual machine. So smart contracts, they're actually the main components in Ethereum. They're on a higher level, some digitally enforceable agreements, digitally enforceable contracts that perform transactions with no third party. And when I say transactions, you can think of it as a state machine. So one way I've read on the Internet to name Ethereum was transaction-based state machine. So it's the same thing as a state machine, except you pay for it. And yes, so these smart contracts, it's code that runs on the EVM, a term virtual machine. It's bytecode, and it will be compiled down from some higher level languages, such as Solidity, which is the most popular one. Viper, which is also another one, but it's not very popular. And maybe someday it could be even another language, because there is currently E-wasm under development, which is Web Assembly flavor for Ethereum. So same way in five years, three years from now, we'll be maybe able to write web apps in even Rust, if you want, or any language or go. Maybe you'll be able to do the same with smart contracts. Now, smart contracts, one thing to understand is that the usage is your imagination. That's your imagination. But it shouldn't be used for anything, either. So it can be used to create decentralized autonomous organizations, which are entities that run without any central authority and which are ruled by code. You can create supply chains, so they're actually big retailers in France and in Eastern Europe that track their chicken this way. It's a thing. You can do identity verification, so you have a few services that do that. Also, Estonia has this e-residency program where you can actually be a citizenship of Estonia. You can apply today if you want to. And they use blockchain for verification of identity. Switzerland also did some trails in that, because they're actually really big on the blockchain. And you can also trade cute kittens. That was the thing, and that was very, very big last year. It's actually a thing. There was millions and millions of actual money that went into that. You can trade digital assets. Now you have a whole new kind of decentralized exchange powered by something called ZeroX, which is a set of smart contracts on Ethereum, which allow for decentralized exchange of digital assets. You can do voting if you want. And really, if you have any idea where you need consensus or you need a mutability, then blockchain might be a fit. And Ethereum might be a fit. But again, one thing to understand is that it's only the consensus layer. So last year, there was this crazy, crazy rage about the blockchain, and everyone was saying, oh, I will buy some Ethereum, I will buy some Bitcoin, because people wanted to make some fast buck out of it. And he had all these crazy projects popping out of nowhere. And for the most part, actually, there was no actual use case for blockchain for Ethereum. So Ethereum is amazing, but it's not fit for anything, because currently it's a thousand times slower than current systems. Sorry, it's a million times slower. And there is a change that's in the works. So there is some update planned for this year, actually, that will make it only a thousand times slower. But still, that's really slow. And not only it is slow, but it's also really, really, really expensive to run code there. So the whole idea is that on the blockchain, you will only run what needs to be run on the blockchain, which is usually a very, very tiny part of your logic. You don't want to put your business logic on it. You want to leave that for your, let's say, classical front end or back end. So all of you with this kitten's image. And I'll explain to you in a second what this is about. So actually, CryptoKitties, it's a very good way to understand what should be put on the blockchain. Because if you go to the GitHub and you try to read the CryptoKitties smart contracts, and you see, for example, the struct for Kitty, you will see that it's essentially just some U-ints. So for those, by the way, we don't know CryptoKitties. It went viral last year. You could buy and sell Kitties on the blockchain. And they were unique. They had their own characteristics. And not only that, but there was also a notion of scarcity, meaning they were rare by nature. And they were also unique by nature because they were part of something called ERC 271. It's gibberish to say basically non-fangible token. Meaning that if I send you one ERC 271 token and you send me one back, they will be different. They won't be the same. And so to come back to that, this Kitty, you can see there's just a U-int. So it's a set of U-ints with genes, birth time, generation. And when some guy actually paid a million or something for Generation Zero kitten with a he-boat was literally 1, 2, 3, 4, 5, 6, 8 U-ints. That's it. He paid a million of dollars to buy 8 U-ints. That sounds crazy. And that's because actually currently the way blockchain and Ethereum works is you will have your heavy logic done off-chains on classical systems. And for true decentralization nerds, that might come as a bit of a blocker because essentially what you have is you don't have fully decentralized applications. And let's say CryptoKitties, tomorrow they decide to change their logic. Well, you don't have a kitten anymore. You have just a set of U-ints, which is worth nothing. But that's a limitation at the time. Actually, there are ways to solve that. So WebTree is part, is actually a grander thing. So it's also a name for a stack, which is composed of consensus layers, storage layer, and messaging layer. So this Ethereum swarm and whisper, they're the official stack for WebTree. The idea is to give the data back to the hands of the users. And it represents a total change of paradigm in the way you think of your web apps or mobile apps. You can also have additional services there. For example, if you want to have decentralized DNS, there's something called Ethereum name service, which is actually already production ready and supported by most Ethereum browsers. So you can have decentralized name services. That's also a thing. If you want to change storage, if you want to not use swarm, but use IPFS, for those of you here that know IPFS, you can. No problem. But yeah, one thing to understand again is that Ethereum is just the consensus layer. And probably the reason why you're here is that you want to know how you can interact with the blockchain on your browser. And for that, there's a library called WebTree.js. So it's a client to interact with the Ethereum blockchain. It can be used actually on the browser. Or you can use it with Node.js or anything you want. It's not the only one. You have also clients in Python and lots of languages. But this thing, WebTree.js, actually, as you probably know, browsers, they can only run JavaScript at the moment. So if you want to talk with blockchain on your browser, you'll use this thing, WebTree.js. It's async, which means it's promise-based. So you can use even async await or things like that if you want. It fits perfectly with modern frameworks, like React or Vue. And one thing to consider with this WebTree.js is that you can do anything. You can do read operations, or you can do transactions, which are essentially a state change. However, if you want to do transactions on behalf of the user, you probably should not do it straight from your application with WebTree.js. And the reason for that is actually really simple. It's security. So if user inputs his private key, then your application will have the private key, and that's a potential security threat. Because who's to say, my application is safe? Who's to say I'm not going to steal your private key and possibly millions? So for that, there is actually something that goes with WebTree.js. It's in second layers, if you will. So the most popular is Metamask. It's a Chrome extension. It's very popular. It's under development. It changes really rapidly. So I really advise you to try it. So you will install it on Chrome. Or if you use the Brave browser, it's installed there by default. Otherwise, if you're on mobile, you can use mobile Ethereum browsers. It's the same logic. They will have WebTree.js injected into it. So you have three of them. You have status, cipher, and trust wallet. That's three that I put there, but it's actually many more. There is Opera, which also has WebTree.js into it. So if you go on Opera Mobile, there is Crypto Wallet there. You can interact with smart contracts there. And yeah, so that's it for the presentation. And now I'm going to show you how to actually have a contract, deploy a contract, and interact with a contract. Actually, for those who want to try it live, you can go to this link here, which I'll probably put back like that. So you can go to this link. It will contain a guest, which you can paste on a website called Remix IDE. So remix.etherium.org. And you can paste the content of this guest there, and you can follow live. So also, if you want to try that live, I advise you to install Metamask. I'm not sure what's the connection here if it will allow you to actually install Metamask, but you can try. Otherwise, you can just follow with me. I have it installed on this browser here. So this is a simple hello world contract. So you can see that there's a pragma defining the version of Solidity supported. There is a string, which is hello, which is what we will actually write on the blockchain. There is the address owner, which is something that you would usually do here. We don't use it, but it's always a good idea to track who deployed the contract initially. So if you want to have something like a kill switch or anything retrieving funds, it's a good idea to always know what's the owner. And it has a simple function, say hello, that will just get the hello variable from memory. So when I say from memory, it's actually on the blockchain distributed in lots of miners around the world and lots of virtual machines. And you have another function, set hello, which takes an argument, hello. And it's a string, and it will just set a new hello. So here, we'll actually deploy it. So hi from defconf, and if I click on deploy, I get actually that second layer I told you about. So that's metamask telling me if I want to do that transaction, yes I do. So it's not actual money, by the way, it's on testnet. So it won't cost me anything, and it won't cost you anything. And if you want to try it, if you want to try a testnet, by the way, you have four sets where you can have free money that's not worth anything because it's a testnet. And so here, you can see that my contract is now deployed. I can see the here. And if I want to say hello, so do a read operation. I do it, it should be really fast actually because read operations are a bit faster. And here you go, hi from defconf CZ, that didn't cost me anything. So if you want to do this sort of operation, you can do it from your web apps. You don't even need metamask. However, if you want to do things like, well, set hello, which is do an actual transaction. So an actual state change. So a state change. Then you can see that it's actually a paid operation because it's a transaction. And that's where the second layer metamask will come into play. So I confirm it. So this is actually propagating in the testnetwork. So this is a copy of the actual network and think of it as like a staging for blockchain. And so now I have a new hello on blockchain on this contract and you can see state change. So this is actually on the testnet. And if you take this contract number, this contract address, you can actually get this variable today. You'll be able to read it for free. If you want to set anyone, you'll have to pay for it. So it's on testnet so you can have free money again. Now this was on the remix ID, which is a web ID to write contracts or deploy contracts or interact with contracts. It's actually injected with WebTree. Same way your web apps would be. Now, of course, if you want to use it from a web app, then you will need that WebTree client I told you about. So it would look something like this. So you would import WebTree. So this is JavaScript. You would import WebTree. You would declare in your constant WebTree, which is an instance of WebTree with the current provider in the window, which is MetaMask actually. You would get the account from that MetaMask. And then you would call, and there's actually a typo here, so that wouldn't work, but let's say the E was not capital E. You would actually call the methods on your contracts. You would get the say hello method. You would call it with minimum way. So it's actually some gas. It's money that you will pay for the transaction. The more you pay, the faster your transaction would be. And then you would send that. So you choose to send it from accounts at position zero at index zero, which is the first account in the MetaMask Chrome extension of the user. Again, you don't have to use MetaMask, but that's for security off. If they use, for example, Cypher on mobile status.im, that would be also the first account there. So that's for actually interacting with it on the browser. And if you want to explore that a bit further, I really advise you to first read Vitalik Buterin's talk. The guy is seriously a genius. It's really interesting to read and hear. BlogGigs, it's also a nice resource. Subscription-based, a bit more expensive than Egghead. For those who know about Egghead, base-worth it, in my opinion. Otherwise, if you just want to get started, Stephen Gridder's course on Udemy is really good. It's $10. It's something like 12 hours or even more of resources. And it's probably not up to date. But then if that picked your interest, then you can just explore further and read the Solidity Dogs and really know the latest spec. Another good way to learn about Ethereum is to use Gitcoin. So it's an open-source platform where you can participate on bug bounties. You would work on tasks for open-source projects in the blockchain and you will actually get paid with cryptocurrency. So in my opinion, it's a pretty good way to learn because you will participate on open-source. You will get paid. So it's a win. And that's it for me. So thank you very much for listening. And if you have any questions, you can come and discuss with me after the talk or you can find me on Twitter.