Bridging the Multichain Divide: Account Aggregation and Gas Relayer Solutions - Firat Sertgoz
Nothing is loaded from YouTube until you press play, and then without tracking cookies.
About this video
Join NEAR's community: Website: near.org Reddit: / nearprotocol Discord: near.chat Medium: / nearprotocol Blog: near.org/blog Twitter: / nearprotocol GitHub: github.com/near github.com/nearprotocol Dev Docs: docs.near.org Create a wallet: wallet.near.org/create Apps on NEAR: awesomenear.com Learn to Build On NEAR: near.university Grants & Funding: near.org/grants #Blockchain #FutureisNEAR #NEAR #nearprotocol #nft #dao
Transcript
2,105 wordsCaptions as YouTube publishes them, usually machine-generated, so product and people names can be misheard.
- 0:06
hi um I'm here again my name is fat I'm a bit jet lagged so if I make any mistakes sorry about that um today I'll be talking about Bridging the multi-chain Divide account aggregation account abstraction what you want to call it and gas Rel Solutions um let's see so I think the main topic of today was that web 3 has a fragmentation problem and usability problem um it's especially with all these l2s coming out that are scaling ethereum and block um and Bitcoin there's a lot of different accounts and
- 0:37
as a user I just want to do something it's just play a game do a swap doesn't matter what it is but when I go into this it's it's not really usable and it's really fragmented so as you've seen this before what we're trying to do is we're trying to build um these Primitives on at pagota to allow one account to control multiple accounts in multiple chains so the users don't really need to worry about um changing networks keeping a lot of different accounts and different
- 1:08
wallets um and we're doing this through a technology that we call chain abstract not chain abstract chain signatures um where an account can sign an arbitrary payload Define what the network they want to in the datation path and in the message and send it to the validators um of this NPC Network to sign it for them and um to to send it to to the other network and now we're going to kind of dive deep into some parts of it I'm not
- 1:36
going to go too much detail in chain signatures I'm going to be more focusing on how the gas is being handled but let's take step by step so at a high level what happens with chain signatures is that a user has let's in this scenario let's say a user has near an eth right um on these chain signature account they they send a payload to change signatures they sign a trans chain Signature Signs this transaction
- 2:02
back and then the user through their wallet can sign the can send their transaction to the foreign chain let's say for now it's eth and in this case they have near and and they have eth on this on this chain abstraction account chain signature account so they can immediately send it and then everything goes well the the transaction gets in profit we're happy so the problem happens when the
- 2:25
user only has near and wants to take an action on eth I'm a user near I I want to send a transaction to eth um I only have near what happens who pays for this right because if the transaction goes to eth then if the user doesn't have any eth the transaction is going to get rejected and also if I do this who makes sure that the transaction actually executes there has to be some kind of an infrastructure that says please take this signed
- 2:56
payload and send it to the other side so what we're working on right now at pagota is this system or this infrastructure that we call gas station contract of multi-chain re layers and now we're in the first iteration of it so what happens is the user has 0.5 near for example and has a payload and then basically defines how much gas it's willing to spend on BNB or eth and it sends to the gas station
- 3:27
contract the gas station contract right now is almost like a almost like a market maker of some sort where it calculates how much near it would want in terms of how much x per gas it will give it to you if it said if it finds it feasible for it what it does it's it sends the payload of the user to the chain signatures and it also sends a payload that says that I will fund this transaction on e e side
- 4:01
both of these payloads return back and then a multi-chain relayer which is an offchain component listens to these transactions its only job is to make sure that there's no nons problem when you're sending the transaction across and it sends the transaction across so what happens is then is that you as the user don't have to do anything you just say here's my five near take this and then please send it to the other network
- 4:26
um and pay my gas right um what happens is is then is that the mulain relair entity let's say operates all of these infrastructure for you and then accepts or rejects your transaction based on the rules that it defines on the gas station contract it could be I will only cover the the gas if the user is sending a transaction to a specific smart contract on eth it could be I will only send a transaction five times from this user it could be I will only send this transaction if you pay me the this
- 4:59
amount of upfront cost so that I can remain this infrastructure running this is the current structure this the current structure that is right now if you go to GitHub um SL near protocols G repository and go to multi-chain reers and gas station relay um repositories you will be able to operate all of this there's an additional part to this where we're also introducing to decouple the gas station contract from the users
- 5:32
Keys which is an NFD contract where you can give the ownership of of the nft to a gas station contract which means that they can use that key that they can use your eth key for a limited amount of time if they give you the ownership back so the good side of this is that what we like I said the extension is NFD extension for ownership transfers and also on top of paying with near you can
- 6:02
also pay with any near FD so it doesn't have to be near you can pay with sweat you can pay with other other tokens that you own near like I said multichain relayer will in at launch will provide at least for now let's say will provide support for BMB and E and it will be used to order non skew to make sure that the transactions eventually make it to chain eventually what we want to introduce which I will go into detail um
- 6:35
is introducing account abstraction on each side which will increase the capital efficiency because then you will have a pool on the each side so that not you don't have to send this e to the um account every time that they want to take a transaction and announce control can be also done with um account abstraction on the each side so there's there's the other thing that we want to work on going forward is
- 7:01
the trustless execution how do we make sure that transactions actually happen on the foreign chain right right now we just send it and then you assume that it happens but for the contract to make sure that they can act for the user to make sure that the contract or the multi-chain reer actually did their job there has to be some kind of a proof on the on the near side that says oh yeah this transaction actually got included and then we're looking to use like clients to do so um running a light
- 7:26
client on on near side for eth or any chain that we want to support to say that hey yes this transaction actually happened on the foreign chain we would also like to introduce the retry mechanisms based on slippage um if the slippage is too high maybe you want to try another transaction without actually paying too much um difference in the gas fees that you first defined um and also if if it doesn't go once maybe you want to send it again to make
- 7:54
sure that the trans actually execute so the next stage for this is to say why stop with gas so now we're only supporting funding on the foreign chain for gas but there's a world where you should be able to say I want to give you just five near and I want you to swap me as much as you can right that's what we're going to be working coming soon um we're going to be working on basic swap
- 8:30
and almost have like a cross-chain DEX aggregator or near where you would go and talk to this contract and say I have five near go find me the best deck go find me the best decks on any chain that would give me eth so this sounds like something that the industry is working on it is not yet what we what we are and where we want to go um and I saw founder of anoma somewhere around here oh right right
- 9:00
there um they're they're putting a lot of work into this um intents right what are intents it is basically when you want to say something like I give you fer find me the best deal for swapping with maximum e or I give you finer buy me that nft I don't care where it is I don't care how much it's going to cost I I'm willing to give you this amount and go go go do that for me or the extreme
- 9:24
case which is includes multiple transactions is I give you five near go and word for that Dow because that includes multiple transactions on multiple um even multiple chains right and that is where we want to go with this um multi-chain gas relays and multi-chain transactions and intents um we've working with also we're a contributor to C cake framework that has been also um in E them where we had talks with them and there's a lot of
- 9:54
research going on on our side to get an intent based architecture going on with um multi-chain gas relays I don't want to call it gas relays at that point it's almost like an intent relayer on any chain but there's a lot of challenges that we're facing right now the most importantly is how do you make these intense automically execute because that is one of the most difficult things to do when in a multi-chain world how do you make sure a transaction actually comes from this chain and then goes to
- 10:26
this chain without actually these delays and if the chain goes down how do you revert so we're putting a lot of um Research into that another thing is like I said it's also connected to this is finality differences how do you make sure that if a chain is slow and other chain is fast that there's not there's there's an there's a chance for Arbitrage and we want to make sure that that doesn't affect the
- 10:50
users that comes into play into like mebs and whatnot and one of the most difficult things to get your head around in my opinion is how do you prove an intent because in a trusted system you want to say I wanted to do do this and it actually happened so that I will pay you but an intent is very abstract right it's like I give you five and go buy me that nft do you do you define a slippage do you define a maximum limit and how do
- 11:22
you come back to the user and say I proved you that this is what you wanted because the user might say I'm not sure if that's what I wanted so these are the things that we're working on right now and I'm very excited to work on these very Noble problems and very Noble Solutions and hopefully we will get these in the hands of the developers and users very very soon and that should be
- 11:46
pretty much it I think yeah thank you so much these are the ga repositories that we have if you want to play around with them please feel free to do so like I said it's mostly testnet and the contracts are going to going to be um quite changing and they're going to be getting audited very soon sorry if I did any mistakes I'm very very gentle but um hopefully it was helpful and hopefully we can move this forward
- 12:18
thanks