To be or not to be... On chain. Privacy and decentralization as systems scale.
ETHCC 4 · July 2021 · 23:15
Henri Stern examines which user data should remain offchain as decentralized systems scale. He weighs transparency and provability against privacy, censorship resistance and data availability, proposing ways for developers to reason about the onchain-offchain boundary.
Speakers
Topics
From ETHCC 4, hosted by Ethereum France.
Transcript
hi thank you all so much for coming here today i know it is bright and early on the last day of the conference and so i'm very thankful that you all showed up i'm here to talk about privacy and decentralizations at system scale um but first i'm going to introduce myself my name is henry stern i work on privy which is a remote secure remote storage solution for your off-chain data and before that i worked at protocol labs where i worked on the consensus algorithm for falcoin the topic i'm not here to show my wares and so i'm going to focus on the topic at hand which is what happens to private data as chains scale and specifically i'm hoping that you'll leave today with three things first the fact that it's
probably one of the most important issues facing the space today second the fact that we have a sort of window of a couple years to really do something about how web 3 evolves and how we think about data being put on chain and third the fact that we have the tooling to do something about it so i'm hopeful that we start making good decisions with regards to what data we put on chain with that i'm going to start by talking about how we got here what is the data paradigm we come from and where does web 3 come out of then i'm going to talk about the core tension that i think exists at the center of web 3 between decentralization and privacy
i'm going to talk about why we haven't seen that tension play out yet there's not that much private data on chain so you might think well this is a sham i shouldn't be here there's no problem with privacy on chain today then i'm going to try and give us some tools so we can think as web 3 developers about what to do with data when we are thinking about building a distributed application before finishing up with some thoughts on you know what the next few years might look like for privacy so to start how we got here if i can find the right place to click nope oh there we go sorry i jumped through cool in the
beginning there was a single word and the word was lo it was actually supposed to be login this is the first message that was sent through arpanet from his computer at ucla computer at stanford this is the first network communication in the world this is pre-epoch so very early on and the birth of the internet is here the thing to note is at the very beginning all internet communications were peer-to-peer there was no state to speak of it was two computers finding each other of tcpip and communicating some messages back and forth now the next thing that happens that really matters for our story is tim berners-lee starts to work on the world wide web project
in 1989 at cern and then in 1991 we get the first spec for the hypertext transfer protocol and what http does is it gives us a really convenient way to serve state over a network specifically we have specifically give me one second here great thank you specifically we have one machine the server serving state to the other machine the clients the clients making requests of the server and the server is sending over http or pages back through http i can't really overemphasize how big the shift is
between sorry i might i might thank you so much that's very nice of you i'll try it but i'll not to you otherwise if it doesn't work through i like this collaborative process thank you um so i can't really overemphasize how big the shift is basically between the move from peer-to-peer to client server interactions and specifically now we have if you proceed the server that not only has the ability to surfstate that was web 1.0 where allstate is static on the internet but
the server can now also receive state this is sort of read write interactive web where the server takes on user data and this is what happens over the next few decades into the early 2000s users start sending a lot of data to the server and this is where we are today the compute gets centralized the server starts taking on more user data and little by little the server sort of becomes the god of all online interactions for all intents and purposes the server is the only one that can reason about state it holds all state it is sort of the maker of truth in our online interactions so what we've done as users is for the sake of convenience and for the sake of not having to store state
ourselves we've given up our data to centralize entity where we don't actually see what happens to our data the server is the only sort of holder of logic that decides what happens and is the only one who can verify you know what is the state of the world thankfully and this is why we're here peer-to-peer isn't dead um i'm going to skip over a lot of the history of you know how web 3 came to be but so for all intents and purposes you'll see i made the very good decision of putting a lot of slides in this presentation so you can keep going um for all intents and purposes the thing that matters to us here you might see it is this genesis um this is sort of the second coming of
the internet the great main point that i want to take out of um satoshi nakamoto's paper white paper publication in october 2008 is bitcoin and the blockchain specifically gives us a way to store state in a decentralized manner specifically we don't need the server anymore to tell us what truth is because every peer in the system every node now can reason about state for themselves and that's really the key like web 3 gives us an ability to reason about state without having to depend on a centralized entity and so this is great in terms of verifiability and i'll come back to that but what does it mean for personal data and what does it mean for privacy now that everybody holds a copy of state
anyways we have a movement basically from a financial system to general purpose blockchains and this obviously opens up the gates to all us all of us being here today and you know more complex computation around data happening in an open and decentralized way and so with that i'm going to move to the second part of the talk which is the core tension that i think sits in the middle web 3 when it comes to user privacy so web 3 aims to make the internet more decentralized verifiable and secure now at the center of this is the fact that every peer can reason about state because every peer holds a copy of state and so we can verify what's happening to
state on the network by running the computation ourselves or you know with l2's some more complex version of it through proof verification and things like that at the center of this and of these three guarantees that we try to get from web 3 is transparency and specifically the fact that we get to reason about these things because we all get to look at state now the real goal of web 3 when it comes to user data is this term that's been bandied about that you might know is either data sovereignty decentralized identity sovereign identity like it's all synonyms of an idea which is basically through the centralized state users should really own their own data they should be able to decide
who gets access to it when they get access to it for how long and that means expressive and revocable permissions data portability you can't get locked into service if you want to leave you can take your data with you and centralize control and i use the word centralized here quite purposefully the point is control should be centralized around the user the user should have sole control over who controls their data and so i want to focus on the last two pieces of this user control and data portability because i think that's where the tension comes from specifically user control is a prerequisite to privacy if i can't decide that you're no longer allowed to look at my data do i really have privacy my ability to revoke access is core to privacy
on the flip side data portability stems from decentralization we're getting very good at this um and this is sort of the core tension which is you have these two things um user control and data portability if you can thank you um that sort of stand in opposition to one another in a sense user controls means i can censor the network i can decide that i no longer want the network to have access to my own data whereas data portability means i can't censor the network data is available and so i don't have a good fix for how generally these two higher level concepts are meant to act together but what i do know is that private data on chain is a very
very very bad idea because private data on chain means loss of fine-grained access control which is key to data sovereignty specifically if i put some encrypted data on chain and then i give you access to the keys to decrypt that data i can't really take that access back because even if the chain evolves even if i make a transaction that takes my data off of chain you still have you know your cached copy of the old chain that contained my data likewise and this is to me a much bigger deal you lose forward secrecy it's one thing to have you know an account compromise or key compromise when your data is walled off behind you know some centralized server it's another when the data is fully public and anybody can access it and what's more um try to think about
what's happened to computation over the last 75 years moore's law is moving we have quantum cryptography coming and so for all intents and purposes we can expect a fair number of the ciphers we use today to break and specifically i mean i guess the point i'm trying to make is any private data on chain today is likely to become public data tomorrow so anything that you might not want people to see 20 years from now you probably should not be putting on a public ledger for everyone to see the last thing and i'll also very quickly because it isn't really a topic today adding more data on chain generally slows down everything else we want from the chain so it's not great for all other operations we want and beyond that
chains won't scale endlessly so we might be able to put a lot more than we do today but there's a limit to that so i don't know about you but i am very much in padme's camp here specifically please please please don't put personal user data on chain in any way shape or form now you might ask how do we define private data what is private and what is public and i tend to think of this as a spectrum so on the one hand you have the most private data which is really pii personally identifiable information or personal health information this could be a social security number it could be your name anything that can be used to uniquely identify you then you've got other identifiers
location data things that can be used to correlate your identity to some action you've taken then you might have behavioral data in the context of a marketplace it's orders you've placed decisions you've made around actions you take on chain and so on and finally non-user system data this is really the important data in terms of decentralization it could be the number of nfts that have been minted the proof that you are the owner of that nft market prices in a defy system to make sure that you're not getting priced out or getting an unfair deal in what is supposed to be an open system and so what you can see is the farther the left we are in a sense the more user specific the data is the farther right the more system-wide
the system is and so while this is a spectrum if i had to draw a line between private and public i would say anything that touches users should be determined to be private data because again any data that's put on chain today may be public tomorrow and as you know culture changes politics change um as vitalik was saying yesterday you surely know somebody who said something about covet that they regret a year after think about that data becoming public in the future it may not seem like a big deal today but anything you put on may take on a different life 20 years from now so with that i'm going to go back to the title of the talk and quote cryptoshakespeare to be or not to be on chain that is the
question and we have the first answer being if the data is private don't put it on chain now i have some time left and so i want to try and dig in a little more by asking why haven't we seen this play out i'm hopeful that i've you know made a case for the fact that this is really important issue for how web 3 looks and for whether we've built you know a system that gives users more guarantees but no more privacy but the question is why is this such an urgent topic and so i think the reality is this hasn't played out because changes don't scale yet the reality is it's really hard to put data on chain today chains are too expensive they're too slow and uh they're heavily bandwidth constrained
and so even if you wanted to as a web as a developer put data on chain it's extremely hard to do and it's extremely costly to do but that won't last forever you know half of the talks at this conference have been about scaling solutions and so we've got proof of stake we've got charting we've got various l2s as well as side chains and state channels like the problem is gonna get fixed and so the question is as the problem gets fixed how does this affect privacy well first it allows us to put more data on chain we get to put more of the private stuff on chain so we've had a reprieve because chain zone scale but that's coming to an end second it stands to reason there's going to be some really positive developments
for privacy notably from zk snarks like we're going to get new tooling that makes it much easier to secure private data whilst interacting with the chain so that's extremely positive and so it's tempting to think as some do that we can sort of get it all you know ideally we can speed up block time 10x we can increase block size 10x we can drop fees 100x now obviously that's sort of like magical thinking that's not how systems work and we shouldn't confuse our goals for the technical realities of the space metallic i think makes a really strong case for this in the limits to blockchain scalability because there's this core tension between scale and decentralization the more you try and scale the chain beyond a certain point
beyond the point that our primitives allow the more you give up on decentralization so for everything you get you give up something and i think the same tension exists between privacy and decentralization the more you try and decentralize data access the more you try to make data accessibility a thing the more you give up on the privacy front so that's sort of the second lesson the first one was please don't put private data on chain the second is remember the trade-offs there are trade-offs involved in the engineering decisions you make and how you decide to put data on chain impacts the privacy of your users in the future and with that i guess my takeaway is if we're not careful about this and if we're not thoughtful about this all we've done is really substitute our
first online god for a second one where there are more guarantees but data sovereignty is still an elusive goal now that hasn't happened because so far we haven't been able to put that much data on chain but this is why i think the topic is so important today these changes are coming the chain is going to change radically in the next few years and we can expect to see a lot more issues around data privacy on chain in the coming future not only that but you're also going to get a lot more users coming into the space from what too who have very different demands and care a lot less about decentralization and so those users will be making demands of us in terms of ux it's going to become very tempting to take the easy way out and potentially
put data on chin so i think i hope everyone keeps this in mind as they're building systems over the coming years with that i'm going to try and give us a sense of hope because we have a lot of tooling already to handle these questions and to do something about it so i'm going to try to find some general heuristics that we can use as web 3 engineers to develop our system securely moving forward so we just kind of have solved the question of can does data be put on chain the answer is not quite yet but very soon yes today at a high price the real question now is should this data be put on chain and part of that question really is what guarantees do you need about the data what is the system you're building what
are you trying to solve for your users and why use a decentralized system now again i like spectrums i think things are more spectral than they are binary this is a spectrum in terms of guarantees you try to get if what you're trying to get is a guarantee around logic control what's happening to the data what operations are being applied to it then a smart contract may do the trick the data itself is off chain but the smart contract allows you to see what operations are being run on the data if what you need is data integrity and assurance that whoever's holding the data is not modifying it out from under you data integrity commitment to the data so putting a hash of the data on chain this is the idea behind ipfs and content addressing may be super useful if you also need
some certainty around data availability potentially proofs of retrievability the assurance that the data is available at any point in time helps now finally if you want to know the data is available not just today or tomorrow you might actually just dump it on chain which again it's a very tricky thing but the point is to say there's a trade-off space where you can make decisions in terms of how you build your system and i think this spectrum from basically less data to more data from less risk of a leak to greater assurances of data availability looks a lot like another trade-off we have in consensus which is the trade-off between safety and liveness moving straight along because i am slightly slow
um thank you the trade-off is basically one between here safety reference of the data leaks and liveness assurance that the data will be there for you the point again remember the trade-offs you cannot have it all so you need to decide based on your application what's most important to you luckily we have increasingly composable primitives we have the tooling we need to make these decisions what you're looking for is logic control you can use a smart contract what you're looking for is data integrity maybe ipfs is for you if what you need is guarantees of data availability i've worked on a blockchain that might be able to help and so on and so on and so on the point is use the right tool for the
right problem we have the tooling try to understand the primitives involved what the trade-offs they make are and use the right tool for what you're trying to build now the dirty truth is we're already doing that to some extent most web 3 consumer products are hybrid products they use a lot of web 2 architecture and some web 3 architecture this is notably the case in nfts where most platforms today are really web 2 social networks with a web 3 backing you interact with the chain through a centralized system same is true in d5 a lot of the gateways to access d5 protocols are centralized then you've got companies for example like compound that's building compound treasury which is a centralized system so people can get compliant access so institutions can get
compliant access to d5 i've heard the term the d5 mullet the idea of the d5 mullet is you have fintech in the front and d5 in the back you have web 2 in the front facing users and you have web 3 in the back providing strong guarantees i actually think that's not a bad thing at all in fact we should probably copy this for privacy insofar as we should be using the best tools from web 2 in order to make web 3 better and i don't think that is a sinful thing and so with that i want to chart a course for the path ahead and conclude imagine this this is the spectrum of decentralization and privacy you've got more centralized systems on the left more decentralized systems on the right you've got more private systems on the
bottom more public systems at the top the sweet spot for us in terms of data sovereignty is at the bottom right we want systems that are both more private and more decentralized where data is available the data is controllable obviously they're strong technical pressures preventing us from getting there the place we are today is here we have this band that we get to play with where we can pick systems to be either more private and more centralized i would argue or more public and more decentralized but the movement over time looks like this as we get better primitives the band of choices we have expands and the area we have to play with as developers gets larger
and so i'm going to conclude very quickly with a parting thought that i ripped up or that i ripped off a presentation from last year this is a slide i stole straight up from albert nice presentation i haven't read the book he talks about but i do like the quote the quote is the more uncertain the future the more its essential logic is that of taking a strong position and creating options and so this is sort of my exhortation for this talk i think we should take a strong position not to sacrifice user privacy and user sovereignty in the name of decentralization and that will allow us to and in so doing create options better primitive so we can keep growing the space of choices we have as developers to allow us to build a future that's both more decentralized and more private so with that reminder
of some takeaways where the crosswords for user privacy in web3 the coming years are really going to determine whether web3 looks different or similar to web 2 in terms of user privacy please keep your private data off chain and your user's private data off chain please remember there are trade-offs involved in technical decisions you make pick the right tool for your problem and finally keep trying out new tools because that's how we get to build better systems where we have to make fewer compromises thank you very much and thank you [Applause] i don't think i have time for q a but i'm happy to talk to anybody who's interested in the topic in fact i would love to
you