New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

NEAR: One chain to abstract them all

ETHGlobalWed, Oct 9, 2024, 12:00 AM

Join Guillermo Gallardo from NEAR, for a workshop titled, “NEAR: One chain to abstract them all.” What if you could control accounts across multiple chains with a simple email login? What if your smart contract could acts across multiple chains? Join us in this technical workshop as we explore how NEAR's vision of Chain Abstract can help you and your users enjoy a barrier-free Web3. This workshop took place during ETHGlobal Brussels, a 3-day hackathon held in Brussels, Belgium from July 12 to 14, 2024. ETHGlobal Brussels 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: x.com/ethglobal Website: https://ethglobal.com Email us at: hello@ethglobal.com

Transcript

[Music] hi everyone thank you so much for being here I'm gisho I'm part of the developer relations at near and I'm here today to talk about near the one chain to abstract them all so today's goal basically is that I want all of you to know that we have two bounties which add up to $10,000 one is for on chain abstraction and the other one is focus on AI and I want you to go out of this talk you know with a good idea of like what is the near Tech stack and also have a clear understanding on how to continue after you see everything I'm going to show where is our documentation how you can reach us to out how you can reach out to us for support and also to give you some ideas uh for the hackathon in case you you know like you want to build something but you don't know exactly what uh I will encourage you all to actually scan the QR codes that you're going to be seeing across the presentation or at least to to take pictures of them because this is going to be like a lot a lot a lot of information to take in you will not see me coding as much as you're going to be as much as you're going to be seeing me explaining Concepts uh that are like important to know in here so maybe we can start with like why even useing right like why why do we even care about it and there are a couple of reasons right like we are an L1 that is very fast and scalable uh we have one second block generation time and we're shed by Design our transactions are in aage very very cheap we're talking about like less than a scent and we are like a certified carbon neutral chain but besides that which you know like eventually I guess that we all going to reach that state um I think that an interesting thing about near is that it's very very user and de friendly because the it comes with name accounts it has a very unique account uh access key system uh it has built-in account obstruction and it also has the ability to control up to some extent uh accounts on other chains so let's start with the first uh one of uh the topic of our bounties which is chain abstraction and to talk about chain obstruction we're going to start with our account model in here we have two type of accounts implicit accounts and name accounts name accounts are implicit accounts are the ones that you might have been seen like absolutely everywhere which is like just a bunch of characters so your account is going to be FB 09 and which doesn't tell you much but we also have name accounts which are like as the name suggest accounts that you can just uh uh refer to them by their name like near gil. near app and gil. near so the nice thing about this is that they're very easy to remember and they're also very useful to organize your accounts for example if you have an application you can start releasing like the version one the version two the version three and also use some other of uh some other of the accounts to put for for example uh your Dao or your fund or you know like anything else that is related to your account so it's very simple to keep organized but also something that is very interesting is that all the accounts are already a smart contract like they all can have a smart contract and they all are at the end of the day a smart contract if you're more if you're interested to learn more about this I recommend you to uh scan the QR code which will take you to our documentation for this and the second important thing about like near accounts is that they have a very interesting um access key model in which you might be used to you know accounts having like one key but in near uh accounts can not only have multiple access keys but this also but we also have two type of access Keys which ones which are full access keys and the other one which are like limited access Keys now full access keys are like the ones that you are aware like or the ones that you are used to in absolutely every ecosystem which you know like they have full control over the account they're going to allow you to transfer all the funds call contracts create accounts add them remove keys because again you can have multiple keys and this is the classic you know keep them safe because if something bad happens to them like that you know it's bad it's really bad for you uh but something interesting is that you know since you can have multiple Keys you can also just swap them like if you think that one of your keys got compromised you can just delete it and another one and then comes the what is very interesting and the reason why I'm spending time to to talk about this is the limited access Keys which are a special type of key that can only sign transactions that are calling a specific smart Cod contract they cannot spend funds they cannot create accounts they cannot add or remove keys they cannot delete your account nothing they just allow you to call specific methods on a specific smart contract and these type of keys are meant to be shared and what I mean with meant to be shared I don't know if you have seen this tweet some time ago I found it hilarious about like the future of web 3 gaming where like every time you shoot you have to sign a transaction and for me this was like very very fun because actually the whole idea of the limit access Keys is that you can share them with some application and then the application can sign a transaction for you so for example like if you want your game to you know just be shooting and you want to save each one of these shots into the chain I don't know why but you might want to do it uh then you know you can just give the application an limited access to your account and say like okay you can call the function save shot into this smart contract and that's it like that's the only thing that the applic will be able to do for you and it will highly improve your user experience because then you will not have to ask people to sign of course this is an this is an exaggeration but it might happen that you know you just want to store like we have guest book example right like you just want to stir like a little message and you don't need to sign a transaction the guestbook can automatically do this for you and the important thing about like not only improving user experience is that limited access Keys allow to call methods on a cont contract but contracts can do everything that an account can so what if you create a method in a smart contract that transfer an nft or a functionable token now I can give this access key to any of you and you can call that method and transfer an nft to your account and now suddenly you have a link drop what or what we call a link drop you can see more information about it in the in the QR code or for example what if I create a method that when you call it it creates a new account for you now I can give you access to my account so you can call that method and create an account for yourself and this is very very very interesting right because suddenly I'm giving you just by sharing a little piece of my account I I'm giving you the opportunity to ga uh to gather H assets to create accounts to you know call other methods in a specific place that I want you to and that's the and that's why like access keys are so important now the next part of CH obstruction is what uh we call Meta transactions I think that this is already like a term that has been taken by by everyone which is a building system to WR transactions and delegate them so someone else cover your fees so imagine that Anna wants to create a transaction right like they want to execute something but they have literally no funds so what do they do they create a transaction they wrap it into a delegate action meage message this is like you know something like this specific implementation you can go into the documentation and see what I'm talking about but the whole idea is that Anna will create a message that then Anna can sign and send it to a relayer which is just like a server that is of chain and now the relayer attaches some tokens to this transaction and send it to the network and what will happen is that the network will take it and execute it as if it was Anna transaction so this is a built-in system would like there's nothing you know like weird that you have to to to invent we just have the relayer you create the transaction and you say okay please someone pay for it and the relayer will send it to the network and cover it but the important thing again is Anna like or the transaction will execute as Anna it's not that the relayer is going to be executing the transaction the relayer is just putting the money and then everything else is a fun so this is very useful for uh for example like if your user has literally no funds well now you can enable them to use the transactions on near but just implementing a relayer and meta transactions now so far I have only spoken about things that are possible on near and the next thing that I want to talk about chain obstruction is the concept of chain signatures which you might have heard uh the the whole idea of chain signature is to be able to reach into other chains uh this is Anum conference so like let's focus on evm but you can also use vcoin and uh and and and other other chains so behind the chain signatures the main concept that you have to understand is the one of the NPC service like a multiparty computation service which what it does is just a r a a decentralized network of computers that can translate an near account into multiple foreign accounts like evm so ethereum accounts Bitcoin Dodge Etc and this service is out there listening for signatur request and when it say it sees one it signs them and returns them on chain so here you can see like we have our our NPC service that is listening and basically we have Anna that now wants to sign a transaction on ethereum so Anna asks the NPC service which accounts do I uh do I own and then ask to sign a transaction by executing an onchain action which is just calling the NPC contract in near the NPC service which is outside is listening to it captures it and Returns the signature in between the NPC contract is just waiting there and then returning the signature to Anna who can now relay it so I have a little video showing this uh you can find examp now I will tell you where you can find the this example uh but basically you can see that there I'm just logging in with a near account now I'm changing which account I want to control I was controlling the test account now I'm controlling the etherum account I'm going to fund it using uh here metamask so if you give it a second then the money is going to arrive if I move here you will be able to see that we went from Ser Z ethereum to 0.05 and now what is going to happen is that uh I'm just going to be sending a request so like executing a transaction on near where I ask the MPC service to sign for me for it it will return to me and then I just relay it to the network and that's it and this example you can find it if you go through this QR code for those of you that are going to be uh working on chain obstruction I recommend you strongly to look at that example because basically it's going to have most of the information and most of the code that you're going to be needing at the end so I'll just give you like 10 seconds more in in case anyone wants to take it I see you're reaching to your phone so I'm going to be just like mindful of that you still have time because so what what is going to happen is that you're GNA be taking to our GitHub and in that GitHub you will see like the near M chain example and it will also like within the GitHub you will see the the the the the the link to our documentation so yeah if you're going to be hugging on chain abstraction very much recommended that you look at this now I'm just going to repeat how it works because this is going to be very useful for like when you're hacking so near accounts can control accounts on other chains by you first ask the MPC okay I am gil. near which accounts can I control and it will tell you and then you say okay perfect can you create a payload for example like by me like that eum account making a transaction to another like sending me ethereum to another uh account then you're going to make a call on chain just this is just like a normal function call on a on a on a um near smart contract and and then you're going to wait meanwhile what is going to be happening is that the contract is going to be as in the same way time that you are waiting the smart contract is going to be waiting because smart contracts in here can wait and it's just going to be waiting until the NPC contract and the NPC service answers and once the the answer is there that's it like you will get your signning transaction which which uh you can relay now so you might tell me okay yeah that's interesting like you sign a transaction so so what's what's so amazing about that right like so the important thing is like two things here like the first one is that thanks to the NPC you don't need to care about like the ethereum keys because the NPC is going to be taking care of it it's not that that the NPC since it's like a distribut network of computers is not going to be able to you know like take hold of your of your accounts it's just going to be there you know like helping you to sign transactions for them so you know that you know you don't have to remember the seats of all of that if you have like an ethereum account that's if you have an either account that's it now you're going contr multiple ethereum accounts and the second one is that the request was made on chain so it's not only that any near account can make uh the request is that smart contracts can also make the request right like because smart contracts are also near accounts so suddenly smart contracts can request foreign payloads to be signed which means like now smart contract can sign can ask to get a transaction signed for Dodge ethereum Bitcoin and when you combine all of these things like the account model with the meta transactions and with the chain when the chain signatures what happens is that you have a world of possibilities that that that you can build right like you could have a down near where people just propose you know like different actions to be executed on ethereum and it's very cheap to vote and you know like to to to make proposals in both and there and you can even you know like thanks to link drops you can drop accounts to the people that you want to be voting here uh you could have a smart contract that triggers transactions in Dodge like suddenly something happens on near account and now you are making a transaction in Dodge you could link foreign accounts to nfts on near and now you can sell those nfts and suddenly you are selling accounts in a foreign chain or you could create drops uh which drop assets on a foreign chain right like you just control an account that has an nft now you can drop that account on near and it has control of an nft outside of near so truly a world of possibilities now that was for the first Bounty the second Bounty is about near plus Ai and what I want to be understood based on like all the questions that I got so far is that when we talk about near plus AI we talk about near powered by AI or AI powered by near so you know think of like the combination of these two things think of autonomous agents that can now transact on a blockchain or think about smart contracts that can take decisions based on AI models in the same way that they were waiting for an NPC signature now maybe they're waiting for like a lln model to take a decision for them so this is not necessarily about like infrastructure or like running AI inside of near or like this is not about like necessarily about like GPU power computational power it's more about like we want you to think what good can you bring into near with AI or what good can you bring into AI with near and what all with what all that you saw about like link drops and uh and the account model and and change signatures so for example like ideas are fun tokens as a way to pay for computational time on you know like on competition time of force of like an AI model right like or smart contracts can Shield competition and wait for external input so maybe you know like your smart contract makes a decision about like buying some asset or sending it or like you know just make a decision on chain based on what an external model is telling them or maybe you know it's about AI to help people navigate with three problems like you know create F funable tokens swap tokens using like natural language so I have added here two QR codes one is about like a small example that one of our Engineers created about uh using chat GPT through a smart contract is quite fun and you also can see an AI showcase that happened yesterday yesterday where different AI companies showcased what they are building on on on near so let's talk a little bit about logistics now uh you can find everything that I was I have talked about in nd.

uh and you we have a telegram Channel where you can find support from us and uh this is the QR code that I put at the beginning which will take you to the bounties the documentation information where to find us and I will make sure to add uh the the the hackathon ideas in there we also have a booth so please feel free to come and say hi we are both like marketing and Technical people there particularly I'm technical someone else is there for support if you have questions about like how this works or like how code works or like you're coding and something is not working just please come and and and and ask for help we are here for that thank you so much [Music]

Automatic transcript — names and jargon may be misspelled.