Quantifying Decentralization - Balaji Srinivasan | Silicon Valley Ethereum Meetup
Silicon Valley Ethereum Meetup Talks · 19 Sept 2017 · 25:15
Balaji Srinivasan presents an approach to quantifying how decentralized a blockchain network really is, rather than treating decentralization as a slogan. The talk asks how to measure a system in terms of how many independent parties it would take to compromise it. It was recorded at the Silicon Valley Ethereum Meetup in September 2017.
Speakers
Topics
From Silicon Valley Ethereum Meetup Talks, hosted by Silicon Valley Ethereum Meetup.
Transcript
let's get started so our first speaker is Balaji sooner Vossen Balaji is the founder and CEO of 21 ko he's also a partner partner at the recent Horowitz and I have to say I had the great pleasure of teaching our crypto class our Sura a crypto currency class with Balaji who actually helped a great deal with the lab for the class so Balaji looking forward to you talk okay does that work all right great okay so today I'm gonna talk to you guys about is basically this idea of quantifying decentralization so just by show of hands which of you guys were at the
block stack summit in July okay only a smattering okay so it's good so some of this will be you know overlapping with that but there's also a fair amount of new content and so you know Dan was kind of intro me that's me in a suit only picture ever taken and so basically I'm actually a Stanford lifer you know almost 20 years ago I was an undergrad moving into one of these dorms and now I'm running 21 CEO and we're gonna talk about today are basically three things so most of it is going to be about the motivation behind a simple metric for quantifying decentralization and at the end i've got funding for anybody who's a developer who wants to build a
decentralized dashboard we've got a great domain name at decentralized comm and so if anybody actually wants to code that I can provide some funding and you know basically you can implement some of the ideas in here to make a real-time dashboard across coins to look at these decentralization metrics and third we've got a new token and it's not ICO you can just go and sign up for it at social token calm and basically idea is this also partially redresses some of the issues that I bring up in point one okay so further ado basically when we think about decentralization this something that everybody talks about endlessly in fact it's something where you know everyone's gonna say it's important and in fact is the most important property of block changes of posts traditional databases but in order to say that something is more or less decentralized
you need to have a quantitative metric so just establish that you know everyone agrees that decentralization is important here Satoshi is lon of Bitcoin actually it's like me about a month or so afterwards but you know in the second sentence he says you know the unique selling point of Bitcoin the attribute is it's completely decentralized right nick szabo says you know it's what allows bitcoin student army of computers Vitalik you know was right here said you know it's viewed as a blockchains entire raison d'être but one of the word says perhaps to find the most poorly and adam ludwig who's a chain CEO says with a very related thing on Censorship resistance that decentralized eps anomaly better they're arguably the only solution for certain kind of application everybody kind of agrees that this
concept of decentralization is important and that it's a key feature that distinguishes blockchains from centralized databases and so the thing is that it would be really useful to have even an imperfect measure with which to quantify decentralization as I'll show later in the talk imperfect measures of performance have allowed us to improve programming languages imperfect measures of what is a hot dog or not a hot dog have allowed us to develop apps like in Silicon Valley and in fact the entire field of machine learning you know feature ization is an imperfect quantification of something the thing is that if you can quantify something even if imperfectly once you can measure it you can say okay this improvement or that improvement increased the value of this function and then you can actually plug that into an optimization algorithm you know many of
you guys here you know if you're a stanford students you've taken convex optimization but basically optimization requires a so called loss function something that actually measures the property of something so if you want to design an optimally decentralized system you need to actually have some kind of quantification of what decentralization is okay this is a kind of motivation people think it's important and that if you could quantify it it would unlock a whole body of mathematical tools that you could then apply to the situation which would hold even if that quantification was imperfect okay so to get there to get to a quantification we're gonna just introduce a few concepts so first is this idea of the so-called Lorenz curve now this is something you've probably heard about maybe from economics Lorenz curve or the Gini coefficient it's used by economists to measure inequality and the idea is
that inequality of money and centralization of power are actually similar sorts of ideas right so let's just review these two two ideas right so um with the Lorenz curve basically it goes from the concept of perfect equality where everybody has exactly the same amount of something let's say it's aetherium or theory mining capability or you know commits to a code base if everybody was exactly equal and they all had you know one Bitcoin all you know 7 billion people which is not actually possible then you'd have a perfect equality like this where it just it just basically be a straight line whereas if you a total inequality only one person has everything and everybody else has nothing okay and so this is this concept of the Lorenz curve which is basically
this this you know this graph and the Gini coefficient is essentially a measure of how concentrated Lorenz curve is it's zero when you're complete equal and it's one when you're completely unequal and these are kind of two examples along that continue and so so that's concept everyone now concept number two is that we can take a decentralized system break it up into subsystems and measure Lorenz and Gini coefficients for each one now I want to be absolutely clear the subsystems I'm about to show these are for illustrative purposes only I don't argue that they are the only ways you can decompose these things and the data is from July 2017 I will do an update of this actually I've got some funding for somebody wants to make a real-time dashboard of it so with those two caveats let's let's take a look at these decentralized subsystems the basic idea
is that you can take a public blockchain and you can enumerate a set of essential subsystems for example again just for illustrative purposes let's say that we say there's these six essential subsystems right so mining you know that is to say the distribution of block rewards across miners the different clients and you know how they're distributed in production across you know nodes that you know you can actually see you know what percentage of shares owned by different code bases developers and so within let's say the most popular repository Bitcoin core or GAAP what is the distribution of commits exchanges and you could see kind of what the distribution of volume is is it all focused in one exchange or is it spread out nodes by country and then ownership by addresses right these are just
examples of subsystems and then for each of these what we can do is we can calculate Lorenz curves and Gini coefficients right so you know if we take the last 24 hours of Bitcoin mining it's actually fairly spread out and a bunch of different folks have earned some and so this actually has a relatively low Gini coefficient it was intact that centralized at the time that we measured this client decentralization most Bitcoin clients are running Bitcoin core there's some that are running you know ABC or you know beacon unlimited or what-have-you developer centralization so by commits to core basically the idea is you know okay how many commits do the first developer have the the second most commits or the occurrence for the second most intriguing developer and so on
that's actually fairly concentrated not as much as as clients I can also do this for exchanges and for nodes and for owners so we can say okay you know across exchanges what is the distribution and share of 24-hour daily volume you know across countries how many nodes are in each country the US and China and what-have-you and across owners how much is held per address given that we imposed some threshold and it's actually important given that most people in the world have zero BTC or zero etherium unless you impose a threshold this is just gonna trivially be 0.99 and I'll return to that point later but given a threshold you know what is that corner decentralization look like we can calculate these curves also for aetherium right so you know mining decentralization theorem again
just over a 24-hour period client decentralization and dev decentralization so there's a lot of you know the top two people you know in Gap have actually contributed a very large percentage of the code exchange decentralization you know like again volume across exchanges note decentralization across countries and owner decentralization okay so this gives some sense of giving these this choice of subsystems this choice of metrics how centralized they are but in the idea here is that we could take a maximum over these and say a decentralized system is only as decentralized as its least decentralized subsystem and the the reason for this just to understand is there's like a decentralization bottleneck right if everything else is decentralized but you
have one component that centralized the system is centralized because you can then go and grab that bottleneck so as an example if we just take a table like this it doesn't matter in this particular circumstance that you know Bitcoin was highly decentralized in terms of blocker over the past point four hours if you could just compromise a particular client you know then this is the most centralized row in that table that's to say you know the number one it's like the most centralized you know component again by this measure and the other metrics wouldn't matter as much because if one portion is centralized the whole thing is centralized now one can object to the Gini coefficient cuz don't you think doesn't really give mechanistic insight into what you have to compromise so we have a modification of it that we call the minimum nakamoto
coefficient but and the idea here is you know basically to go back to the Lorenz curve and say okay what if we do something that's a little bit more intuitive and we say ok how many entities do we need to compromise to get to 51% so we call to nakamoto coefficient you know motivated by the concept of the 51% attack in Bitcoin mining and of course you know in any given subsystem you might need to compromise more or less than 51% to compromise that that subsystem but the idea here is that we can again go back to each of these graphs we can say okay you know the nakamoto coefficient is 4 in order to compromise Bitcoin mining you need to take the top 4 miners and compromise them to get 51% but you only need to compromise one client in order
to get more than 50 of our percent of of nodes but you have to compromise 5 devs to get more than 51% of commits and so on right and 51% is an arbitrary number outside the context of mining you could change that that threshold but this starts to give a sense of how many entities you need to compromise in order to get past 51% and we can do this across exchanges and nodes and owners and we can also do this for aetherium right then we can say ok you know two miners in this 24 hour period you know mined most you know more than 51% of the etherium and again in this particular 24 hour period and when we do all this and we towed it all up we can look at these tables across Bitcoin in theory I mean we can start to see ok you
know holders at least by you know this metric are actually relatively decentralized but you know the clients are actually fairly centralized in the sense that the most popular client has a very large market share across nodes now all these things are subject to change over time I'd like to get a real-time dashboard together so you know if you measure this today it may be slightly different and what-have-you but the general concept here of using benchmarks to identify decentralization bottleneck is I think a useful and valuable one now there's obvious objections and I want to right ahead some of those off of the past right so first the choice of subsystems matters a great deal second you might not consider all subsystems important and third a very important question is these kinds of
measurements mean anything do they actually relate to concrete attacks or is just you know kind of fooling around and so just kind of numerating those you know to discuss those obvious objections so for example one point that Vitalik brought up is if you measure get versus parity versus swarm those are actually you know especially getting parody or like you know independent code base is completely independent code bases whereas if you look at the top bitcoin clients well you know the conan limited and you know ABC and so on are basically Forks of the bitcoin core code base they're not full clean reimplementation z-- like btcd or what-have-you it turns out the most popular clients in the Bitcoin ecosystem our Forks right so you can argue that those aren't actually truly independent code bases and because of that then you know it's more likely
there's gonna be a shared bug across these there's gonna be a shared book across captain Perry right okay so you want to define your subsystems carefully and you could modify the metrics that I chose that's why I said they're ill astray t'v they're not you know meant to be definitive just to show the general idea the second objection you might make is you could say certain subsystems just don't matter to you right so for example Satoshi you know famously back in 2010 he said you know I don't believe a second compatible implementation Bitcoin will ever be a good idea right so he would say it doesn't matter deb-deb centralization client centralization doesn't matter but he does care about 51% tech at least at that time and then third is you know subsystems you'd want them to map to attacks so basically if you have 25%
compromised of mining that might be more serious than 25% compromised of accounts because you've got excute for example a selfish mining attack if that attack is feasible right and so when we just sort of respond to all of these collectively is if you enumerate hypothesized attack types then you can choose your subsystems accordingly and then measure the decentralization of each one by something like the Nakamoto coefficient so you know for example let's say that you you know are looking at the news and maybe you know country X mine eyes or even acquire mining companies right in that case you'd want to measure the hash rate of cross countries and make sure your system was robust to an attempt to you know China action nationalization of mining another example is if you expect the attack that
you're looking at is there's a bug in one client's codebase you'd want to have market share across nodes spread out such that you know you know if there's something like the remote crash bugs and bu and become core or the parity multi-sig bug the entire ecosystem wouldn't be affected by one client it just to be clear everybody who's working on these projects they're awesome engineers and what-have-you I'm saying nothing negative about them simply that you know maybe not having all eggs in one basket may be a good idea if you if you suspect this might be an issue for the ecosystem third example so if anybody remembers in 1996 Phil's immerman was prosecuted for you know rolling out PGP so if you know only one developer is doing all the commits for
an important client well there's a history and there's a precedent for you know government prosecution or what have you of that individual so having that spread out could be good if you think this is gonna be attack an attack a fourth example one that's not even theoretical so you know a country shot sound exchanges so in this case you know like the Chinese shut down a BTCC you know kick coin and would be um you'd want to have volume measured across countries and make sure no one country has you know too much of the volume such that if that country shuts it down it can still operate in other countries right fifth example so if you've got nodes that are running on AWS or Google Cloud and they suddenly decide those nodes violate your acceptable use policy you don't want to crash the network right so you want to make sure that
you've got unique server entities that are that are serving them and in some cases for example people will dial up hundreds of nodes on you know AWS or Google cloud but that doesn't really fully add to the node count in the same way it might be able to process traffic but it's not independent control because it can all get shut down at the same time so actually having independent IPS independent role is very important if you believe this attack is a potential one and last just as an example if you have a very very unequal distribution of digital currency at some point there may be a political attack where those without digital currency vote or support seizure from those who haven't so you know many examples of this in history but a very recent one is in Venezuela you know people you know voted to reach
tree land and that really backfired NPR you know has lots of articles on this everybody at this point so that's an example of how if you believe this is a potential attack in the future you would want to actually you know maximize decentralization in terms of ownership across individuals and again these are not you know just to show you some screenshots if you've got mining centralization than China banning the co executives from leaving the country that's a feasible attack if you've got clients centralization then you know the Bitcoin core or the be you or the Paradis multi-sig you know tax would be bad if you've got dev centralization like this Zimmermann you know prosecution of Phil Zimmermann then you know you don't want to have only one Deb who has a knowledge to modify the code base exchange centralization you know if
it was all centralized in China we would be in big trouble fortunately it's not theirs Japan and there's you know the US and others um you know this guy got his account to shut down randomly by Google so you really would not want Google or Amazon to be able to flip a switch and be able to turn off all nodes and you know as an example of how holder centralization could be troublesome you know the IRS actually imposed a threshold and said anybody over twenty thousand dollars they want to investigate if they've they've done damage to a business on coinbase they're trying to just get a list of everybody right and so if that list was millions of millions of people then there would be more of a political outcry against you know this sort of thing so essentially this is how you can think
about decentralization providing resistance different kinds of attacks lead to different subsystems and measures and preach of them you can calculate a look at Nakamoto coefficient and you can say okay in the event this attack happens what is impact on the Nakamoto coefficient how how much more centralized does it become if that attack happens and how can we allocate resources to prevent that from happening so two more points and then I'll quickly finish up one thing I want to you know talk about is that even imperfect quantification can lead to useful results I don't argue that this is the final metric or or what have you but if you guys saw Silicon Valley you know the show hot dog or not hot dog is actually a very sophisticated machine learning application you wouldn't believe it right and you know so there's a great medium post and how they designed it but
one of the things just to keep in mind if you guys have ever done any machine learning is note one feature determines what a hot dog is you know when you're doing supervised learning or anything like that it's all these imperfect kinds of heuristics but collectively they start to bring this fuzzy kind of object this notion into being um a combination can give useful results similarly um if you've seen this benchmarks game this is actually you know it's very carefully phrased this website doesn't say which programming language is the fastest just like we don't say which blockchain is the most decentralized it says which programming language is a fastest on this toy benchmark and in the same way which blockchain is most decentralized on this benchmark that's kind of the thing I'd like to drive towards where we acknowledge benchmarks are flawed but a collection of benchmarks can potentially
give useful results and help us think about things finally I would say you know decentralization cannot be in my view achieved through one point alone every group of you know coin developers token developers has a different thesis on what kinds of attacks they consider reasonable or probable and so you know strengthen numbers in a lack of monoculture I think would be good so that's one of the good things about this current ICO and token and coin mania is we're getting many many different kinds of approaches each of which hopefully is robust in different ways to different types of attacks and decentralization so just a summary summarize so he proposed a simple metric of decentralization it tracks with our intuitive notions given a list of subsystems you can start with attacks get subsystems that correspond
to those tacks and then measure the nakamoto coefficient for each one and once you've got this you can start putting it in dashboards and objective functions so just in terms of what's next we're doing two things so we if any of you guys you know want to come up afterwards we'd be happy to fund a dev to do something at decentralized comm that URL doesn't resolve right now but we have it and so we'd like to get something like this benchmarks game with you know Lorenz and geni and Nakamoto coefficients for many different coins and subsystems and each person just like the benchmarks game can check off the metrics that they think of as the most important and they can use that to argue with somebody on Twitter or reddit right which is what we all love to do right and you know so so this I think will be
fun because it's something which at least starts to quantify this thing that all of us know is important and I'm not saying this is the final weight of doing it but I do think that it starts to move us in the right direction the second thing we're doing is if you go to social token we do have a new kind of token it's non ICO in fact part of the goal with this is that rather than people giving us capital for tokens they would give us labour for tokens and many many more people can you know go to a website and click some buttons then can afford to invest a thousands of dollars in a new coin um so if this works you know it would be highly decentralized by at least one measure which is the number of holders and that would protect us
against a political attack where too many people don't have digital currency and they get mad at the people who do I don't argue that it protects us against a mining attack I don't argue that it protects us against a node attack or what have you but I do think that a multitude of different approaches to protecting against attacks and decentralization is valuable and this hopefully can contribute to that so you can check that out at social token calm if you want and just go and go and sign up so um that's it you know thank you and happy to take questions when you don't for a few minutes and then maybe we do the panel yeah so that's a bell do you want to repeat the question yeah so
he said anything that has a really long tail is going to have a high Gini coefficient but it doesn't mean that it's not decentralized I would agree that and that's actually why we think this Nakamoto coefficient is starts to get you a better idea of what it is because basically the Nakamoto coefficient is more intuitive you can say it's a number of entities you need to compromise to control 51% of that subsystem that's like something you can get your head around it's like okay when you control for miners in order to control 51% hash rate or we need to control 72 people in order to have more than 50% of aetherium right that kind of thing and and that's I think easier to reason about yes sir let's take one from the other side hey thank you for doing this research is super important I've
seen a similar kind of analysis in a brain research it might be useful to look into uh if you crack open dead people's heads and look at their neural topology turns out that bell curve neurotypicals have averaged many column lengths and then if you have unusually short like hyper-connected clusters in your brain then you're more autistic and then if you have like more stronger global connections but weaker local connections then you're more dyslexic and and then so they take these things like they pour metric you know between different points in the brain and then they have a threshold track like you have but they've moved the threshold from zero to one and then record how many of the connections are sort of the paths are less than that that a threshold or more and how does
that grow and so if you get like a really complex or concave anyway I just want to show that that would be directions in Cresco cryptic research if anybody wants to really make a sacrifice for a theory mmm I'm happy to crack it open and take a look no but actually awesome idea thank you thank you well I think we're actually you know on the cusp of something which is step in which we can organize humans right like so you know aetherium you know is not something
that batalik is actually CEO of right like it's something that is a decentralized organization where anybody can enter and take like almost the equivalent of an equity stake and then work to make it better and there's no direct command and control sort of hierarchy and yet folks have made money on it a lot of lot of money so you know that preserves some of the aspects of capitalism in a sense of folks can collaborate you know put food on the table but it is not as command-and-control so you know I'd say economics is gonna take a B a v2 over the next few years yeah hey one more can we take one more question yeah please [Laughter] [Music] we talked about decentralization and I'm
you introduced a social token for example which is really introducing it to a broader amount of people but is there is there actually a aspect of the self selection that would actually end up with the steel being centralized around those who would have access are know about our participate in it in the first place and what's the impact of that initial connection between those aspects that's a good question so in general I think lots of technologies start with the 1% and then they get to the 10% and in the middle class and then they get to you know the 99 percent and so on so cellphones are a great example in the 80s that was just the province of super rich guys on Wall Street and you know today we've got billions of cellphones and you know folks in India and Africa and so on actually I saw stat
recently that more than 50% the world now has a cell phone and so the thinking is this is I'm not saying it's a final step but this is the next step I think in starting to get a much larger cross-section of folks involve a digital currency and then you know from that hopefully we can build from that base and get it even more mainstream over time it's very cool Thank You Fozzie's fantastic [Applause]