Harnessing the Power of Zero Knowledge

ETHBarcelona Talks · July 2024 · 24:18

Anthony DiPrinzio and Nse Barna discuss zero-knowledge proofs and what they enable. The conversation covers practical uses of ZK technology for privacy and verification. The conversation keeps to what zero-knowledge technology offers builders and users in practice. Held at ETHBarcelona.

Speakers

Topics

From ETHBarcelona Talks, hosted by ETH Barcelona.

Transcript

so ladies and gentlemen uh on harnessing the power of zero knowledge please put your hands together for Anthony deino in bana want to say thanks for having having us today we're really excited to be here this is actually both of our first time in Barcelona amazing City definitely want to come back at some point um and yeah today we're going to be talking about um harness the power of zero knowledge proofs and how you can actually start building us using zero knowledge via a project that we work at called Alo awesome so yeah just to give a quick uh introduction on both of ourselves so I'm Anthony deino I'm head of growth at Alo so mainly what I focus

on is working with developers that want to build on our platform uh also looking for different partnership opportunities for folks that want to get involved in the ecosystem I've been at the project for two years and I've worked in crypto at various companies since 2016 and this has actually honestly been the the most fascinating project for me to work on and yeah really excited to share with you what we're doing and to say and I'm nay Barna and I'm the chief of staff and for me at Alo I just have this bird's ey view on you know the operations and a lot of the Innovative uh projects that we're doing um this is my first time in this space and like Anthony said I've been here for two years as well and like Anthony said it's been an amazing opportunity and an organization to be a

part of um so I'll start and you know much like many of our own Journeys uh Alo traverses into the realm of blockchain of the blockchain space you know there's really is something inherent about the exploration and the constant learning that we're doing here at Alo one of the things that it's important to note throughout this pres throughout this presentation is that um Alo is not an ethereum or Bitcoin or or any other blockchain killer you know Alo is a stride forward um along an established path acknowledging the many efforts and projects that came before it um in the field of cryptography it's built many P

it's built off of many past attempts to create um you know digital money and although many projects failed uh they did pave the way for things like Bitcoin and with Bitcoin the ground which is a groundbreaking uh Innovation it wasn't n cryptographic but more cryptoeconomic uh the idea was that if you align incentives correctly in a network you know say between like Miners and other participants with which Anthony will get into um later on the system can be uh trustless and permissionless you know ethereum took another step forward vitalic acknowledges many times that the potential for Bitcoin uh acknowledges

the potential for Bitcoin but thought that it could be way way more power not just currency on the blockchain um this led to the concept of an onchain virtual machine and it opened up a whole new Direction uh in the world of of blockchain and then Alo continues this TR uh tradition based on a 2018 research paper called ZXI the idea was to blend elements from previous approaches accepting some trade-offs and enabling computation of program trans of programs transitions offchain um while verification happens on chain um in ethereum's model where every transition needs to be validated by each

node in the network this setup requires something called gas you want to hit the next one um to keep the system from overloading you know Alo removes that need by executing computations offchain which leads to a key advantage that we think which is called the which is the unlimited program um runtime if the way that works is if you imagine you're trying to solve like a complex um problem like sequencing the human genome or predicting weather patterns this can take years to complete um in ethereum you'd have you would hit a wall because of the inherent complexity limits on Alo you can run an algorithm like the genome sequencing

offchain for many years and once you get the result you can present presented as proof and it's valid just like any other um proof is valid and then um you can you can think of Alo as like a holy matrimony between smart contracts and zero knowledge proofs or if ethereum and zcash you know had a baby they have Alo especially architecturally um the one thing that I will note is that it is possible to have 100% zero gas fees if you decide to do all of the applications offchain but if you choose to have like a shared state or have part of the computation on chain that there will be um a gas

Fe cool yeah and I guess one other thing I just want to mention here because we we didn't really bring it up like how many people are familiar with zero knowledge just raise of hands okay so it seems like at least more than half the room is familiar main thing we're trying to do here is leverage zero knowledge for its privacy preserving properties which if you go all the way back is what zero knowledge was originally designed for in the 19 80s right like a lot of people have been using zero knowledge for the context of like scaling other layer ones in in you know through like rollups or other kinds of solutions our solution effectively does everything that a rollup does out of the box but again our main focus is how can we actually take the Privacy preserving properties of zero knowledge and enable

