 So now it's with great pleasure that I pass you over to Delia Halbrook. Hello, hi. So, today we're going to do a small or actually a big journey through the world of consensus algorithms with all three topics. So it's sort of an coincidence that today we're covering all of us actually consensus but actually it's not a coincidence because there is a lot happening out there in the ecosystem today. So basically I'm going to talk about POS, about PSK, the proof of stake and Ethereum 2.0 Casper. I don't know whether you have read about it but Ethereum is going to switch from POW to POS which is a massive project. So I think it's good for all of us. So I'm Delia Halbrook and I'm a governance researcher. So disclaimer, I'm not a techie. I do sociology, I do social sciences and I'm trying to make sense out of everything to discover the meaning. So for me it's always super frustrating to be sitting somewhere and it's like a highly technical talk and you know you just drift away. So I don't want that to happen to you. My mission is that at the end of this talk you understand Casper with me. So first question, who is relatively new to the space, like to the crypto space or it's just starting to get an overview. Please raise your hand. Cool, welcome. That's nice. So who has a clear understanding of what... Let's ask a consensus algorithm is. Okay, so a consensus algorithm is just basically a way to agree like all notes, like hey, which chain shall we follow, which blocks shall we mine and then all the network comes in agreement. So this is more or less an overview. So who has a clear understanding of how... Or no, the other way around. Who does not have a clear understanding of how POS works? Okay, so I'm going to go further into detail into that, thanks. And who has a clear understanding of how Casper works? You? Okay, so you're going to help me out in case I... Okay, so thanks for the overview so I can adapt a little bit my talk to that. Oh, POS, POS, proof of stake. What is that? Should we even care? That's a screenshot from CoinMarketCap. It's from last Monday, not from last week, so that this part here looks a little bit less depressing. And if we look at the top 10 coins, we see that already four of them in the top 10 are POS-based coins. Cardinal, Neosteller, and EOS are POS, are using a POS algorithm. So apparently POS is catching up, Ethereum is switching, and I'm asking, right? So before we start, I'm going to explain you my structure. First I'm going to give an overview about POS and PSK, the company that I'm working for. The major problems that POW poses, the solutions that proof of stake gives, pool of stake, and then we're going to dive a little bit further into Ethereum, Casper, and I'm going to explain FFG, and you're going to understand it. So as I already mentioned, POW is facing fundamental problems. The first one being the issue of centralization. Here we see a pie chart of the mining pools in Bitcoin, and this was taken last Monday, right? So we see that there is actually quite a lot of centralization going on. If we count the top three pools together, they already are more than 51%, which is a threat to the network, and you're thinking maybe, yeah, that's Bitcoin, but here we are at the Ethereum meetup. Ethereum is doing better? No. So here we see that Ethereum is even currently slightly more centralized in terms of mining pool size, hash rate power per mining pool. We see Ethermine and F2 pool to already nearly have more than 51%. So this is the first problem. The second problem is the energy consumption. POW is extremely energy intense, and we see here from March 2017 to March 2018 the energy consumption development of Bitcoin, and it's at 56,000 terawatt per hour right now, and this is something like the energy consumption of New Zealand. And then you're thinking, oh, but that's Bitcoin and we're at Ethereum. Ethereum is much better. In this case, you're right. So it's only only 16,000 terawatt per hour. And for the people, Chris, for you, who said that, yeah, but Bitcoin and compared to the financial system in general, I took a look. So here you have the energy consumption of one Bitcoin transaction compared to 100,000 Visa transactions. So I mean, it's like comparing apples to bananas or something. I know that there has been a lot of critique of this comparison, but I'm making a point and there is like a point, right? And then there is a third great massive problem with POW consensus algorithms, which is, you know what I'm aiming at? Yeah, yeah, exactly. Scalability. So here we see the Ethereum transaction chart and this here is where CryptoKitties entered. So CryptoKitties is a D-app, the first D-app that was running on the Ethereum network. And basically when this started, it reached up to 1 million transactions in 24 hours and this nearly smashed the network. Like transactions were not working. An ICO had to be postponed and the breathing cycle of CryptoKitties was threatened, you know? So this is just examples of what major problems actually cryptocurrencies are facing. And there is this new thing called proof of stake, which is solving a lot of these problems. Not all, but a lot. So what is actually proof of stake? In proof of work, you need mining. You need miners to perform work mathematical algorithms to create new coins. MPOS, that's not the coin, because usually coins are already pre-minted, pre-existing. And you don't have miners doing work to validate your transactions. Hello, welcome. But you have nodes like validators that are chosen sometimes randomly, sometimes randomly, and these nodes validate transactions. So you no longer have miners doing computational work, you have validators. And there is no mining reward, but instead you have transaction fees. So if I want to send a transaction on a POV-based cryptocurrency, I pay a fee for the validator and not for the miner doing work. So there is variations of POS, the first one being classical on-chain proof of stake, which is pure coin. These were like the first adapters of POS. And then a sub-variation is delegated proof of stake, which is similar adaptation, not important right now. And you have, as a second branch, as a stream of thought, you have the Byzantine fold tolerant agreements, which is Tenderman, Steller. And there you also have variations of it. So Casper is going to be sort of a variation of the Byzantine fold tolerant agreements. Good, so far. There are like other challenges, so miners have their challenges, right? They need to pursue like super expensive basics, and they have to catch a transaction. So now there are like new challenges for foragers, validators, or we can call it like mining 2.0, because it's like an upgrade. So basically the probability, so if you note a computer and you download the client, and you want to start being a validator and proof of stake, the probability on which you are going to get a transaction to validate depends on how much stake coins you have, right? So you're staking your coins, and depending on how much wealth you have in that way, you are going to either validate or not validate a transaction. So basically the more coins you have, the higher the probability that you're going to validate. And also your note has to be online 24-7, and some coins, POS coins coinage is important. So even if you go online for one second, you're blocked for 30 days, for example. Only afterwards you participate in this lottery of getting to validate a transaction. So this is where pool of stake, basically a new kind of pool was created. It's actually super exciting because today we launched our website. This was a lot of work, but we managed to launch the website. And this was founded by three Italian guys that are very active in the Italian crypto community. And yeah, basically they saw where the general trend of the market is going and tried to already catch that trend. So I'm just going to dive shortly into the technical aspect or how a pool of stake could actually work, and then we're going to continue with Casper. So basically this is Bob, most of you know Bob. He's our user, and he has a wallet, right? So he owns a POS coin, let's say a Qtum. He owns a Qtum, so he transacts his Qtum on the PSK smart contract, which is on the Qtum blockchain. He makes a transaction, and this smart contract immediately initiates a transaction back of an IOE token, which means that basically you are always in control of your coins, of your POS coins, and you don't need to trust the pool, you don't have to rely on somebody else making a transaction because the smart contract is doing that for you. And this is also like a new thing that the pool, it's not a centralization, it's not a centralized node, but it's running fully on smart contracts on the native POS chain. So step number two is that, so now the POS coin has been transferred into the PSK smart contract, and then what happens is that the pool starts forging, right? The pool has a bigger network weight, start forging, and it starts creating tiny little rewards. And for these tiny little rewards, Bob gets daily an IOE back, so basically he gets a credit. And exactly, he can withdraw it, let's skip it, because it's... So the basic mechanism is you exchange your POS coins for IOE tokens. So due to the use of smart contracts, it's fully trustless and fully decentralized. And it also solves the problem for most foragers that they have to be online 24-7, because obviously we're going to make sure that our servers and everything is online 24-7. So the bigger the pool, the bigger the network weight, the higher the rewards, because the higher probability to validate the transaction. And this is for POS coin holders a great opportunity to not just let your... like coins rot in your wallet, but to stake them and to generate passive income. So this is basically what we're currently working on from today. Our website is online, so have a look if you're interested. And now we're going to continue with Ethereum Casper. So Ethereum Casper has been circulating, this ghost has been circulating since 2014. Already in 2014 Vitalik and the others started working on it, and it's been really confusing. I don't know if any one of you tried to catch up on it, but there was a lot of conflicting also information coming up. So now after Defcoin 3, there is some clarity finally, and that's what we're going to talk about. So in the first implementation, so Casper, you always hear about FFG, CBC, what is that? So it's important to understand there is a two-step, it's a two-step thingy. The first step is the friendly finality gadget, which is a hybrid POV POS system. Because obviously Ethereum is a massive ecosystem, and you don't want to make this huge step at once, you want to slowly transition. So that's basically what the friendly finality gadget is for, and we're going to dive into that one because it's already enough. You know it's good to understand first this one. And then the second implementation, which is going to take place later at the later stage, is going to be the pure POS consensus algorithm, which is correct by construction. And maybe if it helps you a little bit to remember it, Vitalik was mainly working on the FFG, the friendly finality gadget, and Vlad was the main designing the CBC correct by construction. So we're going to focus now on the friendly finality gadget. It's important to understand it's a smart contract. It's just a smart contract, which is a POS layer on top of the regular POW chain. So the POW chain continues as regularly as always. So miners doing work, and they mine, and new blocks are being created. And on top of that you have Casper, the FFG, which is a smart contract. If some of you, we all are probably most of us on ETH, right? If we want to become a validator for the FFG, we just have to deposit a certain amount of ETH on a certain wallet in order to become a validator. I have written on purpose here X because the amount has been changing. In the first version of the test net, so FFG is also on the test net, I think you had to state like 1,500 ETH, which not all of us can afford. But yeah, I think they have lowered the bar. And also really important to mention here is previously in older versions of FFG, it was communicated that there is going to be like two type of messages that validators can send, preparing, commit, that's no longer the case. So now you have as a validator, so you're a computer, or you're a note, and you want to validate a transaction. The only message, type of message that you can send is a vote. And a vote has to reach a two-thirds majority. Validators by weight means that the two-thirds majority is not on how many people are actually voting on it, but on the weight. So it means on the total amount of stake coins that they have, right? So you want to achieve a two-third majority of staked coins. And what is also quite new about FFG and CASPER, which you don't have in other BFT algorithms, is that validators are fully accountable. So that means that at every time everyone knows what the others are doing, and if somebody does something wrong, then the others will know and report it. So that's an extra layer of security. And we have a finality every 50 blocks. But I'll explain in a second what finality means. Don't worry, I have prepared it also visually so that you can see and actually imagine that. It will make things easier, but I'll first explain that. So you have epochs. That's you. So the miners are mining their blocks. And every 50s block is a checkpoint. And every 50 blocks are an epoch. And basically the POW miners just do their regular work. They mine, and every 50s block, the validators are basically being called and they're said like, hey, let's vote on the checkpoint, right, on the POS layer. And they're doing that. And finality is achieved when two consecutive checkpoints receive a two-thirds majority. What means finality? Finality means that it's final. You can never revert to history. You can never go back in the chain. It's done, like, right? This is a very important mechanism against long-range attacks. Basically a long-range attack is when you prepare things in a way that are profitable for you. You make a scheme and then you go back in history. And for example, you go back to a point where we had like a lot of money and all the others are, you know, screwed. So this is a long-range attack and finality is a step against long-range attacks. And the FFD offers accountable safety, where it means that the two conflicting checkpoints, there are not going to be two conflicting checkpoints, mostly. And plausible liveliness is that you want your network to keep going, like, right, you want to continue making next blocks and you don't want to get stuck somewhere and be like, oh, wait, what do you think? I don't know, and suddenly it's not continuing. So liveliness means things go on. The next block is being mined and the next checkpoint is being created. So things go on. This maybe sounded a lot very, like, theoretic, so... Ta-da. This is something that is supposed to be a checkpoint. These are our validators and these are our minors. So now there is a checkpoint and, right, the validators have to vote. So the validators submit their votes, ta-da. The minors receive the votes and the minors start doing their work. They're working and ta-da. Justified checkpoint. It got, like, a two-third majority, or in that case it's a three-fourth because it's, like, three validators and one, right? So the point got a majority and it got justified. Yay! Minors can continue working. In between, here, you should imagine there is, like, 50 blocks of pure mining going on. I have left it out for sake of simplicity. So now, minus mine, right? And there is the next checkpoint. Oh, yeah. This is an epoch, the 50 blocks that I was talking about. So there are 50 blocks in between and every 50s block is going to be, like, verified. So now, again, we have the next checkpoint and the validators submit their votes. When they're submitting their votes, it's always important that they refer to the correct source and to the correct target, which, if you later read further into CASPER, it's going to be important. So, yeah. So the minors continue mining and ta-da. We have a justified checkpoint. The second justified checkpoint. And we have here a finalized checkpoint. So as we see, we had two consecutive checkpoints in a row, received two-third majority. So this one got finalized. So after this one, we can never go back again in history. Oh, we can, but it's extremely expensive. So it's not lucrative to go back in history. And, yeah, things continue. Exactly. So this is basically FFD, more or less. It's really just a smart contract, POS smart contract on top of the regular POW work, okay? So what is really important about FFD except for the voting is the slashing conditions. I don't know if you read into the slashing conditions, but there has been a lot of rumor like, ooh, like super strict slashing conditions, like voters, validators can lose their stake. The stake get burns. Oh, it's so strict, you know, you make a mistake and everything is lost. So, yeah, that's pretty much it. Misconduct is being penalized, and this is a security measure. Because in other POS coins until now, you only rewarded good behavior, right? And black coin, everyone behaved well and they got their rewards and everyone was happy. And then there was this one evil person. And he didn't get penalized for the evil behavior, right? So this poses a threat to the network. And that's why we have two slashing conditions in FFD. The first one being no double vote. So, basically, if I'm a validator and we're having our justified checkpoint and we're like, hey, for which checkpoint shall we go? And I secretly vote on both. That's not possible. Like, I'm getting slashed. And the second one is no surround vote, which is, I'm going to explain it with visuals because then it's easier to understand. But basically, if somebody misbehaves, if you're a validator and you sneakily try to cheat, then your deposit gets burned, right? Which is super expensive. It's lost. It's gone. Why? It's not being redistributed. So, basically, why it gets burned is that it makes the cost of an attack even higher. So a lot of economic incentives to behave in a good way to the network. And the second one is, as I mentioned already earlier, right? We have this, like, control. Everyone knows what the others are doing, accountability. So somebody's acting evil. And the other one's like, oh, I know, he cheated. Like, he's a guy. And then the one who reports gets a reward. And this reward comes from the burnt deposit of the evil person, the evil validator. So let's have a look at how this actually works. Okay, so we have our regular situation, right? We have your justified checkpoint. And we have our validators and our miners. Everything's nice. And then suddenly, boom, we have evil validators that double vote. They double voted. So what's happening? Uh-oh. We have two justified checkpoints on the same height here, which is complicated, right? So we don't want to have that situation. So what happens is we have here one honest validator, and he's like, oh, wait, I saw that. And he is basically going to provide evidence to the miner. The miner is going to construct mine the next block. And the honest validator is happy because he gets a reward. But what happens next is that, boom, the evil people get slashed and they lose their deposit and it's burned and they're out of the game. So super expensive. This is the no double vote, which is already quite sufficient to keep the network going and to incentivize validators to be honest. And there is a second slashing condition, which is sort of... Yeah. So the second slashing condition is no surround vote. So basically, let's assume that here, where I'm an evil validator, I want to create chaos on the network. So what I can do, and I don't want to lose my funds, right? I don't want to lose all my stake coins. So basically, here is a justified checkpoint and there is a vote. I vote here and then I go offline. So I didn't double vote here on the same height. I have included the formula. Maybe some of you are super quick on formula from the Casper paper. So basically, what it's actually saying is that an validator cannot vote on two distinct votes and that they always have to be within the span of the other votes. So basically, I cannot vote here, then go offline here, then vote here and then later vote here. Because like that, I would actually double vote, right? So we see like two chains and I participated in both votes. That's not how it's working. So if you do a surround vote, like going offline in between and like playing around with your votes, boom, slash, deposit burned. So this was actually the second slashing condition. This was FFD. It was, yeah, that's actually it. And the good news for you is, yeah. So I really hope that you understood it because it looks really complicated at the beginning. But when you look into it, it's not. And it's super important that we understand what's happening in the ecosystem because it's going to change everything about cryptocurrencies. So, please. Any questions? Yes? The guy in the gray. Yeah, basically, yeah. I don't know how exactly the... I would say that the mechanism works as a regular POW. So basically you have that request into the network and the miner with the strongest hash power is taking care of it. Yes, please. So why would my note line is bugging and keep sending off votes and I'm getting punished for that? Yeah, I think that bugging notes... I mean, if you have the client running on your note and if you don't interfere with the code, nothing's going to happen. I mean, there is full accountability and if, for example, there was a bug in the Ethereum code, then obviously you're not going to get slashed. But for your code to be buggy, you have to take care that it's buggy because otherwise it's not going to happen. So then you basically, yeah, interfered with your note. Oh, yeah. Okay, thanks. Yes, please. Introduces a proof of stake into a proof of work. So that introduces a proof of stake into an original proof of work system, but it doesn't actually take down any proof of work of the system yet, right? So we still mine and we still use the same amount of energy. We just put a second layer of POS on top, right? Yeah, basically we... So you were asking whether we continue to have the same situation with POW and we're just putting a layer on top of POS but we're not solving the real problems that POW is posing. Okay, so yes. But we also have to be aware that this is a very risky transitioning and that you as an ecosystem have to take care that everything that you're changing in the fundamentals of your architecture is going to go right. So FFG is just really the first step, also as a proof of evidence and eventually they will transition to CBC which is then the pure POS algorithm and which will get rid of POW. Yes, please. I think you've talked about the problem of proof of work, scalability and centralization. In a way, I'm just trying to understand how POS is solving. In a POS, centralization is still in place. Whoever has the biggest stake is going to decide in the same way whoever has the biggest power in a POW. So how this is going to solve this issue? Scalability, like how much is it going to solve scalability? Like, okay, the proof of work, like we know that it's slow in a meaning, I don't know, 15th transaction or whatever. In a proof of stake, is it going to be really like solving the problem less of the scalability? Because there are other solutions for scalability, clearly. Like a sharding, plasma, rider, all of us are coming into the game but is proof of stake actually solving the scalability? So the first question you were asking was the issue of scalability and whether POS is actually solving the question of scalability and it is to a large extent. So for example, Ethereum is going to introduce a sharding as a scalability issue, but sharding is directly connected to POS. You cannot have a sharding mechanism with POW. You can only have it with POS. So basically with sharding, they want to increase it to, like, I don't know how many thousand transactions per second. And in POS per se, by introducing an easier possibility to become a node, you can have much more nodes. And so the transaction is not that heavy working and by getting away of this basically work being done, you can ensure much higher transaction rate per second. So the code or, like, the algorithm is giving that possibility but how, like, the different chains implemented and what's actually then going to happen, it depends also on every chain. So it's not easy to speak of POS as such because as I already showed earlier, there are a lot of subvariations and it's BFT, delegate proof of stake, whatever. And then the first question that you had is whether it's solving this issue of centralization to a large extent. So it's obviously going to pose, like, different questions. So I said, like, POS is solving most of the problems of POV, not all. I said that. And basically, yeah, so basically now, I think 75% of the entire Bitcoin network resides in data centers in China and Iceland and wherever. So 75% in data centers. That's not very decentralized, right? So with POS, you can have, like, all of us, we can become nodes in POS, right? We just have to have a computer which has enough RAM space. We have to have a stable internet connection, more or less. Central POV, nothing changed. Like, POV can also be a miner. It's just about the U-minor node. And here it's also about if you have a little stake, it will be still in a probability theory. I mean, whoever has a bigger stake or whoever has, like, a bigger power, he will do that stuff. So it's the same. Yeah. So you just said that basically in POV, somebody can mine and in POV, somebody can become a validator. Did you check recently the prices for an ASIC? So does somebody know how much an ASIC is costing right now? Yeah? Yeah, yeah. So you have CPU and GPU. I'm just right now just generalizing. So yeah, so the price there has been a huge market shortage of ASICs or CPU, GPU. And the cost right now is, like, a 10,000. So if you want to mine, you just have to invest that certain amount and then hopefully you get to actually mine a transaction. So there is, like, real life problems to that. Okay. Just as a short mentioning, it's also in the interest of all of us. We have, like, two more talks and they're also going to be intense, interesting and long. So maybe let's keep the... Two more questions, maybe? Two more questions, exactly. You decide. Hey, thanks for talking. I have a question regarding availability. Why is there, like, the general requirement for being available 24-7? I mean, what are possible, like, attacks that you could perform by going offline as a sticker? That's a very good question. I'm going to repeat it for the live broadcasting. So basically you said, why is availability so important? Right? We can just sum it up like that. So why is availability so important? The answer to that could take very long, but I'm going to try to keep it short. So basically imagine that you are in the checkpoint situation. You're like, okay, so who is going to mine... Who is going to validate the next block? And then you say, okay, you go. And then suddenly you go offline. And like, oh no, who's going to do the next validation, right? So that's why you basically... The coin age issue is sort of an incentive to take care that you're always available and that when you get to validate a transaction, you are actually there. Like, you have taken care of your connection, basically. And having availability of nodes, it's again an issue of network security, incentivization, stuff like that. I'm not going to repeat that for the live streaming. Yeah, you're totally right. And it's always a matter of design choices. So a certain set of design choices has been taken. And what you were just suggesting is also possible, but then this is a different set of design choices. Maybe we can just talk about it afterwards. Yeah, okay. So one more. Maurice, you're picking. What are the economic incentives that prevent miners from becoming validators or vice versa? They're super welcome to become validators. Like, I mean, for example, imagine that situation. You are a regular guy, more or less. And you want to start mining and you have to invest like $10,000. You have to set up... So it's a lot of costs. And then you have invested all that money and suddenly it's taking ages until you can get to mine a transaction. And it's not very profitable. So maybe currently in the test net, it's still expensive. But let's say you, at some point, you decide, okay, I'm going to stake a certain amount of ease and I'm becoming a validator. And by that, you get the possibility to forge. And by forging, you get daily rewards. That's PSK. With forging, you get every time you basically validate a transaction, you get the fee of the transaction. So that's another way to generate, to make money, basically. And it's... In the long run, it's going to be more lucrative and more easy for regular people that don't own a farm, a data farm. Yeah. Okay, so I think the two questions are now over. Please. Yeah, okay. A lot of things we didn't... I'm just going to wrap up so that you... We all remember together what we were talking about. So we talked about why POV is not sustainable. We talked about what POS actually is, proof of stake, how mining 2.0 works, like with the forging. Also thanks for these questions. We discussed the two components of CASPER, being FFG and CBC. We dived a little bit deeper into FFG voting and finality. And we discussed the two slashing conditions. I borrowed the slides from Carl. I asked Carl from Ethereum whether I can use the slides. He didn't respond, so I just used him. I really asked on... Yeah, I asked on Wednesday, and he didn't reply. So I hope it's fine for you. And what we did not cover is the POV, POW attack resistance of POS. So you can always have that condition where miners and foragers, like validators collide. And then that's another messy situation. We did not cover that. Then you have the correct by construction, which is the second step of CASPER. We did not talk about that one. Sharding, we mentioned it shortly. Sharding is part of CBC. And most importantly, we didn't talk about the Ethereum governance issues, which obviously I'm mostly interested in. But that would be another separate talk. So here you can also have the presentation afterwards. A few really interesting sources where you can get all the information. And because our three founders are Italian, Grazie mille. Thanks a lot. Pulloffstake.io is our website, and you can find me on LinkedIn or just drop me an email or ask me after the presentation if you have some questions. And really, thanks a lot for your attention.