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

Loading player…

Hyperlane 🛠️ Unleash the Superchain with permissionless interoperability - Nam Chu Hoai

ETHGlobalMon, Oct 9, 2023, 12:00 AM

Join Nam Chu Hoai for a workshop called "Unleash the Superchain with permissionless interoperability". To realize the Superchain vision, we'll need interoperability between all the chains, this workshop shows you how and what kind of experiences this opens up. Superhack is the perfect place to experiment with the OP Stack. We, like many others, are excited about the Superchain future, and Superhack is the perfect opportunity to test what’s possible alongside pioneers in the ecosystem. Let us introduce you to our amazing partners: 🔴 Optimism builds open-source software for running L2 blockchains, like OP Mainnet, and aims to address key governance and economic challenges in the cryptocurrency ecosystem 🔵 Base is a secure, low-cost, builder-friendly Ethereum L2 incubated by Coinbase built to bring the next billion users onchain 🪩 Worldcoin is building the world’s largest and most autonomous identity and financial network 🌜🌞🌛 Zora is an open protocol for creators and just recently launched on top of the OP Stack The Future is Multi-Layered Without a doubt, Layer 2 technologies have emerged as the solution for a variety of Ethereum network problems. These innovations, which offload some processing and computation from the main Ethereum network, have quickly become our great hope for scalability, performance enhancements and ultimately onboarding the masses onto Ethereum. ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com

Transcript