developers to start building decentralized applications with ZK and I'll start talking a little bit about that um but I just wanted to to make sure everybody kind of understood uh the importance of the zero knowledge component so um now that n gave that uh amazing overview uh what I wanted to do is just dive quickly into how you can actually start using zero knowledge on Alo and the first thing I want to talk about are the three main actors that are involved in the ecosystem so um the main actors here are developers so these are people that write and deploy applications on our Network then you have provs these are individuals that actually run those programs by generating zero knowledge proofs off

chain like nay was talking about and they do this using specialized Hardware that they create and I'll talk a little bit about that later and then we have validators so validators these are the individuals that actually contribute to consensus on alos network so what they do is they take the zero knowledge proofs that were generated by the provs they verify them that they're accurate and then they append them to the blockchain which obviously is a global Ledger that everybody can see and so each each of these actors actually interacts with our uh various parts of our stack so uh if we go from right to left the developers the way they're able to do this is actually by using our uh ZK domain specific language in compiler it's called Leo um it's designed very similarly to languages

like typescript or rust so if you're a web developer um learning Leo is actually pretty easy in fact we'll be doing a workshop on Saturday neither of us come from a traditional engineering background but yet we've learned how to use Leo and have built applications on Alo uh using ZK and then for the provs they actually operate on our uh virtual machine called snark VM uh for those that aren't familiar uh the term snark is a specific flavor of xeron stands for succinct non-interactive arguments of knowledge we get into a whole debate about snarks versus Starks versus all these different flavors but this is the one that we use um and so our virtual machine is not a z ZK evm it's just a ZK

VM we've developed our own zero knowledge virtual machine from the ground up that's designed for privacy because as nay was mentioning you know on other platforms like ethereum uh you can't do privacy right like the ethereum virtual machine inherently doesn't support certain op codes that enable privacy that's not to say ethereum is not a great platform I love ethereum I came from that ecosystem it's just there might be particular use cases where you want privacy and Alo could potentially fit that for you so uh that's where the pro are interacting um and then the validators they actually interact via our operating system which is snark OS uh and if you remember from a couple slides ago that zero knowledge execution concept that nay had mentioned um this is all happening between snark OS and

snark VM so basically our Founders actually published a paper back in 2018 on how you can actually generate these Zur knowledge proofs in a trustless environment uh offchain um and that's sort of the core Innovation behind Ali and one thing I just want to clarify CU people always ask the provs do not contribute to consensus only the validators do the provs are just there to generate the zero knowledge proofs in our system and we actually have a mechanism that incentivizes them to do so but it is not related to consensus that is all within the validators uh and the consensus mechanism for the validators is something called Alo bft um it's the same consensus mechanism that Aptos uses so bullshark and narwhal if you're familiar and we're current

currently implementing that right now and so this is just another um way to to sort of visualize the different actors in our ecosystem if you're familiar with ethereum so the onet toone here is like okay developers on Alo similar to developers on ethereum on etherum you have people writing smart contracts that people that that can which people can then interact with um on Alo we also have developers there in our system we call them programs they'll be writing a program which actually gets deployed to an onchain program registry which which I'll I'll talk about a bit further and which people can interact with then you have the provs so these are the people that are ging the zero knowledge proofs in our system in ethereum the way they're using zero knowledge proofs is in the context of

scaling Solutions like rollup so fundamentally using it for a different purpose but that's sort of where the zero knowledge is coming in uh across both platforms and then obviously well ethereum doesn't use as miners anymore but validators and then we also have validators so same kind of idea here right like validators on ethereum are coming to consensus about the chain same thing on Alo um and then one thing I wanted to talk about here is that and at least for me this is one of the more interesting things is with our programming language essentially what's happening is you can um take this complex cryptographic and mathematical proof generation and convert it into something that your computer can reason about which is

really cool right um and this is what enables developers to actually start building with zero knowledge which when we launched deploy and execute a few months ago is actually the first time that the concept of zexi actually came to reality we were one of the first projects to do that um and I just think it's it's it's a really cool concept uh and just at a high level like if you're curious what's what happens is you write your program in Leo it compiles to an intermediate representation called Alo instructions which is more assembly like and then that actually gets uh compiled to to bite code um uh specifically R1 CS um so yeah and and the example I put here is like you know something very basic is maybe I want to prove I know

