Bonus Livestream Session – Ethereum Basics

hey everyone welcome to the ethereum basics live stream we're going to go live in just a few minutes but first uh a few messages from our sponsors you know no i'm just kidding who are our sponsors you are and i want to extend a thank you to all of the people who make it possible for me to do these ad-free um free content pieces these live streams my videos my educational work and those people are my community builders who donate a monthly subscription on patreon here on youtube with youtube memberships and make it possible for me to do this work and to support not just me but most importantly my staff who helped me get this work done so i'm going to thank some of those people now and we're going to get started in just about four minutes hang out for a second i am a patron of andreas because i came across his videos online and that's how i learned about bitcoin so that's how i got introduced to bitcoin i'm out tonight um at a social event organized by andreas as part of this patreon support we just had a few drinks in a pub which is a punch tavern downtown london so it's been a really funny thing to meet a lot of like-minded people we should support the work andreas is doing he's doing so much in getting new people into bitcoin and into bitcoin education he's a great teacher he can explain very complex topics in an easy to understand way he's very honest very precise that can be prepared and intellectually honest i think it's his best characteristic bringing such clarity to a really complex subject which is bitcoin and the industry around it there's been a very very good inspiration for me and every bitcoin i'm giving to him it will be very well used in helping other understand bitcoin and i think it will improve the world at some point being a patron i get to meet andreas and that's why i love being a patron i'm going to continue being a patron i think it's just a good thing if you're interested in learning new things and also want to support the the bitcoin community then you got to be a patron being a patreon makes you feel special you can attend to his live q a sessions you can meet him at happy hours it's really great totally worth it i'm very very enthusiastic of being a patreon i'd like him to be able to produce his great and valuable content in the future free from advertising and just with the help of his patreons and that's why i'm supporting him on patreon if you enjoyed this video please subscribe like and share all my work is shared for free so if you want to support it join me on patreon intro take two and now we're back and this time we actually have sound welcome everyone to my uh ethereum basics bonus live stream and i'm sorry about that little technical glitch um i had my microphone muted so there you go i will promptly fire my audio engineer um unfortunately for you i am my audio engineer so if i did fire myself then we wouldn't have a live stream so i'd better rehire myself right away and continue with the program thank you for your patience sorry for the technical mistake and thank you to all of those who support me with a monthly subscription on patreon or with youtube memberships where you get some cute little emojis your support makes it possible for me to do this work um and to continue a mission to educate people about bitcoin and open blockchains today we're talking about ethereum uh which is one of the open blockchains that i'm very interested in and uh we'll take your basics questions this content is brought to you free as well as ad-free and that's only possible because uh my staff and i are supported with your monthly recurring donations and i really appreciate it another little announcement we just passed 200 000 subscribers on youtube 200 000 subscribers and to think i started this channel simply because i wanted somewhere to link uh in a playlist my various talks that i'd given at conferences because they were all over the place and i just wanted to keep a little catalog i mean who's going to watch that anyway well 200 000 of you are not only watching but subscribing and if you've turned on notifications you get notified every time i post a new video we've got 250 people watching live now again thank you for coming today to this ethereum basics we'll get started in just a second i want to quickly remind you of our moderation policy today is a bonus live stream specifically about ethereum basics and i want everyone to please stay on topic also in order to ask a question you have to go on slido.com and use a antonop eth basics as the code my moderators are going to post that in the chat in just a second just to help you remind uh just to help remind you what that code is now you can use that to go on slido and ask a question here's the trick however i'm only going to get a chance to answer about a dozen questions today and so if you have a burning question before you post it make sure someone hasn't already asked it perhaps slight variation of what you want to ask but close enough remember that if you post another copy of that question a slide variation you'll end up splitting the votes which means both your question and the one that's close enough are less likely to get answered if instead you vote for the one that's close enough you have a much better chance of having it answered so that's a little um insight into voting strategies and you might play those games a bit on slido and of course just because a question is voted doesn't mean i answer it because i am the benevolent dictator of this bonus live stream so i get to pick the questions that i find the most interesting your votes obviously help me see those great 275 people joined and it's time to start with our first question let's see if it pops up correctly and it did actually it didn't because that's the first question i want to answer today anonymous asks well one second let me switch my screen here just so i can see the question more clearly um anonymous asks how does bitcoin and ethereum relate to each other do they complement each other now today as we're doing this live stream a twitter war is raging about the relative merits of these two blockchains and accusations are being hurled from either side uh in this um bitter debate uh and you probably know that i have worked for eight years in the bitcoin space but i've also worked in the ethereum space since the very very beginning of ethereum in fact slightly before the beginning of ethereum and i've published one book on bitcoin mastering bitcoin and one book on mastering ethereum so why am i interested in both the reason i'm interested in both is because i think they solve different problems and i think both systems have technology that is fascinating and they have their own merits and i do not recommend investment or discuss investment or price in either system you will not hear me recommending investment in ethereum you will not hear me recommending investment in bitcoin why because i'm not an investment advisor i'm a technologist i'm interested in technology whether you like it as an investment or not and so how do bitcoin and ethereum relate to each other well they're pursuing different goals they're making different choices on some important uh and fundamental trade-offs that exist in the technology of open blockchains trade-offs between scaling security flexibility robustness and things like that these trade-offs ultimately result in the two systems pursuing different technological paths to fulfill different application needs and use cases and if you want to learn more about how i see this distinction probably the most important talk i've done in this particular case is called the lion and the shark and it describes these two systems as two apex predators that are operating in completely different environments and therefore do not compete directly in fact i see them as having very synergistic roles where they complement each other um ethereum allows a lot of experimentation and the expression of complex smart contracts which we neither want nor can implement in bitcoin bitcoin implements robust censorship resistant very hard money which we neither want nor can implement in ethereum and so comparing them on the basis of characteristics that are fundamentally different is unfair to both it is no more useful to compare ethereum on its monetary policy as it is to compare bitcoin on the speed of its transactions for example and so as a result i look at these systems as serving different needs very useful in their respective cases and also complementary in many ways and that has nothing to do with their investment potential let's see what else we're going to answer um hopefully that put to rest some of the debates that are raging because i'm not going to get into it i don't want to get into it and i don't think there's any value in debating whether a ferrari or an agricultural tractor are better as vehicles because it depends what you want to use them for and for that reason i'm not going to get into it if you do decide to get into it in our chat you will quickly discover what a timeout is and that's where you get to stand in the corner facing the corner for 360 seconds while you calm down because that's a waste of everybody's attention moderators arm your timeouts all right let's move on our next question comes from our friend yes to crypto he was one of the people i thanked in the initial slides um and thank you again yes to crypto uh both for your support and for this great question yes the crypto asks i've heard the phrase if bitcoin is like gold then litecoin is like silver and ethereum is like oil how would you rate and or modify this summary statement um i think that while the sentiment behind this statement is interesting it doesn't really give us a very good model for understanding any of these technologies or their impact on the world i think um these are fun slogans perhaps but i don't think they give us any underlying insight analogies metaphors stories narratives have a purpose and that purpose is to cast light to reveal some underlying truth to help simplify or understand a complex topic but if you choose the wrong analogy then you're not casting light you're not demystifying or clarifying the underlying concept but instead you're just clouding the waters so the if bitcoin is gold like coin is silver ethereum is like oil is fundamentally broken in a number of different ways first of all all three of these are commodities um and um i i don't really see any of these three platforms as purely commodities in fact i think looking at them as commodities from a marketplace perspective only misses some of their fundamental characteristics all three of these things are programmable um two different degrees and their programmability is one of the many things that makes them incredibly interesting probably one of the main things that makes them incredibly interesting and of course commodities are not programmable and commodities just sit there to be extracted perhaps from a monetary perspective if you look at the monetary policy of the different systems then this could be an apt analogy but to reduce these three blockchains simply to their monetary characteristics is also an unnecessary and confusing reduction so i don't really like this summary statement i don't think it expresses the comparison between these three blockchains all right let me see uh how things are going in the chat um whether we are um experiencing a dumpster fire yet or not i see we've got some all caps screaming this is going to be a fun one today i really did pick my day very very well all right let's uh yes please emoji storm that's what we need right now an emoji storm thank you next question comes from anonymous can you please explain gas and what is happening around back running in d5 applications as well as eip1559 that contemplates fee burns in ethereum 2.0 gas is ethereum's way of metering the use of the blockchain it's very different from transaction fees in bitcoin although it does serve some of that role gas instead is actually related to resolving the turing completeness aspect of ethereum which i have quite a few questions on the board here that i'll be answering so touring completeness is a characteristic of ethereum where um theoretically well no very practically you can write an ethereum program that loops forever and that is the main characteristic of a programming language that is turing complete a computing system that is turing complete it can have infinite loops so gas is used to meter that to ensure that you don't have denial of service attacks or infinite loops that consume everybody's resources because in validating an ethereum smart contract you never know how long it will run so you need some kind of metering and accounting system and that's what gas is gas also serves the role of a transaction fee and similar to bitcoin until recently um well for all of ethereum's life so far gas is used as a transaction fee in a very similar way by holding an auction where people bid for block space by setting their transaction fee and gas and miners pick the transactions or ethereum transactions uh based on the highest amount of gas as a result um as a result there is competition and that has led to some side effects very much like it has in bitcoin which is that people tend to overpay for gas it's very difficult to predict what gas requirements or gas costs will be in the next block just like it is difficult to calculate how much of a transaction fee per byte you need to pay in bitcoin to get into the next block because you're dealing with a competition with other bidders so when you bid you change the future and as others are bidding they're changing your future in this auction system same thing happens here which results in bidding wars which can drive out the price of gas we've seen deviations of up to a factor of 200 meaning that for the same space in the same block you can have volatility in the gas price by a factor of 200 or more similar to a transaction fee spike in bitcoin so uh that's what gas does today interestingly enough one of the proposals mentioned here eip1559 changes that equation instead of having a variable auction for gas it changes the way gas is used so that you have a base fee of gas in every block and then a slight premium on top of that that users can adjust to prioritize their transaction and what's interesting here is that the base fee remains relatively constant but the block size is adjusted dynamically so if you think about it if the block size is static and the fee you pay for gas is dynamic that means that you have a bidding war for gas price if you keep the base fee static and you vary the block dynamically it's almost like the difficulty adjustment in bitcoin so it can move within a certain range but it damps down on volatility this is intended to reduce the volatility of gas and one of the interesting parts of the eip-1559 proposal is that the base fee is burned it isn't given to miners what miners get is only the premium the increase over the base fee that people are willing to pay which itself is capped and this is intended to reduce volatility but it also has another very interesting side effect and that is that it reduces the inflation rate or the supply rate of ether by creating a count of force that burns ether in every block and reduces its available liquid supply so that's what 1559 is a lot of changes are happening in ethereum right now in the run-up to ethereum 2.0 and many of these changes are exploring some very interesting models for both fees as well as scaling in the ethereum ecosystem all right so i'm going to take a few second break here drink some coffee look at what's happening in our chat room um i may have to put on a gas mask to go in there and in the meantime you can enjoy the moderation policy and there we go um yes the crypto was the only one in the chat to pick up on my ridiculously terrible dad joke level pun of putting on a gas mask after i just discussed gas prices in ethereum yes yes it was very bad all right annabelle asks might you explain to my mom what does touring complete mean in practical terms by the way just in case there's any confusion that's turing complete which is spelled t-u-r-i-n-g and turing was the name of alan turing also known as the father of computer science a computer scientist who lived in the 60s um who died in the 60s in england and who was behind the allied effort to crack the nazis cryptographic systems and created the theoretical foundation for computer science turing has left us with a couple of very very important concepts including the first programmable computers and how to think about those theoretically the turing theorem which describes how computing machines relate to each other and what their capabilities are the turing incompleteness problem which is the fact that you cannot predict with a computer whether a computer program will terminate will stop running and when it will stop running because it might run forever and the turing test which you may have heard of which is a theoretical test to tell the difference between an artificial intelligence and a human um alan turing is one of the most influential people in computer science who was murdered by the british government because he was gay and to their great shame after saving us from the nazis now what does turin complete mean in practical terms turn complete means in practical terms that a language that is capable of looping and looping is when in a program you either can go back to an earlier state and repeat some function or you repeat some function based on some criterion like for example if the number is less than five keep going if it's more than five stop and go back and do it again and again and again until something changes any language fundamentally that is capable of doing this that is capable of looping has the possibility of an infinite loop a loop that never ends why because the number never goes over five um it might it might not and it's not possible to predict if the loop will end and the reason for that is because the loop of course is influenced by the internal state of the program and even if you were to simulate the internal state of a program on another computer that other computer would also not finish running the simulation of the first computer which means that it's impossible to predict with a computer whether another program will finish or not or whether it will run forever now this is a fundamental theoretical foundation for computer science um and it also gives us a very important insight into how we write the scripting language that is used inside a blockchain ethereum is turing complete which means that it can loop bitcoin script is turing incomplete which means that it cannot loop that means that you can make certain predictions about bitcoin script such as the fact that it will run for a certain number of steps and then it will end and it cannot run indefinitely you cannot make these predictions for an ethereum smart contract it might try to and run indefinitely and in order to prevent that there is a system of accounting a metering system think of it like a taxi meter you get into running an ethereum smart contract and it has a certain amount of gas that it's willing to spend every little function that it runs every command that it runs in the ethereum virtual machine costs a certain amount of gas and that cost is deducted from the smart contracts gas account until either the program finishes before running out of gas or it runs out of gas and terminates with an error this ensures that all ethereum smart contracts will either finish running within their allocated budget or they will be stopped by the ethereum virtual machine which means that you can validate ethereum smart contracts on your computer without the danger of your computer running forever trying to validate a single smart contract and of course this is necessary in order to prevent denial of service now you might think at this point is is turing completeness a good thing or a bad thing well it's neither a good thing nor a bad thing it depends on what you're trying to do if you're trying to create very very simple programs that are guaranteed in their length of execution then churn completeness is a bad thing and you don't want it in fact it's actually difficult to make a language turing incomplete it's fairly easy to become accidentally true and complete and there are a whole history of computer languages that were considered or thought to be during incomplete including html and css and were later found accidentally oopsie to become turing-complete and therefore have the possibility of looping and infinite runtimes so making something turn complete very easy keeping it turing incomplete quite difficult and you have to keep the language very simple and avoid certain scenarios but if a language is true and complete that means you can express very very complex programs in fact what turing proved with this turing theorem is that any program that you can imagine no matter what computer you use if you run it on a turing complete system it can be expressed meaning that a turing complete system can simulate any computing system that is based on a simple set of programmable instructions so if you have a turing complete smart contract language you can do everything and this is critical because that means you have enormous flexibility and expression now i don't know if that explained it for your mom annabelle but hey annabelle's mom i hope that helped it is a very confusing topic and by the way this isn't simple stuff this is computer science 101 but it is college-level computer science and it takes quite a bit of mathematics and quite a bit of study to understand these topics so don't worry if you didn't get it the first time watch this video again let's see what else we have here ah there we go i'm having some difficulty scrolling here oops all right we're having fun i hope we are tigerix asks what are the challenges of sharding and proof of stake and how does it actually work so many of you have probably heard that ethereum is transitioning to a new consensus model and this is being done for two reasons the first reason is that ethereum was always intended to be a proof-of-stake system and proof-of-work was always intended to be temporary however the transition to proof-of-stake was delayed significantly as the research and understanding of proof-of-stake developed enormously during the time that ethereum was growing and so as a result now ethereum is moving towards proof of stake in a very very specific manner and an almost irreversible manner and moving away from proof of work so this was always part of the plan another aspect of it however was scaling or is scaling like any other open blockchain ethereum has to make some fundamental trade-offs between security robustness decentralization performance scaling you know all of these different properties and it's easy to scale if you sacrifice decentralization it's much more difficult to scale if you want decentralization security and scaling and so what ethereum is doing in order to attempt to solve that is a technique called sharding if you've ever worked in databases you've probably heard of the concept of sharding in a database system sharding is when the database is partitioned into multiple segments called shards and an algorithm is used to keep them synchronized so that the data is consistent between the various shards this technique is also used in distributed systems in a variety of distributed systems for example it's used to segment the table of files and file contents on a distributed file sharing system like bittorrent in that case the sharding is done using what's known as a decentralized hash table or is it a distributed hash table a dht the general idea with sharding is that rather than everybody validating everything instead you split the overall space into 64 for example different charts and each chart is validated independently and then the results are merged together this gives a blockchain a degree of parallelization at least that's the theory and the idea here being that instead of having one block in every time period you can have 64 blocks being validated simultaneously one per shard and then you have these blocks essentially coordinated into a coordination chain called the beacon chain and the beacon chain acts as the point where all of the different charts converge to ensure one consistent state across all shards there are a number of difficult problems to solve in this concept but sharding and proof of stake go hand in hand because the development of these technologies was done at the same time in order to make this transition more consistent with the strategy mission ethos of ethereum so what happened was that initially these two were going to be implemented separately proof of stake first then later sharding but in the end it was decided to do a clean slate design which is now called ethereum 2.0 ethereum 2.0 is the simultaneous implementation of sharding and proof-of-stake in a three-phase transition and i'm going to talk about that a bit more in some of the follow-up questions so we'll get back to exactly how ethereum 2.0 will play out so there are a number of challenges with sharding and a number of challenges with proof-of-stake but i don't think these are insurmountable challenges they're engineering challenges and in fact we have some very good solutions being proposed that have now had more than two years of research and testing and are being implemented right now in ethereum 2.0 proof of stakes problem is balancing subjectivity and finality with a mechanism that ensures that you don't have a problem called nothing at stake meaning that in proof of stake instead of miners using energy in order to in order to bet on a specific block and validate it instead you have validators who put down an amount of ether into a smart contract and then vote for the validation of a specific block there are a couple of problems there one of them is called the nothing at stake problem which is when if validators can vote on multiple blocks simultaneously then they just vote yes on everything and if there's nothing to lose because the blocks that don't get validated don't have any downside that kind of defeats the whole purpose so to solve that there's a technique called slashing and what slashing does is it ensures that if you vote for a block that ends up being invalid you get penalized and even the blocks that don't get validated get merged into the consensus algorithm so that you do get penalized the reward for voting for a valid block is less than the penalty for voting for an invalid block heavily favoring the incentives towards correct validation of transactions and blocks and that's the mechanism that's being used today it's a mechanism called casper the friendly finality ghost which is a hybrid proof of stake and proof of work which is going to be followed by casper correct by construction as far as i understand it which is a pure proof-of-stake system today these concepts are being tested out in phase zero of ethereum 2.0 which launched on august 4th it is a test network that's estimated to run for about a year which involves validation of ethereum one's proof of work blocks but in a test net with validators providing test ethernet in order to prove the concept enough about that let's see if there are any more follow-up questions on this topic and we're going to be having more discussion about this topic i think in other questions breaking news annabelle's mom understood the explanation thank you all right kevin asks when running an ethereum full nodes how can one verify the total supply of ether on the network is this costly compared to get tx out set info on bitcoin cli this question is part technology part doctrine and i'm going to answer it very carefully because this question is at the core of the raging debate that's happening right now on twitter about whether ethereum has any discernible maximum limit on its supply and i'm not going to go down that particular rabbit hole the bottom line here is that the structure of ethereum is fundamentally different from that of bitcoin in bitcoin all amounts are held in what are known as unspent transaction outputs these are utxo the tx out in the get tx out set info uh command that kevin refers to transaction outputs um are basically small chunks of bitcoin whose ownership changes and that can get merged and split based on a transaction and that is very different from how ethereum works ethereum uses account balances and these account balances are updated through state transitions of the ethereum virtual machine from block to block and this state in order to calculate the total amount of ether that is in circulation or is stored in addresses what you have to do is you have to play the entire blockchain from the beginning in order to validate the current balances that are being held are correct and because this state is spread across many many many many blocks and because some of those blocks were subject to denial of service attacks that make that validation very very time consuming it is actually difficult to figure out the exact and precise amount of ethereum that is currently in supply in the accounts there is an upper bound of course you can count the issuance but that's not the same as looking at what ethereum is in balances and so yeah that's not an easy question to answer but then again that's not a very good question to ask in the first place and this is the objection i have to the debate that's going on at the moment this is a gotcha question this is a question where you're asking ethereum to be measured by the monetary characteristics of bitcoin and that is exactly as fair as asking how fast can a turtle fly and the answer is that doesn't make any sense but or how fast can a bird swim the bottom line is that monetary characteristics are not the primary criteria of interest in the ethereum space and the reason they're not the primary characteristic of interest in the ethereum space is because ether is not money ether is a mechanism for paying for gas which is a mechanism for metering to incomplete smart contracts which are mechanisms for expressing rich applications in a composable system and to measure ethereum based on its monetary policy is to fundamentally misunderstand its purpose again as i said before that's a bit like asking how many transactions per second can you do on bitcoin and then going haha at the answer which is too low um that's not the fundamental purpose of bitcoin so before you go asking this question understand why it's being asked and what kind of frame it's trying to put ethereum into i don't think the answer is that interesting the bottom line is that the monetary policy of ethereum is very different from that of bitcoin whether you decide you like austrian economics or not that is a completely separate question as to whether ethereum has merit or whether it works for its intended purpose all right have we set the dumpster fire in the chat on fire now all right so the current debate is ether is money ether isn't money yes it is no it's not why are you punching me i'm not punching you take your hand off my face take your face off my hand i don't think that's a very useful debate but it is a lot of fun for my moderators who are going to get a hazard pay bonus overpay all right anonymous asks which ethereum two layer two protocols are you most excited about um i am familiar only with the broad outlines of the variety of layer two protocols it's very difficult to exactly describe what is and what isn't a layer to protocol in ethereum because there are a number of ways that you can do the things that we do with lightning same thing applies to bitcoin by the way and that's because lightning can be described as a series of uh two-person side chains which are called payment channels so lightning is a bit of a side chain it's a layer two and our side chains layer twos or not it's very difficult to draw clear lines in ethereum there are a number of protocols that are used for scaling transactions the ones i've heard of and i know very little about are plasma which i understand to be the closest to lightning raiden which i think is relatively similar opportunistic roll up which is a scaling technique that isn't layer 2 exactly or a side chain exactly and which i honestly don't exactly understand and of course sharding which is a scaling solution which has to do with the deployment of multiple side chains of ethereum operating in parallel which isn't really a layer two but it is because all of these things validate down to a beacon chain um so it's kind of like a layer two in any case um there's a lot going on in the particular domain of resolving scaling trade-offs in ethereum actually a lot more than is going on in bitcoin in the corresponding domain in bitcoin most of that debate has focused on uh two competing solutions one is bigger blocks and the other one is lightning and that's pretty good because the focus helps clarify intentions and people are doing research in a more cohesive way ethereum because of its fundamental ethos of experimentation has branched off into a hundred different directions all of which are getting quite substantial development effort but it's not clear yet which of these solutions are going to prevail or whether it's going to be one solution or even a collection of different solutions all working simultaneously in the ethereum space so which ones am i most excited about i'm most excited about the fact that i can't even count them all our next question comes from anonymous how does memory on ethereum work where is it stored and how is it retrieved it's a great question so just like in a classical computer the same in ethereum there are there is data that is used purely for storage and there's also data that is used for storage of the code itself so both the code itself the smart contracts the commands if you like the byte code of the smart contract and the associated variables the permanent storage of the execution the state state transitions events and other things that are created by the execution of the code are all stored as data and this data is stored in the blockchain and it's stored in the blockchain for a fee that data in order to write that data you have to pay a fee and gas and in order to retrieve or read that data you have to pay a fee in gas and in fact that's one of the main contributors to gas costs for a smart contract when writing a smart contract in ethereum you have to be very very careful about how exactly you use data you have to be very efficient in your use of data because you pay for all of it it's a metered utility computing system because in order to store and retrieve data you are imposing a burden on everybody who is keeping an archival copy of the ethereum blockchain and also on everybody who is validating your smart contract to decide whether its latest execution should be included in the next block as the transaction that you use to execute it and whether it's state update should be included in the next block so if you think about it a smart contract doesn't just run whenever in ethereum a smart contract runs when a transaction causes it to run the input is the transaction the execution is the smart contract and the output is the changes that that smart contract creates in its data these are changes both in state so variables being updated as well as events that are being emitted think of these as log messages if you like as a result part of the cost of running a transaction is the cost of executing all of these data changes um and a transaction is only valid if it has sufficient gas to pay for its execution um and because smart contracts can call other smart contracts which can call other smart contracts when you start running a transaction you don't know how many smart contracts it's going to call you don't know how long it's going to run you don't know how much memory it's going to use here's a really interesting thing though there is a very interesting little wrinkle in ethereum which is that if you release data if you erase data you earn back gas and this was a change that i believe happened uh not in the beginning of ethereum but somewhat later which was to create a credit for gas and i might be wrong about this i believe that this is currently operating in ethereum but i'm not entirely sure because i haven't used it myself and i haven't tested this in a contract but from what i understand if you allocate data in the blockchain you pay gas but if you release data by erasing it you earn gas back and using that little trick um some systems have created essentially gas futures where what you do is you buy yourself gas during a time when gas prices are low and you do that by effectively paying gas to allocate a whole bunch of data which is filled with nothing with randomness with zeros i don't know what it's filled with but in any case you basically grab a lot of data and you pay for it then when you want to run a contract later when gas prices are high you call the smart contract that allocate the data for you and you delete this junk data getting a gas credit when gas prices are much higher which allows you to reduce your gas costs brilliant right that little wrinkle in the accounting was actually used to build an entire infrastructure for a secondary market for gas futures it's one of the fascinating details that really makes me interested in ethereum because these little secondary effects and secondary markets that emerge from the composability of the underlying system um are fascinating all right just a quick break here let's see how many uh people we have and uh i don't know do you want to do you want to see the moderation policy again i don't know do you really need to see that i'm just gonna i'm just gonna put up a thank you for my patrons since i need to take a sip of water while you're watching this all right and we're back i'm actually going to run this live stream long because we have some great questions and i'm not done i have quite a few things on my mind and i want to talk about them a bit more so um let's answer one more question and then we'll do a special segment called down the rabbit hole so i hope you enjoy that but first let's go to the question by mr dents i see the term ethereum killer thrown around a lot do you think there will be an ethereum killer or instead an ecosystem of co-existing blockchains i'm so glad you asked mr dents um i think the term ethereum killer makes as much sense as the term bitcoin killer or the next bitcoin and i didn't talk about this called bitcoin is the next bitcoin and everybody in bitcoin cheered until halfway through the video i said and also ethereum is the next ethereum and everyone went because they didn't want to hear that bottom line is that when a system captures enough market share enough developer mind share and does the job well enough it is almost impossible to unseat that with minor incremental changes it requires a truly revolutionary change and of course all of the ethereum killers just like all the bitcoin killers before them will say we have that truly revolutionary change uh no you don't it's not that easy and as a result especially with ethereum that has the flexibility and the ethos to move very fast break things if necessary and implement new and exciting features all the time sometimes incredibly dangerous and buggy features too um this creates an environment where it's even harder to kill ethereum with an ethereum killer than it is to kill bitcoin within with a bitcoin killer which i also think is not possible so um no um i don't believe in ethereum killers and the reason i don't believe in ethereum killers is because i think ethereum can continue to evolve improve uh and iterate and in fact very fast absorb features that are good enough but deploy them on a platform with a much bigger installed base with much better and better maintained libraries infrastructure support developer mindshare and all of the other things that make a platform great and so i don't think all of these me too second comer blockchains are going to have much success in this space if they differentiate enough to be really interesting they're no longer competing with ethereum and if they don't differentiate enough to be really interesting well they're not really interesting all right let's see it's time for down the rabbit hole which is the special segment where i ask myself the question that i wanted to ask myself but you failed to ask so i get to ask it instead and then answer it and pretend like it's an original question that nobody ever thought of before because i asked it great question andreas all right so um what is ethereum 2.0 when is it happening is it real and what should i expect now you asked similar questions but i wanted to phrase it in that particular way and great question andreas what is ethereum 2.0 ethereum 2.0 is a clean slate design of ethereum intended to replace ethereum in a state transition that will occur approximately one to two years from now this represents a transition of ethereum from a proof-of-work system to a proof-of-stake system and also from a single chain system to a sharded chain system of 64 parallel executing chains which are converged on a coordination chain called the beacon chain the beacon chain itself is a chain that doesn't actually store any of the transactions or data instead the beacon chain is the basis for the proof of stake system it keeps track of the proof of stake validators validators are those who commit 32 ether and that is the minimum commit you can make to become a validator and then validate blocks if they validate them correctly they get rewarded with a percentage return of between two percent and up to possibly 18 percent per annum on their underlying stake if on the other hand they validate an incorrect block they get severely penalized in some cases losing up to 100 percent of their staked amount although i believe in the first implementation it's not that harsh but it's certainly a lot worse than the reward heavily incentivizing people to validate correctly validators also get penalized if when called to validate a block they are not online so being online continuously is a requirement to be a validator if a validator gets penalized several times as they lose stake they reach a point where their stake drops below 16 ether and they get kicked out of the validation pool so how do validators get chosen well that's part of the job of the beacon chain and it uses a randomness engine called randell vdf as far as i understand it and um randall vdf or verifiable delay function is a system that produces a random number generator through consensus this random number generator is used to select validators from the pool of validators and give them the opportunity to validate a block so validators stake into a contract they put down their 32 ether or more of stake and then they wait until they are called to validate by the selection of a random number that identifies them as a chosen validator and then they validate the block that they are handed if they validate it correctly they can earn a small reward there are some other nuances and details that's what the beacon chain does the beacon chain was launched on august 4th and is currently operating as a test net it had been in testing for almost two years and now it is running with validators staking testnet ether this phase called phase zero is intended to last between one and two years at the end of this starts phase one and phase one is the transition of um the is the introduction of shards and the transition of the uh system from proof of work to proof proof-of-stake and then phase 1.5 is the incorporation of the existing eth one chain into the e-2 chain and this is done as a state copy meaning that whatever balances smart contracts addresses and things you owned on the eth1 chain thereafter become available on the e2 chain and the users don't have to change anything the entire eth1 chain runs as one of the 64 shards and this allows for scaling of a factor of up to 64 x all of the shards then get coordinated into the beacon chain at specified intervals i believe those are called epochs so that's the plan ethereum is moving to proof of stake and a sharded scalable architecture and the intention was instead of trying to make incremental disruptive changes to the base ethereum chain instead it's it was implemented as a clean slate implementation which at some point has a migration of state so that it subsumes the entire eth1 chain in a way that users don't even notice and all of their data state and funds are carried forward to the east to chain this allowed for much more radical experimentation and rewriting of code from scratch in order to implement these rather ambitious goals so it's running right now um don't know how long it's going to run that depends on how well it runs in the first couple of days there was a bit of a shortage of validators but i believe that's been fixed now i'm watching it with great interest i'm not currently running a validation node unfortunately i don't have the time to keep it up and running and monitor it carefully because as i mentioned before if it goes down you lose money even for testnet ether i'm not willing to do that because i really don't have the time but i am watching this rather carefully and with great interest because if this implementation is successful it represents a very significant advancement in the science of consensus algorithms and in the science of proof of stake interestingly there's another question that came up related to this which might be a good segue from this down the rabbit hole so that was my uh question of the day i hope you enjoyed it all right let's see what else we're going to cover here um here's another great question when ethereum finally moves to proof of stake there will be a lot of miners looking for a new place to direct their proof-of-work power where do you think they'll go there's a great question asked by pathfinder thank you pathfinder this is a great question because not a lot of people they're thinking about the impact of uh the departure of ethereum from proof of work will have on the existing miners now uh one thing i can tell you about the answer to this is not bitcoin and the reason not bitcoin is because ethereum is mined on gpus um it has proven to be marginally asic resistant by um by this time and there are no good uh widely deployed asics as far as i know for mining ethereum and because it was always known that it was going to make this transition miners were not willing to invest the money into building asics for ethereum and in any case the algorithm is fundamentally different ethereum proof-of-work mining happens with a sha-3 algorithm which is different from sha-256 which is the algorithm used in bitcoin so if you take your gpu from mining ethereum and you try to mine bitcoin you will fail because gpu mining in bitcoin hasn't been profitable since 2013.

