Cometh Cometh Connect Workshop
ETHOnline 2023 · 6 Oct 2023 · 10:41
Johan, lead developer of Cometh Connect, explains how account abstraction separates an account from its signer, so a smart contract wallet can have several signers, social recovery, sponsored gas and batched transactions. He introduces the Cometh Connect SDK and API, which use WebAuthn passkeys and Safe smart wallets, then runs a live coding demo: creating a project on Mumbai, creating a wallet with biometrics and sending a transaction. The workshop closes with documentation pointers and the ETHOnline 2023 prize categories.
Topics
From ETHOnline 2023, hosted by ETHGlobal.
Transcript
Hello guys, so I'm Johan from Comet. I'm the lead dev for Comet Connect, and I'm gonna present you a small workshop for the hidden line. To begin with, uh a small summary, what we're gonna talk about. First of all, uh, what is a count abstraction, then a description of Comet Connect, then a small live coding session and a conclusion. So, what is a count abstraction? The idea is uh a separation of concerns. Um if you take EOA, so externally own account, uh what happens is that you have the account and designer as the same entity.
Uh for example, with a Mayamask account, you have a private key that allows you to sign transactions and messages, etc. And if you lose uh your private key, your signer, you also lose your account. So you lose all the assets that are uh in the account. In the case of account abstraction, what you have is you have a decoupling of the account and designer. So you have a smart contract uh as the account, and you can have uh multiple signers for that same uh account, which means that uh for example if you lose one of the designer and you have uh another signer that is available, you still have access to uh your account, which is a big deal, of course. Uh also it unlocks uh many benefits.
Uh, what you can do is you can uh define uh flexible security rules uh in your account in your smart contract. You can also implement uh a recovery system uh in case of uh losing your keys. Um, you can also relay transaction, meaning that you can have someone pay the gas of the transaction for you. You can also uh batch transactions uh to get better UX, and you can even implement uh multiple validation logic. Um not only the validation logic, uh the standard uh of the Ethereum uh protocol.
Uh another idea is that uh for us, transaction experience it depends on the context. Um, for example, uh in the regular uh finance uh system when you want to do uh uh a touchy transaction when you're gonna do a big payment, you want to have a system with different steps when you reassured because, for example, you have to uh uh put your identity, you have to maybe have uh a PIN code and do multiple checks before you really sending the transaction. Uh but on the other hand, if you take the bus or the metro, uh you just want to maybe put your card or even your phone with Apple Pay uh and pay in just one second.
So it depends on the context, uh the UX that you want, and in crypto it's really difficult to have that. Uh and that's what we try to do. We try to create um frictionless transactions, uh, and we created an SDK for that, but it's a really big technical challenge for our developers. So, what is Comet Connect? The overview of the solution is that first of all, we have an SDK. Uh that SDK allows different signers. Um, the default one is Webaton, the one that we use, and that SDK is connected to an API.
That API can uh create wallets, deploy them, uh relay transaction, uh sponsor a transaction, etc. Uh, and then that API is linked to a safe smart wallet with other logic that the safe wallet uh allows. Now, uh a bit of overview of WebOtham. Um, it's an open standard that was set by Fido, uh, it's supported by uh all mobile devices, it's based on uh public key cryptography, and uh the idea is that when you create a private key using button, what happens is that the private key is created in the securing cloud of your device, and when you want to access that private key, you have to uh authenticate yourself with different methods, for example, with the touch ID, so with biometrics, um it what it means is that the dApp itself cannot access that securing cloud, you need the authentication of the user uh to really be able to access that private key and then sign transaction or messages.
At Comet, we want to provide uh solutions for real life problem. Uh, for example, you may have some questions. Um, with comet connect, can I use my account on multiple devices? Uh well, of course, that's the idea. We have um a trusted device management that allows you to uh uh have multiple devices as signers for your account. Um, but you might also be wondering okay, but if I only have one signer uh on my phone, uh and if I broke my phone, uh what happens? Uh well, we have a social recovery system with the Guardian that allows you to uh regain access to your account uh in a safely manner.
Now, uh a small live coding session. So uh after going to the Discord uh of the ETHO Online uh partner comets, you're gonna have to uh go to that link that we sent you and write your white listed email, sign in, then you're gonna have to go to your emails and verify your accounts, which is what I'm gonna do right now. Okay, I just received the email, can verify it. Alright, now I'm logged.
I'm gonna go to new projects. I'm gonna create a new project. I'm gonna call it if my presentation. I'm gonna create it on the Moombay Cassette. Click on launch. So here I access uh my dashboard where I can have some data regarding my wallet, my transaction, and what's happening uh with my uh project. I can click on API T with to have uh some info regarding API keys and other data, and I can click on that button which is clone our demo, and what's gonna happen is I'm gonna download uh a sample, which is uh a project, uh a small tutorial that I'm gonna put here. What I'm gonna do is I'm gonna do a small yarn for all the packages of the uh the uh tutorial, and then I'm gonna gonna run a yarn dev.
And the idea of the tutorial is to give you uh an idea of what we can do with uh comet connect. We guard there. Okay, so now I'm here, and what I can do is I can click on catch your wallet. Now it's gonna ask me to uh click on continue and put my biometrics. So what's happening here is I access uh a private key and I create and access a private key in my secret cloud, and then I deploy uh a smart wallet. Well, actually it's not deployed yet, but I created a wallet in our database.
Uh and then I can click on increment counter to interact with a smart contract. I'm gonna put my biometrics, and then a transaction is happening. Uh so actually it's a multi-call where we first of all deploy your smart wallet and then execute the transaction, which is uh the increment counter on a smart contract. And here it is, the transaction has been executed. I'm gonna wait a bit for a polygon scan to uh index uh because it takes a bit of time, but we should be able to see uh the data regarding the transaction, and here it is. So that's a small overview of the tutorial.
Um if we go back to uh the documentation indicating started, you will have a small description of what I just did with all the steps and a small uh video. Uh and then in the under the hood section, there's an explanation of uh what we did, what you just saw with a few lines of code. Uh for example, the init of the comet connect SDK with your API key, the way you would uh create and connect a wallet. So depending on if you have the wallet address uh of your user. For example, if it's the first time that you use comet connect for a user, you can call connect without any parameter and you create uh a smart wallet, and then you can get and save his address, and the next time you can put the address as parameter of connect and you can connect the wallet of an existing user you can also create uh eters provider so an ether z5 provider uh if you want to interact with a smart contract uh the same way you would do it with an eters provider what you can do is create uh the interface for smart contract using comet provider and then call methods for that contract for example we call the count method uh in the demo uh also if you want to check more advanced feature you can go to the docs for sending transaction and and gas list transaction adding multiple devices and social recovery uh and if you have any question you can ask us of course uh in the chat now going back to the demo um the demo if sure we have the the conclusion here um in the conclusion um in terms of prices for the hackathon uh there's a price for the smoothest UX uh which is the first price uh the second price will be for the best mobile DAP and the third one will be for the most original use case uh and in conclusion uh good luck to you guys uh you can check our docs test the SDK give us feedback uh you can request your access to the dashboard if you go to the uh uh partner comet uh channel uh on eth online we'll be happy to answer any questions that you guys have and help you uh in uh what you guys are building.
Thank you guys
Related talks
- Safe 🛠 Building a Plug with the Safe{Core} Protocol
- Building a Smart Passkey Wallet with AA by Farhad Asgarov | Devcon SEA
- Based Smart Wallets
- Upgrade Summit 🚀 Join us for the ETHOnline 2023 Upgrade Summit!
- Building Seamless Onchain Apps with Privy I Siddesh 0x
- Safe 🛠 Build a Group Wallet to Buy things with Frens using Safe {Core} Account Abstraction SDK
- AA Workshop: 1 总览(Overview)
- [trustless://interop.landscape] Workshop - Future-Proofing EOAs: Free EIP-7702 Infra Integration
- How LUKSO will UP!grade the blockchain user experience
