Polygon Aggregation Layer: Cross-Chain Security Thru Chain-Level Accounting | Jordi Baylina -Polygon
Ethereum Denver·Wed, Oct 9, 2024, 12:00 AM
Speaker
Jordi Baylina will explain how is possible to bridge assets and messages between chains in a few seconds. I will talk about the composability of the chains. On the technical side, I will highlight the importance of zk-proof recursivity to aggregate the proof of many blocks of different chains and consolidate them in a single proof in the Ethereum mainnet. APPLICATIONS FOR ETHDenver 2024: #YearOfTheSpork ARE OPEN APPLY NOW https://ethdenver.com/apply
Transcript
hello everybody good morning I am Jord Bina I'm the technical lead at polygon zkm and today I want to explain a little bit the work that we are doing in the uh in the aggregation layer aggregation layer is part of the polygon 2.0 ecosystem is uh uh the part that mainly uh interconnects different chains as you know the polygon 2.0 Is We I like to call it a constellation of uh of chains uh the first one is the polygon Z kbm but here other networks are going to be connected uh I mean polygon Maiden The the POS is going to be connected also here to the to the polygon 2.0 but here we're also connecting all the cdk cdk this can be private change public change you can can build your own chain I mean you can uh and the idea is all this change needs to be connected and uh they will share the same liquidity and they and another Point here is uh the composability between chains so the idea is that from one chain you can have a smart contract that maybe is calling another a smart contract in another chain and then coming back and transferring values between one chain and the other and ideally this should be done fast uh in a way that uh from the user perspective it should be seen everything like a single as a single as a single Network okay and for doing this the I mean the main technology that uh enables this is the ZK is the ZK technology so um this of course one another way to see this is like uh I like to to talk about the simul about processors I mean here there is like two way to scaling processors one thing is doing processors faster but the other is put putting um setting more cores uh uh uh as a processor so of course uh the the each chain there is a technology to to make this chain faster but at some point there is some limitation and then the way to scale is having many processors in this case many chains that con connect and communicate uh one with the other here of course we are talking about a a trustless uh I mean a trustless reach in uh thing that you that it doesn't depend on third parties and things like that okay so yeah this is the main advantage I think that from the user perspective this can be super interesting I mean imagine for example um I don't know a a a private network of some corporation uh um talking maybe with another insurance company and doing some swap in uh Unis swap uh chain or I mean just uh there's a composability between between chains this uh I mean here we are enabling for the people that's uh all in the space uh this remains me a lot at the 2015 or something like that when we were talking in ethereum about sharding uh at that point we didn't distinguish between data data availability and and everything I mean Char were just execution environments and at that point and we start talking about this cross chain uh I mean this asynchronous calls uh cross chain communication or in this case was cross shart communication on that this is the equivalent that we have right now so see no it's time actually to put that or that theory that appears in 2015 2016 and put that in in in practice okay so the first step is uh the what we have I mean this is the XL y bridge okay so how in order to understand how this aggregation layer works we need to understand how the the bridge uh works and what's the idea of the of the bridge okay so let me explain briefly how a bridge works okay uh if you have different chains and you can consider L1 as another chain maybe it's a special chain but at the end it's another chain every time that a chain wants to transfer funds to another chain actually what it's a we call Lo we have a um a kind of a database or if you want a Merc Tre of exits of that chain I mean this we call this local exit route okay so you have a uh a chain every time the uh uh every time that we do a uh that transfer to another chain we add a leaf to this tree okay and in this tree is an aen only tree so it's you you see only the different uh the additions to those trees okay and here the idea is that uh we collect this roote of this uh local exit route okay in main net and we create another roote of all the trees so it's a a tree that Aggregates all the trees of all the chain and we call this tree the global exit route and This Global exit route is actually um broadcast to all the networks so the idea is how it works I mean you you you send phones to another to another chain you I mean you you send the phone your phones to a Smart contract this a smart contract actually updates the tree the local xit tree this local xit 3 when the proof is generated uh it's inserted in the global xit 3 the global xit 3 um it's sent to the other chain the other chain already have this Global X3 and then in the other chain you can claim you can claim those funds because you can prove Pro that uh the exit in one side was uh is in the global exit tree and in general you also Mark that this in order to not double a span or not that so that you can only claim once uh you mark that as a as a claim okay but um but see so so and um yeah this is very much how the local Exit 3 uh would look like okay this is the kind of the leaves that that you can see in there okay so um I mean this is actually what's running I mean we already have some uh some private chains connected to the bridge since the last uh since the last week and uh but this is relatively slow why because well when you do a transfer the other chain cannot start using the funds until it's sure that uh this uh local exit Tre is propagated to the global X3 and This Global X3 is actually included in the in the state and for that I mean this this is a slow but because I mean the idea is one chain when when you're sending uh some uh funds from chain a to chain B uh well you need that chain a needs to generate the proof and publish this proof on on on ler one at this point then the you are sure that this Global exit route is updated and then you can use it in the other chain generating approve currently it's a process that takes a couple of minutes this can be reduced I think that can be reduced to a few seconds uh with the uh technology I mean with the Improvement of the ZK technology that uh that are coming but in any case there is this L1 transaction needs to to happen and the chain needs to publish this transaction okay so this okay this is a first approach this is what is right now uh it's good because we already we can communicate different chains and this is the first stage but uh we can do it better okay so what's the next Improvement okay this is this is not ready yet but almost ready we are auditing the smart contracts the idea is that um in the CD case in polygon instead of each chain um creating their own proof and Publishing their own proof and paying the cost of the proof the idea is uh that one proof rules it all I mean the they is take all the all the proofs of all the chains and aggregate all the proof to a single proof okay and this proof and then when you publish this proof is it's a proof that's uh uh that's uh proving all the chains okay so it will not earn directly speed because it's exactly the same you need to prove but the idea is that you that the cost of the proof is is going to be much much much more smaller and because this proof is aggregated to all the chains uh we can uh send this proof more frequently so we can send maybe this proof every once every minute two minutes over every three minutes because it's a proof that's common to all all the chains of course the chains can do the do the proof individually if they want but if they uh send the proof to this aggregator and then this proof is aggregated then this is going to go u i mean we guarantee we will guarantee that uh uh this proof is uh more peaceful and this proof is um it's like a clock I mean it's uh this proof is what actually triggers the transfers okay because in this in this proof is when we we take the global exit route and we send it to the to and broadcast to the other chains and this is like a clock uh uh for for all these all these transfers okay but for this we still need to do white for the the proof generation and the clock okay so what's the next stage okay and this is mainly the core of the aggregation layer in the future okay the next stage is the idea is to have a A blockchain or something similar that's a kind of a coordination blockchain okay and the idea here so the idea here is that uh the chains the chains can commit to a given State okay so and um okay they come to this when a chain come to one state the chain cannot change this state so the other chains now have the warantee that this state will not be will not be modified and um the other chains can start using this uh in the local the local exit route or the state of this this change can start using that that that chain what are the conditions that this uh that that the other chains uh what what conditions are required for the other chains to accept this well the first is of course that the state is committed and the second is that the second chain is able to generate the proof that goes to this state so actually it's not necessary to generate the proof if another chain is able to generate the proof maybe because it's following the other chain they can start using the other chain why because the state of the other chain is committed and if the other chain doesn't publish the the proof you can always build the proof so the other chain can build the proof so then this is this warrantees this warrantees that uh I'm not going to be locked so what's the problem I mean what the bigger problem let explain it in a different way okay so imagine that we have a chain a and chain B chain a commits to the state one to A1 and then chain B commits to be one okay but the chain B requires a one to I mean it's it's it's it's uh it depends on A1 okay so it's using the local exit root of uh of uh A1 okay so if the A1 if the state A1 is reor or it doesn't change then B would be lock for that so when chain B decides to include uh A1 to depend on A1 chain B needs to have the warranty that's able to uh prove the A1 and that A1 have the guarantee that that the chain a will go to the exact state route that that chain A1 okay so and this chain of course you can uh you can commit to different chains later on you can prove uh you can prove the different states and the proof you see here that there is a kind of a dependenc C3 uh between chains I mean there maybe the the state uh A1 depends so the state C1 for example depend on B1 but the B1 depends on A1 here there is a if you can see a graph of dependencies so the state actually the final state becomes only valid when all the dependencies are solved okay and this but can be computed dynamically and prove it dynamically at this chain is going to be also a kind of a checkpoint uh point so points where you will take this state and the aggregated proof will be computed it will take all this individual proof and this aggregated proof will be computed and then send it to layer one to just to consolidate the state and this can be done again once per 1 minute to minutes 3 minutes or whatever but the cool thing here is that the cross chain communication can be solved uh really fast I mean here we are talking about seconds if this um if this uh aggregation if this aggregation chain uh has a finality of two three seconds that means that uh in 10 seconds you can do a full composability between uh between different chains okay so this is the I mean this is very much the core of the aggregation layer here I mean there is a lot of uh details I mean about these dependencies the proving the aggregation of the proof of all this but this is the main idea okay and from the user perspective I think it's interesting to see that how we are solving uh this uh fast intercommunication layer in a trusted in a trusted in a trusted manner okay um also this this also this chain uh can be used U can be used to I mean this chain also can can be used also to decentralize the approver I mean because this proof anybody can should be able to generate the proof and in this chain you we can create all the cryptoeconomics for the proof generation uh so that instead of being a central server that's generating all the proof U different chains or different actors can generate the proof and get reward uh for that and this is the chain that will coordinate the proof aggregation uh uh uh of this okay and just to finalize I'm a little bit changing a little bit here I just as a as I mean as a responsible of the zkm team here I want to uh explain the road map of course it's no strong commitment but this is I think is good in the conference to explain what we are doing inside the team and this is uh and we can what you can expect in the upcoming in the upcoming in the coming month okay right now we are um I mean uh fully working in the EIP 4844 4844 I mean it's for thata availability is going to be an super important uh EIP this is going to be enabled um uh next next month in uh in in the main net okay and so so we are working and we expect uh to already uh be using e 4844 at the beginning of May okay uh and then we will work with data compression okay see these are the big uh things on that in parallel we also uh working actively in the Aron integration so this will increase a lot the performance of the Z kbm because the main client is going to be uh arigon here is the the RPC and the sequencer that we're working a lot and then in parallel we're also working in the technology in the vop SP2 this will allow us to remove the counters uh I mean this is a ZK counters as a specific thing of the type tools rollups but I mean this is most of the users should not care about but are some defi applications that uh they currently it's a little bit difficult to handle that and they with what cops to remove all these counters and also increasing the performance of the pro we expect I mean we don't have uh current numbers that but we expect that uh 2x 3x uh uh Improvement on the proof generation will happen in the the B cops data compression again we we in the data compression we expect that the cost of the full Z kbm should be something like between 5x and 7x uh compression and this is going to be very much the the the cost in parallel right now as I mentioned before we are boarding the cdk the first I mean the first networks are already live on on on Main net and we expect to uh the next uh weeks and month uh to start on boarding different uh different cityks uh uh mean different chains I think here even from the business perspective it's a super interesting opportunity I mean the cdk uh it's a it's a a sovereign chain I mean they can have their own token they can they can get all the fees there is a lot of new opportunities for uh the new reward I mean new um new um monetization models that can happen because I mean the if it's a centralized sequencer you can get all the fees you can centralize the centralizes going to validum to no validium so here the the the vision here is that uh all the apps instead of having to create create their own uh layer one that's what they were doing uh I mean recently the idea is that they can just run a uh uh Layer Two uh their own network and uh yeah that that's that's going to be much much easier and they can focus in their in the specific uh application there a concept of dab chains or uh I mean there is a lot of opportunities here on the on the on the cdk uh Awards okay and of course uh we are also starting to work in the on this aggregation layer what I presented here the aggregation layer V2 I mean this aggregation of the the proof aggregation of the different circuits this I would say that the I mean the the the the the proofs and the I mean the proofs and the smart contracts they are done so this problem we are auditing at that phase so we hope that in I don't know one month two months at most is they're going to be available and we are start uh working hard in this aggregation layer in the V3 in this U uh chain to do this coordination between proof and actually go to the uh few seconds uh cross chain uh composability and that's very much what I wanted to explain thank you very much for listening to me
Automatic transcript — names and jargon may be misspelled.