[DL 3-Year Anniversary Meetup] Risc0 zkVM and its ecosystem

DappLearning 3 Year Anniversary Meetup · 15 Jun 2024 · 35:13

Mashiat Mutmainnah introduces the RISC Zero zkVM and its ecosystem at DappLearning’s third-anniversary meetup.

Speakers

Topics

From DappLearning 3 Year Anniversary Meetup, hosted by DappLearning.

Transcript

AI thank you joining us okay thank you so much time that you can take the yeah of course um let me share my screen so I can get my presentation started how's it going Hong Kong first time I'm so sorry wow amazing I've actually been to shenzen when I was like 13 years old like almost oh my God 15 16 years ago it's been one of my most favorite places ever I'd love to come back please and hopefully to see

you again next time in sh with our four years five years anniversary amazing yes well thank you everyone it's so great to meet you I'm really excited if you don't know I'm wearing my risk zero shirt repping our team um and I'm really excited to give an introduction to risk zero and what we do um we are a team that is dedicated to Bringing Universal zero knowledge um and yeah I want to take you through um our technology and our ecosystem so for our agenda for my talk

um I'm going to be chatting about um a little introduction who I am and our team um the risk zero zkv M uh how it works and why we've made certain design choices um Bonsai our remote proving service and then we will kind of dive into some of the use cases our ecosystem and then resources that you can tap into after this presentation and after this talk awesome so hi everyone my name is msh um this is short for mashat that is my full name um I work in Partnerships and ecosystems for risk zero I'm currently based in Chicago I'm in the US so if you are ever

here um please let me know the summers in Chicago are absolutely lovely um I've been in the crypto space for almost nine years um and I'm very excited about ZK accessibility and um creating systems and platforms that enable enable um people to own their own data um I believe data ownership is very very important especially in this day and age where we are always um selling our data but we do not have ownership of it um so previous to risk zero I was working at cell um I don't know if many of you have heard about it um cell was an

alternative um layer one uh blockchain um and so I was very much focused on Defi and nfts for emerging markets such as Africa India southeast Asia and before that um I was working um at blockchain a Berkeley and I also co-founded x256 which is a governance um Community um and they mainly do a lot of um governance protocol governance for UNIS Swap and other big uh ecosystems so outside of ZK um I'm still very much uh active in the Emerging Market space um I'm a

co-founder at Oasis on chain so we do a lot of consumer crypto for the global South um we are hosting our next Summit in the Bahamas in January 2025 so if anyone wants to come to that one please DM me um and I will of course uh send you all of the details for that so let's get started um into risk zero what is risk Z so our company um started in 2021 to really tackle the biggest challenge in our industry um and potentially our society which is you know increased centralization of data and uh the increased centralization of not just applications that we use but also the

infrastructure that we use to build these applications um our biggest purpose is really to be this bridge that brings general purpose Computing to ZK okay so we want to empower users to trust programs um any that to trust programs that are run anywhere um while giving developers really easy access tools that they already know and love to deploy zero knowledge applications our mission is essentially how can we help developers um accelerate ZK Innovation and develop zero knowledge applications or ZK daps in week instead of months and our team is a passionate group of 40 uh

people we are you know cryptographers with phds who have been with problem their whole lives um white hat hackers um futurists nerds and optimists like me um so before I dive into you know what risk zero um is and like what our Z kbm looks like like I wanted to give an introduction to general purpose dkbm so in you know the the ZK evm I'm sure many of you have heard of um it's a virtual machine that essentially executes um ethereum smart contracts in

a way that's compatible with zero knowledge computation and essentially ZK EVMS they compress a large number of ethereum trans actions into one single lowcost succinct validity proof but at the time when zms were forming um the ethereum virtual machine or the evm was not best designed to run a ZK circuit within it and that's why a lot of ZK EVMS in the market have had to made significant trade-offs from you know choosing to not be the most ethereum equivalent um to you know having discrepancies or um lots of differences between gas costs and P

