Nomadic Chains Barbara Liau; James Preswich
Ethereum Denver·Sun, Oct 9, 2022, 12:00 AM
Transcript
while he's figuring that out i can just start introing so my name is barbara liao i am a co-founder and the ceo of nomad um and myself and my co-founder james will be presenting talking a little bit about nomad state of cross chain um today interoperability and what happens when things break and like why security is important and the trade-offs you need to make so did we get it's good we good okay thanks julian oh okay so this is me with different color hair um some people have met me and i like change my hair a lot and so if you don't recognize me again it's fine i understand i'm like superman change my glasses hair color um my background as a javascript engineer i've been in cryptos since um 2015-16 as a engineer storage is where i started it's where i first met james and we've been working on stuff together since my hobbies are really just a maxim list i love doing different things whether that is playing my dogs hanging out um from like crocheting to i went through like a blacksmith phase for a while um and just trying and doing a lot of things and i think this maximalist um mindset it really informs a lot of the work that i've done in crypto which is like all the chains right like there's not any one chain i think that's going to win um and then there's a lot of different things that are good about a lot of you know chains right um and if you want to follow me on barbara barberly out at on twitter um yeah and so uh i would say like it's pretty safe to say that um we're chained maximalists so we've been working on interoperability since 2017 um with our first startup with suma and really what we were doing is um we ended up just doing a lot of cross-chain consulting um and working with a lot of different ecosystems and different chains and that was really great it allowed us to try a bunch of different things atomic swaps between bitcoin and ethereum was like the first thing we worked on and this was something because all a lot of the l1s and certainly l2s didn't exist at the time and so as the world changes the solutions change and you need to keep a balance between you know your ideal theoretical um you know this is what we would love to see our ideal world and then what is possible now and the reality um and also people are like people would be like we want this thing we're like okay and we build it and then they're like just kidding that's really not what i want and in many ways we're kind of like toddlers and we just don't really know until we get it um and and so we have to figure out you know are we solving real world problems and what are the solutions we can implement now so nomad um is kind of the result of many years of unintentional r d and experimentation um we've we've also contributed to the problem right now fragmentation and everything and and working on solutions to fix that and so nomad is an optimistically inspired system built for today right uh we're working towards this goal of trustless communication between blockchains but we're not quite there yet um and so nomad is a combination of different things um it's you know there's always trade-offs when you build something and it's a combination of you know trading off time latency it's not as fast as some solutions but it's not as complicated as others there's high reusability um and you know it's relatively secure in different ways and and and um i mean james we're going to talk a little bit more about that um [Music] so really our ethics is we want to let devs do something right nomad um it's really honestly we want to be boring in that people are using it but they don't really know if you don't have a nomad shirt you can get one but it's stealth mode right it's it's uh it's kind of like http um people use it what matter but no one really cares or knows they just know that if you're going to build a web application the way that those messages are passed across use this protocol no one knows and the value comes from the applications that are built on top of it that's what you know we want to drive that communication that innovation and we want what's my next slide yeah we don't want people to have to worry about that right if you just want to drive your car from here to there you don't want to worry about building the roads right let someone else who specializes in roads do that and because if you don't you end up with this crazy denver like road situation so so where are we where's nomad now uh we deployed mainnet um in january so we're on um mainland ethereum we're on move meme suit oh i forgot soon tm on evmos once edmonds launches and then whatever other change soon tm uh as as is everything so you can keep an eye out for where we're going um so how how did we get here so this is we're just a bunch it's just a bunch of chains right but they're all different in some way some of them are groups of change some of them are like whatever chains and some of these chains were built really kind of in isolation you know they have their own ecosystem they weren't oh all my notes are in the corner too it's fine um so you know the they were trying to solve a specific problem but communicating with other blockchains wasn't a priority it wasn't something that they thought about it wasn't part of the design so it's relatively isolated and so now they're like well how do we i think those notes are on every single slide now um you know how do we they haven't solved that problem from the beginning and then there are like ecosystems of ecosystems that thought about like oh hey chains are gonna happen like let's make sure that we um build this communication into the chains so like uh you know ibc if that's built into it and that really is a great solution but if you didn't have that from the beginning it's really hard to implement uh after the fact so you know where does that leave us where um and and even if that was the case right you have like something like cosmos polkadot like you have those but how do those talk to each other right so you still have the problem it's just a little like one layer moved um and so we have we still have this communication problem it's a bit of a mess uh and and everyone wants to talk to each other when there's like globalization stage of uh nation states you know um so what are the different ways like talk a little bit about ibc this is probably the most where obviously we're a little bit of ibc maximalist but we just can't do it now and um as fast as we would want to but this is the most trustless way um and but yeah the the other thing too it's a little it can be a little bit expensive um it's hard to re-implement and uh but it is very trustless because you basically just replay and verify transactions um on the destination chain other things that exist right now is external validation so some trusted third party validates the messages that are passed across so that can be good because it is faster in many ways um but it relies on also like economic incentives you know if there's some group of trusted people or entities how do you make sure that they are actually doing what they say they are and so this is great until it no longer is and so is there a better way can can you know what what if you could keep an eye on these trusted parties and make sure that they are doing what they're doing how can you like watch watch them and so james is going to talk more about that and can devs do something to fix thanks barb uh so i'm i'm more of the technical like co-founder here uh i did a lot of the protocol design for nomad and for a bunch of cross-chain things before that i've contributed to tbtc to aurora near's vm looked at the wormhole architecture and have been working in crosschain stuff for just like five years or so way before any of this was cool or fun or interesting so i want to go through and real quick talk about how bridges break and kind of the ways that they informed the design of nomad so we have a few of these that are very high profile lately and they've all broken in specific ways in this cross-chain message life cycle so in order to process a message from one chain to another there are three phases you start off on the sending chain the message is you know sent by some dap uh it is committed to that chain state and then off chain actors take over for phase two so this is your oracle or your multi-sig or your ibc light client relay uh maintainers and the what happens off-chain is that these people see the message they decide whether or not to forward it and they dispatch a transaction to the second chain so you start off on the first chain and an off-chain actor takes it over to the second chain dispatches a transaction the second chain processes that transaction and hopefully the message is received by whatever cross-chain dap you're trying to interact with every bridge works this way every cross-chain communication system works this way so we can talk about specific bridges uh this was a while ago is thor chain suffered an eight million dollar hack uh middle of last year so how did thor chain break it broke in the part where the message is committed and then seen what happened with thor chain is that the off-chain actors thought they saw a specific message and in fact the message that was sent was different so the contract for thor chain correctly emitted an event saying that no value had been sent but the off chain actors after seeing that event went and looked up the transaction and saw that the transaction had value and overwrote the zero with the transaction's value so they incorrectly parsed the transaction in the ethereum blockchain and that resulted in them seeing the wrong message and dispatching the wrong transaction over on thor chain uh so specifically you know like uh sorry i made too many slides for this so i'm skipping forward really quick uh so thor chain broke where the off chain actors saw the wrong commitment because they had custom blockchain parsing logic in their node client uh so the lesson here is that chain vms are hard they taste bad and we don't want to work with them any chain specific handling code that you write for your bridge anything that is like uh specifically for the evm specifically for any cosmos vm is going to be really brittle and terrible and chain specific logic should generally be handled by the chain itself your evm specific logic should be handled in the evm doing it off chain doing it in this parsing layer in your node is a mistake and it's the mistake that thor chain made the next really notable one is poly market not poly market excuse me i always make this mistake poly network uh poly network suffered a hack of over 600 million dollars which is really impressive considering that i had never heard of them how can there be someone that you've never heard of with 600 million dollars in this space it just doesn't make sense so polynetwork also had a very interesting break but it was on a completely different part of the life cycle polynetwork works kind of like this an incoming message is signed off by the oracle they dispatch a transaction to ethereum or wherever after the oracle signs off it goes to the polynetwork system the system is responsible for forwarding that data to the actual smart contract that's supposed to process it so it forwards the value and the data from the message on to the actual recipient of the message so uh what happened with the attack was that the attacker you know cleverly said ah i can just send a message to the polynetwork bankvault and i can have that message give me all of the money uh so in this case the polynetwork bank is owned by the polynetwork system and the system had complete control over all the money and the attacker realized that the polynetwork people never actually validated that the message was a system message and not a user message so it's the like most interesting uh user account privilege exclamation that i know of in the evm and it broke in the latter part of the stack and then the lessons here are that you need a strict layer violation they confused a system message for a user message uh so how can we build cross-chain bridges with a strict layer system you separate the application logic from the communication logic okay the last one we're going to cover and i'm going to talk really fast for this is the wormhole exploit from a few weeks ago a few days ago a few weeks ago how did wormhole break uh wormhole really interesting broke between the communication with the off chain validators and the on-chain processing what happened in wormhole is that a user was able to fake validator signatures and the solana verifier was broken this allowed the user to mint a huge amount of eth on solana and then bridge that fake uh forged eath back to ethereum and get all of the real eth out of the bridge so uh the interesting thing about this is that this lana oracle and the poly market uh poly network oracle both behaved perfectly through these processes and the takeaway here is that a perfect oracle is not enough uh a perfect ibc light client is not enough uh these things break and when they break the bugs are in the application they're in the part that's minting and burning code or they're in the part that is verifying the uh oracle signatures uh there has never never been a compromise of a bridge's route of trust no one has ever stolen the oracle's multisig keys no one's ever broken the ibc like client implementation uh 100 of bridge hacks have been breaks in the application code not in the trust model uh so it kind of follows that the only thing we can do about this is not like build a better bridge with a cooler trust model and a big proof of stake system or something the only thing we can do about it is insert financial controls into the off chain portions so this is why nomad has a delay uh in transmission is to allow us to insert controls off chain actors who are watching the system and for each message asking is this message real you know was it actually committed by the sending chain is the origin faulty you know is there some issue in solana that's not validating signatures properly uh that means this message shouldn't be sent back to ethereum and steal all the ether and will the recipient behave as expected you know when there are messages going to the poly network system contract or the bank contract are those messages going to have the effect that the developers intended and expected all of these questions can be answered off-chain before any of the you know before we make these processing transactions on the receiving chain so the uh lesson here is that bridges will never be perfect the perfect oracle you know behavior that we've seen so far has been great but everything breaks in the application layer and all the money ends up getting stolen even though the bridge security model is perfect and not compromised so the only thing we can do is write better code separate the application and the communication in the code and have explicit in-depth off-chain checks and balances for our bridges uh so that's all i have um i am unsure if we have time for q a nope uh so you can find me probably by the bar after this thanks so much everyone
Automatic transcript — names and jargon may be misspelled.