It is impossible to compete on that basis and as a result that's not where these gpu miners are going to go so where will they go in order to answer this question i tried to do a bit of research and then i discovered something really interesting here's my train of thought look at the market capitalization tables the top say 20 blockchains or tokens and try to figure out which one of those which ones are proof-of-work um that are not bitcoin forks and therefore not sha-256 proof-of-work but are another algorithm and then figure out which ones would be the most profitable to mine effectively that's the decision process that a gpu miner would follow they would um they would decide to go for the most profitable gpu mineable proof-of-work coin that's next in market capitalization liquidity stability etc and mining profitability after ethereum goes away and if ethereum goes away by going to proof-of-stake that's a pretty big amount of proof of work power that needs to be redirected turns out if you search all of the various market capitalization tables that show all of the coins you can't filter by consensus algorithm at least not the ones i looked at so um i had to kind of go through and from memory like oh yeah no that's that one's proof of stake that one's an erc20 token um that one's a federated architecture that's managed by one dude and his dog et cetera et cetera and go through the consensus algorithms and um i i wasn't able to come to a clearer conclusion it seems to me that some of the top likely candidates right after ethereum are ethereum classic of course as well as monero um z cash uh and perhaps another another few coins like that and litecoin so the best answer i could get and this is by no means uh a correct answer because there i may have missed many things are litecoin monero z cash and ethereum classic are likely destinations for this extra mining power which will increase the underlying security of all of these systems by bringing them a lot more hash rate from ethereum and that's what we had for that question anonymous asks do you see ethereum 2.0 scaling efforts as a success um can't possibly make that determination at the moment it's way way too early right now the the stuff that's been done in ethereum 2.0 as i mentioned in my previous answer regarding the phases of deployment of eth2 are not focused on scaling scaling happens later with the deployment of the shards right now the focus is on the transition from proof of work to a hybrid proof of work proof of stake and then to pure proof of stake using the beacon chain that's what's being tested first the actual scaling solution which is sharding happens later all right fine let me put on my asbestos suit and john dive right into this little dumpster fire is there a possibility for bitcoin to scale on the ethereum blockchain if yes how would that look in reality you know for every bitcoin maximalist who goes ethereum can't do what bitcoin does and its monetary policy is garbage there's an ethereum maximalist who goes we can just simulate bitcoin as an erc20 token and all your bases are belong to us i think both are wrong for pretty much the same reasons and that is that there are real tangible underlying trade-offs that means that when you design for one thing you necessarily have to de-optimize something else you don't get to do jack-of-all-trades you don't go through door number one and door number two as a super quantum superposition of both doors and then come out the other side and say ta-da instead you have to choose a path especially in engineering and that path will involve optimizing for the things that you think is important and by necessity when you optimize for that thing you make choices and those choices by necessity make you de-optimize for the other thing yes you can capture bitcoin and tokenize it and put it as a wrapped token on the ethereum blockchain um is that as good as bitcoin no it isn't and the reason it's not as good as bitcoin is because the fundamental uh mechanism for security and bitcoin uh is very very different and that very very different model is designed to be censorship resistant um and ironically has better privacy when used on its native blockchain than ethereum so i don't think it's the same um i don't trust a true incomplete smart contract with wrapped bitcoin with my bitcoin um when i can instead put it on a turing incomplete simple scripting language that has withstood the test of time and cannot so easily be attacked there are multiple risks in ethereum smart contracts that require many many many many iterations before all of the vulnerabilities are found risks both within the smart contract implementation risks in the uh programming language that is used to implement the smart contract and risk in the virtual machine that is used to run that smart contract on the ethereum virtual machine and vulnerabilities in underlying mechanisms such as gas and the consensus algorithm all of which are made more complicated by the transition to east 2.