costs so essentially what it means is that building a ZK evm on ethereum has a lot of limitations and it actually makes it very difficult to implement and optimize validity proofs and that's why you know we've seen this rise of the ZK VM which is the zero knowledge virtual machine and what the ZK VM does is that it essentially is a virtual machine that emulates for a ZK system and it essentially guarantees secure and verifiable you know trustworthiness through the ZK proofs that it generates so in a zkm you would be proving the

execution of a specific program with a zkm you're proving the execution of itself or the virtual machine itself so we've seen um different types of you know dkbm uh kind of come into the play uh you have um teams like Alo or zky who are building Noir and essentially they're kind of building a middle ground language um that goes into a compiler it generates like an arithmetic circuit and then you take in inputs and that arithmetic circuit generates like a proof

but sometimes what you want to do is essentially abstract that a little bit more and create like more of a VM architecture so in this case what you would be doing is you would take a program push it that you know your compiler would understand push it through your compiler and um what that would do is that it compiles into a set of instructions or Isa and what it what that means means is that now your program is also an input into your VM circuit um so in the VM architecture your VM circuit not only takes in the inputs like the direct

circuit would take in the direct arithmetic circuit but you're also taking in the original program that is written in a language that the compiler can understand and the benefit of this is that now you are opening up the playing field to more mature ecosystems and you're opening up the playing field to more accessible languages um rather than having developers you know really learn a very Niche language such as Noir or Leo so entering the risk zero Z KVM um what are the problems that we are solving um within risk zero you know some of the key things that we've

noticed are the current challenges that developers face in this web three and onchain world so first of all as I mentioned even within the direct circuit uh design there's a lot of developer friction um as a developer you will have to learn a new programming language such as Noir Leo snarky JS adapt um your program or and your inputs to blockchain specific you know design patterns and essentially that can impact your lead time and go to market time to building your application um and make it more complex in time time consuming not only that building on chain is pretty difficult there's a lot of scalability limitations um even with Trad like

onchain execution um especially when you're executing on the base layer such as ethereum there's a lot of network congestion and really high transaction costs and we've also noticed that as developers are trying to build more complex applications there's limited expressivity so this means that there's a lot of gas ations cycle count restrictions and what that can do is actually impact how complex you can build your dap and how functional you can make your dap it also limits interoperability and cross commmunication between applications as well so we try to solve all of this with our risk zero dkbm we're not 100% perfect but we're really getting there

so what is the risk zero Z KVM the risk zero Z KVM follows the VM architecture which is um more of that uh architecture that takes in the program um into a language that the that our compiler can understand generates a set of instructions and then that goes into the VM circuit with our additional inputs and within the risk zero zkm we've chosen to have risk five open- source microarchitecture so we have kind of implemented an open source architecture that everyone can easily access um and the benefits of having a risk five microprocessor like as part of our

circuit is that instead of writing your own DSL or writing your own compiler you can actually use any sort of language that the llvm like supports right now we're just really focused on Rust because it has a very ecosystem lots of folks know it and we can actually provide the best developer experience for teams that are writing their programs in Rust the Key Properties about our risk zero zkm are the three so first of all it's a virtual machine which means that it essentially emulates a physical risk five circuit and so it runs code like a physical risk five circuit um the second thing is that it's

verifiable this means that the dkb after it takes the GU program and program inputs it generates a receipt that tells anyone that hey the code go that went into our zbm was executed in a cryptographic manner and thirdly it's zero what that means is anything beyond the program and the program inputs is um isn't published um and so essentially all of the data that is going in is private data and that's what makes it zero knowledge so I'm going to take you at a very high level um how proving Works

within our zkv um so what we have is that we have the guest and the guest is essentially like a program that is running on the zkm and the host is the system that the zkm is running on and what we have is the host the host emulates the guest and it tells the guest to execute you know a particular program um in this case the host will send the the host will send the guest you know private data the guest will execute code within that program and it will construct a receipt um the receipt is then returned

