[BUIDL Asia 2023] Building an L2 Ecosystem by Jordi Baylina, Co-founder, Polygon zkEVM
Kryptoplanet Talks · 2 Jul 2023 · 25:48
Polygon zkEVM co-founder Jordi Baylina speaks about building an L2 ecosystem. Presented at BUIDL Asia 2023, the technical, community-focused conference hosted by KryptoSeoul in Seoul, the talk comes from a builder of a zero-knowledge rollup on Ethereum and focuses on what it takes to grow an ecosystem around a layer 2.
Speakers
Topics
From Kryptoplanet Talks, hosted by Kryptoplanet.
Transcript
foreign ER I'm the technical lead at polygon ckvm and today we just take the clicker here today I'm I'm gonna do I'm gonna explain mainly I'm going to divide my presentation in three parts first I'm gonna give you a give overview of the current status of the polygon Z KVM that will launched last March then I'm going to explain a little bit then I'm going to explain a little bit the future of polygon more the long-term strategy and finally I'm gonna give some details of the current work for the
coming month that we are doing in the in the polygon C KVM so let's start as I mentioned polygon ckvm is the first ckvm that launch it actually is the currency KVM that's running mainnet in ethereum evm is ethelium virtual machine that means that's fully compatible with ethereum users can deploy smart contracts in the layer 2 without having to use any specific tooling they can reuse all the tooling that's in ethereum here is her heart remix truffle they can just connect their wallet metamask wallet or whatever
wallet they have in ethereum they just connect to the polygon ckvm and they work exactly the same way without any without any friction for the developers and for the users it has been we we try to do a let's say a soft launch this is a very new technology and we don't want to go crazy from the beginning there is a lot of a lot of new code a lot of new things and we want to get maturity so we are we are taking this blockchain as a baby we are taking from The Roots we are onboarding we are on boarding a lot of defy applications right now we are seeing we are monitoring very much we're seeing
all the needs they have and we are just trying to have a healthy growth but currently well it's already ramping up at this point and well we're happy how the network is progressing and getting and getting traction so far so I would like now to explain a little bit the what's the idea of uh polygon why polygon can scale I can bring this technology uh to the society to millions of users well as you know polygon is a scaling is um it's the division is to to scale uh ethereum
and to do that we are just having a layer 2 a strategy the idea how we see the future in polygon is many a kind of a constellation of Roll-Ups of layer twos we have the first one the first one is the polygon Z KVM but it can be other other chains here some of them are public chains some of them are going to be private chains or chains from associations and and so on and all of them are going to be secured by uh by a CK approver okay this is what gives the security all of them will share the same liquidity with L1 or to reach and because it's SDK system that time for
exiting the Roll Up is very very small it's just the time that takes the to generate the proof and this can be as low as 30 seconds or one minute that means that uh there is a compost ability it's possible to do a composibility between Roll-Ups and you can be in one private roll up do a maybe an exchange or do a some Landing or some defy operation in a public rollup and then go back to the to the private Roll-Ups or in between private relapse you can communicate one each other and this is possible again because this ZK proof this is a proof gives you finality gives you details so you can move between roll ups very very
easily the idea of this ecosystem also is that it may be Roll-Ups that require Central lights or decentralized sequencers depending on the on the application and here we'll have a kind of a staking hub for especially for the centralized sequencers where it can be a multi-sequencer a multi-sequencer network okay and all the all the all the proof that is that instead of each roll up having a specific proof what we can do is take all this proof and aggregate all this proof in a single in a single proof so that means that the cost of proving is going to be divided by all the networks the proof right now is really cheap and this will
allow us to generate the proof every 30 seconds or every minute just as a clock okay and that is when you are transferring you will be able to the the communication the interoperability between the Roll-Ups will will happen okay so this is uh how um it would look like um we are focusing very much in in in in in in the throughput in having so in scaling so that this each of these change can generate the maximum throughput for for itself we are working a lot in the current zkvm to scale it as much as we can and then when this limit is richer then we have this multi-chain
this multi-chain idea okay as I mentioned it's going to be a network um it's going to be an infrastructure Network for aggregating for aggregating many proof this will mean a consensus layer here for coordinating the generation of the different proofs of the of the roll ups and aggregating all of them um this idea of compostability this is the idea of constellation between uh Roll-Ups this is really important this is what will give a full ecosystem and the idea of the decentralizing decentralizing the sequence so this is
very important because uh uh decentralizing sequencers I mean we are building the centralized applications and even centralized sequencer is not maybe the the word centralized is not the most appropriate because the sequences they cannot do much they still have some some power maybe to kick somebody out of the system and so on so the centralized sequencers are becoming really important okay all of this is going to be we are creating what's uh pulling on the stack is a ZK pulling on the stock we start from the from the approver brewery is based in plunky two right now we are writing the plonky three it's some it's some much faster uh provency2 which is actually really fast and it's the the
the fastest proverb in the in the system uh we have the zkbm and maiden maiden is uh technology it's a different Paradigm it's not ethereum equivalent but it will allow to have like more asynchronous it's a kind of asynchronous network and uh another level of scalability at some point um we have the client or the CL the client itself have the bridge the staking hub for this mainly is the sticking Hub is for the centralizing uh sequencers for the this the the proof generation and also for some that availability in the case of validiums they will have also an
important role here and all that on top of uh of ethereum because at the end what we are doing is a scaling ethereum okay so now let me explain you a little bit what we are what what's the current work and the immediate work the work for the next uh for the neck I would say for the next six months and what what we are working in the polygons in KVM the first thing is we are going from a Type 3 to a type 2 roll-up that means so right now we are I would say almost compatible to ethereum but there are some missing I would say some specific and missing pieces most of the applications don't use it but some but to be fully compatible to ethereum we need to implement that these are Shadow 56 the lake and and pairing pre-compiled
smart contracts except for this all the op codes and all the system is fully compatible with ethereum and I would say that right now like 99 of the applications are fully compatible but we're finishing that and we hope that in the next version we can provide these uh this uh pre-compiled smart contracts another thing that we are doing is we're improving a lot the the Brewer so the proverb right now uh generating a 10 million gas proof it it already takes like one minute and a half between one meter and a half and two minutes in a big server but it's a normal server not gpus and nothing else it's just a big a
big server with a lot of memory and many cores but a normal server but we need to improve that a little bit right now what we have is like a big monolithic proof that that proves 10 million gas but in this proof uh if you see how is the proof is made we have different stand machines for doing different pieces for example we have we can call them like a super like co-processors okay we have a main processor and then we have a memory we have a binary we have arithmetic operations we have catches we have different arithmetic Steam Machines the problem is that this is fixed is is fixed and if we have a not many catch
hacks for example we are spending a lot I mean we are spending a lot of resources building a proof uh that has no catch X in there so this is not this is a little bit super optimal so the idea is to have different sizes so that this this is each of the state machine can have different sizes instead of having a monolithic proof it's a composite site proof with different sizes and this will adapt much better so here we'll have much much optimization much more optimization and we will not have to do a kind of a terrorist that we need to do that in that today in order to optimize the the the transactions inside
okay um so the advantages is that we are not wasting cells in the in the in the proverb um this allows also not to count resources one important one important feature of the of the polygons in KVM is that it's censorship resistant that means that uh you cannot so if if the if the centralized sequencer decides not to include your transaction uh you can always generate an L1 transaction with a specific L2 transactions that will be forced so that the sequencer will have the obligation to include that uh okay so and this uh this um what the
consequence of that is that you can always claim your funds even if the sequencer decides not to not to not to do any transaction that you are sending to him okay um this prover also will require smaller smaller service with less memory and also probable will fit some of these approvers will fit also in the GPU so we will expect also a much better performance on that said that well um said that I need to say that the proving cost currently is not the it's not the
proving the proving cost of the ckvm is not the critical factor that was probably the when we started to design the zkvm was the most concerning uh parameter but right now is not the critical Factor so the the proof is it's relatively it's relatively cheap okay well another thing that we are working on is is in this we call it build this is a language for writing for writing proof well here we have a lot of I don't want to extend here too much but here we we are extending this language so that we are some whole generalizing this is going to be part of the stack
and if you want to build other provers for other systems this will be more more generic okay this new system will support this variable degree variable degree proofs it will have a more constructive language this is one thing that we saw for example in the audit that we have like external external uh scripts to generate part of these uh of these constraints so we are embedding that in the same language so that's much easier to to audit and to it would be more consistent uh in the language uh well we will have functions this one well these functions this will allow to make us more complex in the language
will allow us to make more complex circuits and to reduce also a lot of the cost on this it will allow also to build so right now we have some hard-coded operations like blue Caps or permutation checks inside the approver uh we we are just enabling in the language to create this uh more low level uh objects and this will open for new constructions in like rain checks or new constructions that are happening currently in the zero knowledge this will allow us to to to to to include them and well to use all the performance that this new uh systems that are currently research we can put
inside the inside the program okay also all the constant Generations there is a lot of parameters in the system circuit that again they are from external scripts we will we will be able also to put them inside the inside the pill okay well some other details we can have like accessing not on the next row but having accessing to the previous rows and next rows um will connect also we will split right now the provery is very I would say quite specific for the ckbm but we are being doing that more generic so that's not only for the ckvm maybe somebody wants to build the zkwazam or ck and this will give as a community this proverb will become very much a standard
for generating zero knowledge proof especially for scalability this big zero knowledge this big zero knowledge proof that are important for the for the roll ups another point and probably is the most important point that we are working on is in data compression data right now the roll ups the biggest limitation is the is the that availability we are working really hard in compressing this data what means compressing this data well there is need to mention here that the roll ups there is like two approaches us for putting the data well you need in a roll-up you need to put the data needs to be available because there is an attack that if if a proverb generates a proof but the
data is not available well you know that you know that current state is valid but you know you don't know which is the state or where this state comes from so it's important that the data is available okay and this is very much right now the way to make this data available is putting this data uh on chain okay so putting this out on chain is still a little bit expensive and so what we'd want to do is well first is compress this data so that we put the minimal data on chain so that the transactions are cheaper and the other thing is also ethereum is working very hard in in in lowering the increasing the capacity so loading the the the
price for that availability and this is the the Dank chart protocol and and well the prototank chart that's going to happen next so what we are working very much is in this compression of the data here just to mention these two systems one the way to compress the data you can do it two ways one is put the transactions on chain or put what it's called the the state divs or the difference of the state that are changing these are the two approaches we are betting a lot with putting the transactions on chain we believe that the financial system understands about transactions not about uh estate diffs okay and the other
advantage of putting transactions is that transactions in general made by humans okay and human generated data has is less random it has less entropy so the compression is much better let me put you an example here imagine that you are compressing a value a human will send 1.1 ether or 1.2 ether we put one two significant bits or three significant bits but in the state transition maybe you need to decrease the gas so here you have uh I mean the quantity of information for putting the difference of the gas that's more random thing it's it's higher so we can compress a lot much much better these transactions there is other parameters
to compress for example in the in a zigiro lab we can substitute all the signators which is an important part of the data of that of the transactions by a single proof that proof that all the signatures are valid we are kind of aggregating the signatures will also um well for example another thing that consumes a lot of data is the addresses but we can use the so of course the first time you're using an address you will have to send that a specific address but the second time that you are using you can reference that as an index as a reference to a previous transaction so all this will give us a I would say um uh this will give us a a total more or less we are we are estimating a
5x this is a very pessimistic optimization we are in the Quran currently we are seeing that this may be 6 7x easily depending on the transactions but this will be given that in the data compression that when we add to the eap4844 that proton line sharding that will happen probable at the end of this year at the beginning of next year in ethereum this will give us a total of 50x okay and this will be uh the cost reduction that we will see in six months in the in the ckvian this is the direct cost that we have to pay uh that the users have to pay for the transaction so this is where the real scalability is is
is happening we're also working in the not performance optimization and I like to explain the example that what building is the KVM we build like a a very fast engine a very good engine okay but the ckvm is not a gene it's a car okay and and you need to so it's not if you want to have a car that's running at 1000 miles per hour uh it's not enough to have a good engine you need good Wheels you will need a wood a good aerodynamics you need to you need to you need to go to all the scroll screws of the of a car in also you mainly need to build like a
new car so that you can run at that at that speed and this is also an important work and probably I would say it's the main work that we are doing uh inside the polygon ckvm is to to bring this car to 1000 miles per hour if you want we want to bring this system to uh thousands of transactions per per second yeah another point that I want to mention is that we are as we are ethereum compatible we are benefiting of all the work that's done in the space and one example is the account abstraction all the effort that's happening right now with the 4337 in the polygon ckvm we have it for we have it for free uh it's
just deploying this smart contract in the polygons AVM and we will have a full support of a contract of a contract action fully compatible with ethereum we don't have to do a special wallet we don't have to do special tooling we are reusing all the tooling that the ecosystem is building okay and this is the nice thing of the zkvms that we are part of the ethereum space and having all the synergies that the ethereum is that the ethereum is happening and this is well this is the first example foreign decentralizing the sequencer this is a
little bit more a little bit long longer run because it's a little bit more complex but uh a way to understand the sequencer is uh so you can't replace the sequencer as a consensus system right now we have a kind of a consensus let's say it's uh it's a dictatorship uh consensus it's a centralized sequences whatever the centralized sequences this is what's a consensus okay but you can there it is to replace these consensus the centralized consensus with a more decentralized consensus that will depend on the different applications here we are in the consensus we have we are in
the Trillium in the in the blockchain three Lemma so we need to choose what's the right place if we want to be in in the if you if if the ethereum is enough we would be in what we have what we understand as proof efficiency this the protocol that mainly done the concept is using the L1 as the same consensus but this has the limitations it has the parameters that ethereum has but sometimes you want to have consensus that for example if you wanna finally take time of one two seconds you need a different kind of consent so sacrificing or other things so having this temporary consensus until the transactions are in layer one this is maybe important for
different applications and this is where we are also working uh very hard in polygon security is a Non-Stop investment this is our highest priority in polygon these are complex systems we are investing investing a lot of resources internal and external in security and auditing right now for example we are we in the in the coming weeks we are gonna we're gonna do a new upgrade on the network and it's uh well it currently is being audited by external by external teams all the changes everything that we are teaching this is really important and we keep the
bug bounties and we take is something that we take very seriously in in polygon because this is what at the end is the but it's important is the value that we are giving somehow okay from the training wheels right now um well next stage is uh well we need to the first thing is any of course enable Force transactions everything is implemented but in the upcoming weeks we are going to enable that then in order to be what we call it in stage two in the as according to vitalik's relapse we need to remove the the security Council uh uh currently we have a kind of a kill switch with a six out of eight uh it's a six out of eight multi-seek
with uh recognizing members from the community we need to remove that uh well this will happen it's when the trailing Wheels we are going step by step but this is a absolute planning and the other thing is also extending the time block right now we have 10 days for for updating the the roll up and we need to extend that to 30 days which is the recommended but here for practical issues we are still at 10 days these are the the things that we need to do for the training wheels this is the the this is a full run map summary of the things that we have in talking and but the idea is that uh at the end of the year uh having this
50x this is the goal that we have that we have in in mind and what we're working as always it's no commitment but the only commitment that we have is that we're working hard to scale ethereum so thank you very much and thank you for inviting me here and thank you and thank you all foreign