Cross-Chain Without Bridges: Secure Interoperability With Threshold Signatures | Kendall Cole
Ethereum Denver·Wed, Oct 9, 2024, 12:00 AM
Speaker
Building cross-chain products? Brace yourself for the tradeoff tango. This session dissects the hidden costs of bridges and presents an innovative alternative: threshold signatures. Discover how they unlock enhanced security, blazing-fast transactions, and effortless user experiences in the cross-chain realm.
Transcript
[Music] hello everyone good morning a very good out for the first session of the of the day welcome to the Trident stage we're going to be having a little bit of fun here a little bit of energy going and I am going to be your MC today my name is Masha Healey and I'm really excited to learn alongside with you guys today so our first talk is going to be Kendall Cole who is the director and co-founder of proximity Labs Kendall co-founded proximity Labs a research and development fir firm focused on the near ecosystem formerly at consensus and the near Foundation Kendall has a deep web three product and Business Development experience Kendall leads strategy and Outreach for near Defi and scalability solutions let's hear what you have to say Kendall let's give this a second and see if we can load these slides there is my all right one second here we go okay now we should be good all right hey everyone my name is Kendall uh and I'm going to talk to you guys about how you can build cross chain applications without using Bridges which we think is going to be a pretty important pattern for this uh this next wave of uh the market cycle uh so this probably isn't a surprise to any of you who are who are already using defi but cross chain defi is becoming increasingly important uh pretty much every single day so here is a chart that I found pretty interesting which is that since November we've seen brid Daily Bridge volumes uh more than 4X um and we've also seen cross-chain swap volumes see a similar kind of peak in interest and it looks like this is only going to continue as we have more and more chains layer twos and other kind of layers that are launching which seems like pretty much hourly right now um one of the problems we have though is that Bridges have a lot of limitations uh they one they are really difficult to build securely uh just a few of the headlines from the last couple of years that show some of actually really high quality teams and high quality bridges that have suffered exploits um and a lot of times this is actually just because the attack surface of a bridge is quite large they're really difficult to buildt the other issue is that there are no bridges that support anywhere close to every single chain or layer even some of the more prolific Bridges like Wormhole which have done a great job of integrating a lot of chains do not support nearly every single chain that's out there um and some chains they can't support like non-smart contract chains including Bitcoin and others so what this means is that if you want to bridge across multiple chains most likely you're going to have to use several different Bridges and each Bridge has a completely different user experience uh you might notice that Bridges have very different speeds some are you know minutes some are hours some are days or even weeks you also might notice that when you bridge an asset uh to a chain you'll realiz that you actually ended up with the wrong version of the asset a lot of bridges use kind of a wrapping unwrapping pattern and what this means is that you may end up with a certain type of wrapped usdt and go try to deposit that into uh a lending protocol or swap that somewhere and realize actually that you have a version that is either unsupported or does not have very much liquidity which creates a pretty frustrating problem for you to then solve and figure out how to get the right asset um and then last but not least Bridges often times do not provide you uh a great way to acquire the gas tokens of the chain that you are using uh some of them are are starting to add this into their protocol and it is it is helping but you likely will still end up in a situation where you'll have to find a way to acquire the gas token uh for the chain you're trying to use even if you manage to bridge say a stable coin or another asset and again every single bridge is going to be different and so users have to basically learn how to use several different Bridges which is not ideal fortunately we actually do think that there is a new design pattern that is going to alleviate a lot of these challenges and basically this is what we call programmable MPC so a lot of you might be familiar with uh NPC type of wallets if you've ever used a coinbase wallet supports this uh if you've used institutional grade Solutions such as fire blocks they support this but these are actually really designed for uh kind of the user having their having one of the keys and then a centralized party having one of the keys with programmable NPC we can actually allow developers to kind of tap into these Solutions as well and we can also make them decentralized so what are some of the key advantages of decentralized programmable NPC well they support they can support any chain including non-smart contract chains so with this programmable NPC you can support Bitcoin you can support Ripple you can support Dogecoin you can support any chain uh and you also get instant support for new chains as the MPC kind of Provider what you do have to support is the different types of the different elliptic curves so you need ecdsa for the M chains Bitcoin and a lot of Cosmos chains and you need EDSA for salana near cardano and others but if you have those Primitives then you can support any new chain as soon as it launches without having to go and integrate that chain like most of the bridge providers have to and then last but not least you can provide a much more standardized user and developer experience because you can essentially have a a simple API for developers to build on top of um they might still have to themselves integrate a new chain but they'll be targeting a specific Community anyway and then usually users when they go use this solution they won't have to you know wait different amounts of times for bridging they won't have to potentially even deal with gas tokens depending on the implementation it can just be a lot more consistent and normalized for the user which uh we think can lead to you know a true potential for something like chain abstraction where the user doesn't even have to know which chain they're on so there are several teams that are building uh programmable NPC today uh I think just about eight total and probably a couple that I missed here uh fortunately some some very good ones and and there's two kind of main patterns that are arising so the most common is what I call deposit-based and this is typically where uh essentially like the programmable NPC network will maintain a single or a small number of deposit addresses that can basically be used to create kind of a canonical bridged asset so good examples of this definity with their chain key they have kind of uh definity Bitcoin definity ethereum uh Zeta chain recently launched has been getting a lot of attention they support Bitcoin and they're going to be supporting more they basically have this kind of main deposit address some of the more uh unique ones chain flip and Thor and thorchain is kind of the OG here uh they use this for like swap based addresses where like the the kind of nodes will give you an address to deposit your Bitcoin or ethereum to uh and then they'll allow you to trade essentially that asset with another user and then axlr is building kind of more of a generalized brid solution but still has this very deposit base like they maintain one address uh for you rather than letting you have access to the address yourself so uh near protocol uh which is what we're working on and then lit protocol use a little bit of a different pattern that I would call account based and what's cool about the account based is it actually lets an end user maintain sub accounts for any number of blockchains uh so the example uh from what we're building in near is we actually let this near account which can also be a smart contract and that opens up a lot of a lot of really cool Avenues can essentially request a through through a smart contract or even through like kind of a native near action can request that the validat the near validators or the the NPC nodes sign an arbitrary payload which will likely be a transaction for Bitcoin for ethereum for op for atom whatever it might be um and then what they'll get back is they'll get back that sign payload which they can then relay to the chain and a lot of this will be abstracted away and the user will just think they're signing normal transactions that'll end up on the Bitcoin chain that'll end up on you know whatever destination chain they have uh for developers what's nice about the this is the API is actually quite simple it's basically going to be the sign function they pass in the payload they can also pass in kind of a key derivation path which means that like every single near account can have essentially like a very high number sort of infinite number of accounts they can sign for On Any Given chain so a near account could have say a 100 uh accounts on bitcoin or a smart contract that's using this in a more flexible May might have tens of thousands of uh accounts that they're maintaining on bitcoin or on ethereum or on these different chains and then you can of course pass in the key type and this is basically like how the only thing you really have to do to differentiate between chains is like make sure you're using ecdsa for EC ecdsa supported chains make sure you're using ed25519 for those chains Etc so to visualize a little bit of what this process looks like so we have the near account the near account initiates the signature which goes to these MPC assigning nodes then these NPC signing nodes basically sign this payload and then they'll essentially help route this transaction to destination chain which can be you know several uh we're also building a gas relayer on top of this which is a similar type of path the big difference here is that you'll have relays who will essentially pick up using like a gas router contract these relays will basically pick up the transaction uh the user will pay them in something like usdc recently we had a demo from the sweatcoin team who had their user paying in sweat to then send a transaction on binance uh and then this relayer will basically take your payment send you B&B on your BNB address or ethereum address whatever it is and then also will route your signed transaction and a lot of times this can happen in the same block and so it creates like a really smooth experience and this actually enables W like wallets uh uh application layer teams and users to not have to deal with multiple gas tokens and multiple chains they can actually live in a world where they can use usdc to pay for gas on transactions on any chain uh which we think is pretty pretty cool so what are some of the other use cases well we're particular excited about what uh what can happen when it's a smart contract that's using this uh this these chain signatures so I think there's three in particular that I'm excited about uh in addition to a couple of others that will eventually blow Minds first is bridgeless cross-chain defi hence the name of this talk and we'll go into a little bit more detail there uh the second is defi on non-smart contract chains so you can basically uh take chains that really only support transfers like a Bitcoin like a doge uh like a bit tensor um and what you can do is you can use near smart contracts to act as escro contracts and also kind of manage who controls what and on top of just this fairly simple primitive you can build lending protocols that support any asset on any chain including assets that are staked or in kind of unique states maybe even in liquidity pools it's very flexible uh and you can also then of course build swaps and you can actually power swaps between any asset on any chain so you could be trading like a staked Tia for an nft on salana it can get really wacky uh and then the third that we'll touch on a little bit is what we were just discussing which is that multi-chain account abstraction pattern which includes support for a gas Rel layer so one of the things that's cool about near accounts is they're natively smart contract accounts meaning that like any near account can have any number of keys and so you can rotate Keys which can add it for security you can have kind of multier patterns it's very flexible um and you get that out of the box and you can then use that as your account to sign for any chain uh which you think is is pretty cool so to dive a little bit deeper on some of the ideas that we're seeing teams explore in the bridges Crossing defi realm so we talked about the native swaps we talked about the cross-chain lending order book you can even power something like reaking for any asset on any chain and you can basically handle kind of the slashing conditions and the reward conditions on near which is going to open up a lot of opportunities uh and just ways to reuse assets uh and then we'll walk through this example kind of specifically but uh you can also build a Bitcoin ordinal Marketplace that's quite trustless so to dive a bit deeper into that example let's imagine that we have a seller of an ordinal we have a buyer who wants to pay say usdc in this case for that ordinal and then in the middle we're going to have this near smart contract that's going to act as kind of the marketplace contract so the way this will work first is the seller will basically ask the marketplace contract for a deposit address on bitcoin what's going to be unique about this Bitcoin account is that only the marketplace contract can request from the PC signers the ability to send a transaction on behalf of this account uh and what it'll do within the smart contract state is it'll basically recognize that the seller is the owner of this account and thus that seller can act can like request to say withdraw or move their ordinal out of that account as long as it's not in an active order on the other side let's say that the buyer deposits usdc this user they'll deposit the ordinal finally um and then if they decide to list this ordinal and they have an open order the contract will not allow them to withdraw and this is basically just so that the buyer who kind of comes in here and buys this doesn't have to worry about something happening on the Bitcoin blockchain uh kind of behind their back only this Marketplace contract can can uh allow a withdrawal and they will only allow a withdrawal if the order isn't open so order is now open no withdraw is allowed uh let's say they list it for 10 usdc on the other side we have a buyer who will accept this listing they say cool 10 usdc works for me for this ordinal so here's where something really cool happens so what we said before is that this seller was is the only one who could request the withdrawal for the ordinal so because this trade has now been executed what will happen within one block so atomically is that the buyer will now be the only one who can request to withdraw this ordinal so they effectively now control this ordinal they can withdraw it to an account they control and exchange whatever they want to do then on the other side the seller now is in control of that usdc they can also withdraw it from the contract uh go do what they want with it and now we have uh this completed Atomic transaction so this this pattern talks about an asset on and an asset on bitcoin but again this can be generalized to any asset on any chain uh in that case basically what will happen is the marketpl contract will only be doing one thing it'll essentially allow uh it'll just be verifying that two users have agreed to swap their accounts that's all it'll do and like two things It'll like let users basically list their account for sale and that account can basically be controlling assets on any chain and then uh when both users like the seller of the account and the buyer basically have co-signed uh essentially an order then it'll decide okay cool now we can basically swap control of these accounts so it'll actually be completely agnostic to what assets are being listed on what chain and and that flexibility is what allows this contract to then support any asset on any chain which we think is pretty exciting so uh we just launched the docs for this protocol uh we have uh a test stable test net that is up that you can try out today so if you check out the uh the QR code on the left you can see those develop and try his examples mainnet coming soon uh and then on the right side you can join the developer telegram chat where we have all the devs who are building this and a lot of project uh people building different projects and we can answer any questions that you might have or brainstorm on ideas or uh you know whatever it is that might help you on your way and that is it excited to see what everyone can build with this technology uh and yeah happy to chat with anyone you know after this who's interested in programable NPC or has any questions thanks everyone R all right everyone we're going to have a a nice little five minute break and then next we will be hearing about erc20 the Open Cross chain token standard from
Automatic transcript — names and jargon may be misspelled.