the sum of two numbers you could have a public and private variable and some private output and we can basically validate that the the output is correct without having to reveal one or both of the the inputs just depending on the specific use case uh and then just briefly going through the the steps of like how you can actually do this prio so like I mentioned before you you can deploy your program right you essentially what you do is you write in Leo and then it gets deployed to an onchain program registry now I want to highlight the onchain program registry because I think it's a really interesting and novel idea so basically our onchain program registry is effectively a name space so if you go to any block Explorer on Alo you can

actually look at every program that's been deployed um and see what people have written um and the reason that we need to have this program registry is because transactions on Al are private you need to know what program they're actually interacting with and so you can reference those programs on this uh onchain program registry um and it's also a great way to facilitate like composability on alos so any anything that somebody wrote in one program you could actually take and use in your own program which is um really important and then actually one other thing I want to say about this um is that uh Alo is a private by default platform as well so people always ask like okay you have all these private programs and transactions going on like

how do you meet regulatory comp compliance how do you prevent like you know nefarious activity things like that well because we're private by default what it means is that when I write a program on Alo by default everything is private but then you as an application developer have the the optionality to decide what information you want public what information you want private maybe you write a certain program such that if certain actions take place then you could selectively reveal certain information and then on the end of the user can also decide what you want to selectively reveal um so for example maybe I need to verify my identity to some Authority and they need to specifically know my exact birthday for some reason I can selectively reveal

that if needed or based on the program that's used for that specific application maybe that information is public upfront it just depends on whatever regulation you're trying to follow and the specific use case um but I think that's a really important um thing to highlight um and the the piece where you can actually review your information is done through something called a vew key um so yeah and then Okay cool so you deploy your program on chain then the next thing is you execute your program offchain again you can do onchain computation and you can have onchain computation in shared state if you want we just have to remember in that case there would be a concept of gas because we have to prevent um somebody from we have to prevent somebody from doing a denial of service attack obviously but anything you do

offchain there's no gas fees involved um and what happens is these provs will actually generate Zer knowledge proofs and run those programs and you might think to yourself okay how does that work and and why are they incentivized to do so well we have a mechanism called proof of succinct work uh it's a combination of traditional proof of work and a and a paper called proof of necessary work I don't have a ton of time to go into the whole thing but basically the highle idea is that all of the computation used is actually necessary right so maybe people have heard about you know proof of work being very wasteful for the environment in this case you're not necessarily reducing the amount of um electricity spent but at least it's all being used uh for something and not just wasted

however over time we want to try to uh reduce um the complexity with which it takes to actually generate Zer knowledge proofs and the cost and so through this mechanism we actually incentivize these provs to create more efficient hardware for generating Zer knowledge proofs because essentially they have to compete with each other to to generate the proofs on the network and solve a coinbase puzzle that we have embedded so if you're familiar with Bitcoin right in Bitcoin you grind shot to 56 right um and then you basically get like a a block reward if you mine a block in this case what you're doing is you're solving a coinbase puzzle at a set difficulty Target and then you receive a PR a share of the rewards uh from that so depending on how much uh computation you submitted to solve that coinbase puzzle you'll

receive a prata share um and when you're solving that coinbase puzzle you're not generating a full zero knowledge proof you're just generating something called a polinomial commitment SC scheme again it's just there to make sure people are constantly running their hardware and like competing but then again if you actually want to generate a full-blown zero knowledge proof for an application that's a separate thing which you can do and if you don't have the requisite Hardware to do so you can Outsource it to aover so this is something we call proofs as a service right so maybe I'm just an end user that needs a proof generated I go to a Marketplace I pay some trans fee for them to generate the proof for me and then I can start using it in my application and those uh transaction fees be determined by supply and demand on a

market and then the last piece is okay so once the provs run the computation and generate Zer knowledge proof the validators will um you know verify that those proofs are accurate come to consensus and then add it to the chain and now you'll basically just have this uh chain with a bunch of zero knowledge proofs that represents some transactions that occurred but again you don't know all the underlying data behind those transactions right uh you just have the proof which is a statement saying that like okay this piece of information I'm trying to claim is accurate so that's kind of where you're getting the Privacy uh aspect oh okay so you know by leveraging um zero knowledge proof uh like the Define and letting lending protocol on

