Secure Interoperability with Zero-Knowledge Proofs | Balal Khan, ZKEX | ETHTaipei 2023
ETHTaipei·Mon, Oct 9, 2023, 12:00 AM
Transcript
I'm actually one of the co-founders and I even though I have a computer science degree I'm actually the least technical person on our team and so this is a bit of a challenge for me to talk about the technical side of our of our protocol um and it's actually one of the core features that enables us to build some amazing use cases which have never been seen in Industry so it's it's going to be slightly half Technical and half use case oriented so uh I'm very much to kind of developer who believes that there's no point developing anything unless it has a use case and particularly in the blockchain industry we all get criticized that we're building Tech that has no use case so we want to share with you a case study our own case study of something which we think is potentially quite quite revolutionary so I'm actually going to focus a little bit quite closely on new application of zero knowledge technology which is going to be in the security space and it doesn't really get much attention because it's very new all the attention you got so so far is scalability so ziki is seeing stock wear and scroll and all those guys are doing some amazing things with scalability but there's actually some new applications with with security which I personally believe in our team believes is a more fundamental problem because if something is not safe and secure um don't really care what network is actually sitting on what they want is they have an asset whether it's nft or a piece of crypto or some something else they want to do something with it and sometimes the work is quite passive it might be staking or holding an nft or it might be quite active SO trading assets or playing a game but the ultimate use case that people are looking for is people are looking to make money and our job as Builder is to make it easy for them so if you have assets on one chain and you spot an Arbitrage opportunity on another chain let's say a new meme cake meme token came up on Solana would you want to buy then you've either got to move your money or you need to use a trusted third party like a CeX to leverage your original assets let's say you've got usdt to buy the assets on another chain now a CeX makes it easy because they take away the complexity but if you do in a decentralized way you have to use Bridges unfortunately moving your assets using a bridge currently is quite expensive it's complicated time consuming and that's why 99 of people are using cexs and C5 point of view they don't want to lose the users and they don't want to lose the assets to drain out of their Network or their chain they actually try to hold the user and the money in their Network and force you to make it difficult for you to move out and the bigger reason though actually is as an industry we are going through a massive diversion of different ideas and different Technologies and and maybe in five or ten years some of those ideas will be proven to be wrong or not as strong and the stronger ideas will come forth so there will be like Divergence so many different l2s right so many l ones so many different contensors ideas or architecture ideas but in five or ten years some of these chains and l2s will die and will have less and have will have convergence so we as developers can use ZK technology to force interoperability between these different chains and networks since they're not going to do it themselves we can do it for them and we have to do it to the point where the security is taken for granted now I have a point of view that uh there's a two things here like one is multi-chain and one is cross chain the idea of multi-chain is that you have the same app connected to multiple chains and the user doesn't really care about the underlying chain they just care about the asset with whether it's sitting on polygon or eth or Solana user doesn't really care that much but cross chain is something different when you actually need a utility on a chain which is unique so it might be a gamified project is on BNB chain and uh the you have a version of your app on that chain it might be slightly different and then you move your assets across so you can use it natively on that chain so actually both multi-chain and cross chain are valid case studies but they're different now I want to go very very quickly to I don't think everyone here is the expert in ZK honestly speaking so I wanted to find uh what aziki's knock is because it's important for what I'm about to tell you later on the point about Zeke snack is that there's two points the first is that you have a proof system basically it's a very very small proof system and we call this the snark not the ZK but the snark bit and what it allows you to do is it basically allows you have approver who's on this left hand side to convince a verifier on the right hand side of something oh that something is true and the amazing thing is no matter how complicated this secret is it could be hugely complicated but the actual proof that comes out of it that the prover generates is Tiny is very very small so you can have like extremely extremely complicated calculations and Mathematics going on but the proof itself is Tiny and which is which is quite an amazing thing so unfortunately the prover has to have a very very powerful computer a lot of computation power to actually create that succinct proof however once it's made it's really really quick and fast to prove that it's correct and the verifier on the right on the right hand side just checks the proof very fast and very quickly and if it's okay okay thumbs up can continue to continue so just for proving that a certain computation ran correctly when you add in the ZK side zero knowledge it means that you want to um you want to prove that something worked correctly but we also want it with zero knowledge which means that we want to prove it's correct but we don't want to give any information about what happened in the secret so the point here is the proof is Tiny so the second point is that the prover is when the prover uh wants to prove that statement is correct then then there's going to be a single approver usually in most cases and a lot of people criticize ZK projects saying that oh you have a single prover which is centralized uh doing the the mathematics and there are ways around this but essentially you can have that collaborative proofs but to be honest even if I'll be honest we have a we have a centralized approver however this centralization isn't as bad as you think because uh unlike a consensus system which might be controlled by single entity then the the worst thing that approver can do is just to Pro is is that they have to follow um they have to follow the um uh they have to have to follow the mechanism that's built inside it so either they prove something or they don't prove something it's as simple as that so the amount of damage that can be done is not the same as a as a as for example a multi-sig bridge or something where they could potentially can change the direction of of assets and things like that this is it's a very very simple and very kind of like innocent kind of centralization but you can decentralize it this is a this is the point but the point here is that the amount of decentralization here is to protect the asset and to make it secret so it's kind of decentralized in that sense but the actual architecture itself is like it's it's it's it's definitely magnitude is more uh stronger than uh say a multi-stick bridge or something like that it's very very powerful now this is a really simple view of what cross chain looks like so crushing protocols basically they coordinate the state change so what happened on the source chain and what happened on the destination chain and so the core security properties of a Crossing protocol is that the state communicated from one network to another is valid and final in the source Network and the cross chain State communication is communicated in a in a timely manner as quickly as possible basically so you have message based uh token Bridges so there are the bridges which allow liquidity Flow by messen messaging across chains and they typically allow for the minting of assets on the destination chain so you have the lock in mint so you have to lock and burn the original asset and you meant one on the destination one then you have a liquidity Network which is one Higher One level above and this is when you move already minted assets from from chain to chain so they allow users to move assets to other chains assuming that the asset already is um is is is is is is a valid uh asset on the on the destination chain using message Bridge basically so the message bridge is like a cross chain messaging protocol on a very low level it's not only for asset transfer it could be any kind of messaging uh whatsoever so there's actually four kinds of risk when it comes across chains so this network architecture implementation and operational and I would say the most fundamental one is the network risk at the top because um early on I just defined what it is about the core property of a cross-chain protocol essentially by having a crushing protocol you have to coordinate exchange between different networks and we're making a fundamental assumption about the soundness and the safety and the liveness of the network itself and next below that we have um architecture risks which is basically the design of the protocol itself and different protocols have different uh different security models they have different trade-offs and different assumptions as well and then these are sources or risks themselves that if something was not correct it could be uh they have to be all these risks have to have to be considered and mitigated so following that is implementation risk and a simple way to think this is about the uh code itself so if you have a bug in your code it could actually lead to a massive hole in your protocol it's very common and so any kind of risk that risk them from this kind of creation of this kind of code is related to the uh uh is a vulnerability in the protocol itself and the very last thing at the bottom is operational risk which is basically risks that stem from how these uh protocols operated and managed and typically the protocols involve a number of different moving pieces managed by different people or different um uh different kind of pieces of code so there's a huge massive surface that things can go wrong in while the bridge is is alive um so I'm very keen on the time it's already 44. so I'm going to skip forward a little bit and I want to go forward to the different kinds of bridges and the first kinds of bridge that I want to talk about is the trusted architecture so the worst one the one the most extreme is on the top left which is basically having an external validator and this is for example what you use you might have this for a central uh government kind of issued kind of token where you have the trusted intermediary they can say yes or no to you they can censor transactions they monitor everything so this is the worst possible kind of bridge that you can have and unfortunately they are actually coming soon all the governments that want to implement this kind of this kind of crypto but this is the worst kind essentially the most extreme um and on the right hand side as we become more decentralized um we have a we have the external validator set Bridge uh so what easier here is that we have uh the idea is similar a little bit similar to the first one but we have a set of parties typically a multi-sig that attests the validity of the state of both sides and those parties and the mechanism they use amongst them uh use basically an honest majority so if you're like five people signing up to to agree on something then as long as the majority say yes then it will go ahead you know that this is flawed lots of people have been lots of bridges have been uh take advantage of of this model when somebody can mimic one of the those parties then it can it can go really bad then at the bottom we have something called optimistic bridge this is actually even more decentralized as well so I don't like to call it two it's very very trusted it's still quite decentralized and essentially it's quite similar to an optimistic roll-up where it relies on optimistic mechanism with fraud Windows to essentially resolve any kind of dispute about the ability of of state and by default it says that yeah something is valid until it's proven that it's not so the the difference between the external validator bridge and optimistic bridge is that optimistic Bridges they make a the honest minority assumption as opposed to the honest majority Assumption of validating set Bridge Now we move to trustless Bridges and one of the most secure models would be a state validating bridge at the top so in this case what you have a destination Network and let's say Network B that receives state from Network a validates the state transaction corresponding to that state and independently verifies that any state he receives is verified to the rules within that protocol so basically that means that this is a real example good example of a roll up uh say a ZK roll-up inside ethereum so it doesn't have a different security mechanism it has the same as if it inherits the same security as as ethereum so this is actually very very secure so you can be quite assured that ZK Roll-Ups are very very secure because they inherit the same as as ethereum and so um over here it's essentially it's uh it's it's we can categorize this as consensus uh verifying so Bridges and here are basically bridges are what each network uh they're doing is not really uh they're not really um not not really kind of validating state or state transition but rather at a high level they verify that consensus has been achieved in any block that it receives so basically in this scenario Network essentially uh kind of relay blocks amongst each other um sorry sorry I'm actually talking about the second one uh sorry apologies so the consensus verifying Bridges okay so in this in this scenario networks essentially kind of relay blocks amongst each other through the help of uh intermediate trees and each Network can independently verify whether the blocket received or the block header that it's received has a valid consensus uh according to the consensus rules so IBC on Cosmos is a really good example and this is considered to be a really secure method as well and the the question that people have is why can't we build this in ethereum and the the thing is that IBC is a really elegant solution to cross-caine communication problems so you run a light client for the source chain a on on say a Target saw chain B and that like client running on the destination chain verifies consensus of the original chain and keeps track of the original chain header the problem with IBC kind of this kind of consensus uh lightbridge client the IBC type mechanism on ethereum is that ethereum computational environment is too expensive very expensive in terms of gas to verify the other Chain's consensus especially if the other chain is non-evm so bridging from ethereum to other chains also has problems so keeping a track of ethereum's very large validity set and the corresponding public key and state distribution is quite burdensome it's it's it's a pain in the body not really possible to build so the solution that people come up with I would say in the last one year is Zeke Bridge most people haven't really heard about it but actually this is quite beautiful quite elegant in that it's a variation of the like client Bridge however what we have is uh we the ID here is instead of having each Network verifying the consensus of another Network that's can be quite expensive we do off-chain and we use validity proofs that are sent to the network themselves so essentially ZK Bridges use ZK proofs to make the verifying consensus more efficient in the same way that say we use CK snox to help ZK roll-up teams scale execution so we're now able to use the same idea but for bridging here as well so it's fast and very efficient so there are actually Four cool projects which I like which I follow uh the first is succinct um the second is electron Labs electron Labs is interesting because they actually have the idea to rebuild IBC in ethereum um but it's a similar kind of idea as a succinct and we also have the the literally called ZK uh Bridge Project I think it's called a run by a company called polar poly Hydra or something like that and we have a fourth interesting uh variation it's not strictly speaking a bridge but it has a multi-chained roll-up which is a z key link so Ezekiel link is I think the only modded chains you can roll up in Industry right now there's another one but they're not really PR haven't really made it yet they're still in beta but Ezekiel link is pretty much ready to go live so we have this new ZK interoperability standards and I personally think that over time this will become the standard because they are not assuming inherently like other bridges are secure but they use Game Theory to be secure while ZK uses mathematical verification to be secure which is just better it's just better not to say other ones are bad but this is better and potentially much faster the problem right now though is computationally ZK is very expensive but again with time this will get a lot faster a lot better so uh to go through a really quick example we we ztex are using ziki link uh for several for several reasons because actually they were one of the first protocols to actually have a working uh API we could integrate into and start using these other three protocols came a bit later and what we like about this is the ability to have multi-chain as default be able to use so people can use their assets on one chain and buy and sell other assets on other chains which is quite revolutionary in in Industry so there's basically three stages in a classic ZK roll-up solution uh so number one is the is when you have a commit stage uh you have a proof stage and also you have an execution stage however the interesting thing about multi-chain ZK roller is you have you have a new thing a new stage called consensus and this is essentially where you have a Oracle Network a third-party Oracle Network process the stage where it basically uh has accomplishes The Interchange of a final route of each chain so you have essentially a recursive proof so on chain a you generate a final route on chain B you generate a final route and then you have a recursive proof that is checked by the Oracle so these basically you have like two systems that are uh that are that have a both both networks have a mutual final route so it's very easy to check whether or not the cross chain transfer was was valid or or not so if it is valid then essentially the Oracle uploads the transaction parameters and the final route to the layer one or for settlement and it's settled so in this way you are mathematically verifying cross chain transfers in a way that hasn't been done before so we essentially have a check and balance security design the cross chain transactions are verified with ZK stocks they generate the finer routes and then the Oracle Network which is basically independent layer of a group of druries and we are using layer 0 as the independent Network and so they are the ones who check the final routes from chain to chain and compare the final rules to make sure if they're consistent and so this is separating the verification and the Judgment so we have two networks so somebody wants to hack us they need to hack zk's link and they have to hack layer zero so I think not really possible so we think we are very very secure in terms of bulletproof security for for any asset or the on the multi-chain asset I don't think any other Bridge can say this uh they always have I think some kind of compromise somewhere I don't think we have any compromise in comparison so we have no even we can't rug our own our own customers to be honest we we have no idea what's happening either as well we just know that it's it's going okay and if something was to happen in the middle maybe the sequencer gets corrupted or something like that the worst case scenario is that rolls back so I want to summarize what I just said with a little bit of a metaphor to and I I like metaphors and analogies so if you imagine that current bridges are like um like like pots of gold and like cash and jewelry sitting in the middle of the town uh the city center and you have security guards standing around the all this money and assets and you just hope that social security guard does not fall asleep or he's not corrupted you have to trust that the security guard will do his job to protect the assets but on the ZK uh using the ZK technology instead of what we have is like we have like a a bulletproof gloss house that's protecting all the assets so only you are the one to get the key and only you can get to your locker and extract your money no one else has your key no one else can actually access that money but it's all transparent at the same time it is transparent so CeX on the other hand is a black box you have no idea what they're doing with the money that's sitting in there you don't even know if there's any money in there it might be empty because we saw this with FTX there was no money in there actually no assets they stole it but with ZK essentially we have a transparent box which is pretty much uh bulletproof so at the very beginning of my talk I mentioned that 99 of people are using C5 it's because ultimate asset diversification is very important we should not stop people from Trading what they want to do we should not stop them we should enable them so if you make it difficult for people to take advantage of opportunities to make money then activity will drop on your network eventually and eventually the network effect of crypto is less people are in active in crypto the worse and worse and worse it gets for us and everything might even collapse eventually if it's if it's bad enough so the source of assets from multiple chains must be maximized we must maximize activity as much as possible we shouldn't be too kind of stuck in in terms of methodologies which must you must enable users to do what they want to do especially outside of ethereum as well um so if you want to access assets from multiple chains then cross-chain bridges are the first solution that people think of but they're also the first problems that we have with security as well and if assets deposits are implemented on crosstain Bridges then there will be problems um 2.5 billion dollars last year and we don't know how many this year there are hacks going on every single day pretty much and plus the usability aspect as well is very very painful right so with ZK technology we extend essentially we can deploy uh to multiple chains on ethereum all the ZK Roll-Ups uh polygon uh Avalanche zikisyncs.net scroll and others and it natively supports trading tokens on all these chains without needing any Bridge whatsoever so the way it works is you have complete reassurance that you can lock your assets on your wallet and then to use as collateral to trade on ztex with the reassurance that no one else has access to the app to to the asset so um so that essentially that gloss house analogy is basically uh gets even better because if you have a sequencer then uh inside you can actually see see you can actually watch that sequencer and if you don't trust that sequencer you can even have a watcher outside the glass box and those are those can be independent third-party oracles and even for example um if you're if you're a market makeup firm and you didn't trust uh what was happening inside you can still watch it so these win to be a witness is very cheap and very simple so you have complete reassurance that everything's secure and everything is safe so I was actually going to tell you my time is up I was going to tell you that actually we are the first decks to have portfolio margin ask me in person what that means a very low entry for retail users and also Pro Traders and there's no cross-chain rest whatsoever you can buy and sell any token using any asset whatsoever you have token merge as well all your assets are aggregated on ckx very very cheap very fast very easy blah blah blah but actually what I want to say is we're going to rug pull our users uh next month because people think that we are actually secretly CeX when we actually are Dex so we to prove it we're going to shut off our sequencer for three days or shut down a network and we're going to post like memes of us sitting on the beach with like still we stole your money but actually users can actually connect to a recovery node and get their money back so we're going to prove to people that actually we are not centralized we're not custodial of your money whatsoever so any money you want zkey X anytime whatsoever even if we turn off right now we turn off and run away no it's okay use money safe you can get it back on chain it will rebuild and those EK proof will be generated and it'll come back to your wallet within about half an hour so you you're completely safe so that's what I was going to say I'm here to tell you that we're going to rug pull you very soon so yeah thank you so much for your time [Applause] so thank you for bell for your great talk so we can have one question anyone okay I hope I didn't scare anyone I was only joking it's a fake rug pull not a real one okay thank you though cheers okay all right so uh all the station on the day one are over so since we're coming and I would hope you all learned a lot today and we will publish the recording to the YouTube and ensure you can watch the talk again and uh in the evening we have a lot of a side events and then you can find the information on the website and the last please remember to bring your page and the ticket tomorrow to ensure that you can get into that venue thanks
Automatic transcript — names and jargon may be misspelled.