 So, good morning everyone, I'm Ismael Kofi, I graduated in mathematics in the University of Bonn, worked at several companies and put in applied research institutes such as Fraunhofer and was very interested in inspired by the Snowden Leagues on privacy preserving technology and decentralization and from that I started working at EBFL as a software engineer where I collaborated on scalability research on blockchains but also on distributed decentralized systems and privacy. So this work inspired me to join Cosmos and Tendement which I also briefly introduced in this talk. So let's start, first I will reiterate some basics that are necessary to understand what is this blockchain thing we are talking about. I will present some challenges, one of them is scalability that is already mentioned but there are much more challenges in the blockchain space or many problems that need solving that I will just briefly present and then I will briefly talk about scalability and present one scalability solution which is not just one solution for scalability but basically an ecosystem of solutions which I will explain. So to the basics what is a blockchain? As you have seen there are many different definitions. This definition serves the purpose of my talk the best and it is also very simple because it is just a sentence but there is a lot to digest. So a blockchain is a domestic state machine replicated on nodes that do not trust each other. So what does it mean? A state machine, you can think of a state machine, you have several states and transitions to this state, you have an update function that takes the current state and a transition and updates to a new state. So in the context of blockchains this could mean the state is the account balances and the transition could be a new block containing transactions in a certain order. So this state is not stored at the central server or central service but is replicated on nodes and the tricky part is these nodes do not trust each other. So how do the nodes actually reach agreement on the state if they don't trust each other? So this leads us to consensus algorithms or consensus protocols are the tool that makes it possible for these nodes to reach agreement. There are two types of consensus algorithms roughly. One that assumes that nodes can only crash, they are heavily deployed in cloud infrastructure for instance if you use Google or AWS your data is also replicated, it is not stored at the single server but at many nodes but it only assumes that you are in control of the nodes so a single entity is in control of the nodes and you can trust those. So it only operates correctly under the assumption that those nodes can just crash and the more interesting part for blockchain or for nodes that do not necessarily trust each other is that these nodes can behave completely arbitrarily, they can expose malicious behavior often called Byzantine behavior coming from a research paper that tried to solve the Byzantine general's problem where generals that communicate through a messenger try to reach agreement if they should attack a city or not. So examples of these are PBFT and tenement, tenement I will roughly explain later. So consensus can operate in different timing models. On the very left we have synchrony which basically means there is an upper bound for an unknown upper bound for the message delay, for the message to arrive and there is complete asynchronic which means that you don't know if there is such an upper bound or actually no there is no upper bound and messages could potentially be delayed forever. So this is more or less how the internet, many protocols on the internet come with this assumption and a very simple way to explain it if you think of synchronous communication is more like a phone call where you have direct feedback on how people interact and asynchronic is more like writing an email because you write an email, you send a message, you never know when the recipient will actually read it. So and in between those there are different timing models, semi-synchronicity and partial synchronicity. I'm not going into detail there but it's interesting that there is also a middle ground that is interesting to explore. If you want to learn more about consensus I can highly recommend this podcast I just linked there which gives a historical overview on consensus algorithms and explains them in more detail. So now a few limitations on what you can do on distributed systems in general, this is not specific to blockchain or any cryptocurrency or something. This is a general theorem that states that under the assumption of complete asynchronicity no deterministic algorithm can reach consensus under the assumption there is a single faulty node. This is a very strong claim and it's important to know. So what is interesting here it only says for deterministic protocols and also only complete asynchronic timing model it doesn't work. So it's actually very necessary that they explore the middle ground it sets the stage what we can actually do in consensus algorithms and also you could have probabilistic consensus algorithms they are not impossible through this impossibility theorem. Another theorem that states what you can do in distributed systems is the cap theorem that was already mentioned by Ali. So it basically says you can only have two out of three properties which is the properties are consistency which means the most if you read from let's say the database you get the most recent right or an error and availability means that you get a reply you always get a reply from the database but it's not necessarily the most recent data. Partition tolerance means if you have a bunch of nodes that communicate with each other on the Internet what happens if the network splits and the messages between these two groups or partitions cannot communicate. So this is something that happens all the time on the Internet and usually if you build distributed systems you have to assume that partition tolerance is a necessary property you want to achieve. So you can only trade off basically availability and consistency. So for instance Bitcoin that was mentioned is available like trade-offs availability for consistency because what can happen there is a chain can fork nodes get blocks that were propagated through the network but they are not the longest chain that has been mined so until they get the longest chain they have to when they get the longest chain which is the extra ground truth they have to throw away all the work that has been done and then if you read before from the from the blockchain basically you get stale data that was not actually representing what happened. So next this brings me to what challenges are blockchains currently facing. So there is this idea of replacing central authorities the Bitcoin paper itself speaks about replacing central banks I think and there's a large authority and people want to live in a kind of decentral world where there is no power agglomeration in conglomeration on central powerful authorities why don't we see that yet why are we just talking about it and what are the challenges we're facing in these systems so one big challenge that is often overlooked is usability. So these systems usually they are built by experts and they often assume that you know the stuff that they know and this hinders mass adoption so often if you deal with cryptocurrencies you have to have a basic understanding of publicly cryptography that was mentioned but I mean for mass adoption this is not really good because most people don't want to know or probably don't need to know these things so there's a trade-off to be made here as well about educating the people or building the systems in a way that you don't need to educate them this is ongoing research but I think the end-usage ability comes after we have actually systems that scale but it's a very important thing to keep in mind if you build systems another challenge is also often overlooked is developer usability so if you want to build on top of a blockchain you want it to be as easy as possible for developers to build on top of that so in the past the only solution around has been for instance in a Zcash did that which is a very interesting project by the way they forked the source code of Bitcoin changed the analogic of what happens there and deployed a new blockchain called Zcash and this is quite cumbersome and very difficult to do you have to know a lot of the inner workings of the source code and everything Ethereum changed that in a way that you can deploy smart contracts which are basically programs and you can deploy them on top of the Ethereum blockchain the only downside to this is you're stuck to the Ethereum blockchain and you're stuck with the trade-offs that are made in the Ethereum blockchain in terms of scalability and all these consistency and availability properties that underlie these systems so this is very cool but it comes with with downsides as well this brings me to the next challenge usually if you build such systems if you think of blockchains as basically replicated databases these databases are not connected with each other at all so basically if you have value on one chain you cannot transfer value to the other chain easily and the common approach today is you go through a central exchange or you introduce a central authority again and that defeats the whole purpose of the blockchain so yeah we definitely need a way to these chains to interact with each other which does not come with the assumption that you trust a single central authority again another thing that was also mentioned already is privacy actually blockchains are not privacy preserving per se so if you think of Bitcoin for instance it basically sorry it basically you could think of it as an Excel sheet which is like replicated on many computers and the Excel sheet contains the history of all transactions in the public meaning like in Maya said that DefCon recently it's like Twitter for your bank account this is probably something you don't want in the context of this research community you could think of okay if I store records of data or hashes of data on the blockchain which is actually public data that's totally fine it's totally okay to store this data publicly but if you're dealing with highly sensitive medical data for instance you obviously don't want that publicly available or even the metadata maybe of that so they are trade-offs to be made between transparency which is a property that blockchains definitely have so it's very transparent but you also want some form of privacy depending on your actual use case and so they are trade-offs to be make and there's probably also a good reason why there won't be like a single one-size-fits-it-all blockchain solution that solves all the problems another challenge we're facing is how do we actually change the inner workings of a deployed blockchain so currently how this often works is there is communication out of band then people kind of try to reach an agreement somehow and propose solutions and then try to convince the community of their approach and there's actually also no transparency here ideally you would have the voting mechanism on top of the chain so it's transparent again and people can vote ideally yeah in some form of democratic system stakeholders of the chain or the community members of the chain so something that was also kind of mentioned is energy consumption so Bitcoin uses as you have heard something called proof of work which is not only necessary for consensus but is mainly also something called a civil control mechanism so civil control mechanism is it makes it difficult or impossible for a malicious actor to flood the network with fake identities and take over the majority of the network with that so in Bitcoin this is done by finding pre-images of hash of hashers and this is a very difficult task basically what you can do you must basically try all different solutions so it's an exhaustive search more or less and this is heavily energy consuming people use specialized hardware for that but it uses for instance Bitcoin annually uses 73 terawatt hours so just to to make this number a bit more understandable this is like seven million US households or as much as the country of Austria. Ethereum the numbers are slightly better but it's still loads of energy consumed there are people that argue that's fine because we can use renewable energy and energy and things like this but the question still is is it worth it to have this energy consumption I highly doubted but yeah there's no there's no clear question a clear answer to this and the main challenge and the most pressing challenge we're facing is scalability so scalability means mainly throughput is how much transactions per second your blockchain can handle and latency how long to wait until a transaction is confirmed and this in major blockchains which major public blockchains are currently deployed like Bitcoin and Ethereum this doesn't look very nice the transaction per second rate is very low like from seven to maybe a few hundred at max and this doesn't scale so if the world would actually use Bitcoin the system would basically flood with transaction and it would more or less stop working another thing another topic in scalability is how do we reduce the data storage necessary for nodes to participate in the network and also for clients so you the naive approach you commonly use in deployed blockchain system is you have to download the whole chain verify all the transactions it's infeasible for many commodity hardware or smartphones so slightly more on scalability because it's such a pressing topic they are basically two different approaches or two different families of approaches one is so-called on-chain scalability so just started off with the blockchain debate in Bitcoin if you increase the block size in Bitcoin or in all these systems you can fit in more blocks but this doesn't really scale doesn't really solve the problem because it only increases the throughput with a constant factor and it doesn't solve latency as well there is so much academic research so the research community itself is building blockchains by the way and I put on the slide a few publications the name of a few publications each of which would deserve their own talk sometimes quite complex systems but they're extremely interesting and the thing I want to mention here is probably in a few years we will definitely see a scalability solution even for on-chain for single blockchains on chain the downside of all these approaches is again it's like one-size-fits-all solution they try to build one blockchain of course you have to make trade-offs and you want one chain that basically scales but so there's no interoperability involved and most of them are academic projects and often there's no proper implementation but for some like chain space there is actually a company that is building the implementation the other family scalability approaches as I said they are two the other family is layer two or off-chain solutions where you take off the processing of the transactions from the chain and you merely use the chain as kind of a settlement layer or another analogous would be you if you transfer money you only use the blockchain as kind of a court if there isn't disagreement so there is the lightning network riding if you're interested in those you should look them up also we we have in the audience people that are actually building a payment channel networks and so the big advantage of this approach is that you are building on top of existing well-established systems that have been around for a while and the downside is you're still limited via the main chain which is often like Bitcoin or Ethereum so throughput their transaction costs all these things still exist often they don't incorporate as well and they sometimes introduce the risk of centralization so what if you could use you could use another scalability approach where you have many parallel chains they are mainly so they operate in parallel and you do the transactions on the particular chains for your particular application or use case so there are two major projects poker dot and cosmos cosmos I'm going to explain and if you want to see a comparison of those I linked the blog post that does a fair neutral comparison on the trade-offs made there so now to cosmos as I said it's not yet another blockchain but it tries to build basically a whole ecosystem of application specific blockchains instead of deploying your own smart contract on something like Ethereum you could also build your own application which is their own chain but it's still able to communicate with all other chains and with this approach we try to solve scalability interoperability and usability so cosmos is powered by tandem and BFT which is the consensus algorithm if you remember so it's a perfectly Byzantine fault tolerant consensus algorithm which operates in the parts of synchronous or in this middle ground so the key takeaway here is it's very fast it can take thousands of transactions per second and produces a block every one to three seconds so for the civil control mechanism we replaced proof of work in the main chain with proof of stake or delegated bonded proof of stake which is less energy consuming and also gives you the advantage that you can incentivize honest behavior or punish malicious nodes from misbehaving and not acting according to the protocol also enables governance so I want to highlight a little how cosmos works and what you could do with it you could use then them and the consensus algorithm and tandem and core which wraps the state machine by using something we call the application blockchain interface and the cool thing here is if you're thinking of building any blockchain maybe a private chain or a consortium chain or proof of authority chain you could use this approach and basically you can use this approach and code in any programming language so if you develop a chain like this so how do we connect those chains we connect those chains for a protocol called interblock chain communication protocol and it's very so the details are a bit difficult to grasp but the the idea is very simple if one chain wants to send a token to another chain it basically locks the tokens on the first chain it sends a proof to the other chain that the tokens have been locked they this proof gets signed by validators of the first chain and so then tokens with the same amount get created on the other chain so it's like the very basic idea here with this you can sovereign blockchains can exchange value so now how do we connect all the chains if they exist naively you could connect all with each other this would lead to a large communication overhead because for n nodes you can think of like everyone's connected to everyone this would cause for instance 400 nodes you would already have 5,000 connections instead we use the approach of a hub or hub and spoke approach where the hub connects the different chains often we call them zones the zones don't communicate directly with each other but instead through the hub where the hub itself is a peer-to-peer network so if this is not enough for you and you still think oh maybe there's an easier approach how could I build a blockchain myself I recommend you to check out the cosmos SDK which is a set of libraries that makes it extremely easy for you because some design decisions are already taken care of and the only downside is you're stuck to the programming language go for now we also build other SDK soon and this is ideal if you want to build a public proof of stake chain and it's a modular design you can use existing modules you still have to quote but it's much easier I can learn more at the on the homepage I linked there so the main takeaways there are many challenges in the blockchain space that they're hindering mass adoption although there's a big hype scalability is the most pressing one there are many many smart people and well-funded smart people that work on these this on the scalability problem so we will probably see a solution there it's it's it's appropriate to be optimistic here cosmos is one scalability solution that tries to establish a whole ecosystem we often spoke of trade-offs and not every application you want to build has to use the same trade-offs so here you can explore all kind of different trade-offs and build your own zones according to the specific needs you have and the cool thing about this you can also if this research continues and for instance privacy research continues you can plug in another zone that makes use of this and it's the whole system cell exists and operates in the same way thank you very much I hope I didn't confuse you too much thank you thank you very much presentation maybe we take one question there's a question yep hi the most challenging trade-off with regards to scalability so I think you always have to make trade-offs between two things like decentralization security and scalability basically so these are these are the trade-offs you have to make and I think there's no one as I said I think there's no one solution that will solve the scalability problem in general for all use cases it's more likely that we will actually see an ecosystem of different chains actually we're already seeing this but they are not connected so I can't answer this question because there is no single answer to it it depends on your use case I think for the sake of time there's going to be a panel as well we will switch also as a kind of sacrifice his own talk now but I just maybe want to use this moment to to highlight again that this entire conference is really I mean we are all sitting here because of Zunke and we should give him an applause yeah