something like Alo ensures privacy for participants while enabling um efficient borrowing and and um lending in a secure lending securely and trustless Le um if you think of like stablecoin protocol that prioritizes privacy um if you like a stable coin pegged to like a fiat currency can be created where users can mint transfer and redeem stable coins privately using zero knowledge proofs you know this ensures transaction amounts um user balances and the underlining um Fiat reserves remain confidential um some of the other use

cases would be some similar like what Anthony mentions like identity verification like uh kyc or the voting system the uh implementation of zero knowledge machine learning by preserving data privacy and securing Outsourcing or even like ZK gaming which allows for the delivery of provable fair gameplay um enhancing security all while protecting a user's privacy and personally I'm really into the machine learning example I think there's a ton of interesting use about that so if you want to talk about it later let me know um cool so that's what we had for our presentation today so if anybody's interested in getting involved in Alo there's a few different ways that you

can right now so we do have a developer grants program going on so this is for people that want to build applications on our Network you can receive funding to do so we also have a bug Bounty program for our operating system and our virtual machine so if you're a whad hacker security researcher that's into this kind of stuff um we have a program on hacker one and Bug crowd um if you go to our blog you can find updates on all of this but we have the information on how you can submit to that as well as the grants program and then right now we have incentives on our test uh deploy incentives on our test net and that's going till July 15th so I guess you have about like a week left and basically we're incentivizing people uh with test net Alo credits uh for anybody that

deploys a program you can almost kind of think about it like a hackathon so once everybody deploys their program we'll have like a Review Committee and we'll award prizes one thing I want to say is that if you don't think you're going to fall in the top submissions don't think about it that way it's a cool way to just experiment with Leo and get involved in the ecosystem and if you build something cool even if you don't win we will find a way for you to continue your work on the project so I would definitely highly encourage it and again go to our blog for this information uh here's some additional resources we're actually relaunching our website in August so all the stuff will look a lot more beautiful on the website but I guess if you just want to take a picture of this uh this repo awesome Alo

on one of our co-founders GitHub profiles is really good there's a lot of examples that people have built on Alo I highly recommend checking it out and if you're interested in running a note or anything like that if you go to the aloh HQ GitHub page and go to the snark repository you can find details on that so yeah with that thank you uh and we really appreciate you having us today thanks so much [Applause] yeah can we get a microphone for a question just Qui came down here with the with the uh the pink

dress hi uh thank you like uh it sounds like new uh fresh uh spirit of centralization and how are you going to struggle against regulations because if you don't have kyc and Etc you know MH yeah so this goes back to the fact that our our uh our St our um project is private by default so basically what that means is for example I'll just give a practical example like I was in Korea recently and in Korea they have their own mobile applications that you have to use and that's because they have like privacy and security concerns obviously from North Korea and just as a country they're much more conservative what I said to them is well we can actually

develop an application specific for that region right so basically you go to the onchain program registry maybe we see that somebody who's you know using it is like Korean or something like that then they would have to use that program which we built and so what that means is like as an application developer I can decide what information's public what information's private like if needed like we could potentially give access to a regulatory body for specific aspects of the program if needed like if certain actions are taken um so that so basically whatever the regulation ends up being we can follow it we don't know exactly what it's going to be because it hasn't been fully established yet but whatever it is Alo can definitely follow

those guidelines the bigger question is are the regulations going to be so tight that what we're building doesn't even make sense um in terms of like applications deployed or is there going to be like a happy medium um and honest in Korea people were more interested in were actually kind of interested in in this specific case because what we can argue is that they can still have access to their citizens information right but no outside threats would be able to have access to the information because let's say North Korea did breach it all they would see are a bunch of zero knowledge proofs that don't actually give them data which they could they could use uh incorrectly but we could still you know create some way for the South Korean government to have access if needed so yeah that's what I would say and we are

building a kyc AML product right now using alos so specifically answer that part a question on the screen here if you want to take that as well just uh what is your energy consumption when compared to proof of work and proof of stake that's actually a pretty good question I mean right now we're in a test net so um I guess yeah the numbers aren't like 100% maybe accurate of what it would look like at mainnet we're still implementing our consensus mechanism so I don't have any hard numbers on that um in terms of the proof of succinct work part um I can't remember off the top of my head but if

you go to our blog post there's actually uh a piece on when we incentivize provs to run uh during our test net if you look at that there's like some very specific metrics about what the output was of that I think proofs generated yeah there was only like over a million or something like that um but yeah for the exact number I would I would check that blog post uh Anthony and [Applause] everybody