Hyperlane 🛠1-Click Crosschain Actions
ETHGlobal·Wed, Oct 9, 2024, 12:00 AM
Join us for a workshop titled, "1-Click Crosschain Actions". This workshop is part of ETHGlobal's flagship online event: ETHOnline 2023! ETHOnline 2023 has grown into one of the most exciting events on our calendar, anticipated by hackers all over the world. ETHOnline is a three week long online hackathon with over $200,000 USD in prizes as well as a series of curated summits, celebrating some of the most significant happenings & learnings from the past 12 months in web3. ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com
Transcript
[Music] my name's York I work on a project called hyperlane hyperlane is an interoperability protocol um in the past we've been operating on exclusively ethereum uh evm chains but uh recently have expanded to few other ecosystems if you're not familiar with interoperability protocols uh I'll give some basic definitions in our CL case we like to describe our product and our protocol as a permissionless interoperability protocol so um you know permissionless just means anyone can use it um it's accessible to everyone we want to create a protocol that can of outlive the lifetime of you know any business um and interoperability is making applications that are on different architectures composable so um why should you care about this I'm going to set the scene with what's been going on in the ethereum ecosystem and crypto in general for the past decade or so uh the way I like to think about it is um you know as daps decentralized apps have evolved they're using increasing Divergent infrastructure so we started with Bitcoin which was this kind of quite simple and elegant payments protocol that allows users to you know send each other Bitcoin in a way that's permissionless and trustless at least up to to some kind of hush power guarantees but ethereum generalized this and there were a few protocols that follow follow suit soon after so we went from just the simple payments to generalizing computation on a blockchain um hopefully I think most of you guys are probably familiar with that so I don't need to get two ineds there but um you know beyond ethereum there are more recently people experimenting even more so at the infrastructure layer um so so if you guys are familiar with the cosmos and polka dot ecosystems their idea is kind of uh instead of having this kind of generalized execution environment like ethereum you can get some additional optimizations from having a chain that is designed specifically for an application so if you're you know building a lending protocol maybe you can have the entire higher infrastructure stack make design decision or make trade-offs based on that specific use case um and then within the ethereum ecosystem I think um mostly people are excited about rollups um they're a lot of this was motivated by you know basically ethereum L1 not scaling to the kind of consumer grade demand that we maybe anticipate or expect know fees are high it's maybe hard to use maybe slow we don't have single slot finality so rollups provide an alternative while maintaining some of the kind of ethereum security guarantees um you we have plasma sharding whatever so this is kind of like a time my timeline of you know how how we're diverging and uh in the infrastructure that actually daps uh use and this presents a problem um so well first of all it's exciting because you know I guess like for a long time these these rollup Frameworks were like very theoretical but I just wanted to include a slide that shows that um you know actually this is actually taking place in the market applications are adopting these new architectures um here's a screenshot from l2b which is a great website to kind of track this transition um just showing the kind of marginal activity across ethereum L1 versus l2s and um actually over a year ago now the the transactions per second on on l2s and aggregate um crossed over um you know we have coinbase bought into this applications are building application specific rollups so we got this like it's cool it's exciting we're solving the scaling problems but we have new problems and the new problems are fragmentation um so yeah maybe this chart is also familiar to you but um there's you know all these different rollup architectures now we have optimism we have arbitrum we have polygon ZK snc Avalanche um you know take your pick uh list goes on and as an application developer if you want to build your do on top of one of these infrastructure layers you have to go and learn one of these Frameworks and that might be you know fine maybe there's maybe they're sponsoring haathon maybe you can like go and play around with it but uh the problem that uh presents itself is each one of these Frameworks has kind of like an entirely unique integration surface area you and kind of conceptual overhead that you need to understand to be able to like build your app on let's say optimism or arbitrum and so each of these actions that I've listed here on the right side are all independent interfaces so if you need to go from L1 to L2 that's one surface area if you want to go between l2s that's going to be like a different bridging interface um if you want to do General message passing so not just like depositing or withdrawing tokens but actually like passing some some richer information that's going to look like a different interface for most of these Frameworks so um yeah basically we we don't have standards around any of this stuff and that's a problem um people are thinking about it but um yeah we're we're far from kind of solving solving this problem and so at hyperland we've been thinking about this uh specific problem of this fragmentation and this Divergence of infrastructure and we are presenting a solution which we feel so can can address some of this fragmentation and we call that modular interoperability um the theme of kind of the past you know decade or so is that we're in the evolution of these infrastructure layers you know things are becoming more modular we're optimizing narrower and narrower layers um in the hopes of having the stack that an application developer can come to and kind of pick and choose the pieces that make the most sense for them and so we're taking that same approach to this interoperability problem um so instead of being forced down a specific like uh Frameworks uh you know interface for interop uh to to reach their chain um if you want to reach the users or or you know kind of have distrib ution there um we want to provide to application developers a single interface or doing this basically like General message passing and and deposit and withdrawal from from and to any chains whether it's an L1 or an L2 or um you know a Cosmos app chain or a you know Celestia rollup or whatever it is we want a consistent interface so application developers don't have to so much time thinking about the infrastructure because that's counterproductive I think for us innovating at the product layer and so yeah we're trying to separate basically the API that you guys um can use to like send information between these chains and the actual underlying kind of security mechanism and and transport mechanism for actually moving that information um because you know as we can see like some of these rups are optimistic some of them are ZK and like they they might have different mechanisms by which they verify information coming from an L1 or an L2 or or another chain and so we want to abstract that away from the application interface um such that there's just a single integration that you do and then you you can use this API across basically all of the chains and all the rollups um more specifically not only do we want to abstract that away but we have noticed this problem in kind of the competitive landscape with uh other protocols that attempt to to solve this kind of like generalized message passing bridging problem which is that you have what we call like omnius security choices which basically means that applications don't have the modularity they don't have the Cho the choice The Power of Choice to be able to say hey I don't want to use your your security I want to to tune it to to kind of my own applications like Risk tolerances um if maybe if I'm like a if I'm a dow and I'm doing cross-chain governance I might want like really high security on that um or I might want some like you know uh members of my Dow to even like vote on the cross chain messages or something like that so in addition to like abstracting away this transport layer we allow applications who are receiving messages actually to specify their preferences on the security used um coming from another chain uh through like a smart contract interface so instead of thinking about like oh how do I integrate this proving service or whatever there's like a a simpler application API if you if you choose to kind of customize your security preferences but just going to walk through kind of like the motivation here so a lot of these protocols look like this um where basically as an application you want to send a message from you know origin chain to destination chain so you need to choose uh a recipient contract on that destination chain and you need to pass like some some string some body and there's going to be some offchain actor that basically takes that message that you dispatched and uh passes it to the destination chain there's no way for these contracts to interact with each other across these like chain boundaries and that's why this is a difficult um problem to solve so we need this offchain actor um to pass the message for you and kind of the simplest security model is uh we just trust that offchain actor so if you have some serve centralized service that you trust um that does the the relaying um you can specify your security preference to be just this like trusted relayer as a message recipient and then everything's good right but let's say we want some some different security model that maybe provides better guarantees than just like this kind of centralized service approach well the idea of fan is okay we can abstract away all these other security mechanisms so instead of use for if if we're going between uh you know a optimism L2 and ethereum L1 we can actually leverage the uh optimism Bridge contracts to actually be the one who does the transport layer of passing the message from chain a to chain B and and there's some you know optimism uh proposer basically in between here but like we don't really need to think about that um this is like an off-the-shelf configuration that we kind of allow applications to specify and then they get all the benefits of the kind of L1 L2 security relationship what we actually operate is a set of validators um providing this security um it's it's it's quite involved but the the general idea is that they can provide Economic Security on messages I don't want to get too deep into this but um that's the basic idea here that we we're abstracting away the security and the transport layer so we have a consistent interface across all these chains so as an application developer you just integrate our API once and you can still get the same uh trust guarantees of like you know rollups and um you know Economic Security maybe you want to use like Wormhole or something um this this chart shows kind of like the different uh chains you would want to uh reach to have like the the widest distribution um of your application and so integrating hyperlane once you get all this distribution rather than having to go and integrate all these s um so that's a basic idea on top of this uh simple API of just like sending and receiving messages between chains we've built a bunch of developer Primitives for you guys to use during this hackathon and in general in your applications um to make the integration even more even more seamless uh because sending kind of like bites over the wire between contracts like maybe at first might not seem super useful um so yeah if we want like this this talk is called oneclick actions um how do we actually achieve that with this technology uh so I'm going to explain that so uh we have these two developer Primitives that we call interchain accounts and interchain queries um and the idea of this is so uh this API blck you can basically think of as what we were just looking at with the dispatch and handle uh of just sending a message and rece and receiving a message on another chain and this interchain accounts API basically allows you as a contract on the origin chain to send a call that you want to be made like a an eth call that you want to be made on the destination chain on your behalf um and the idea here is that uh normally like your contract on the origin chain can't interact with contracts on the destination chain right that's that's the whole problem here um but this API basically allows you to to pass a call so let's say you're on you know ethereum and you want to make a you want to call Mint or you want to call um you know yeah let's say you want to call Mint on some nft Marketplace that's on polygon so what you would do is you you hit this interchain accounts API with that call um that you want to be made on that other chain and and this will abstract that whole process away and basically it will perform that call from a proxy account that only can be uh kind of activated or make calls based B on actions that you do from the origin chain um and so it would call it would perform this mint and then this proxy account this interchain account as we call it would now own the nft and so this enables this relationship where like smart contracts can now hold assets on other chains um you know they can do actions basically against contracts on other chains um so this is like a nice simplification of like basically Crossing the the chain boundary almost introduces like a an async await style like syntax um for doing like contract calls on other chains and then uh just extending that idea a little bit further we have this queries API which allows you to actually you know if let's say we were doing that mint and we wanted to know the return value of doing that function call on the other chain we can use the queries API to do that um so this will actually underneath the hood it actually is sending two hyperlane messages um one from the origin chain to the destination chain basically encoding this contract call and then on the after we've done the call we we did mint and we're getting the return value we actually send a message back with the return value um and so uh again this is like kind of this like ASN away style syntax it it really lowers the barrier to developers basically um you know building applications that can leverage all these new infrastructure layers um so when I say oneclick action um there's been a lot of people talking about um you know basically how this this Zora chain as an example right Zora launched an L2 um what does it mean uh you know they can basically get a better like fee experience for users who want to just like you know only interact with Sora uh but the problem is like okay well uh if I'm a user and I only have funds on ethereum how do I actually interact with Zora historically what you have to do is you have to go to some third-party application that's not Sora and you have to basically Bridge uh eth from ethereum L1 to the Zora network uh in your in that bridging application through your wallet and then you have to figure out how to go back to the Zora application and connect your wallet that you just bridged uh eth um to on the zor network you have to like add the RPC of the zor network you have to do all this stuff to figure out like how to actually connect to this network and then only then can you call Mint you know it's like you're signing multiple transactions um your you know the user experience of this is like really not great and so with these style Primitives what you get is uh actually like you know you have a single action that the user signs a transaction for on one chain and it can go and do the mint and it can even get the return value um all in one transaction so you don't need to um impose this like uh kind of quite complicated user experience I think there's been you know countless stories of people basically losing funds while they're bridging or um you know there's all these Bridge hacks so we want to avoid exposing users to that level of complexity I mean it's hard for us even as like application developers to reason about this stuff so like we can't expect our users to understand you know how to move between chains we want to really abstract all that away um just as another call out we have um this concept of uh token War routes which is like uh a uh contract smart contracts um template basically that will allow you to create a token which users can kind of seamlessly move between chains um without having to you know do it's like sign transactions on multiple chains and this is compatible with like native assets um it's compatible or or you know you know mic on pogon or the equivalent of the Native asset on on any chain uh you can wrap existing tokens and and move them around to other chains um you can basically create synthetic tokens so you can like um you know create a derivative of a token that's on another chain um and yeah that's uh basically what I wanted to talk about so these are the two apis that um are going to make it easier if you want to kind of go more bare metal in this app in this hackathon um something that we're also interested in is people actually going out and building their own security mechanisms so as I said like we're we're pushing this modular interoperability Concepts um if you want to contribute to the protocol itself you can actually go out and Implement one of these interchange security modules uh as a smart contract and then other developers will be able to use your implementation and so like I said we've done that for the optimism bridge but you can imagine doing the same thing for the arbitrum bridge or um you know bhole we we actually have ongoing work on a few of these but you can basically reach out to us and figure out what would be the most useful kind of contribution if you want to contribute to the protocol and then um so yeah that that's I guess the last Bounty here write a new interchange security module um that could be you know a new a new ZK light client or something of another chain if you're really into ZK um or or some other like light client mechanism you know there there's a lot of um possibilities there that I could um give more details on if people are curious um the other prizes are basically just best interchain applications so we we're curious what you guys can up with with uh this API and some of these developer Primitives uh maybe it's a cross-chain lending protocol you know maybe it's a um extending just something some dap architecture that exists on one chain which maybe would benefit from the kind of distribution or composability of of being on multiple chains maybe it's uh bringing um you know a lending protocol for Native assets so maybe you can like borrow and lend madic and eth against each other um something like that best use of uh warp routes and then infrastructure is kind of open-ended um basically this would involve contributing to something that improves the developer experience of of building on top of hyand so that can be anything from you know uh additional monitoring uh maybe you can build some sort of like front end uh component that allows you to as a as a developer maybe leverage interchain accounts you could have like a wallet integration um we've talked about metamask snaps as a potential um Bounty here if you wanted to basically create some sort of wallet integration or Plugin that um leverages some of this like interchain account stuff so that as a user you maybe don't even know or you don't need to know kind of what what chain you're you're on or what chain you're interacting with and hyperlane underneath the hood handles all of the Cross chain balance management cross chain calls Etc um there's a lot of possibilities here um and and yeah I think that's mostly my time uh happy to take more questions I saw a few comments in the chat if I can just pull that up
Automatic transcript — names and jargon may be misspelled.