Ethereum is not meant to be the robust secure unstealable unsensible money platform it was never meant to be that no matter how much ethereum fans wanted to be that and it shouldn't be that because with that comes extremely conservative development that kind of messes up all of the good things in ethereum bitcoin was never meant to be the super flexible smart contract platform and it shouldn't be either because with that come all kinds of problems that bitcoin doesn't need um so is there a possibility for bitcoin to scale on the ethereum blockchain not really not without some fundamental sacrifices sacrifices that the bitcoin developers the bitcoin culture the bitcoin ethos has made very clear it's not willing to make we the community who are involved in bitcoin are not willing to make the sacrifices to achieve scale by sacrificing decentralization and security i think we figured that out during the scaling debate but in any case if you weren't clear i think that's a resounding no does that mean that they can't work together no because in fact there are lots of opportunities where if you want to you can actually sacrifice a bit of the security by moving your bitcoin into a wrapped smart contract on ethereum and then getting advantage of the smart contracts but be very clear when you do that you get the flexibility of the smart contracts by sacrificing the security of the blockchain and that's a trade-off the i'm very happy to make on occasion it serves my application use cases very very well i can do very interesting things that's not a huddle application though and i wouldn't do it for even a tiny minority of my bitcoin because i keep it for a different purpose i hope that answers your question let's see what else do we have here we go sachin asks for developers which one do you think is better to start with bitcoin or ethereum and what are the possibilities for development in the future it depends it depends very much on what you're trying to develop if you're just trying to be a blockchain developer then clearly the answer is ethereum not because i say so because the market has been saying so consistently for the past four years and you can see that simply by the number of developers who are jumping into ethereum think about the value proposition you can create banking software with the ease of javascript now some developers find that a very appealing value proposition oh my god you can create banking projects with the ease of javascript how brilliant and a whole bunch of cynical conservatives hear that and go you can create banking projects on javascript are you nuts and right there lies the cultural divide between bitcoin and ethereum there are benefits to both of course and if you're trying to learn fast break things and play around forge a new future carve new ground develop innovative things and are willing to take very very big risks at the same time then the answer is obviously ethereum and if what you want to do is develop very conservative robust financial products um especially ones related to the pure function of money either as a medium of exchange a store value or some combination thereof then the answer is probably bitcoin and your style of programming your goals will determine how you do this now moving to bitcoin development doesn't necessarily mean that you're going to be doing core protocol development that is a high expertise high learning curve area where it's very unlikely that you're going to get even the slightest pull request or patch introduced into bitcoin software for at least a couple of years but i have good news for you if you want to have much more fast development with a lot more flexibility and freedom you can also get that in bitcoin by working on lightning software and that's because in lightning you don't have to be in lockstep with consensus in every line of code you do and the bugs only affect your implementation of one channel with your channel partner rather than the entire lightning network and the health of the underlying system so it depends but when you ask the question bitcoin or ethereum or whatever else also add lightning into that equation because there's kind of an in between that is a very interesting domain with a lot of really talented developers doing very interesting work my answer in the end was both and it was precisely for the same reason that i speak multiple languages and travel to multiple countries because i believe that gaining perspective by exploring many different cultures many different styles many different lifestyles many different environments you learn not only about these new places but it teaches you very valuable lessons about the old places the places you came from it's only in seeing the differences that you fully appreciate um the original and in fact i've learned that through language when you learn a second language you understand the first one better through programming languages through cuisines through international travel through exposure to different cultures and it shouldn't be a surprise to you by this point that i am not a maximalist in any aspect of my life and i don't believe in litmus tests and dogma so as a programmer i would have the same attitude which is intellectual curiosity above everything else a willingness to play a willingness to explore and a willingness to compare things in order to better understand both sides of the equation so if you're a developer try both what else what else want else okay fine i'll do a completely self-serving one paul says peace and love brother i don't understand ethereum at all what book would you recommend oh i know mastering ethereum written by andreas m antonopoulos and dr gavin wood um it's not only for sale on amazon hint oh come on i'm not going to try and sell you on a book you can download it for free on github read it and enjoy it under a creative commons license recently actually i made it available as an open edition ebook on my website where you can not only buy it but you get a drm free pdf epub and mobi in multiple formats that is truly yours to enjoy forever without the licensing restrictions but i've got a question for you paul what languages do you speak because the best gift we can all give back to the community is to help me on my mission my mission is to educate as many people as possible in as many languages as possible about open blockchains and that includes ethereum my book mastering ethereum has now been on trance effects for just over seven months transfex is a translation platform where volunteers are already hard at work the spanish translation is almost done so congratulations for all of those who are working hard on the spanish translation and for all of you who speak another language that is not spanish you need to work harder my friends because the spaniards are beating you and they're going to get mastering ethereum translated and available as a spanish ebook very very soon so if you speak a language that is not english that perhaps doesn't have a lot of english speakers in your country and you would like to see a book like mastering ethereum same applies for mastering bitcoin and you would like to see it in your own language and you would like to learn about these technologies there is no better way to learn about one of these technologies than to read the entire book while trying to translate it into your native or second language and give back to the community through that so shameless promotion of my book but not to buy it instead to become one of my co-authors to contribute in building an educational foundation that will serve for many years to come that's my mission and that mission is supported by all of you who have been so kind to come on this live stream and ask me great questions so first of all thank you for joining us today thank you for asking great questions about ethereum basics i really appreciate all of your patience and willing to your willingness to tackle this topic at a time when there's a bit of acrimony and some raging battles on twitter i'd like to especially thank those of you who have decided to join me with a youtube membership you don't get much in return all you get is silly emojis um and i would like to take this opportunity to ask you to demonstrate these silly emojis in the chat right now with an emoji store go all right and while you're all watching the emoji storm that our youtube members are demonstrating in the chat and can appreciate the pure silliness and pointlessness of it all i'd like to thank those of you who support me on patreon and make it possible for me to do this work and i'm going to bore you with another pitch so i'd like to express this in the words of the people who actually support me on patreon back last year when touching other human beings was still possible i did a series of visits to various countries in europe as well as south america and during this tour i met with many of my community builders on patreon at an event we call a happy hour this involved a lot of beer a lot of laughing a lot of jostling around a lot of wearing of weird and funny t-shirts with dank memes and um i got to know many of you and during that i asked some of you if you wanted to do a quick video to tell other people why you might support me as a community builder so let's watch it in the words of those people who do support me who i thank so much i am a patron of andreas because i came across his videos online and that's how i learned about bitcoin so that's how i got introduced to bitcoin i'm out event tonight by andreas as part of his uh patreon support um we just had a few drinks in a pub which is a punched cabin in downtown london so it's been a really funny thing to meet a lot of like-minded people we should support the work andreas is doing he's doing so much in getting new people into bitcoin and into bitcoin education he's a great teacher he can explain very complex topics in an easy-to-understand way he's very honest very precise technically prepared and intellectually honest i think it's his best characteristic bringing such clarity to a really complex subject and the industry around it he has been a very very good inspiration for me and every bitcoin i'm giving to him it will be very well used in helping other understand bitcoin and i think it will improve the world at some point being a patron i get to meet andreas and that's why i love being a patron and i'm going to continue being a patron i think it's just a good thing if you're interested in learning new things and also want to support the the bitcoin community then you got to be a patron being a patreon makes you feel special you can attend to his live q a sessions you can meet him at happy hours it's really great totally worth it i'm very very enthusiastic of being a patron i'd like him to be able to produce his great and valuable content in the future free from advertising and just with the help of his patrons and that's why i'm supporting him on patreon if you enjoyed this video please subscribe like and share all my work is shared for free so if you want to support it join me on patreon i love that little tune that music is from orphan who you can find on facebook facebook.com or fan and you can find my attribution for that great music which i'm sure you all recognize immediately at the bottom of every one of my uh youtube video descriptions so thank you orphan for contributing that wonderful music that brings us to the end of today's live stream but we have another fantastic bonus live stream q a next week next week we're talking about decentralized exchanges or dexes and decentralized exchanges are a great topic they're an incredibly empowering technology that truly brings forward the real benefits of decentralization and building this new economy they're a very important part of keeping these systems resilient open and free and so i'm very interested in what questions you'll have for our bonus live stream on decentralized exchanges for those of you who are subscribers on patreon the q a is open now you already have the code you can go and access it youtube members will get it 30 to 60 minutes before we start the live stream and then everybody else can jump on and ask questions live come and join me next saturday same time same place for the decentralized exchanges bonus livestream q a and don't forget we publish a whole bunch of videos all the time a lot of q a videos that continuously get published on this channel and you can get the latest by subscribing on the channel so don't forget to subscribe um hit the little bell icon to get notifications when new videos or posts are made you'll get advanced notice of a bunch of different things we do and um also please share like comment enjoy subscribe a alright thank you so much for coming today it's been a pleasure chatting with you about this very interesting topic um and i really appreciate you taking your time out of your weekend to join me have a wonderful weekend everyone take care you

You May Also Like