Hyperlane 🛠️ Permissionless Interoperability - Connect Any Chain with Hyperlane - Yorke Rhodes
ETHGlobal·Mon, Oct 9, 2023, 12:00 AM
Speaker
Join Yorke Rhodes from Hyperlane for a workshop titled "Permissionless Interoperability - Connect Any Chain with Hyperlane". Welcome to back to ETHGlobal Waterloo, where it all began! Returning to Canada's tech hub, we're thrilled to bring together international enthusiasts and local talent for an unforgettable hackathon experience. This year we had 650+ attendees from 29 different countries and 47% were new to Web3! We concluded the weekend with 168 projects submitted and gave away $250,000+ in prizes ----------------- Follow us: https://twitter.com/ETHGlobal Check us out: https://ethglobal.com Email us at: hello@ethglobal.com
Transcript
foreign [Music] thanks guys uh thanks everyone for coming um York I'm part of the engineering team at hyperlane and today we're going to talk about permissionless interoperability um and what that means if you have questions afterward or if you want help with integrating hyperlane in the hackathon definitely like come up to our booths or you can ask any questions at the end so just to start today's session I think we need some definitions of the title slide so um permissionless I think a lot of people throw that term around it's kind of like at this point used for marketing but generally like the word permissionless means that a protocol is accessible to anyone there's no kind of in discrimination or censorship for specific classes of users to access a protocol and interoperability I think our definition that we can use today is composability for applications that are on different uh infrastructure layers and so you know the internet is highly interoperable because we have all these shared protocols um that are quite permissionless we have you know HTTP uh TCP Etc um and in web 3 we're just starting to establish kind of these shared standards that allow applications to communicate with each other um but the problem we see today is like the crypto space is facing this scalability problem and people have kind of identified this as the barrier to adoption for the next you know billion users and um you know there's all these great teams at hackathons like this building out these new scalability Solutions um for you know to onboard that uh next next set of billion users but the problem is we're ending up with these like kind of Highly Divergent infrastructure layers that don't actually use sharing protocols to communicate with each other um and you know that leads to a big problem I think like if you look at the evolution of crypto we've like continued to diverge with respect to like what protocols we use um I think like maybe the first decade was like just Bitcoin payments it's like a very simple application and then we kind of evolve to these like smart contract VMS and and that got a little more complicated and we saw like ethereum and near and Solana all popping up with like different protocols um and then we some people got excited about app chains uh because there's like you know different scaling properties that you can have if you don't opt into this like monolithic infrastructure layer like ethereum or recently we're seeing ethereum kind of coalesce around the roll-up scaling roadmap I think vitalik had like a you know seminal blog post about that arbitrum and optimism now do more daily activity than ethereum L1 um and these protocols also kind of have their own new standards um there's these new DA layers that are in service to those roll ups um so we have ethereum 4844 it says EIP that kind of changes the cost structure if we're posting call data to L1 you know we also see Celestia this new like modular da that maybe app chains can post call data to again a lot of different kind of diverging protocols maybe in the future we'll see some sort of like plasma or sharding solution I think there are probably some teams here working on that I don't know what happened to my slides oh there we go um but yeah this is a problem um on the flip side at the kind of like looking at this from an application perspective uh we're seeing a lot of dapps actually adopt these new infrastructure layers which is like super exciting um so actually just like a couple days ago Zora which is like this big uh kind of nft social feed and Explorer application that is one of the most popular applications on ethereum announced that their going to be rolling out their own layer too using the optimism op stack um I think you guys have probably heard of like coinbase's efforts to work on their own L2 there they launched base uh test net a couple I think like maybe a month or two ago if you look at this website l2beat you can see kind of the evolution of activity over time across these different infrastructure layers and what you'll see is that actually you know a majority of activity has migrated to to ltus and so we need a way for these applications to you know communicate with each other and the problem today is we have a highly fragmented market so we have arbitrum optimism kind of the two main leaders I would say ZK sync it's like the fast follower they launched the first validium so people are super excited about that and as an application developer when you're choosing what roll up to deploy your application on it's a really hard choice because you know you have to think about what's the security story of this specific roll up what is the current ecosystem look like is there enough liquidity um you know are my users going to be stuck here if the platform decides to change their you know terms of service or maybe they're going to censor users based on like ofac or something like that um it's a really tough choice there's all these different interfaces for interacting with these things so for example arbitrum optimism ZK sync all have different smart contract interfaces for handling deposits and withdrawals from L1 to L2 moving assets between different l2s there's kind of also highly fragmented like uh Bridge Solutions so depending on you know what applications are where there's different Bridges available um and then more recently we're seeing these kind of General message passing protocols to to move arbitrary information between l2s papa hyperlane is an example of this um but again there's just like all these things to account for and as an application developer you have to kind of know about all these interfaces and you have to custom integrate every single one of these like new Roll-Ups new infrastructure layers and that's just like a really bad place for us to be in um actually just this week vitalik posted about this so like super topical um you know vitalik's like all in on Roll-Ups being the layer the applications should build for and he he wrote a blog post about kind of what the solution space looks like for interoperability between l2s um and I highly recommend this post I don't know what's going on with the connection here yeah highly recommend this post as well as the three transitions post which talks about kind of this like evolution of scaling Solutions um and how we can actually you know get users to like adopt these things in a way that's internet scale um but yeah what's the solution to this problem of like fragmentation we think a hyperly we think it's modularity um you may have like heard the term modular blockchains um it's like also a heavily used marketing term at this point but um the main idea is you want to like separate the interfaces which are exposed to applications from the actual like underlying transport layer stuff so you know if we have all these roll ups that have different kind of like security properties I think the three kind of examples we can work with in our head are like arbitrum optimism and ZK sync um all of these Roll-Ups have very different uh kind of security stories like when they when you can view them as settled what the finality looks like can you use like soft confirmations Etc um and as an application developer like you shouldn't have to think about that or like custom integrate that so instead we can have this like Universal interface that looks like a message passing interface and under the hood depending on the path that we're taking we can actually leverage different underlying transport layers but the application developer shouldn't have to necessarily understand that there should just be kind of like a community governed uh set of standards for like okay if we're going from you know L1 to optimism we're going to use this specific transport layer which is like the optimism bridge to collateralize my deposit but again like the application developers shouldn't need this crazy like switch case statement of like uh you know if this network do this specific function call so that's where hyperlane comes in hyperlane is this kind of like Universal interface that tries to abstract all these different bridging interfaces um through like a what we call this like General message passing interface and so as an application developer all you need to understand is like this dispatch interface and this handle interface so I can walk through kind of the life cycle here but uh your smart contracts or your eoa for that matter can call into this interface called dispatch which basically specifies the destination blockchain via like a chain ID a recipient address on that destination chain and just like an arbitrary uh body of bytes raw bites and behind the scenes our protocol will uh you know handle the transport layer stuff um and then on the the destination chain uh basically the handle function will be called on the recipient that you specified um and that will also provide the like origin chain sending address on that origin chain and the body that that sender sent and now obviously like as an application developer you want kind of strong guarantees around the content um and kind of like validity of you know messages that you're receiving or messages that you're sending that they're actually going to get delivered um I'm happy to kind of talk about the different guarantees that we have for different Pathways um but generally like because this is a hackathon I think it's like better to sometimes avoid those like you know nuanced discussions of like uh what the security trade-offs are and just try and build something which is useful um or like demonstrates a new use case um but yeah the idea again with modular interoperability is like as an application developer we actually have this interface uh where we allow you to configure your security preferences and your risk tolerances um so we have this like uh interchange security module interface that as a message recipient you actually just configure as an address if you opt into this like configuration layer and the idea is when you're receiving a message our protocol will ask you hey what is your security module mechanism of choice you know we provide a bunch of off-the-shelf components that you can kind of like select from and compose um for the various channels so like you know optimism canonical Bridge or uh you know using Wormhole or whatever it is our protocol will ask your application uh what security module you've configured for this specific uh for this specific like origin and sender and body you can actually have control flow on the message body which actually changes the security requirements um and so an analogy there is like wire limits in traditional Finance like if you're just transferring ten dollars um across you know two chains you might not care so much about um you know the the guarantees uh that you have in your application and you might not want to pass those costs onto your user but if it's like a million dollar transfer or if it's like some sort of governance action then you might want to like really ramp up the verification requirements um so this is like yeah modules that just generally yeah so so it's it's sometimes it's which Bridge do you want to take um we think that like uh yeah bridge is like a loaded term um so there's also different flavors of security um you know you can you can uh you can opt into like Economic Security versus like reputational security um or you can have like certain Gary I don't know why this keeps dying um so for example our default security mode for a lot of Pathways is this economic security mode where we have a set of validators who are staking On the Origin chain and they're they're producing these attestations of messages which are being sent from that chain and uh as a recipient of messages from that chain you can say uh I want to leverage like this Economic Security which gives you uh like discrete cost to attack the system and kind of it gives you a lower bound of like hey up to this or I guess an upper bound up to this economic value on this specific message I have like kind of strong economic guarantees that this message was actually sent from this chain because otherwise like the validators will be slashed it's kind of economically irrational and so um that's like one type of guarantee you could you could look for alternatively you could have these sorts of like uh yeah like if you're using a canonical Bridge you have this like fraud proof system where you yeah can can always like kind of do forced inclusion or or those sorts of things but um yeah Economic Security is not the only mode we can do like an optimistic security model which is like a very different trade-off and it's actually like like you can think about it as like operating over the same Bridge or the same tunnel but just like the security constraints that you're imposing on that bridge or actually look very different yeah not sure if you added this already but where does that um so right now we just have like uh right now it's like a a white list um but we're like really soon hoping to transition to a fully permissionless like validator model where you can put up any stake uh any steak data set it actually doesn't matter what asset it is um On the Origin chain and you're basically just like producing at the stations it's kind of super easy to run because there's no consensus then the validators are not networked with each other they're just producing attestations on messages that are being sent outbounds just need like an RPC connection to a chain um depends on the Chain uh we have all the information in our docs if you want to check it out um yeah so yeah uh the last thing I want to highlight is this uh I guess modular security Paradigm allows you as an application developer to eliminate this like scary choice of uh being locked into a specific Bridge or a specific uh you know security model or or pathway for your app for your users because you can configure this and so in future uh if some sort of like you know ZK like client becomes available for some pathway you can just configure that later on um and this is kind of like a way for you to again separate the application layer from the transport layer and we think this is like really important for uh just like application developers when they're reacting to kind of the evolution of all this infrastructure they they shouldn't like impose those things on their user they shouldn't have to tell their entire user base hey we're actually migrating Bridges so you got to go and like unbridge and then re-bridge and then like migrate to our new version like that's crazy so this is just like kind of the the model that we think is better um and it's really a framework for how to think about interoperability we obviously have like specific opinions about like what the default security modes should be um and if you don't as an application developer if you don't specify like uh your own preferences you will kind of by default be opted into R preferences but um yeah that's the like modular framework the last thing I want to highlight about this like modular security Paradigm with hyperlane is you can deploy hyperlane anywhere so we have a guide right now in our docs that like walks you through all the steps and right now it's only available for evm networks but we have um several other environments that are pretty much like production ready we're running on testnet on Solana we have a fuel VM implementation we're working on a cosmos SDK module and so really we want to make this protocol and this framework available everywhere so that you as an application developer not only do you not have to choose you know a specific Bridge you don't even have to choose a specific execution environment if you're worried that you know later Solana might become the you know might eat up all the defy market share or something you know hyperlane allows you to easily like uh have your application exist across all these execution environments and maybe in in kind of the near future your users don't even know which environment they're running on because they just have like the single interface into your application and you decide where it makes the most sense for them to get routed to um but yeah the specific kind of thing I want to highlight here is now uh if if you want to roll like spin up your own roll up which is kind of I think like you know like you saw earlier something that a lot of people are thinking about um there's like this kind of traditional problem of like okay you spun your up your roll up but like uh doesn't do anything because it's not connected to anything there's no Bridges operating to it there's no liquidity Etc um and in the past if you wanted to you know make those connections to existing ecosystems you have to go out and you have to talk to organizations and kind of Doom b d and establish trusts and and like um ensure that like you know the bridge that you're getting to come to your ecosystem isn't risky for users and isn't uh you know gonna just rug you or something um and now that you can deploy hyperlane and you can configure your own security you don't have to do any of that you can start as as a new roll-up you can operate your own um deployment of hyperlan and as you scale up and as you kind of progressively decentralize you can continue to configure the transport layer with uh stronger and stronger like security guarantees for your users but to start out it doesn't really make sense for you to impose those requirements like you don't you don't wanna before you launch your roll up you don't want to require that there's like a full light client implementation across like a bunch of different clients or something um you just want to like be able to launch your application test it iterate so um yeah we think this is like a big yeah that's a great question um so that's probably one of the biggest things that you need to understand when you are kind of building for this multi-chain future is the introduction of like asynchrony and execution across many chains definitely introduces a lot of complexity um and one of those complexities is we don't have strong guarantees of transaction inclusion um at least today um so unfortunately like um the way our protocol works is you pay a fee on the origin chain which covers the gas costs on the destination chain of like transaction inclusion but um you know if that destination Chains validator set is like deciding to be mean or whatever they can just like censor you um and then your hyperlane message won't get processed in future we have ideas about basically like building hyperlane messages into the block proposer like auctions themselves so like we could have you know block proposers like potentially an eigen layer set being aware of hyperlene messages that like want to be included for a specific block and like you know we can have a more sophisticated uh fee market for like message inclusion but right now it just falls back to basically like transaction inclusion which is not something we have guarantees about today um so even as a user on a single chain when you attach a fee into your transaction like you don't you you don't have guarantees that it'll actually get mined um it's just kind of like an assumption we make based on like you know the market dynamics yeah like uh what do you I'll call it or should you can cancel transaction from me he is a battle consolation for us that's a that's a good question um so we don't have a native concept of cancellation or timeouts or uh ordering or anything like that like the core protocol is kind of very unopinionated in that respect but um there are middlewares that you can like opt into which can kind of introduce yeah like basically timeouts or cancellation semantics to messages um with the trade-off being that you like lose out on some composability because now applications need to understand that like hey there's this header attached to messages which um you know Define some time out or whatever um but yeah that's that's a great question and something we honestly like I think should think more about um yeah um so just to give a few examples of kind of like the developer Primitives and tools that are available on top of this protocol for you guys to use um that are maybe like less intimidating than just this like raw bytes pipe uh between chains we have like this this or browse abstraction which is like should be familiar it's like similar to traditional token bridging um where you can yeah basically just like connect uh either canonical token or native token to a bunch of synthetics on a bunch of chains again the kind of modularity of hyperlane allows you to evolve and configure the security of this warp route so you could just as an example which we've talked to with a lot of customers or like a lot of customers are excited about this specific example of like having application specific security so if you're transferring on a warp route you know more than let's say 25 or 50 percent of like all of the circulating Supply on that chain you might want some like administrator in your application to uh actually like function as a notary or uh or veto or something um just to ensure that like you know your application didn't get rugged by like some Bridge um and with the interchange security modules you can like totally do that really easily so you can have these different like um safety modes we just actually sent the first like token transfer between the Solana and devnet that I mentioned earlier and the evm so that's maybe something you can play around with this weekend um we also like I said have been expanding to other ecosystems so if you guys are interested in like uh kind of some of those longer tail ecosystems definitely be happy to chat um but yeah this is just one abstraction we also have uh this concept of interchange accounts and interchange queries um which again is like a an API that as a developer you can use kind of simplifies uh some of this like cross chain control flow so interchange accounts are basically a way for you to have a contract on one chain own assets or do actions atomically on another chain um so basically if you're familiar with the concept of like a smart contract wallet this is like smart contract wallet for your contract on another chain um you can basically your contract on the origin chain can like send calls to be proxied by its inner chain account on some other chain and you can send assets to your inner chain account um we we think this is pretty useful especially for like doused if you want to give ownership to some Dow that exists on another chain you can just do that um counter factually without the Dow even like opting into it you can just be like hey Dao like I'm giving you this permission to your interchange account um comments you know take me for whatever um and so yeah this is a kind of a powerful primitive for just managing assets on different chains you can do like some sort of multi-chain portfolio management type thing um without actually bridging those assets um which is like sometimes risky um and then The Interchange queries API allows you to basically make like uh cross chain vehicles um so you can like you know go query a contracts function on some other chain um some examples of using this have been like looking up uh ens ownership or or nft ownership on ethereum because like there's a lot of I guess Network effects on ethereum L1 but people want to migrate their application ecosystems to other chains so this can be this is a way for you to kind of have remote views into other chain State and networks um and that's it I I guess I'm almost at time anyway um can't really do the demo because my Wi-Fi has been uh really struggling but um I would love you for you guys to check out our docs um we have a message Explorer with an API um we have ten thousand dollars in prizes this weekend so uh you know big opportunity if you just want to like use one of these apis you could deploy hyperlane to one of these new chains you could try deploying hyperlane to Zora or base or one of these new roll-ups and have your application do something cool with that um I think we're also looking for people to use word routes if you use one of these apis understanding accounts understand queries I'm sure that would qualify so yeah that's it thanks for coming
Automatic transcript — names and jargon may be misspelled.