to the host as the proof of compute and later on the host can decide to put this receipt you know on chain so that it can be publicly verified or it can keep the receipt and do whatever it wants what's important about this receipt is that provides evidence for the valid execution of the guest program so it actually tells us like which part of the code in the program was executed and what was the result of that of that computation um there are two parts within this receipt so the first one is a journal and this contains all of the public outputs of the guest and the

second one is the seals so this is also contained within the receipt and the seal contains like more cryptographic information instead of like just public outputs so it'll contain a ZK snark proof of the guest program's correctness it's generated by the prover it also contains a hash of the guest program and so when you have a receipt when the host receives the receipt and you know puts it up on chain what that means is that anyone you me Bob Alice can go and publicly verify this receipt and they will take a look at both the journal and they'll be able to see like what were the public outputs of the program and of

the computation but they will also be able to see that okay well this is the program that was or this is the hash of the program that was correctly executed um as I mentioned within the seal you know we have the ZK snark proof um what we do is that we also take that AR proof and we wrap it in Groth 16 to reduce the size of the proof and to ensure like you know these applications of ZK can be as scalable and as efficient for our partners so now we beg the question you know why use risk zero zkm so in the problem slide or the current challenges

slide we really mentioned that hey there's a lot of developer friction that is going on because developers have to learn a whole new language many times and they have to navigate a lot of specific blockchain designs um which slows down the go to market there's a lot of limited expressivity because of gas limitations um and this can actually and high gas costs and this can actually limit like complexity of the daps that are being deployed um and there's a lot of high gas costs and transaction costs from building an onchain application um so this is how we through our zkm abstract away all of these challenges um with the risk zero zkm we are

essentially helping developers focus on building applications instead of building circuits so all you need to do is run rust code um through the guest and through the VM and you can prove the execution of that code directly um what makes our zkm very different from um other ZK VMS in the market is actually a new innovation that is called continuations and continuations is a technique that we use where we will take a proof request um for a guest program or for code within a guest program and we will essentially split that request into small segments

and after that we will independently prove each segment in a parallel fashion so what we are doing is that we are essentially keeping the memory size constant um but we're able to prove very large computations very very quickly and what this does is that it actually unlocks boundless unlimited computations and we're able to generate um you know proofs of millions and billions of Cycles in a matter of seconds to minutes um the other feature that makes us very different from VMS and provs in the market is proof composition um

essentially what we want to do is that we want to make it as cheap as possible to generate proofs and as chap cheap and efficient as possible to verify proofs so proof composition is a technique that we do in where we aggregate as many proofs as possible into one batch and that generates one single receipt that single receipt is then you know posted on chain and any public verifier or public entity just test to verify that one single receipt to verify that the data across all of the other proofs are valid and lastly um ourz KVM you know it's fully open source and we actually encourage folks to install it locally into their machine so

that you can generate proofs of your own private data using your local zvm only on your machine you own your data we just provide you know the software for you to run and all of the underlying thing is that we want to help developers who are building ZK applications get to Market fast um on on average teams that are using risk zero zkv M are experiencing up to 1,000 times faster development time um we uh you know have very stable apis we've as a team we've been building for the past two and a half years and what this means is that we've achieved a

level of maturity where developers can essentially build complex applications with a peace of mind that as they deploy new features or as we deploy new upgrades to our zkm system things aren't going to break um we have just released um a new version of our ZK VM which I will talk about a little bit more later and uh what makes this extremely compelling is that we have new performance benchmarks that are coming very very soon basically on Monday next week um and this these benchmarks essentially Place us as one of the most performant um and coste efficient zkm in the space and thirdly um you know our ZK VMS just like our zkm solution just like ZK

EVMS obviously enable validity proofs um and you know ZK fraud proofs at the protocol level but um they also enable ZK at the application Level um so we really want to be um the solution for the entire stack and we have a feature called steel which is a view call library and what that does is that it really enables developers to build complex rust applications for ethereum um by bypassing the size and the gas limits um with steel you can essentially read and compute over ethereums like historical State through these secure view calls and essentially what these