foreign [Music] and welcome to the super hack hyperlane Workshop unleash the super chain with permissionless interoperability joining us today is nam who will be taking us through the session and without Esso original to get the session started cool thanks Drury um yeah so like I said my name is nam uh I'm one of the founders here at 8 building and yeah very excited uh to be participating in uh super nank we've been big fans of global in general so this is not your first uh if Global hackathon you probably have seen others around um if you will be participating in one of the upcoming ones in either New York Istanbul will be there as well um but yeah I think for uh today we really like uh always enjoying these kind of online hackathons if if they're in last time around and there's always yeah really cool uh hackers and um projects kind of coming out of recycled pumps um so yeah looking forward to that uh for this one right we'll be talking about super hack um which is kind of in the theme of the op stack and the super chain and still we felt like apart from the very I think generic maybe like kind of like Workshop that maybe we would do normally we would want to focus on how we as hyperlane or how attackers using hyperlink can kind of like unleash the super chain with what we call like modular or permissionless interoperability all right this is good um yeah so let's start with um you know like what is what is the super chain um what is the super chain what is the current state of op stack interoperability and an hour ago into you know like what's hyperlane and like why it might be interesting for kind of the super chain and by extension for folks here hacking um at super high uh um and so I hope this is not news but you never know a kind of who's uh participating to prefer time gear by Optimist and Labs has kind of built the optimism chain um and the stack that the user thing can deployed and change the initial kind of chain uh it's called the op stack and I think since the creation of that op stack there's a lot of like interesting folks who have kind of like used that stack to deploy uh their own right and so most recently probably most known worthy as well is base coinbases um L2 I think Zora public network like Bitcoin I think there's a lot of interesting examples of folks kind of deploying their own rollups for the applications and like kind of like making a certain modifications uh either technically or culturally kind of like to basically uh customize I guess the blockchain or like the rollout to their needs um and I think Super chain is kind of this right like this concept I think that op labs and the various folks using low key stack um have been um kind of like trying to Rally around as this kind of like vision for how oh like op stack chains kind of together it can make this more cohesive Network and ultimately scale uh right to connect ethereum Bishop um further and yeah if you're more interested in kind of like what exactly that means and like how let's say um yeah the op lab sucks after thinking about that I highly recommend going to their website um but one of the things obviously that like this kind of like uh vision of this kind of like network of chains um requires is interoperability between these chains right let's say if you had git coin if you had Zora on ethereum those contracts were able to interact with each other because they were sharing the same VM right they were able to make calls to each other composed with each other and that is something that now that these are technically different blockchains uh is something that you need an interoperability for the call to kind of like allow for messages to be sentenced between these applications and so I will quickly go through the current state of op second Urban build her ability basically how does OP stack communicate with let's say the L1 um and to be honest the current state level PC second operability is not super great right so one you can really only use the uh like contracts that Dopey stack has primarily to cross domain Messengers to send the messages between uh the L1 which is obviously ethereum as well as the L2 the chain of deploy as either optimism base or uh and so there's no way really if you have an application on uh based on Zora for those connect two you have to technically kind of like send it back to ethereum within seven days and then send the message back up to the other L2 um and I link like the op Labs folks are kind of on the docs are recognizing that that ready to ultimately extend the super chain revision like there needs to be this ability to do cross chain transactions that are faster than that kind of seven day period um but also allow for again not just like faster to L1 but also faster to other l2s um I think the second thing that we saw last week is that there's actually no like out of the box UI for the standard bridge for op stack deployers so right so like let's say if you deploy um a new p-stack chain like you actually have to figure out how to build the UI that kind of allows users to let's say deposit usdc on the L1 standard Bridge contract to ultimately receive ustc on L2 and then the other way around um and then even there was do you access kind of rough and like we'll go into exactly why that is the case so again from L1 to L2 it's actually pretty simple right you die on the right side you can see the diagram basically the user calls the bridge literacy 20 contract on the L1 standard fridge which ultimately calls the cross domain Messenger on L1 which to send message function that ends up calling the optimism portal with the deposit transaction function and that emits a deposit transaction event and then right like because a rollout is literally rolling up over L1 State uh the World level ultimately you kind of like have a word visual deposit transaction transaction on optimism or under L2 which calls relay message across the main messenger which itself will basically call finalized bridge erc20 on the L2 standard bridge and that's how basically you get kind of this like synthetic usdc let's say on optimism because you deposited the usdc right like on ethereum as collateral and so this I'm actually looks pretty nice right the user initiates only a single transaction On the Origin chain and the message is automatically processed kind of like as part of the rolling up over L1 stage um and so you have kind of like full security right like there's no kind of additional trust assactions Beyond just a normal roll up trust assumptions that you have however uh sending from L2 back to L1 is like looks a lot more complicated right so like today what you have to do is as a user we could call the bridge erc20 contract um sorry the L2 standard Bridge contract and the bridge USC 20 function that will send it like that will with the synthetic usdc that you have right that another like that will basically burn the usdc on L2 it will send a message to the Cross domain manager which itself will kind of uh call initiate withdrawal on the L2 to L1 message passenger and that basically right writes this particular message to storage on Optima on optimism L2 and so at some point later like I think the docs say it could be up to an hour later the proposer actually proposes the state route of that L2 onto the L2 output Oracle um contract on L1 and that's right like where uh anybody like people like depending on the configuration of the of the contracts like somebody could basically contest and like submit a cruise effectively or like hey the statement wasn't actually the case but let's let's just assuming optimistic is a proposer proposes a valid State Route then we as a user we can make a second transaction called approved withdrawal on the optimism portal and for that we basically um right like we checked the miracle proof on the week sorry we attach a marker proof to the transaction which basically proves our particular message in the storage slot on Optimus and optimism portal is basically able to check that roadblock rooms against the L2 output Oracle and once that is the case the optimism portal will basically kind of have this pending withdrawal why it will rate the like famous seven day period to make sure that they were indeed no uh fraud proof submitted in that time period And then after that the user has to initiate this third uh transaction to ultimately finalize the withdrawal right and that will ultimately call a relay message on the L1 cross domain messenger which will cause finalized bridge usc20 on the L1 standard bridge and that's what um releases the usdc to the user right and so um right we said like it's a little erupt of an experience because there are three transactions over a period of seven days that a user has to manually submit it right developers have to they make uis have to create tooling using the SDK that is provided to uh allow users even actually to do that right it relies on the proposer like it's like usually a single UA to actually propose these State routes and so there's kind of like life misconsiderations on that and then probably the biggest thing obviously still is the fact that like you have to wait this like seven day challenge period for um tokens but also be any message to kind of make it make the way from L2 to L1 um and so yeah so that's I've been quite a pretty rough experience um uh and I think the reason for why many users never actually end up using the kind of like canonical Bridge right but actually use like third party systems like things like pop across connects um to kind of like actually privilege let's say like this DC around uh and so we think that um yeah the Hangouts are great and like for this and many other reasons we've worked on hyperlade and just basically a more generic interoperability protocol allowing any change to be connected to any other chain um and so I'll quickly go over like like what kind of interrupt like what to kind of flow looks like in hyperlink and ultimately how that might be beneficial to the super chain and how you got you hackers see a super hack can kind of improve the numberability of uh the simple chain absolutely so the basic massive flow looks actually fairly similar right so basically we have this contract called mailboxes on every chain that high blade supports that is both evm chains but can also be non-evm chains and so there's a bunch of like non-ebm implementations that are about to go um to go live but for now I think I'll just kind of instruct for instructional purposes just kind of assume the evm but basically we have mailbox contracts on both chains right and as a sender and like for example the L1 standard Bridge uh in the kind of like op stack token Bridge context can just call the dispatch function with basic destination which is just like a chain ideally basically of the destination chain a recipient the address of the uh the address of the recipient on the destination chain right so in that case would be let's say the L2 standard Bridge contract and then the body which basically just kind of like signifies yeah like hey like mint uh the synthetic or like the least this collateral token right there's arbitrary bytes depending on the application and yeah basically we have kind of the system that are going more into it called interchange security modules where those are the contracts on the destination chain which the recipient can specify to ultimately uh say like hey under what circumstances do I accept messages right under what circumstances do I believe that this standard has actually sent the message um and with that basically you can relay that message to the mailbox and the message recipient will basically because of this kind of handle function and then they can again do whatever they need to do with that uh and so War routes are kind of like high plug Lanes uh take on again the classic lock and token Bridge right similar to the like standard bridge in uh Adobe stand where there's basically the like collateral contracts on let's say ethereum which accepts the collateral that ascends a basically like mint synthetic uh message via the mailbox to the hip your C20 contract on let's say any other chain let's say in this case your op stack chain and basically that uh that contract can again specify what security model it wants to use and if it kind of accepts which is what we call the ism the transaction submitted by the relayer is able to basically process the message to this contract or what mint this the synthetic token um and then the same thing applies IC version um and so the nice thing about little browse is for example that we do have a out of the box UI right so let's say if you instead of like using the standard Bridge uh use web browse a token bridge between um uh ethereum and optimism like you are unable to use other security mechanisms for connective withdrawals on optimism right so Ukraine for example choose to either go through the canonical bridge but you could also choose to use like a validated based system or like use like sticking all right like eventually there will be maybe like better validation mechanisms like likewise available um and so the key piece is that the word brow by these token Bridge contracts are sovereign to the issue and so you can actually add like right like custom functionality um onto the token contracts themselves to um again facilitate both settings like Securities and features like one of the things that for example we recently is the ability for a token to be votable um on both L1 and L2 so that you can vote on L2 for proposal on L1 and so yeah there's a lot of kind of cool extensions basically a word balanced that you can do and that's like an offering that hyperlane has and so that kind of gives brings us to right like how can hibernate them improve super chain and raw and so actually there was a contribution last week by another contributor who kind of um basically at the hyperlane as a pre-deployed contract onto the OP stand right so like basically if you go to this repo and you deploy the p-stack me using this Fork uh you automatically have the hide built-in mailbox contracts on both L1 and L2 um and it modified the standard bridge to basically allow for a certain like configurable tokens to basically be withdrawn with a different mechanism other than the kind of like L2 output Oracle and therefore the seven day window um and because of that because it uses kind of the hyperplane mailbox system it also benefits from this kind of related system where a user can just pay a ring layer On the Origin chain for this kind of prostitute industration chain and so ultimately the UK experience is then you only have to sign for withdrawals for example you only have to do with uh sign a signal transaction optimism and you just like pay extra amount of e so that you no longer have to submit these like um transactions on uh on ethereum And So It ultimately looks a bit like this right so like on the standard Bridge instead of it calling the ll2 across the main messenger it just calls this such function depending on the configuration but let's say it's called the dispatch function on the mailbox and then [Music] um the relay will basically kind of like relay that message to the mailbox to get depending on the ism used by that particular token the L1 standard Bridge would kind of get the handle call from the mailbox and so and then again release the token into the user right and so that's where another ISM piece comes in because you can in part of again hyperlens kind of ethos is basically there's different security modules for different trade-offs right so again maybe for like the if right like you have to say it's like the most secure token on the roller and so therefore you want um you want this kind of like right like very heavy system that makes sure that there's like these problems available you have to wait seven days but maybe if you are right like a game and like you are you want to take a certain different trade-off you are able to specify different ISM that is say let's say a multi-state right like it could be like that's if you're on store a chain like maybe like could be run and that would allow uh developers or token issuers to basically have withdrawals that are faster right um that don't have to wait seven days obviously again the security is different but there's no kind of a single answer that we can think of and so that's why we want to support kind of like this generic modular interface to allow developers to pick whatever trade-off they want to choose um you can actually also wrap right like the kind of optimism portal slash out to outward orable into an ism itself and then again allow different tokens to kind of have different security mechanisms under the kind of same interface uh what you could also do is you could actually move the right like once you have this kind of like mailbox and modular interface you could actually move the Canon fault prover uh as an ism right and so again therefore allow tokens to kind of get selectively move into different proving mechanisms we're also basically have all the um all the captions like uh contracts basic setup to support um stating and permissionless slashing so you could imagine folks basically validators let's say this kind of multi-sig ism basically have an economic stake and if they ever lie about it they would actually get slashed um and there's some there's a pool uh kind of like construction where actually in this like because generally in hyperlane the state can only be slashed On the Origin chain but because there is this kind of like very secure canonical bridge that does exist from L2 to L1 you can actually communicate the slashing condition over that canonical bridge to L1 and have the stake live on L1 which actually means that for restaking right or something like eigen layer you could have validators validate messages from multiple roll ups with kind of the same economic Stig and therefore get higher economic efficiency um and then like last but certainly not least uh isms are composable and so they allow you to uh basically aggregate multiple verification mechanisms right where you could basically say like hey like I actually I want something super secure so I actually want both the canonical bridge but also this set of validators took agree on a message for me to consider it secure um and so these are kind of these like what we call like security Legos that developers can use to can ultimately adjust the trade-off that they want to choose when it comes to sending messages between different chains right in this particular case let's say from l2121 um and so yeah so there's a lot of like really cool I think opportunities here because I think you know the oh he said interop has been so focused on um the kind of like classic canonical Bridge built a seven day uh fraud window there is a lot of opportunity for you hackers here super hack to kind of like improve uh the inner experience of this op stack right I think what if we like we very much agree with again I think the super chain kind of proponents that like this is the world we're going to be living in right there's going to be all these super chains that use the piece stack to deploy uh kind of their own rollups but for that we just need better interoperability between all these roll ups and so here are like the few ideas that I think we want to share with you guys um certainly not kind of like right like limited to this but uh one thing that you can do is you can support the high blend ISM interface not just at the standard Bridge level but even like like lower at the cross the main messenger or even optimism or level um so that you kind of have more like a piece that native I guess native interface but have this kind of modular security um via hyperlane um like I mentioned you can kind of implement just kind of slashing where you have like Fast withdrawals via validators right let's say on a multi-stick ISM but still have Economic Security um attached to them because their state kind of will be slashed via to kind of like slower security mechanism of the canonical Bridge um other things you could do is um I think that like if you've seen you're going to solve x right they're kind of like unusual uptake on cow swap one inch Fusion uh they kind of exclusively talk about this opportunity for um doing swaps cross chain or like Reddit in our case crash problems and so being able to basically like have these element articles you can build Implement them with hyperlin um and therefore support kind of like native yeah I mean Native cross chain swaps um even if you don't want to do kind of like let's say like unusual back style swaps you can even still support right like uh moving to problems from one roll up to the other right so right now again the standard bridges are between a 1l1 so between the L1 and the single L2 but let's say if you moved like DC YouTube base like you can directly move to usdc over to Zora and so one thing you could do is you could like modify the standard Bridge contract on L1 to basically be able to kind of let's say like collectively collateralize right like I said usdc on both based and um uses on base and Zora and so that I would allow users to actually indeed send USBC directly between Roll-Ups and so that's I think another thing that you could do um you could because there's no I guess default UI you could use like the warp UI the template UI that we have for our brows and you could just like modify them for the standard Bridge so that like folks can use that if they didn't want to uh um kind of deploy the war broad contracts themselves and then actually one really cool things as well that we have is what we call Dynamic withdrawals right so let's say like right now I just kind of like frame it as a like oh for a single token like you could just use I could say validated based security to do withdrawals but actually what's really cool is you could also do something along the lines of like oh withdrawals of like let's say 100 usdc or less which are basically by like smaller Regional users we actually support like using the valid based mechanism but for withdrawals larger than 100 usdc we actually do require uh photos to kind of like go over this kind of slower path right and so again that kind of allows um that allows kind of more I can just better trade-offs for people to actually use these Spirit juice versus kind of relying on just like um yeah I think third party solutions to kind of like support say children uh and then the last two right I got kind of maybe even more like application need things whatever example you could build like you could Bridge or nfts to base with like War routes right that we recently announced our nft support on the war brows um so that should be pretty easily done you could just go on docs and deploy these War bounds um and similarly like you can uh kind of take inspiration from I think two weeks ago when we announced this kind of like tally uh early integration where you're allowed to use warp tokens on the altitude to book proposals in L1 and so you can do something similar I would say between like PG and an optimism um I think that's it I think I'm like surprisingly good on time um if you want to learn more right like read our docs docs.hypeland.backs by Z do not Discord follow us on uh on this and Twitter you can follow me individually on Twitter uh under Adnan broad or on television telegram under the same handle you can email me you'll be like we are gonna be on obviously if Global Discord as well um but yeah so please do not hesitate to reach out it's like we are very active we are like proud ourselves to have great um response times on our Discord as well as in person if you kind of come to your symbol uh at the remainder of the year um and yeah I think with the remaining time I would love to take uh questions and uh go from there um all right so first question I see some bullions say can we transfer tokens choose our girly test net and how and yes so like I mentioned you can uh you can basically obviously use the like default standard Bridge contracts right and then you can use subjects to this kind of seven day window or what you can do is you can write deploy hyperlane biscuit choose Aura because High building distribution list which I guess that I haven't gone into but that you can deploy hybrid into zoron and then deploy what we call the war Broward between Zora and Gurley um and that kind of allows you to add basically a token bridge that kind of isn't subject to this everyday window and so for that as I mentioned I'll link you to I will link into the relevant docs pages give me one second line exactly in the sealer and then deploying a warp route is here um and then Nicola asked Elizabeth you could in the body parameter and we pass the function you want to call the destination contracts so in the base at the base layer um let me actually move back to the figma I don't know basically at the base layer right like uh there's just kind of the arbitrary method passing and so do you as the sender and for receiver have uh to total freedom ask us to like what do you want to pass in the body parameter right um and so what you could do for example if you want to yeah like call something on a destination chain you could um you could uh just like in the body basically ABI encode like your function call right and then as the recipient you basically receive that body you kind of like parsed that API encoded a function call and then the message recipient on the destination chain makes the call to kind of your desired destination contract so that's kind of like one way you should do um remote function calls right um I think if you are kind of on the like existing chains that we have deployed on we have this uh API called um interchange accounts like the accounts API and that actually does this automatically for you right so you basically just specify again a call and instruct um let me see if I can actually screen share that icon right here and so basically here um You can call can call remote function and specify a bunch of calls um and then actually the kind of hyperlink contracts will create you a proxy account under the nation chain which will make those calls on behalf of your sender contract um and so that's another way of kind of like doing remote um functionals on Investigation shade so I hope that answered those two questions um I don't see any more questions that folks have um yeah if you have any more questions happy to stick around and answer them yeah if uh if you want to just go ahead and take yourself off me and ask questions feel free to do so and yeah if there are no more questions uh thank you nom for the great workshop and presentation and uh thank you everybody else for attending so uh yeah we've got a few more workshops there today but um yeah hopefully everybody's uh uh super hackers start off uh off to a great start so cheers thank you all thanks chord all right foreign

Automatic transcript — names and jargon may be misspelled.