Chain Signatures: Cross Chain Apps Without Bridges - ETHGlobal London 2024
ETHGlobal·Wed, Oct 9, 2024, 12:00 AM
Join Boris Polania from NEAR for a workshop titled, “Create Gasless Transactions with Circle’s Web3 Services.” Building a cross-chain product? Meet Chain Signatures: the latest programmable MPC technology that enables cross-chain protocols to support every chain (even non-smart contract chains), eliminate the risk of bridging, and unify user experience. Learn to sign messages on any EVM network, and even Bitcoin, Doge, Ripple, with a single NEAR account. This workshop took place at ETHGlobal London 2024, a 3-day hackathon held at the Truman Brewery in London from March 15 to 17, 2024. The event brought together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.com Email us at: hello@ethglobal.com
Transcript
[Music] my name is Boris pania I'm the death real from near and we are going to talk about you know hacking with Chan chain abstraction with near um and I will talk a little about near first um and then I will go into the chain obstruction part so let me fix something here it should be here here come on there you go okay so I don't have a lot of time so I will make the near part very quick why near we in case you don't know near we are ler one uh we are natively charged so we are really fast really cheap the account model is very unique so it's very well suited for abstraction um the charging model makes us H well infin a scaleable we we can scale very easily we just recharted last week to our fifth chart um we have a very good ecosystem very good uh support for Dev tooling and on boarding we we are making all that we can so you can not only yourself a developer in board into near but you can on board your users into near as an when you deploy your application you create your application so what is chain instruction right so it's an it's a multiart computation technology we have created that you know enable you as a developer to in integrate multiple protocols to support multiple Pro multip uh multiple protocols multiple chains right so er don't eliminate it basically eliminates your risk of the risk of risk of bridging and it makes you easier to unify your user experience basically you should be able to sign but this means you should be able to sign transactions from near from Mostly any other blockchain so you don't you can your user if they deploy you know a game they should be able to sign transaction in any any blockchain using only the near EOS system and the near set of libraries Etc um so that's basically what is the chain obstruction about right so you can any VM compatible network even Bitcoin doggy Ripple whatever you can just use near to ER unify the the the the user experience and you know reduce the risk that comes with briding assets right so again simplify the the user experience ER you can abstract you can hide of the complexity from your users that's the main the main thing right uh you don't want users to keep dealing with the the connecting the wallet paying the gas this is we're trying to eliminate um you you can use some of the uh Services we have like you know account recovery and stuff like that um you can eliminate the use the you you can uh delegate the decide who pays the gas so your user doesn't have to pay the gas and well we just said you have the cross chain controller so the the the components that we we have for the chain obstruction thing was is the the relays basically the you when you deploy a you will be able to cover gas fist you know all all this wor is you will be able to cover the F to cover the the gas or decide who covers the who pays for the gas it could be other your yourself or a third party that's that's what we're trying to I would show a little I don't have a lot of time but I will show later a little code for each one so you have more idea what it takes to implement I'm it will be thinking of the hackaton like easy way to you can because the the bounties I will talk about the bounties one of the bounties is related with this so the Rel layers is to cover the gas phe so you decide who pays for the gas you don't want user to pay gas you can buy it yourself or no another any account you decide to who will be paying the gas so H the signatures is one account multiple chains basically you you you sign the transaction I would show that code too you sign the transaction are like five steps you it's a meta transaction at the end what is happening is a meta transaction and basically that's what will allow allow you to do that you will be able to sign a transaction in another blockchain you you sign it from near um oh sorry I don't know what happened there and then we also have the fast out so if you want to do email on boarding like you know Google and stuff like that o out is standard out you can do you have we have a set of libraries that you can do it you so you don't have to relate a centralized uh service to to to on board basically it it based the Authentication on uh near account so that's I will show a little code about this too um okay so uh the bounties well I go to the I go to the bounties and then I talk to the code because I want you to see the code the an easy way to you know to deploy for the hackaton right that's why we are here right so we have two bounties one is boost your startup with neon so if you had a start a project already running and you integrate any of the stack from from near it could be aora smart contracts boss you be eligible for this bounty it's a $5,000 bounties we usually give one first or second but if there are not good projects we just give one one if there are many with up to three no more than three usually is two most of the time is two and then we have the the chain instruction the chain signatures this if you use any of the components I about to show like the f out all the multi-chain or the relaters you should be able to be eligible for this specific Bounty so well this is us H we will have we have a telegram group just for the hackaton where the dev are here you join we keep we have support all the hackaton we will put in all the libraries for example we just released a libraries like two days ago when you can pay the gas of any blockchain in near so if you integrate a chain you can pay the gas in near right so that the stuff like that will be posting there they very beta thing but you will be able to use it uh yeah H so let let let me show you a little the so this is H bu a met you need to to do the metalac need a relayer so we the the the demo we have is using nexs so basically you need to set up you create an account that will account that will be you know taking care of the gas and you create your the you put the the the private the the private the the private key and then you just create the the routes is that next GS right so you need create you need to create the routes where you will receive the the requests the the code it should be very copy pasted for you if you want to use it you just need to make make sure you have a near account um and yeah you and you just create like this the nexts server it's an xgs H example we have here and then you have the client code so you have two parts on the client code you need to sign the a delegated transaction this is the meta transaction you have to sign the transaction there and then you use this is this is code that you can literally copy paste to sign the to sign the transaction and then you need to use the relator you created up here uh to send the transaction right so again we'll be in the booth if you get stuck here we can go more detail but I don't have like 15 minutes I can't go through all this code but this is what you need to do you create the nexts you create the routes then you you have one part that will sign the transaction The Meta transaction and then you use the relayer to submit the transaction to the other blockchain right it depends on where you want to sign the to where what exactly blockchain are you using to to to to integrate right that's it that's all what you need you will have access to this but we'll be there we can help you if you get stock then you can do the chain the the for the the the actual chain signator that are five steps you need to figure out uh first you need to figure out derive the the address on the other change right so that's the first step you have to do you you have the example here that's a little complex but if you get stuck come to us then you have to create the transaction that's again this a meta transaction you create the transaction using the address you just derived and then you request the signature so you you call you call the you call the near the multi- chain is a library it's a SDK you you you use that library to request a signature in near for that transaction then you Rec do the Reconstruction of the signature and then you use the relay to sign the the the transaction that this one's a little tricky but we have a step by step here H I only have a minute okay I only have a a step by step here to how you can do that and again we'll be on the booth to do this and the last part I don't know what is here I want it here but I show you here is the fast out so the fast out SDK is an SDK that you can root you know is ideally is you want to sign up your users using their email so we use it's a multipar computation the the security com using NPC and then you you just need the the the signer the signer app you know the you know you require the recovery service and you need again a transaction relayer right so the the relayer is basically you will need to you to to use it everywhere it's done in nexs so it should be if you are from familiar with you know react next should be shouldn't be that hard but still the the sample codes are here I can we can always help you um so you have the code here you require some keys that we can probably find we should be able to find one for you but this is a very long example so just come to us I won't be able to but the IDE is here that you create a email about that user will be able to recover the the access that's that will be actually the benefit right and it's still you know kind of decentralized so so that's that's one of the the the the benefits of using the the fast out SDK so we also have the boss H we don't I I mean if you want to use there other things that you can do you can do boss that is like react on on on chain I I don't have time to go through that but that's something you can use for the other for the other bound but we really if you can we really want to focus on the on the abstraction part that's that that the things we want for the for the bounties so these are the three components you can you can ER if sign metal transactions you can do the fast out or you can do the you know the multi-chain the chain signatures that's basically what uh What uh the things we what you like to to focus the the make sure the building are are related the Met transaction this is only for H free transactions on on near right if you want to create an application that the user doesn't pay gas on here you use the relayer the simple relayer or you can use the the multi-chain so they you can handle the signatur of other chains but even so you can do it so they don't have to pay the the gas in another chain it will be crazy for you to pay it but you can pay the gas for them too but the the idea is you can they will be able to sign action here and uh so that's that's the three components we want you to use for the hackaton to to apply for the abstraction Bounty uh they are a little coding intensive but again uh please stop by on the to in the booth and I I don't have much time left so because I want to use a couple of minutes for questions so er please before leaving join the telegram group where we will be giving you know the all the all the this links to this libraries and the sdks and all the things we're also we giving some G giveaways during the hackaton and stuff so follow the telegram group um yeah so if you have any question I think we still have a few more minutes to do that yeah thank you very much for for the talk um I'm a bit curious about account abstraction how does it work um especially if for example um when I create a near account does it create for instance narum sorry ma can repe yeah um so I have a question regarding uh when you create a near account does it create a n wallet address and also Bitcoin for instance address like like that and my second question is um could we agregate a different wallet so let's say for example I have a Bitcoin and ethereum wallet is it possible to when I'm creating a near wallet I can put the two wallet together for my my near account um um well not like that if you want to integrate like a Bitcoin address you have to the first thing it's a meta transaction right so you need to first to derive whatever address from from the libraries we have you you you you can see to the screen we have a code a sample code how you can derive addresses in other chains so with with once you derive you start you first create the transaction sign it and use the relay to to send it away that's the way you you link it not just by creating the the the accoun in near it one you cannot direct link B basically you have to derve create a metal transaction sign the transaction and send it to the relat that's that will be the way the the right way to do it probably the only way to do it any more questions uh yeah I'm very interested in meta transaction uh you said that it's possible to communicate with other chains and is it possible to deploy some bite code on ethereum network so I have a contract I want to deploy it to ethereum and pay fees in near is it possible yeah I mean I will understand exactly the contract but it should be you should be able to sign the transaction in near and you know pay the gas in near I mean so contract deployment say also covered so I can deploy contract using mid transaction to be honest you got me there if you want to deploy and pay I need to double check that part I know you can pay the the the the gas for the transaction you sign but probably if you can put the buy code and the transaction inside the deployment of the contract yeah probably that's that's possible okay thank you yeah if you are in t group we can ask directly to someone that is more involved with me than arando is there with the guy he can he can yeah any other question okay guys well thank you H please St by by the booth and [Music]
Automatic transcript — names and jargon may be misspelled.