are are storage proofs and you can not only be able to access these storage proofs but then you can program different types of ZK computation or arithmetic within our ZK VM on them so essentially what you have is programmable storage proofs which is very very powerful and it also allows application developers to achieve more interoperability because now you can um you can essentially you know deploy your apps once they're written um in Rust to any of our supported chains and we have our verifier on I believe like eight plus different chains both in the optimism ecosystem and the

non-optimistic rollup ecosystem and essentially our verifier can then verify any of the proofs that your application is generating on any of the chains that you've chosen to deploy on so what we're really trying to enable is that all you have to do is essentially run your program once and then you can verify it everywhere and achieve some level of dap interoperability while also bypassing a lot of the gas limits and you know size limits that um just building straight on top of ethereum or straight on chain um has um so the steel view call library is extremely powerful I really encourage um any application developers here to test

it out um it is uh just a great way to to understand the value proposition of our zkv um but it will also help you um 10x um you know your development time um and go to market for your applications and we have a very exciting news so our zkm 1.0 which is our latest version and the most stable version of our zkm is now live um this is the world's first and most performant production ready zer knowledge virtual machine um we have very very strong benchmarks coming out on Monday and we

would I would love to invite the community here to also participate in reproducing these benchmarks and showcasing them off we will be posting our guide very very soon so you will have a chance to test out you know zkm 1.0 and play around with it and tell us how it works and give us a lot of good feedback so next up is bonsai so we've spoken a little bit about the zkm and this is you know a system that you can run locally on your machine on your Hardware on your laptop to generate CK proofs um but what if you don't want to do that what if you are a really big team and you have a lot of users and there is a lot of proof requests that

are being generated well not to worry we have a remote proving service Bonsai that is essentially used for that um for very large computations so Bonsai is um a remote proving service it is highly highly parallelized and it's very performant um you want to use Bonsai when you really want high performance proof generation for your application but you don't want to run the zkm on your machine you don't want to manage any hardware so you just want to offload it to us and the way it works is that you have to just specify which zkm application you want to run and the inputs to the guest program Bonsai will

then take that proof like the proving request or the proving work and it will split that work across a parallelized cluster of gpus that we run on the back end what this does is that we can essentially return you a proof um in a very return you a very highly performant proof um in a very short time so use cases leveraging risk zero um at risk zero we're really known for general purpose CK and that kind of means that we can do everything um as I mentioned just like ZK EVMS we support a lot of different rollups um both optimistic

rollups and also you know ZK rollups um in generating proofs for the ethereum blocks so zth is our type zero zkm and this is a solution that actually uses Bonsai um and it generates you know proofs of validity proofs of ethereum blocks um in minutes um this is one of the fastest solutions that is out there and we have you know we have received a grant from optimism to complete the solution and have just passed acceptance testing um there are a lot of teams um that are both you know op stack or they

are non evm such as you know in the movie ecosystem or they are in the cosmos ecosystem that are optimistic rollups and they're looking to essentially have zero knowledge fraud proofs um so they will use our stack to generate you know ZK proofs of their fraud proofs or of of of their blocks and um we essentially help them create a pathway to becoming a full-on validity rollup and that's kind of our goal with supporting rollups with our zkm supporting Roll-Ups the Second Use case um that we are seeing is uh more at the application layer um we do a lot of work

with authentication uh teams um and wallet providers or identity teams um we actually have two demos um on our website at risk zero.com um that I think are very very informative how um ZK proofs can be used to generate um a generate a proof of like digital identifiers or decentralized identifiers and then essentially give the user access to a microservice so um Bond iay and ZK kyc underlying it's the same kind of architecture we are generating you know a ZK proof of a JWT token or an authentication token that is either

issued by a kyc provider or it can be issued by uh email provider such as Google login and then later on you know uh because the ZK proof is publicly verifiable um the user would just hit verify and then get access to um you know whether it's funds that they're claiming or to an application that they want access to we're also seeing a lot of use cases within gaming we have two gaming teams um that are building with our stack um and essentially onchain gaming is super expensive I think for every onchain move it takes around two million gas to verify um that move um or to verify a

