Build high-throughput and private applications on Ethereum / Dominik Schmid
EthPrague 2023 · June 2023 · 11:38
Dominik Schmid presents Polygon Miden, which aims to extend Ethereum's feature set so developers can build high-throughput and private applications. At ETHPrague 2023 he describes Ethereum as a base layer designed for stability and security, with rollups opening new design spaces, and shows where Miden fits as one of those rollups.
Speakers
Topics
From EthPrague 2023, hosted by ETHPrague.
Transcript
hello hello nice okay let's check um okay yeah uh I'm Dominic I'm from uh polygon Maiden basically like polygon has three different uh ZK products and um one of it is Portugal Biden we are more of a research project I would say but on the uh like we are getting tested next October and it works quite different to other other products I would say um but yeah basically uh what are we actually doing so uh ethereum we think is still our best bet as you all know basically when you look at the amount
staked and the number of professional active developers then you can see that all of those um chains basically they are quite the same but ethereum is outstanding so ethereum is by far the safest chain in the POS like I don't want to get into that discussion now and it has the largest developer community so it would be stupid not to build and not to tap into that ecosystem not to build on that however um the evm so the the underlying backbone of ethereum is limiting uh the applications that we can build so far so
ethereum basically the evm processes State changes sequentially so one transaction at a time one block after another but all with always a global lock so actually it's like sequential um processing and if PayPal would have been built on top of ethereum or using ethereum then you would all see that like this is my personal PayPal account so the evm is very hard on privacy so you can try to get around that but from its like internal structure the global account States it's very hard to get privacy on the evm
and um so yeah that's our thought process so the ABM is somehow limited it's not suitable for applications that require very high throughput complex computations are quite costly and transactions and accounts are always publicly available and visible so but real world use cases like let's think of attacks or um yeah attacks that should work somehow like a stock exchange um or simply buying coffee in the morning with crypto need very fast and cheap uh transactions we probably need parallel execution we needed to have at least partial privacy in the sense of
privacy as we have it in PayPal at least and um way better wallet security and good user experience so the question obviously is how can we use ethereum but not the evm for us and the answer kind of obvious I think to since the rise of the roll ups so we have polygon Biden here as an example of a zero knowledge roll up that can tap into the ethereum ecosystem but with different features so basically we are zero knowledge roll up with not running on the evm and the goal is that you can create applications that are at the moment
infeasible on ethereum or evm-like systems and uh like how we do it basically is uh we prioritize in our virtual machine um the zero knowledge uh protocol over the usability so that's it but I will explain how it is uh what is actually new um I think most important is client-side proving so basically uh the modern users will be able to create zero knowledge proofs on their machines and with that we almost have it so with that you get privacy obviously when you use a zero knowledge proof of your own State change then no one knows what's happening on your own State they just will always
know everything is correct but they don't know what's happening and it also enables very low cost computations because if I use a zero knowledge proof then in like in contrast to a normal blockchain the state does not need to be recomputed by every node in the network they all just check approved that's actually quite cool because then I can run very complex computations that are super cheap I get concurrency and that hopefully leads to high throughput applications and in Maiden you can update and recall transactions um that we think leads to user-friendly depths but let me explain you how it
works and then I can show you or we can create some zero knowledge proofs together um so basically what's different on Biden to other systems on writing their accounts and nodes and accounts you can think of as uh in ethereum like an ethereum account and nodes are quite like banknotes and both can carry assets right and um those are counts they send notes to each other when they want to exchange assets and this is much like cash works right so I give you a banknote and then and this banknote basically carries the value when I hand it over to you
and these accounts they can do that asynchronously they can con asynchronously produce and consume nodes and when an account consumes or produces a node we call that a transaction and that is actually quite different but this is why we can create user generated zero knowledge proofs basically when you look at that that's what we mean with a transaction so Alice here she has 10 magic and 5 ether and she wants to consume a node of 5 ether and for these five ethers she needs to pay 5 magic which is quite a nice exchange rate
given that today's uh yeah but whatever so okay see she consumes this node and this is her account state in the lower right and the transaction basically which is defined as a state transition of one single account so as a result we have Alice account in a new state having five Matic and 10 ether and she produces she has produced a note with five magic and that goes probably to the sender of the first note or whatever we don't know but like this is a transaction right and the important Point here is a transaction always involves only one account and because for every transaction in
Biden there's always a stack proof there's always a zero knowledge proof for these transactions now you can combine these things that basically because it involves always only one account the stack proof can be created but the owner of the account alone because it doesn't need information of these states of the others like when I produce a node single-handedly or consume it and create it I can create a zero knowledge proof of it and um like these zero knowledge proofs can be created by the users in parallel and then they get batched together using recursive verification
and put into a block but this is basically as it works with other zero node rollups as well and then at the end you have one big proof on ethereum that proves the global state of the network but different to other zero note rollups is that these transaction proofs basically can be done by users and not only by one single centralized entity or so called approver and that's how you can keep uh you can stay private basically um yeah like let me check the time okay so my actual time is over but I would want to show you
okay I also started a bit later can I what's my son okay so uh yeah maybe I can show you this so you can take out your phone and I can scan this and this is our playground basically I want to show you um how it works so this is the maiden VM uh in in the in the browser basically the Mind VM Works in is written in Rust it can be compiled to version and so let's create a zero knowledge proof together meaning that it looks like this and it's a bit hard to use at the moment we're working on a cool compiler for move or rust one second
so and when you scroll down this is the program that we are going to prove it's a super simple program and it's way simpler than a transaction but just as a as an example so in this language that we have at the moment here it adds one and two together with zero inputs and I can now prove it like this runs in the browser and it should be done okay in 200 milliseconds I don't know like it's someone over one minute on your mobile phone when you prove it you click proof kinda nice okay so how long was it 100 yeah okay so it should be quite quick and this is the result so it's three
um the result of adding one and two together and then you can now uh you can verify the proof okay verification failed that's not never do a live demo one second yeah I think I just checked something okay so now you can verify it and you can look at the proof so it's actually like a super long hex thingy um but this is basically how we envision in the future that also uh people can in their browser create their own proofs but like their proofs of consuming and producing a set of notes and then only sending this proof
um yeah this proof here to the verifier and this is how we basically get very high throughput because these can be done in parallel and privacy at the end and yeah happy to discuss or take questions or I can show you more slides of the design or are there any questions good then uh thanks a lot and have fun at the conference [Applause] [Music]