New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Hyperlane 🛠Building the Interchain with Hyperlane - Yorke Rhodes, Nam Chu Hoai

ETHGlobalMon, Oct 9, 2023, 12:00 AM

Speaker

Yorke Rhodes

Join Yorke Rhodes and Nam Chu Hoai from Hyperlane for a workshop titled "Building the Interchain with Hyperlane". Thank you to everyone who joined our first in-person appearance in 2023! We are incredibly grateful for the support and contributions of all the hackers, tech mentors, judges, partners, and volunteers who made the ETHGlobal Tokyo event such a huge success. Without your dedication and expertise, this event would not have been possible. We would also like to extend a special thank you to the attendees who traveled from over 59 countries to participate in the event. Your presence and involvement made it a truly international weekend, and we are thrilled to have had such a diverse group of participants. With over 1070 hackers it was a pleasure walking into Toranomon Hills and seeing such a talented pool of individuals. With over 22 workshops, 9 talks, and over $375,000 USD in prizes we hope you enjoyed the weekend full of hacking, meeting all our incredible partners and learning from enthusiasts of the space. We are proud to have welcomed over 35% of attendees who were new to Web3. We hope this event sparked your interest in the world of blockchain and provided you with valuable insights and knowledge. We cannot express enough gratitude to everyone who contributed to the success of ETHGlobal Tokyo. We are already looking forward to the next event and hope to see you all there! 🎉🚀 ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Music] welcome to permissionless interoperability and warp routes I'm from a project called hyperlan uh we're a interoperability protocol focused on modular security and bringing interoperability to all chains so we're very chain agnostic uh we're hoping to kind of support whatever chain you guys want to be working on in this hackathon you can stack some bounties it's my colleague Nam uh we're gonna hopefully do a live demo for you guys at the end here uh fingers crossed but yeah first let's hop into what is permissionless interoperability and what are warp routes um and why why should you care so just as a definition to start with interoperability in our eyes is composability amongst apps that are on different infrastructure so whether that's like a Dap that's on an L2 composing with a DOT that's on an L1 or a Cosmos app chain with dap on ethereum or you know something more exotic uh that's that's what we Define as interoperability and if you look at the DAP ecosystem in the past couple years what you'll find is that the infrastructure that dapps are choosing to deploy on is kind of increasingly Divergent as people start to realize the benefits of different trade-offs throughout the kind of layers of the blockchain stack they're choosing like more and more diverse uh trade-offs so you know we have uh kind of the the hot stuff right now is like uh you know data availability layers like having this infrastructure layer that's optimized for the specific task um you know there's also a lot of people thinking about app chains and kind of the different economics that you can capture as a dap developer by kind of controlling the entire blockchain stack um so these are just a few examples but it should be abundantly clear by now that like this is only going to become increasingly diverse um so the ethereum ecosystem is focused mostly on kind of the roll-up side of things uh they've kind of committed the past couple years to that scaling strategy but um it's by no means kind of like uh I think a final destination um they still want to work on these other things plasma sharding Etc um and we're seeing daps to adopt these new roll-up architectures in the ethereum ecosystem um so Arbor germ optimism kind of the two canonical examples of like big roll-up ecosystems there's a bunch of D5 happening on both chains um and the challenge for adapt developers is the developer interfaces for interoperability between like all these different layers is super fragmented so uh each one of these roll ups like let's say arbitrary and optimism they all have a custom like uh Bridge implementation and so if you want your dap to be interoperable between like arbitrum optimism and ethereum you got to implement like three different interfaces depending on what you're trying to do the action like you have to use the different pathway so like deposits and withdrawals or one pathway and then there's like separate Pathways for bridging wrapped assets um or doing like arbitrary message passing or arbitrary contract calls on these other chains like all these generally you have to like use some different pathway maybe like the canonical Bridge doesn't provide this or it doesn't provide it at a latency that you're happy with um and so yeah this is like super hard as adapt developer to actually like take advantage of all these new things so typically what we're seeing is people are just choosing a roll up they're like oh I think arbitrim's winning so like I'm just going to be an arbitrim dap um but there's no reason that uh they should have to take on that risk of making that choice so early on in their uh product development um these are just a couple examples of like uh things that get unlocked once we start getting like real interoperability between heterogeneous blockchain architectures that uh at the infrastructure layer provide different uh capabilities or features I'm going to move quickly through this um yeah I'm gonna also just move quickly through his but okay so hyper lands uh kind of one of hyperlane's core ideas um or insights is that uh in order to provide this like modular interoperability layer that developers can use across all these different uh infrastructure layers we need to separate the transport layer and the application layer and so at the application layer we can have a consistent interface that developers can use across all of these different uh infrastructure layers and depending on the kind of pair that developers are having communication move between the transport layer might look slightly different but all of that is going to be kind of abstracted away from the application interface that like dap developers need to understand and this allows app developers to basically no longer have to think about like maintaining multiple implementations of their protocol for different chains for different Roll-Ups um and uh furthermore like uh tap developers should be able to express their preferences for security and kind of the trade-off that they want to make in their application so if you look at kind of like the canonical roll-up Bridges like we just talked about arbitrum optimism you know we have a very specific fraud proof mechanism that implies some you know security constraints some latency but it's this like Omnibus model that all applications on that roll up need to opt into um and that might not make sense for your application or it it might only make sense for like one type of action that happens in your application but otherwise you know you maybe don't need all that security or you'd prefer the the lower latency like faster finality settlement pathway so we want to allow dap developers somehow to express their preference for these trade-offs in the interface and as stronger verification mechanisms become available from kind of the r d side of the the ecosystem like a bunch of people are working on you know ZK Lake clients all this like signature aggregation stuff as those become available the DAP developer can just change a very simple configuration without changing any of their implementation to say hey I'm going to now apply this new security module to this these set of actions that are happening between these set of chains um and that's just like a configuration layer in their smart contract instead of like a whole new implementation that they need to do to now like go and verify some new uh security models like messaging format um yeah and the final the final kind of like core idea that we're excited about at hyperlane is extending this capability and this uh developer interface and and like modular security Paradigm to any chain that you guys want to be on so uh we have a feature that we've been like working super hard on recently that we call like permissionless deployment and it's this idea that uh someone who's like maybe spinning up their own roll up let's say they're using like the op stack or something uh they should be able to just bring hyperland there independently from our organization and so like we've basically built out the the tooling for developers to deploy our protocol to their chains and this just way more scalable than what we've seen with like the existing Bridge bridging and messaging providers where you have to kind of go and like Lobby them and like they have to take on some amount of risk to operate on your chain and maybe there's like not enough economic incentive for them to do that um yeah so uh this is hopefully what we're gonna live demo today uh in a moment uh or you went through that cool so Switching gears a little bit the application that we're gonna try and deploy today across a few different chains is called a warp route a warp route is basically like this collection of contracts that allows you to Route tokens between chains um there's a few different flavors of our warbrad implementations we have like the native flavor which allows you to wrap native assets um like let's say eth and then like a single transaction route them to some other chain the collateral flavors for like existing tokens and then synthetic is for how to represent those collateral tokens uh on chains where they're being warped to um so a word brow is like some collection of of these set of Primitives and I'm not gonna go super in depth here but you should definitely check out our docs um I think the basic premise is like we yeah I don't I don't even really want to get into the kind of how hyperlane protocol Works in this Workshop because I think it's like less interesting for the hackathon context but um yeah there's a bunch of stuff going on here um you can imagine Bob being like a recipient application um and uh the idea is Bob can specify his security preferences for like what types of warped assets he wants to accept into his application um so where to whereas today we have like let's say Wormhole usdc that's like bridged everywhere that has some kind of like Global Security model that everyone is basically opting into if they're like using wormhole you can actually like have different uh I guess like you can almost look at them as like tranches of uh a warped asset that is like using some specific uh risk tolerance or security model um to verify that like those assets have indeed been uh kind of locked up and collateralized on some other chain if that's the um instantiation um cool so yeah we've we've basically like built a bunch of off-the-shelf tools for you guys to play with this like wordbrout primitive so the idea is like you don't even have to necessarily write your own contracts you can deploy one of these whereabouts between any chain that you want to deploy hyperlane to um and that'll allow you to just like import liquidity it's like a big use case that a lot of new chains um are really struggling with right now because uh in order to like launch a new chain you need to establish some reason for people to like come to your train and that usually implies like having some economic activity and so you need to bootstrap that somehow um and an easy way to do that is just like importing liquidity from some existing chain you kind of like can leverage existing Network effects um but if there's no token Bridge operating to your new chain you can't do that so the combination of like being able to deploy hyperline to your chain and like having this nice warp route primitive allows you to like spin up a chain which can like solve this kind of cold start bootstrapping problem um cool so yeah we have a bunch of different tools here for what I just described I think Nam is gonna try and demonstrate us deploying hyperlane to a test net and then deploy a warp route between that test net and and maybe some public testnet this cool all right so like York said I will be doing live demo of what it's like to deploy a hyperlane to your own chain so let's set the context here let's say right like you create your own roll up and you're just like oh it's all great but like obviously now you have to convince right like developers and users to come your own roll up um and right a traditional world like you maybe have to convince I don't know like coinbase or binance to ultimately list your token for people to actually be able to like move economic value to your roll up right oh to your own chain what like I'm just using roll up as a specific instance of that and so now with hyperlane you can basically deploy interoperability to your chain and connect it to any other chain that is connected to hyperlane and so that's what we're going to be doing so right so on our docs here in our guide we have this kind of like five-step process of deploying hyperlane so the first steps is just generating keys so I guess that doesn't even count as a step the second point is to basically deploy contracts and so we have a hyperlind deploy repo which I've kind of cloned here already and basically all you have to do is you have to add your chain right so basically in chains.json oops actually this is the wrong one here it is in Chains you just kind of add you and like change information all of this really like the name the chain ID and then an RPC URL so in this case we're going to be deploying to uh coinbase's new chain call um called base right and obviously if your coinbase you know I guess you have your own exchange but again if you have right like deploy your own roll up here today it's gonna be very hard to convince anybody to deploy anything on your chain um so you're just going to do it ourselves so all you have to do is basically add your chain here um like York said you can have we have modular security and so like in this case what we'll be doing is we'll just deploy like a one out of one kind of like multi-sig ISM as we call it to basically validate uh messages going from your chain to all the other chains um but actually you get to reuse the security that we already have existing on existing like kind of default chains as we call them so for us we should just be deploying between let's say base and support you and so then all you have to do is I guess I could just copy and paste that here so basically you add your chain you can configure the security at the default security from your chain and all you have to do is like run the script right and um I'm not going to like deploy this because it's like a bunch of transactions going to take a little bit too long but at the end of this deployment you basically get kind of these addresses so in here you get basically all the artifacts of the addresses that got deployed on both base and sympolia and so that's kind of just the contracts and then the two remaining steps are basically to run the validator which basically validates state from your chain in this case base to all the other chains right so that's the first step um so all you have to basically do is uh kind of run we have Docker images or you can just build it from source as we did here and you basically say like hey like what's the origin chain name that um I want to validate on uh where do I want to write my signatures to so in this case I'm just writing it to a local folder and then basically the config file that you got from the contract deploy and so basically once you run that that uh that validator will now observe the contract on your own chain and basically anytime there's a new message it will kind of like a test to that new message The Next Step then is after running a validator is to run a relay and so basically relay is a permissionless role that basically just sends that uses the signatures from the validator to ultimately pass them on to the destination chain mailbox contract right and that mailbox contract basically then uses a security module that is specified to validate hey does this actually happen on the origin chain and then process the message um and so basically we have relayers that uh run basically from like one chain to another so in this case you can see here uh I think this is from base to sepolia so we'll just run that right here and then equivalently we have another relayer that runs from sepolia to base and so that's basically all the kind of like object infrastructure that you would have to run and now we're connected uh we can kind of like easily uh there's a test script I can run right now that basically just sends two messages one from basis of polio and one some sepolier to base and then we should see those being uh delivered in one second if August one yeah I realized I didn't like a lot of that lots of like what's happening it's contract layer but it provides color there like when you work on track yeah that's it describing that interaction and that message needs to be authenticated uh such that someone can actually know that it was your contract that dispatched this action rather than uh you know some malicious attacker and so we have uh a few different security models that you can select off the shelf to like perform that authentication one is this uh like multi-sig validator setup where basically there's validators on the source chain that are signing commitments to the messages that have been dispatched from that chain such that those signatures can be used on the destination chain as an attestation that hey this message was dispatched on this Source chain um eventually the idea is to have uh kind of like permissionless Economic Security model where anyone can be a validator if they're putting up enough stake and provide security to this type of um authentication system but yeah what's Happening Here is the uh message is being uh committed to on let's say uh sepolia and then the validator that Noms running on his machine is signing uh commitment um and then the relayer that he's running on his machine is taking that signature and passing it to the destination chain contracts um which is like one of these warp route contracts that's basically verifying like we saw in the multi-sig ism config that he had up earlier it's verifying that we've reached a threshold of the specified validators that have like attested to uh the fact that this message was like committed to on the source chain um but yeah definitely for more details uh check out our docs on kind of all the different types of security configurations cool so basically now that we've kind of verified that we can send messages back and forth right like we've kind of connected this new chain it didn't have hyperlane before to all the other chains that have hyperlane and so now that you have kind of the space messaging layer on um kind of setup you can build applications on top of that right and like York said I think a very common application is effectively a token Bridge right so let's say again if you're a new chain like one of the first things you probably want is like you want a stable coin right and so why don't we just kind of like create a warp route of let's say like something like usdc that exists on sepolia to like your new chain which in this case is base and so we once again have a guide for that right so under warb routes here you again just go off hyperlane deploy and you just run a different script uh the script base is configured with this warbrock config so let's say in this case swarp isn't it I guess some call it more tokens now right so that's basically we say like on the base uh chain um which I guess it's like the collateral chain we basically say like hey we want to collateralize this token which in this case I think that's just a link token because there's a good faucet on it on sepolia and basically we want to say like hey we want to create synthetics synthetic versions of that token on let's say a data chain in this case our base token I see how that naming can be a little confusing in this particular instance right but basically we allow Now to create a warp route between supolia and bass and so then all we have to do is uh what's it called uh deploy War routes right with basically our private key to kind of deploy the contracts and I think that's what happened above here so again I'm not going to run through it because the transactions take I think a couple minutes um and the cool thing is that like once you've kind of deployed this war brow right which is basically just a set of smart contracts on both chains we actually have a like out of the box UI that you can use to kind of let your users now leverage this warp brow to kind of have these like synthetic tokens and so all you have to do is basically take the output of your warprout deployment and basically add that to uh this like template repo that we have that you can clone again all you have to do is add your chain information in here and you add the token information from the warbroad deployment and I can do like in this case I can just like kind of run it locally right here but also like super easily deploys reversal or any other like next.js Hoster and so basically then here on localhost um it will basically fetch kind of the warp route information and then after a little bit will show you right like the kind of the chain options for your warp route you can see the token that you can kind of Warp um you can say hey I want to send this much the recipient you can just say it to yourself and then basically send it to base and again this is all out of the box right I didn't have to change any code it will prompt me to approve my link token to the warpl contract on sepolia and once the approval happens and if the Wi-Fi is good enough uh ultimately it will if you guys saw the uh layer zero like Gorly youth Market uh drama a couple weeks ago um this is like a tool uh where you can create those type of markets between any chains assets super easily um so if you guys wanna like in this hackathon go mess with someone else's test net uh you could maybe do that cool all right then we saw basically the second transaction right is to actually ultimately send the tokens over to uh to base and so that I guess just confirmed on sepolia so like York said previously again like valers will basically attest to that transfer on sepolia um create signatures and then the relayer that I'm running uh uh right here will um yeah basically observe that message and we'll also process it on base and so I think what we can do actually is just to take the uh yes so we can basically take the this is the token address on base right so we can just go to base I think which was a base ethernet I forget what it is what was it I just had it I think they're called base scan um and then you can put in the token address right so that's basically like you know you can already see here it's like shows up as a chain link even though I'm pretty sure chain link doesn't have it deployed the token on base and then under I think that tokens transfers you can see here like 25 seconds ago we just minted ourselves 0.001 changing token on base um and then I think in the UI yeah like you can kind of see the same thing and then like if we wanted to write like we can send it back from base back to sepolia again um and yeah you can imagine what the kind of outcome of that is um I'm totally out of time so if you have any more questions um feel free to Jump by our booth today uh we have three uh bounties one is for the best use of permissionless interoperability so basically right like you could deploy to many of the networks that are represented here today as well and kind of like no I would love to see you can have some cool use cases between let's say like yeah a new chain and like an existing chain uh second bounties for best use of the warp routes right so I can bring your token to some new chain and I can do something useful for that uh then the third is like we said we have this kind of modular security approach where developers can choose different trade-offs and we would love for developers to kind of build some kind of like alternative models like an optimistic one or like maybe one based on succinct like and it's like a ZK uh like clients but like yeah because we believe that the story hasn't been kind of finished Talent yet about what security models they're out there for cross interoperability we would love for hackers to kind of like uh play around with that um I think that's it thank you

Automatic transcript — names and jargon may be misspelled.