proof of that move so what they are doing is that they're offloading computation of multiple onchain moves into our zkm using our proof aggregation feature aggregating the proofs of of all of those moves and then posting a single proof onchain and um with risk zero verification is very very cheap so in general you know it costs only 300,000 gas instead of 2 million gas to verify a single proof um using the risk zero verifier and lastly we are also seeing a lot of Headway in governance um uh onchain voting can be very very expensive and so we enable a way to process a lot of ballots in the onchain governance process into the zkm so that

it is Affordable um for us users and um you know token holders or governance members to participate and participate in an efficient way so our ecosystem is uh very much growing we have over 40 plus teams um building multiple different use cases within the risk zero ecosystem as I mentioned we have a lot of gaming teams um we have a few authentication teams folks that are not only building um you know ZK logins um but they're also building um ZK passports um so these are all the solutions that we're very excited about a lot of our teams that we're working with are also um using

risk zero to generate zero knowledge proofs um of uh blocks in their R in their own rollups these are rollups that are optimistic rollups that settle on ethereum or um optimistic rollups in other ecosystems that are non-m compatible um and we also work closely with a lot of DK ecosystems as well um just because they support our verifier and um we're also able to bring you know through our VM um we're able to bring more rust accessibility to their developers as well so developers can essentially um first put in a rust guest code into our ckvm and then they can transition their way into learning a more complex

language for that CK rollup ecosystem um so yeah if you are working within any of these fields whether it's rollups gaming identity um dpin which is more physical infrastructure such as trusted execution environments or TLS notary please come to me I'm very very happy to chat um and give you partnership support or integration support uh we have a full team of solution Engineers um and a very Hands-On product and engineering team if you are more further along in your stack and you need more deeper help into integrating risk zero as part of your solution lastly um I'd love to see all of you at etcc Brussels I don't know how

many of you are going but we are hosting our own half-day conference on July 8th it will be called boundless and we will be featuring a lot of our partners and teams across zero knowledge but also Beyond zero knowledge in the rollups gaming identity and Hardware space and you know the Luma for uh RSVP to boundless is here I will of course share these slides with everyone so you can take a look please follow us on Twitter at risk zero um and we have a I have a few links that I think would be very very helpful for people to get started as I mentioned ckvm 1.0 is live um and we have a quick start guide if

you ever want to test out our latest solution um we'll be releasing our benchmarks very very soon on Monday but I would love to invite the community adap learning to also um join in testing out dkbm 1.0 and running your own benchmarks um your feedback would be absolutely valuable for us because we are currently very much iterating um and I'm happy to connect you to our developer relations team who can support you in setting up and installing ckvm 1.0 locally onto your laptops second um if you want to try out Bonsai which is our remote Moving Service and you don't want to run the CK virtual machine on your local hardware

um please request a bonsai API key this is a simple Google form um I'm usually the one who approves this API key so I'll be able to approve all of you here and you get 25 Cycles as a quote to work with initially which is a lot of cycles and it's a great easy way to get started with writing your own rust guest program and then testing out how are remote proving service Works um what is kind of you know the proving time and the proving cost that you are experiencing through your requests it gives us a lot of information as well on how to fine-tune Bonsai and how many clusters of gpus to use um and to service and thirdly I would love to encourage

everyone to learn more about steel um this is our ZK co-processor solution um it essentially is our view call library that enables these programmable storage proofs and allow uh application developers to write applications in Rust and deploy them on any chain that they want um we usually support almost all ebm uh optimistic chains and also some of the ZK chains such as ZK sync and starkware so if you choose to deploy your application on there and generate risk and use our Z kbm to generate risk zero proofs your proofs will be easily publicly verifiable um and we kind of take care of that so so yeah let me know um how

you will how you find steel we're always looking for more application uh applic application developers who want to use more of a co-processor solution and that's about it so thank you so much um I don't know if I have time for questions uh but I will pause there because I know I went through it very quickly thank you so much I think that we will collect questions from the a and send back to you later on and sounds great okay thank you for time bye bye [Applause]