How to Make bridges Fast & Furious (and survive)?
ETHCC 6 · July 2023 · 17:07
Kirill Abramov examines cross-chain bridge design with attention to reliability, security and ease of use. The speaker discusses how these requirements interact with core blockchain principles.
Speakers
Topics
From ETHCC 6, hosted by Ethereum France.
Transcript
hi guys uh happy to see everyone here so at the conference here a lot of smart people talking about smart stuff blockchain cryptocurrencies tokens and many different things but we let's talk about movies um but first uh let me second let me actually Define that the blockchain bridges should be boring uh why let me explain so the life is ongoing it's happy sad funny attractive and even though it could be but it's not obliged to be boring
the bridge on the other hand you usually need to cross in your life the real life breach and you cross to the other sides and you're alive but you are not like worrying each time uh will be alive this time or will I if I bring my family if if I will make it so you actually just use it and it's and it's pretty boring and again the design of the bridge could be like uh fascinating it's attractive it could be a piece of art but the process itself it's boring because their business in security the thing that matters for people um so of course you can make it more fun you can design like the roads you know
like in a waveform will it be fun of course but it will perhaps distract the people and intimidate um so yeah you just want to have it simple and confident the process itself so the bridge itself as a tool should be boring and in this analogy you might imagine that when I'm so when I was talking about the life we can talk similar things about blockchain uh blockchain is live even though it's a different movie um not fast and furious um and a bridge as you might have predicted a blockchain bridge again blockchain could be surprised in
like fright and in Kauai and it could be disappointing but also empowering usually anything but boring but the primary purpose of the blockchain bridge similar to the real life is to allow you to cross between different chains from point A to point B chain a to chain B and actually to ensure that this process is reliable and during last years like more than two billion dollars um were stolen from the bridges and it's not burned at all right so let's keep the enjoyment of the
design for the engineers and deliver the robust way to travel between chains so let's imagine that you are a screenwriter and you are living in the world which is a boring world uh not necessarily born in the world but the world where actually uh boring movies are appreciated so in that World The Fast and Furious would be a dull and boring movie but still consider it one of the best and you're a screenwriter and you got the tasks that you need to write a screenplay about the bridge the blockchain bridge explain how Securities how it works and you need to use the
analogy of the real Bank um for your movie and this is of course because the bridge could be seen as also an interband transfer which is which is a boring thing you might agree so let's review the cast first um so at least it's an honest client but one of the managers of the bank check it's a dishonest client so let's start writing a script so the bank has a safe with the money three managers for example verify the documents of each of the transfers to prove the validity and after the verification they get the key from their keychain which is on their belt and open the safe to give the cash to the clients
um now let's review some scenarios for this group so um the ls comes to the bank like Mr Bob um I want to get my money uh here's my documents for the transfer but verifies it and the other managers do the same sure Mr Ellis Mrs Ellis this is these are your money and then Chuck William comes to the bank with the same requests but both verifies it and see so we don't see a transfer you are fraught bye um so how do you feel about that It generally looks right the workflow is fine
but this could become funny relatively easy one of the ways for example another screenwriter comes to you and adds a piece to your uh to your screenplay so the group of armed burglars come to the bank they retrieve the keys from the managers it's conveniently on their belts on the keychain the burglars they get access to the safe they drain it so the bank becomes insolvent this is a huge problem for your clients and their life just became less boring um in this example you might imagine
um what the characters here means so the manager is and of chain validator and kitchen on the belt is the hot wallet which that validator uses um and as you might know like also quite recently there could be actually just one manager or could be like multiple keys but eventually just one manager holds all of them on his belts so it's not really sustainable so what can we change about that one of the solutions that can be probably required having more managers verify that these are like different manager different people and maybe let
some of them store their keys for example at their home so they become less hotdones for the villains um but what could go wrong with that so for example some of the managers get sick then your client cannot retrieve his funds and need to wait until all the managers are available but also the managers could be blackmailed they can have bad intentions or they and they would just open the safe and drain money so again your bank will become insolvent and there are also many other exotic ways um how how to get it insolvent and it's
usually pretty interesting but not boring so what can we do better let's try and improve the previous script a little bit imagine how great could it be if you can just trust that the bank and you know for sure that if you got the information that the transfer happened there you know for sure you don't need to trust anyone from that bank you just trusts that it it happens and luckily in this world the banks have a public database which contain the information about the transfers so this way we know that transfer is valid let's adjust the story
um so the bank has a safe with the money but it also has a client manager Robert Dominic who verifies the client's documents and after the verification opens the safe and gives the cash to the client and it verifies it according to the public databases of these Banks so the robot Dominic has a motto for his life security is the most important thing in your life security family and Dominic tries to ensure that he's competent enough that there is no bug in his firmware so he occasionally invites the group of qualified professionals to review his internals and make sure that
everything works perfectly and in this version of scripts this scenario with Alice Bob and Chuck Remains the Same so this is fine in case the Chuck like provides invalid transfer he won't receive his money the burglars come to the bank and the robot can open anything because there are no records in the database and you cannot blackmail the robot so let's review the new actors in our cast so the bank public database is actually his blockchain that has been connected to the bridge and the authority of the other bank Who We Trust is actually the blockchain
consensus so why should we trust anyone else but the consensus of the blockchains that we are building the bridge between and the Dominic in this case is the bridge smart contract on each blockchain verifying information from the bridge flight clients so yeah we use blockchain we believe that the consensus Works flawlessly in case there are issues with the consensus itself most likely you will have issues on the blockchain itself not not only the bridge and it's hard to protect against this thing for sure um so uh but definitely we don't want to have external bridge validators that
verify messages and transactions and process the transfers so let's review one of the Practical examples how we utilize the scripts in our world now so this is an example Rainbow Bridge which utilizes the light clients following the scripts and the core idea lies that the light clients is the main thing however in this scheme there is one limitation because for the near light client on ethereum it's optimistic it's because the pre-compiles for eeg25519 signatures which are signatures of near validators they are not
available yet as a pre-compiler in ethereum which makes it super expensive and not sustainable so because of that it's optimistic but it's still trustless hence the Watchdog in the scheme that anyone can run so out of practicality we can say that our scripts because of this thing was changed to the following so now the Dominic verifies one of the banks of the documents each each four hours and yeah but it works and all the scenarios work and so far we discussed how to make Bridge Furious which is the most
important part right you cannot go fast if you are not controlling things uh but that's now let's review one of the possible solutions on how we can add some speed to it how to make it fast well we need for that the charger and fuel tank for the Dominic right um so in the script the charger quickly checks the documents of that bank which is slow for some reason and delivers funds to his clients from the fuel tank and in this case of mistake the risk is only for the fuel tank and bank is safe
and in this case the fuel tank is of course um meaning the separate pool that holds a liquidity for that bridge so there is no extra risk so let's review how it was implemented in this case of the Rainbow Bridge so we actually required building a fast Bridge connector and a fast Bridge relay to connect all the pieces all together and add the speed so the funds are almost immediately available only in ethereum chain after the user's transfer on linear chain and later the fast Bridge relay will use the trustless proof from the ethereum
blockchain that's that fast transfer happened and the user received his funds then the relay rebalances back to the ethereum pool and so it works and the user also can cancel his transfer using again a proof of non-existent transfer non-existent fast transfer on the ethereum blockchain so there is no risk for the main Bridge locked video or for the clients only for that liquidity pool um nevertheless um it's essential to always remember that no matter how good your Dominic is there could could be some flows and
there could be you know like other screenwriters wearing black hats or white hats that would want to go and modify and deceive your scripts so yeah but we don't but we don't need another scripts and we don't want to have Fast and Furious security drifts so we need back bounty um and of course besides of that you also need to ensure that you have a proper deployment processes for the bridge and that you have robust Monitoring Solutions because not always You can predict what what will happen next so
um one of the things that perhaps you have in your head right now um what about ZK to speed up the bridge or to make the bridge in the first place well the case too much fun especially for the bridge uh just look there are many possibilities for uncertain circuits for sorry for unconstrained circuits for vulnerable components in the whole chain of building the bridge because the tools are relatively new there are still lack of wide expertise in that field and lack of capable Auditors so sometimes there's a k for the bridge unfortunately looks like that
kind of strong protected but you have pretty much pretty many workarounds or in some cases where there are ZK stuff happening but it's not actually activated because there was a flow of vulnerability discovered so it could look like this too um so let's summarize the thing um we really need to have boring Bridges there are many amazing but boring things in our life let's say aerial industry you just use it the process itself is boring even but it's the bridge between countries between cities between many
miles so let's build reliable and boring Bridges and have fun in the blockchain and real life thank you do you have time for questions no
okay thank you [Music]