Whiteboard Series with NEAR | Ep:9 Stan Kladko from SKALE Labs
Nothing is loaded from YouTube until you press play, and then without tracking cookies.
About this video
We got Stan Kladko ( / stan_kladko ) CTO at SKALE Labs ( / skalelabs ) for the Whiteboard Series speaking about how SKALE works and enables high-speed, low-cost smart contracts in Layer 2 along with our Co-Founder, Illia Polosukhin ( / ilblackdragon )
Know more about SKALE Labs here: skalelabs.com
Download the video here: near.ai/03601
This Whiteboard Session was taken during ETH Denver 2019 at the Enterprise Co-working Space in Denver, Colorado.
------ About Whiteboard Series --------
The Whiteboard Series with NEAR is a set of video interviews with Founders who are building scalable solutions for Blockchain. We deep dive into their story, what they're developing and how it is helping the ecosystem.
Follow the latest from NEAR Protocol on,
Discord: near.ai/discord Medium: near.ai/medium Twitter: near.ai/twitter GitHub: near.ai/github
#WhiteboardSeries #SkaleLabs
Transcript
11,488 wordsCaptions as YouTube publishes them, usually machine-generated, so product and people names can be misheard.
- 0:00
foreign from scale to talk about how to scale scales with you uh Stan you want to introduce yourself and then you can Devin okay yeah so yeah so just a couple of minutes till you guys about myself because then you'll better understand you know what I'm interested in and what kind of things scale does so I'm the city of scale uh but like my history started like when I was still in high school I did lots of mathematics physics there's probably many children in the form of Soviet
- 0:44
Union you know like homotypical I would say like a new Earth in a sense that they did lots of science so I didn't miss physics when I was in high school I participated in different competitions and Method physics then I studied the physics department in Ukraine and you PhD in physics again like in theoretical physics in Germany that I was working at Los Alamos National League in New Mexico in the states and then at the Stanford University
- 1:15
all was about physics so mathematics physics and then at some point I was a Stanford and at that time it was that close to the first bubble everyone was doing like stereotypes and making lots of money and excited and I moved from Academia to more like startup life pretty much for my like entire life I was doing startups different types of startups so I hope that the startup which was started by Professor Robinair at Stanford it was called Indra networks
- 1:47
and then they raised about 50 million dollars total that was a network encryption device so that time people needed to encrypt stuff and we started as encrypting websites but then we pivoted to database encryption and created this Hardware box which was used at Banks to encrypt database so you know at some point the startups were required by a company called safemet and now it's still a pretty well selling device so by safenet
- 2:22
they're selling it to Banks so if you go to a bank as a database and there's some information database there's a very significant chance that it's encrypted using its Hardware books so after that I actually started the my security lab and we are the slip was doing uh research together with the US government and also a certification with the US government so we certified different types of crypto starting from
- 2:47
software crypto software to Hardware so we worked on things like uh Mozilla browser crypto Library another crypto Library which is called open SFL we worked on crypto chips from different companies such as cable networks Marvel all kinds of crypto in all those cases collaboration conforms to government standards whether there are any types of vulnerabilities that was very interesting kind of work and then I was working in this crypto
- 3:25
lab for a while and then after leaving for many years in Silicon Valley I got seed funding for startup which was doing Wi-Fi security and I kind of got back to Ukraine and hired people there and it was a product software product which secured a large Wi-Fi installation so our products got installed in many places such as London Underground and Thames river in London New York City and
- 3:58
Manhattan in the form of telephone buses in San Francisco city of San Francisco pretty good products and they ended up selling this product to a telecom company in in the UK in London and after that you know I was looking to do something else so I went to VCS and at that time my new services so I knew Mike from Floodgate Mike Maples and I knew Rick Thompson from Sydney Adventures so we were like thinking what to do when we started doing big data so we did like a
- 4:35
big data platform and and build a product but we were like competing against the similar platforms by Google and also AWS had a similar like data platform and it was very hard for us because like a small small startup you're like wow here's my big data platform but it's like Google and this Amazon so it was not doing well all the technology was doing well but competing against very much companies was not easy and so I can do it I'm thinking about like
- 5:07
putting down the startup or doing something about that but at that moment all of the crypto Revolution that was I think in 2017 so all the crypto stuff suddenly started happening and people went back to our investors to my Maples from Target and to Rick Thompson from signia and they said yeah you guys have to do that you know this big data stuff and crypto and like you have to go into this crypto
- 5:33
space and that's then they kind of started to lure and understand what problems this crypto space and how we can find the product Market feed how we can actually find something that people needed so we started researching a video and the scalability problems and things and that and then you realize that I think as many people that definitely the scalability is a problem so transactions are expensive on either
- 6:04
uh also takes time to finally so typical zero transaction if you want to make sure it's actually okay you wait maybe a minute or two minutes if you don't want someone else to come and kind of we were watching yeah so we kind of thinking thinking about it anyway here's a scalability problem and we talk to our investors and investors stuff they said yeah do this and then and then we started to kind of first we understood the problem and then started
- 6:36
to understand the product Market feed what should we do and so we made several decisions and one of these decisions we made was to focus on eth ecosystem so instead of creating our own blockchain we decided to create this product this implementary like hackers and people and like coding and using these languages like solidity lots of excitement so we had a theory that it's like JavaScript you know like if you guys remember like what the first browser was released there was JavaScript which probably wasn't the
- 7:18
perfect language but there was so much momentum in hacker Community for programmers and staff that people kept modifying JavaScript and although like companies like Google friends like Google tried to come up with a different language there was this language for instance Dart from Google in Charlotte so it's very later yeah later but they couldn't actually get momentum so what are the top was JavaScript is now typescript from Microsoft so JavaScript kind of took
- 7:50
this more like evolutionary approach and that kind of still exists but but Market is more kind of attached to JavaScript so let this workbook we are pretty that's what we told investors so that's really what we focus on on speeding up each image while uh being still you teach comfortable so so when we decided this then the next step was was to decide how do we do this and you know solution is pretty like
- 8:20
stage workers we have the side chain so then there's like eth main Chiana and you have our searching and let's say we have some number of computers servers on this side chain and the thing is half of steak which is like it is compatible so we tested to make sure it works with three mix and truffle and metamask and all of the stuff and then obviously also have to somehow connect the two there has to be some connection here and and then like an important decision
- 9:18
which we also like to be thinking about like the principal thing was minor so there's some networks which are minable and some have Works which are not mine minable means that you know pay people for putting servers in your network supporting your network so for example eth is minor right but for instance EOS is not so much mindable because you cannot freely join EOS you know like go on you can delegate yourself right right so small baseball version
- 9:50
right so but it's not like so so yeah so so kind of a high level the what we realized is that like the mining is where your money goes the money that you print because in money in many cases you print money you you introduce inflation and you print it out of the thin air so this money has to go has to go to to people who actually grow your network so you have to produce this natural uh fit where you print money but you don't
- 10:29
just give it like the people who don't care about you that you really want to simulate people who care also promote your network and if you find this correct uh symbiosis then the first starts to grow and so if you put for instance in a teenage maintenance right it's not so optimized in this way so miners for instance get paid right so you get paid for money but then if they change Mainland there are also ten thousand percent right yeah which are like more like altruistic guys
- 11:02
right they do lots of Europe they get blocks they store them they run idiom they respond to requests but all of those norms I'm not actually getting paid and there's lots of like tension now on this even magnet whereas people are saying okay we're running the school notes but we're not getting paid so we cannot increase our computational resources cannot increase our storage so
- 11:28
in our Network we're trying to find a more natural payment scheme where everyone that does something in our network is somehow getting paid and that if we can find this way then network is going to grow this is kind of very principle thing to us as far as the economics but the economics becomes really hard because these guys do lots of stuff so they store files they respond to requests as you probably guys know in th there is the call requests
- 12:01
where the state of the blockchain doesn't change but they just get some information the spawn requests they do storage they do computation so so you need to be able somehow to be good people and not to play basketball and this problem is not only our program it's for every utility Network's Channel yeah so for example we met these people from a network called life peer and it's
- 12:30
people who do like video streaming you know they're pretty much have the same problem right like I want to pray people that include a video for me and I don't want to pay people who I actually Byzantine or the bad stuff right so the way we solve this problem in our Network because it's a complex thing we introduce this notion of uh we call it decentralized quality of service or
- 12:53
business SLE service level agreement okay where let's say perhaps up number of servers not Network and by default each of them that gets the same volunteer at the end of each month so we pay them monthly but we need to somehow measure performance of each of them and if the server is misbehaving we don't pay right so in the first iteration of our Network we're going to take a very simple formula and the
- 13:23
formula is that you have a larger Network and so each one each if you are a server every month you have 21 uh guys at this universe on the same network randomly assigned to you just like everyone is watching everyone so at the end of Demands there's 21 guys report on me and say okay you know standard server was okay the latency was okay it was responding to requests it's kind of the
- 13:54
metrics And if every metric measured by this 21 guys is above the name required we pay this particular server mounting and then if one of the metrics goes down the arrangement right then you don't pay the volunteer so but then now we're not 21 measurements so let's say this guy is getting measured by it by its peers and at the end of the month I mean you might not see measure rate let's see so I've already through the
- 14:25
information that they've ever done let's take a very simple mathematical example so let's say this guy is like 21 other guys ping ping it though this guy right yeah of the 21 guys is actually reporting average latency that this guy so you actually have like this wine and on the line you have to take a media pretty much so let me give you the algorithm that we are going to have in the first iteration
- 14:59
of our network not saying there's the perfect algorithm but that's the simple formula that we are going to start in the first iterations the formula is now very important thing is this in this proof of stake systems that's a mathematical assumptions so we always assume that less than one-third and of the guys are built and then some that's something which is assumed and mainly because the next day
- 15:27
networks all of our servers have the same stake and we assume that on the Chain less than one is one circle of them are bad so let's have the 21 measurements now what do we do in this case on the left we drop one six and on the right we drop on six because these are the most outliers these are the most measurements in Chicago of the average media medium projects and that's somewhere here there's this line this like standard so at the end so this is a day like the
- 16:08
idea they found uh and then if this metric is more than the standard this okay no trigger sets could be latency could be response to API schools you can create all kinds of Tricks um what we plan to have we're gonna start with a simple Matrix measuring script but then we don't know what's going to happen you know there could be all kinds of bad things the bad people may try to use to fool our Network into
- 16:39
paying them with salvation work so this script is actually going to be dynamic and so when there will be governance in our chain and then the three months from start we see a particular bad behavior a particip we can always add an additional metric to the script and then this is kind of a way to fight defy so I have two questions here first of all how does this 21 actually get selected okay so let me go into this part so uh in many cases in our Network
- 17:13
we need Randomness um and um you know actually it's kind of a hard Topic in the community right and we're actually going to try those kinds of stuff and thought about all kinds of stuff in the how do we create this random thing uh at some point we were really excited by another algorithm which is called vdf verifiable delay function so it is algorithm called vdf and uh the idea is that you know a number of
- 17:47
nodes uh let's say even one or you know submits this function PDF which takes a long time to calculate but once it's calculated it takes short time to verify so let's say the function DDF takes 10 minutes right and what you do for the random number generator becomes like vdf of R and the idea is that this guy used to provide things really fast and so he's not able to calculate PDF and that's why he doesn't know you know what the result is so although I'm
- 18:31
providing random number and I'm not able to know what the result is going to be so I'm not able to form the system I will influence the system so there are different types of ways of to use PDF but the fundamental problem that we encounter this UDF is that PDF is this function which let's say it takes a 10 minutes to okay right the problem is that if you build a function like that or in the software on
- 18:59
Intel processor so that's what we faced so it made around 10 minutes on uh in the hotel right but if you do Asic my running 10 seconds almost right so because of that uh this entire business with cdfs require you to have this Asic and this is not exist now no Asics like that ethereum Foundation recently announced they're going to be building this A6 and maybe even open source things called facing so it may need that you know a
- 19:40
couple of years from now is going to be something to be able to buy easily and incorporate your network but since now this stuff is not available to use VDS so after like many sad moments because I really like this entire mathematics we decided it's unusable for us in 2018 19 so instead of UDF we use it pretty much only as an algorithm which is working and have to tell you guys about the Sound Works so I guess this mathematical
- 20:19
motion which is called common poem and it wasn't reduced by mathematicians many years ago and was like not used much for anything but I also like this blockchain this is called like mathematics is used and the idea of common coin is is that you have like M people and people somehow you need to derive the random number and you know let's say as an example you know the less than one
- 20:52
zero of these guys are better so what you want to have is another reason for Collective random number generation where each of these end guys somehow creates a piece of something okay mathematical obscure thing and send it said to all other guys and ultimately when I get all of the pieces I kind of glue the pieces and create a random number very important thing is that this requires at least one third Over N guys to participate so whether people cannot
- 21:29
just install the number because there has to be at least one good person in the system and the random number is unpredictable so if you'll see it will require one sort of way applies then the bad guys can influence because it's kind of it's kind of application of Entry you know the resulting entropy is kind of the sum of everything so even if the group there's one good guy what the answer is Aggregates you eat multiple the bad guys will be able to predict or pre-influence the stuff so
- 22:00
now there's only one algorithm pretty much which is good enough to solve this problem and this algorithm is called VLS signatures so the type of reason was derived in about 2001 by three people so there is a professor at Stanford yeah let's make sure we're thinking about this really interesting so much collaborism where you're normally like all of us using like signatures photography issues and then now a threshold signature something which they call Fresh
- 23:06
threshold signature is a bit of a kind of Improvement of this technique where um I have I have one M guys 10 people let's see and to create a signature it's a collective thing so let's say six out of these people uh need to sign a piece and then when they when the sign pieces like we're good together you you have seen that she has a result so the interesting thing this interesting
- 23:39
mathematical property so you have the signature yes right of a message and um uh the way I don't have a signature I have my key so S5 my piece and then out of the remaining nine people I don't care if five people send me their pieces and the five pieces I got from them and I get this else but the very material mathematical property of this is is the movement through which of those people reach six subset of six I get out of ten the result is going to be the same
- 24:19
which helps to prevent against bad people because one thing which black people can do is to withhold it doesn't they don't have to Simply encourage you sure if like they're like full bad people they could just accept me anything at all and then my protocol loses something which is called liability that's why this means that lecture has to complete right but in this example if six people
- 24:43
are good and the signature requires six out of 10 no matter what the bad guys do including like would say they are signatures to some people send you to another whatever happens is guarantee that the good people will be able to grow and every good person is going to have the same result is and since as in general looks like a pretty random number this s provides very much like this so it's a random number which is derived by everyone I've known to to everyone
- 25:15
and can be used them for full purpose what are you using to sign uh so that's an interesting question so depending on on the application you could tell the difference just be the random number right you just let's say you have a book typically you need to have like a random number to walk so you just your blocks are like zero one two three four right and then you can use all kinds of modifications improvements and so anywhere that Network when we need a random number we
- 25:52
need we can take these are all nodes in our Network or subset of nodes and we always use this bla signature so so the threshold signature requires a setup right that's another interesting question thank you yeah yeah the biggest problem is General signatures is the setup is quite complex in the original paper was very interactive totally so so for the setup we started uh these things a lot there are several
- 26:29
papers which provide this initial setup the mathematical name of it made will use the same dictionary distributed key generation and distribute means that there's no traffic party because for the threshold signature you have all the keys but you somehow generate those keys in such a way that everyone gets a key but no one knows everyone else is key so it's fully centralized and it's like an entire set of papers and how this key is derived and there's an algorithm
- 27:03
which is called during the film which provides a number of steps to derive the scheme but this joint curable algorithm is well known literature you know you need to like change lots of messages all of these guys and messages to each other so this is well known but some of this guy is as we just discussed may just this whole person don't send anything so for this joint here or think they have to be somehow punished and the punishment
- 27:41
algorithm we do through blockchain and let me explain how it goes so let's say so let's say someone comes some someone comes to us you know Network and the problem comes and these are reminders you know the servers they're getting paid someone comes to us and says I want like a 50 server blockchain so please using our token it will be like randomly 0.50 guys here and we're supposed to run a blockchain with the city guys but each of those 50 guys is
- 28:20
to get this key it's like super key for us this key which uses dictation and the way it's on our case is that on the main map of the ethereum mainnet here there is something which you already yeah smart contract so all these protocols enjoy the development all these messages that like send to you they don't actually they're not these guys don't send to each other directly but they
- 28:46
send them through this onset so the indicator contract why because we punish them for just doing nothing right so we give them like you know 10 minutes so and tell them okay guys you have the minutes or to exchange messages using dkg and if each of them says the correct message there is a verification procedure so each of them follows the protocol everything it's fine the keys are derived then they're super happy if on the expiration of this
- 29:19
10 minutes one of them is a sense in invert message which doesn't pass purification or doesn't send anything at all a particular step we just stop the protocol and punish the particular node essentially people charge mine you don't really know how much but let's say the counting box and then you restart again so pretty much if I just run around these guys on ethereum constantly I can pretty much just flash all of them and
- 29:50
pretty much postpone this for a while for 10 minutes I mean this is doable um so but this will require you to spend money yeah right I mean this is an attack right like like I'm trying to pretty much somebody requested this chain like a custom chain um for something right they are waiting for it right right so you are going to feel like increase the gas price the entire blue yeah like how I mean depending how they use how they Define the gas price for the transactions I'm assuming they don't
- 30:39
want to pay that much right because I'm assuming this is a lot of messages for EKG now let's uh you know and the typical pay scale my skill for this is that you know each of those guys will fake so the typical thinking we don't know exactly how much is going to be but we're going to assuming like five thousand dollars uh so this like this day five thousand dollars the typical amount uh the
- 31:09
typical amount they're going to get it at each month like from uh money maybe like several hundred dollars 500 bucks I'm not gonna get more answers less people yes I'll talk about this I'll tell you about economics but let's say five times yeah so so you know to from them and if we see this problem I think differently we can either increase the time or they can pay more it's it's a problem but for the first
- 31:43
version of the network not such a you know so how many messages do you need for education so for tkg uh typically each of them sends a message to each each other so 350 is uh each each transactions yeah it's actually going to be one transaction it's just you know they would actually put the transaction with many messages what is the difference no it might be a bit of a problem for the first but we'll see how it goes this this part so that's the
- 32:16
decades now coming back to your question about the bounty let's say our market capitalization is 100 billion dollars right 2.75 means 2.75 million dollars so if I have thousand servers all of them functions well 2.7 k pure few years uh so so yeah so so this naturally adjusts the number of servers in our natural because when the number of servers goes up yeah each of them gets
- 33:19
yes and at some point it becomes not not economic uh to not take economic to actually you know to join the network so that is currently they can't so if you look at the Bitcoin or ethereum you always see that in a network original initial stage where the network network is under loaded and most of the miners are getting paid by this by this inflation when the network gets loaded at some point their transaction fees
- 33:52
which are becoming not zero and the hope is that when the equilibrium is arrived many years after at some point the inflation goes to zero it's half every six years and at some point let's become self-sustainable paid for this transaction fees so that's pretty much what we do like many other people follow this so that's that's the economics on this question so pretty much but let's say we're 21.
- 34:19
folks that are monitoring your specific Health right so for us it's actually beneficial to all can do it and keep you out as a system because we'll get more money right like for that specific month uh it's uh true but for the most part they won't care because see to kick you out the potential game they have is very small right which you have like a thousand more Network and you select 21 of them yeah if you pick one
- 34:54
up well no don't you know it kind of increase marginally the Bounty there's a very little uh deal and but what we see at this point is that well all these miners I want to be like this generalized mining guys and most of them are gonna have pretty significant preparation uh they're going to have lots of Serial research community and I think but that's a very important question I think at some point but I mean let's assume we have less than one-third of malicious right so we have 333 servers let's say
- 35:28
are run by a single entity for simplification then they have I mean statistically they'll have a like they'll monitor a lot of things right so this will be more than 100 other notes so they can kick out 100 nodes per month and then this is goes to 900 and they now control more than 1 30. and then they can like start actually affecting Randomness so like even up to one month of us just kicking out excuse servers we can actually start
- 36:00
affecting the random VLS and GG right now but actually is but uh you know all the systems if you look at them are there different Security Options right there's like external adopters some can someone can do you know Assurance computer systems there is like other abilities someone like find a hole in your software there's this Insider thing that you see but when this networks like
- 36:24
become realistic some of the attacks you cannot like potentially fix all of the small things from the beginning because the systems are complex and if you just try to fix everything you will just be able system becomes too complex so I think us and life peer maybe you guys everyone is creating this like newer generation networks with lots of servers you kind of solve the problem what is getting free like I mean it's true it's just we
- 36:59
need to be clear what are the Traders so you start with something and you I do it so I think an answer to all of those questions it's like a little startup technology where you start something with something simple you see what the important problems are you kind of fix them and so because that means that you have to have very important community and governance in your system you should be able to react to to and in our system because at this at
- 37:33
this point when you said it for the security response team that's a lot of people that have a security response team which is going to be decentralized yes Security Experts selected or elected by community and the security team will have ability to at some point stop an exchange because you could have anything you know you guaranteed against like for instance security vulnerabilities you can wake up and just exchange can be down so uh there will be a directional process
- 38:02
which we are still thinking about but a simple model is that let's say you wake up and your sgm is compromised so the SG owner votes yes we compromised and that the security response team will accept this and also says yes they've been compromised and then and then they decide how how to roll back the chain and they decide to come on points in time to which your stream this chain is rolled back and this is kind of diverse scenario but my feeling is that you have
- 38:34
to use this kind of face to change you have to have scenarios like this because like there's no way to like to do like an AI to prevent against all the security problems right so you to be like a kind of modest in the sense that you will accept the faith that you can become from my system you know you have to find some reasonable way to to solve this problem so I think that's pretty much the great the solution we arrived
- 38:58
at the moment but this part um yeah so I think I can also tell you a little bit about our consensus if sure yeah yeah I just wanted to finish this actually how do people become validators and how does this two two-way communication happens so how they become literous everything in our network is based on this dkg and BLS that you discussed so when there's a need to create a new SG in all of the nodes in the existing chain they assign the BLS
- 39:32
signature and this BLD signature becomes the random number field which is used to randomly pick a certain number of nodes from a network and that becomes Elemental I meant how does new validator become like how I have a server around f5000 how do they become part of this yeah so this paper is like so you buy a server yeah and then you have to have also this deposit so you buy applicants and your state parks
- 40:06
exactly and that's actually one of the kind of decisions you made was that to simplify our Network all of our management stuff happens actually on the Ethereal mind so all of these Bounty payments no the addition removal all is implemented through smart contracts of the main net so you know registers the or using our erc20 token on the main net you deposit this token and if you become part of the system but originally didn't have any experience running on you and then and then but you still pay bonds you'll pay
- 40:39
Bounty number three you visit reload it or not but then at some point some idea of developer comes and says everyone and you're getting randomly picked and then now you can you start serving in this chain and an interesting thing in our case is that we provide also a cheap exchange for developers let's say you don't want lots of performance right we run our stuff on Docker containers I'm a single server can run up 128 tiny buffer containers very good timing
- 41:11
chains so essentially on each server you only run 128 so full resources such as CPU and storage and then this these things this data containers are joined into a blockchain which is not so much of a performance blockchain but it's going to be very cheap because I want to make sure we're essentially like usually like 120 so that's really a question which we like thinking a lot right so so what we have now on this video definitely we
- 41:52
have the main layout which functions well but is expensive what you want to have is right and when it becomes like an AWS and sounds or like internet in the sense that every chain becomes like a server in the old language and serves a particular application so regular internet like you have like a hotel the e-commerce site you have a hotel server and then you have Airline you have Airline servers
- 42:21
you have this logical things and you have this loose coupling between different servers in a sense that typically an internet service talk to each other through apis so the hotel server holds this home API the airline server and Airlines back so what is this kind of lose capital in architecture and we decided in our system to implement this loose Cup in architecture so all of our stuff is implemented using messages smart contracts on each Network the validity smart contracts can talk to each other
- 42:56
send a message so in particular when this SG wants to send a message to the main net all not all but again servers on the SG sign particular message and the message you have an agent which relays this message to the main net or is the agent work and the way the Asians work is that actually on every each of those servers there's a copy of the agent and there is a time maybe like five seconds let's see 10 seconds right so in the round robit
- 43:34
fashion at least on the first version of our Network each of them gets to be real here so if this guy is built and I mean but the message is sent from this place that place it is originally sent by it's like a smart contracts like a proxy smart contract in this map so actually the message is trust in the smart contract here and then it's signed but now someone has to relate it to the
- 43:59
smartphone to this proxy smart contract so this guy is supposed to relate let's say this guy's bed like 10 seconds after this guy she's well okay this guy was supposed to relay things he didn't release things but this guy away he seems like around Robin fashion in which all of those guys at some point get to the early heirs so on average you even have some of them a bit and don't really
- 44:24
you'll get a message straight okay not surface as things inside but for the most part the messaging is going to is used in our case for uh transferring tokens so you pretty much you freeze the token the main map this smart contract creates sends a message to a Smart contract on this session is created so this message on the main net these guys can just verify very in a regularization way to verify the state route of Brazilian Room and so it's actually first in the smart
- 45:01
contract here and then this guy verifies the state route and the cases this message to to the smart concept of this network I mean this it means the external person could send who wants to send the token he actually like like after block included he sent it here let me give you an example so uh so this like on this nail we have this proxy smart Contract Processing sure and there's a proxy smart contract
- 45:40
on this snap and there is a smart contract Fender right here yeah I mean he's outside in this case it's just a smart contract let's say this Smartphone chart on this network once and there's like another smart contract on this minute so this guy sends a message over to this program here this is right here it's not gonna don't send a message person or authorized transaction like this yeah so ultimately there's a user yeah usually
- 46:12
uh and the user it could be also a user could be a smartphone sir could be user but what one of them sends a message I'm actually uh it could be different architectures but marriage architecture ideas there's also like a deposit box so bring smart contract to user sends message to that one it doesn't matter it's not so important but ultimately the message is here yeah and it used to be released this so again we have this kind
- 46:43
of round grouping situation where there's a layer and one of these guys actually really is but it actually all of them two-thirds of them confirm you you again have this to Source information so to pass the message it talks to others to certain guys creates a threshold signature and then the threshold signature is verified right so every node actually needs to run a full ethereum client just absolutely every little translucent kind and moreover you know going back and forth here actually
- 47:14
requires you to spend some easier and the way it's done the owner of this gear paused to maintain this account it shouldn't be zero where this either should ER should be in raised and then it's up to the owner of the how to read mirrors maybe ask users to pay or you know someone has to pay this guest quotes and you know this type of this kind of DLS even truly is also used by deflimiting like and also I I think full conduct also uses this kind of threshold
- 47:52
signature based like messaging the idea is that the spiritual that depends on everything is calculated Inside by two serums because so the security model as you see again that if one series of the guys become malicious the problem so all of these people stake systems have this natural I mean the question is how easy it is to get one third right differently that's that's really a professional thing that will that people will learn
- 48:22
and when the first generation of the networks will be released people will see how uh important this problem is it might be and there are different discussions it may be some kind of reputation because what you want to do for those sidechains and not only for even like a for Life peer if any like utility Network you want to keep be able to keep the number of bad guys small because if
- 48:48
you have many bad guys no mathematical algorithms can help so maybe this can be done through us through reputation maybe through governance so at some point there will be some kind of way to enforce this and it's a very important question in this industry uh that's actually the thing everyone is going on uh uh yeah okay go to address okay so that's the the this part and let me how much time yeah yeah I'm late we're not talking about here
- 49:20
yeah okay there's a black thing is pretty bad okay so so let me just go into what you found we'll tell you guys a little bit about fancy sauce sure so it's kind of a very interesting subject because um we have lots of massive petitions and are like the company and we're really interested not only kind of a theoretical not only practical application of that but also in theory how does it kind of connect mathematics and usually
- 49:58
in mathematics you kind of understand things they tend to be simplified so we were like looking for like a simplified framework to understand how what this consensus the same is you know how is it getting used and to find some kind of a logical pre-working in our brain how we can understand this because otherwise you see like these people are doing this Concepts that people are doing that
- 50:22
Concepts it's like a zoo of different consensuses everyone says like because they have the best consensus and like you know it's like becomes like really special people talking to each other so so we designed this favor which is a simple framework I mean what's a typical like consensus what are the typical steps or the consensus and what the consensus is and so we're like talking about classic consensus in a classic consensus you supposed to like you have multiple modes right
- 50:53
and really what you hear is a little close known this is blockchain so for instance it's like blockchain here and the blockchain is kind of composed it's kind of a glued together transactions and so you have this one two three four like transactions and they which are like blocks actually they so they added to the end of the blockchain box but really what you want to hear is that or any water tracker doesn't want you to have is that all of these chains
- 51:25
kind of are identical with the only exception of network device so I make here for instance like a longer chain here like three four five and only four transactions here but the parts which are the same on this node and on this node has have to be the same so it's not very cheap that the chain grows exactly exactly the same time whenever and all but them to be the same the attacker wants
- 52:00
them to be different and that's like the entire business of blockchain is about that and so so what what you typically have no matter what protocol you use like tender meat for instance like our friend like Zaki that you guys interview tender meal or like divinity or like algorithm or all these people actually conception is the same like small differences so you have steps and what steps do you have okay the first step number one
- 52:30
you it's it's a submission typically you have users like submitting transactions like okay yeah so sleeping in transactions your network so you have the submission the users like you you have lots of them they don't like I'm gonna be like you know Cooperative so they typically have your network and they're like throwing transactions on your network and so when they throw them you have some type of a painting to you
- 53:03
know somehow these transactions they don't actually go on into blockchain right away there was some kind of stored somewhere and they hope to be included so you have the spiking here and then next step someone has to create this out of this chaos someone has to pray like a block candidate or maybe block candidates because you might have multiple book proposals at the same time you may have a single book proposal so you have this book proposal stage yeah
- 53:35
and whatever your algorithm is is you may have one look proposal at a time like an EOS with a fireball proposers could be of all kinds of bridge but someone has proposed proposed books now this this another important thing uh which is called Data I will deal with here and this is really like important Council many of them one of them and at some point this book may win winning means that it makes you get committed to the
- 54:16
end of the chain and it kind of transforms from the book proposal to the blogfish everyone is supposed to hear if I'm a bad guy and I somehow managed to not to send a bold proposer or to one of the good guys this good guy is gonna he's gonna get stuck so what I would want to have as a bad guy is to somehow propose everyone like accepts my proposal maybe I'll have to set the entire block at the face of the block so
- 54:45
I said I they accept the proposal and then one everyone's everyone says okay you know we accept this block I say okay and I'm not gonna give this book to anyone and that is everything is so so so so so because of that if someone proposes you have to somehow grantee datability and there could be different methods but this step has to be there and and so after that there's a fixed step which is that's called consensus in
- 55:16
some generalized cells right and this consensus means that okay you may have this and at this point still multiple book proposals but now you know that all of them are data available or you can use the term C they are safe and so what means they are safe is that at least one good guy has the cut loaded because if I am a good guy I have a capital a particular book proposal I can do always
- 55:41
give it to some other good guy so the data availability proposal means that the mathematics has to guarantee that after this step for every book proposal which is deemed safe and goes further before the steps at least one guy has this proposal so that there is consensus and this kind of a where you know you may still have multiple safe proposals somehow you have to select which of them wins and then somehow select each other wins and then
- 56:10
it's kind of a finalization step this where like the proposal repeating one is connected uh committed to the end of the chain if I'm a good guy but I don't have a copy of it I ask around or other good guys and because I know it's safe so I'm able to pull it so this this finalization is there but the proposal is added to the chain also means that there will be no other block that will be replaced exactly not
- 56:41
as it looks right so you have to also the little bit of a block you have to guarantee also that one SQL proposal only um I could send one proposal of one guy another guy so so this is kind of framework you can use this framework you know you can like look at tender units for instance and actually the state machine which is inside tender means you can somehow ripped to this conversion or framework you can take algorithm and map it and
- 57:15
then it kind of becomes easier for you because you can take a look at the particular product or whatever you say okay what are the six steps and how like conceptually and high levels is is achieved now let's go back to our protocol so the important thing is data about so in our protocol if I'm a proposal I want to propose a book and they make it the way it works is that I if I proposal I have to send my book to everyone right but some of the bad guys may decide to do not to accept
- 57:48
it so I cannot like guarantee that everyone will like take my book so what I do is I'm I'm in Pearl parallel trying to send my blood proposal to all models in the network but once I uploaded the proposal to uh two-thirds of the nodes I cannot wait anymore because the other guys who might not accept so so I wait so each time I upload a book proposal I get a piece of a threshold signature so as a result of this data I will ability step
- 58:24
I have a threshold signature which assists the uh that I did upload my proposal to two over three and all right so yeah is there one of the proposal in your case so this protocol works for multiple proposers one proposal everyone who did a proposer depending on how many proposers uh it takes more computation and more Network there is a version where everyone has a proposal and
- 58:56
there's a there's a lot some great fairness uh about this person where everyone proposes the bad guys cannot really change things but but really the critical thing is having this data data availability receipt now Assurance the type I'm ever again I uploaded my proposal to Sir two-thirds of the nodes and then I'm actually broadcasting this proof to ever again to everyone in the network so people have everybody sitting I'm not playing football so I'm just sitting in the network and I'm seeing what's going
- 59:29
on someone sends me a proposal but also sends me a proof the not only I got this proposal but it's all but also to sorts of other people that's so there's a mechanic like that and this this proof verifies to me that this proposal is safe so then I vote one if for a particular proposal if it's safe if I can prove that it's safe and I can proof it's safe because I have an instructional scene so it looks
- 1:00:01
like this algorithm which kind of explained at high level but the idea is that I vote one for a particular proposal only if I prove to myself that it's safe it's all Easier by me or by at least one honest guy right so I wrote one in this case and I wrote zero if I don't have a proof like that so so then you have then at this point you have a particular proposal you have every every note votes is a zero or one
- 1:00:33
and then an algorithm happens which is called binary consensus the binary consensus collect zillions of algorithms right but you don't have binary if you have multiple blood proposers you actually have zero one on all of them so so for each work proposal yeah you run for for each if you have five proposal proposers you actually have a vector okay of five so you hold zero once we
- 1:00:58
shoot them and that's how like honey which reverse that's how we work so you end up running in this in this example like five binary consensus of algorithms and then you have this final name it's a synchronous binary concerns and also synchronous biological it's like the entire zone of them but the point is that what you do you you run a consensus on each of them and five consensus is complete and they have what zero one and if at least one princess was returned one you can commit
- 1:01:32
but you could hesitation where for several results you return one so you could actually commit any of them there has to be just some deterministic procedure to commit like let's say four of them at once and you use a BLS signature Randomness to decide the priority if there are four ones which book proposal wins so there is also this type of game and this is something which we do something that honey badger does some of this uh blockchain at University of Sydney in Australia also this have
- 1:02:04
played with this Vector so it's interesting now the last thing I'm going to team you guys in a very simple way what a primary consensus is and this entire I think conversational invitation to look at those things because some of these algorithms are very involved it's hardly to go into every detail but I hope at least you get the feeling you know how it works just before you do that
- 1:02:30
is uh there's no preset there is like maximum size of a block but uh the group proposal happened in this video that you have this 15 seconds time relation time so you wait 17 seconds whatever you get in your painting if you like you might make a put proposal don't have anything like that in our case is that I'm an old a just committed a particular block and I immediately drew a proposal for the next block so they're like lots of different policies or algories of the
- 1:03:12
greedy algorithm is that I take whatever I have my painting Fuel and all of this stuff like trying to like to increase this report my the entire thing in my painting queue becomes the proposal but this has to be somehow limited so we can say okay it has to be like less than a megabyte or 10 megabyte so glad you're out of the blocks the faster is overall throughput of the chain because well I mean the networking profit will be huge right because you know you want to send
- 1:03:39
it to everybody pretty much this is also another very interesting set of algorithms that you could use So when you say the proposal uh you have the spelling views right so you kind of assume the like apps and network delays pending queues on each of the nodes kind of look the same most like major transactional filters yeah so you get lots of facilities you can like first for instance like in the like are for saturation the way it would do it the proposal is Revolution transactions
- 1:04:17
it could caches with the transactions it becomes more so I push proposal the guy who does the inside sees okay I have all those hashes so it reconstructs proposals for patients if there's a missing hashes it talks back to this guy the stored guy and get the missing transactions these algorithms we don't do this now but could be actually even taken even deeper because if you think how this goes typically when you use
- 1:04:51
um on each node they look very much the same so you have to do that difference so you have all the sellers totally so you have all of the algorithms related to kind of how if you have two things which are actually almost the same what amount of information you get a place between the two entities to for the destination entity to reconstrate so this entire life kind of potential for this this part um now let me go really fast into the upbusting into binary consensus just to
- 1:05:21
give you guys a feeling what the binary consensus is um so binary consensus it was like a very interesting mathematical topic and like some people call it Byzantine General's problem and stuff and the classical mathematical problem is that it's like let's let's maybe it's a ball you know it's a castle wall and like two gates like game number one and gate number two and you have like like M generals like it's like it's Army
- 1:05:54
the arm is like a number of generals and then because like mixed point in there is to decide do we attack here on this wall on this skate over attack here on this game and we assume that that out of the generals you know most of them are really smart people and there's a one like crazy guy or bad guy or Byzantine guy right so so some of them like all the good guys like you know they look at this this particular situation and maybe
- 1:06:26
one of them thinks okay you can attack here and another one makes a decision you can attack here but what's important that all like in the morning all of the armies attack one of the gates because if some of the soldiers goes he go here and some of them go here they may lose but people of them like concentrate their in one single place then they will win so so you have this thing where
- 1:06:50
initially each generals let's say zero is getting left gate and one is right right each of them independently decides I would attack here right so we should then plug 0 1 1 0 1 0 0 and the crazy guy may also decide something but this is this crazy guy is totally crazy right now you may assume that his decision is totally illogical and he can during the protocols the method message exchange you she can send any messages wrong
- 1:07:23
messages correct messages actually a randomly a random guy is the same as Byzantine a malicious guy because right but if you want if you want to predict against all of the actions of the random guy you may assume that just by the very Randomness the random guy might just read publishing rate a malicious strategy so actually all the proofs actually assume they got the random in
- 1:08:05
the same way like a month you can like print like a Shakespeare the random guys totally random guy if you prove that any Randomness results in consensus maliciousness there's one of these guys are right now so what what you want to hear do you want that kind of subject changing messages calling each other and you want to have several things first of all at the end of this protocol you want the all of them how to the same to the consensus to the same kind of decision
- 1:08:39
is of the zero left eight or one write it and and then next morning each of them will attracts again so first of all here's to become census zero level one only and its consensus has to be solved the throughout all of the good guys but then there's another very important property if initially all all of the good guys all of them decide one the result should be one she has a none of them decide zero and you don't know maybe they write the zero Gain Is Not Safe maybe the reason why
- 1:09:18
they decided one because the kids see that this other gate is like so strong you can't actually bro basically so if all of One it has to Output one yeah and initiative all of the good guys say zero it it has to be zero and this is kind of the entire this decision consensus thing now if we pick now this ones and zeros and just to give you guys a feeling remember uh notice one is zero one means that the proposal is safe and zero is unsafe so if all all of the good guys say that
- 1:09:58
the proposal is unsafe this means that uh that no one has a proof that it's data available so it should be zero and tailed you cannot select this proposal for consensus so if all of the good guys initially zero has to be zero and this effect is not so important but what's important about the consensus if all of the good guys say this proposal is unsafe you shouldn't and because otherwise so now you see that you know
- 1:10:27
this General's problem has a direct kind of map into the proposal whether it being safe and also this is algorithms there are lots of different versions of this algorithms and the literature some use cryptographies and don't use cryptography we use a particular version which comes from a group in France this professor his name is mustafi I think that's how it's painted you guys can Google frame I and you can Google high temperature
- 1:11:00
paper and honey badger paper because honey badger also uses this is also reference this it's very nice consensus but yeah that's something we use because it's pretty fast in Syria we could take this with the power consensus details but this Empire but then what they forgot to tell you is that there's actually a very interesting mathematical proof that the even like if one General is bad there's no digimonistic algorithm that solves consensus
- 1:11:31
so there has to be some Randomness in consensus so if everything is deterministic the white guy always has a strategy to put the consensus to Israel not never stop or output different values on different sites so that's very interesting CRM it actually can be explained but maybe not today but it is actually a pretty pretty simple explanation and we are planning to publish a blog post you know simplifying
- 1:11:56
like how the serum was right it's interesting saying that the consensus requires some randomness and without those things about consensus is the consensus assume some type of a network model so this generals or the servers The Exchange messages so the question is what's the quality of this network and there are different General control networks exactly so and there are all kinds of things so all kinds of development questions and I think yeah
- 1:12:26
there's all kinds of things that uh there's a lot of consensus to study yeah um one question I have is given you actually have like as a book proposal right if you're collecting parts of signatures first people you just choose the thing at the end you actually have a aggregated signature which is a proof that two-thirds right so pretty much just saying like why everyone inviting consensus on top of it like if you have already proves to
- 1:13:00
share so just because one third isn't any malicious and they like right too yeah so this is a very interesting question and this entire like something it's a little reminder opening so me personally it took some time to kind of go into this kind of understanding like this very interesting mathematics so let's see you have a proof that this book proposal is safe you could like say okay you could commit it to the to your blockchain well there
- 1:13:31
could be another good guy and the bad guys could have intentionally this help the truths from the good guy so this other good guy doesn't have improved so you when you commit a Blog you you you shouldn't only know that this is safe but you should know that all other good guys know shall be the same but in this case so let's let's say in this two cases right there's a good guy who uh who is a blood proposal in this case he collected to
- 1:14:03
search which means at least one third of those two shirts is good guys okay I should say right so they will distribute it right totally uh and then there's a case where the bad guys is who who proposing a lot right so for him to show a aggregator to say signature he also needs to show it to one surgery a good case totally so this guy's watching students right so if you have one block
- 1:14:27
refers please and this work proposal connected to search signatures it is like we don't need to run it as a binary consensus proposal uh then he has the receipt but he was helpful and he sells the receipt to all of the honest guys except one so all of these honored guys but then there is this other yes to others and but then uh and then if they broadcast it then you have another level of uh you have to have a budget right the problem is if they broadcast it you
- 1:15:26
have to deal there's like entire another swarm of worms because you're getting broadcast you don't know if the broadcast you're getting coming from you can just hear the broadcast so there are lots of things which you think it's easy and the consensus kind of this potential Infinity stops because it what consensus tells you it's not only that this is safe but that every good guy knows this is safe and this is kind of a logical step which is very counter intuitive and
- 1:15:57
like I kind of spend like my entire life in mathematics like AI like machine learning this and that this is kind of one of the most strange Parts all these asynchronous things and you kind of have to take time to kind of move your mind and it is then you're going through like exactly the same things which I was going like trying to understand this stuff and I think I I understood this but it would be like even like six months like even through
- 1:16:27
literature but let's break the thing and I assuming uh suggest you guys you can find the there's a honey badger people it's like lots of references written this paper of mustafari which is signed in the honey badger paper and then from that you can like go and there are all kinds of Concepts algories like this is really interesting but what is great for us we are like using this stuff so even
- 1:16:58
though we're not like super experts in consensus if we take this mathematical papers and Implement them as 200 the papers and also if you understand at least you know the concepts we know that it's secure so we can build our security Pools by kind of referring this classic but this is very very interesting subject sorry we're out of time so thank you thank you very much please leave your comments and feedback on the video okay guys if you
- 1:17:31
have any questions you can also send it to Ilya and I'll be able to answer