The invisible wallet: how to make crypto magic

ETHCC 6 · July 2023 · 25:00

Julien Niset explains how account abstraction can support less visible wallet interactions. Examples include session keys, recovery without a seed phrase and transactions where the user does not pay gas directly.

Speakers

Topics

From ETHCC 6, hosted by Ethereum France.

Transcript

[Music] foreign [Music] my name is Julian I'm one of the three co-founders at Argent and for those of you who know me I love to talk about wallets and I love to talk about account abstraction and this talk will be no different I will be talking about wallets and I will be talking about account abstraction but I don't want to talk about wallets in general I want to kind of reflect on the concept that I find in torque is the invisible wallet but before we discuss on how to make the

wallet disappear I just want to actually give you what I believe is a wallet because we need to agree on this definition to make sure we are all on board and all aligned on what needs to disappear so for me a wallet is a client software that manages one or more accounts and that leads to the definition of an account an account is a non-shane object that holds the state of a user's identity and assets and so basically we have really two components we have the account that lives on shame and then we have the wallet which is the software that the user uses to interact with this account and we tend to see these two things are actually one thing to merge them but there are two different components

and today it's very clear that users need wallet right the very first step on anyone's Journey to the blockchain is actually center around the wallet the first time you want to use the blockchain you are supposed to create a wallet I remember I mean the first question is do you have a wallet if not please create a wallet so the wallet is really front and center and when you create that wallet it comes with a lot of complexity right you need to install or download the software which actually is kind of weird I came to do X and I'm supposed to install y why should I do that then you need to backup a seed phrase you need to on-ramp to pay transaction fees there's a lot of complexity and the wallet is really front and center of that first user

experience but the thing is the fact that users need wallet doesn't necessarily mean that users want wallet right I mean we tend to forget that but we are early adopters of that technology and so we can live with a little bit of complexity and I would argue that for many of us actually we want to see that complexity we want to see the underlying technology I mean I remember the first time I interacted with the blockchain I wasn't there to do something specific I wanted to interact with the blockchain that's really what I wanted and so it was completely okay to install is software to interact with the blockchain I was in for the technology not for something

specific and so we've come to believe and I think that's a mistake that the next billion user and the next billion user is kind of this mythical Bunch that we like to throw at conferences to represent the next wave of people that will come I mean we tend to believe that this this next wave of users will be exactly like us we we picture them as a bunch of zombies just desperately needing needing a wallet and I think that's a mistake so we should ask ourselves what actually do normal users want and I believe normal users they don't want wallet they want applications because in the end they don't really

care about the technology the next wave of users they will come to do something maybe they will come to play a game and it so happened that that game as a component running on a blockchain but they are not there for the technology and in a sense I think many of them will not care about the technology they will only care about the applications and so when you take a step back with basically creating an ecosystem that look like this we have application we have the account on chain and then in the middle front and center you have that object call the wallet but that's interesting because what users really want is actually the

application but we also know that the protocol needs the account so there's basically that beast in the middle that nobody really needs and and really wants so I do think that we should try to make that Center component invisible and that's why we should make wallets invisible but what does that exactly mean what would be that that dream experience of an invisible wallet well I think the first thing is that there should be nothing to download or install if you want to make it invisible there's no way for me to install something that I want to make disappear so there should be nothing to download of course you should be able to onboard in in seconds right you should create an account for the users in seconds

they should be there shouldn't be any complex concept that users need to understand like a seed phrase transaction fees all this is very complex if you want to make the protocol as invisible and the wallet as invisible as possible that complicit complexity needs to be abstracted of course we want to have some kind of simple account recovery the very reason we have seed phrase is to help users recover the account if they lose it so if you want to make that complexity disappear we need to find ways for users to recover their account in case something goes wrong and that should be very simple I also believe we should have some kind of fraud detection because the blockchain is still a a dangerous space

sometime and so if you want to make the wallet the protocol as invisible as possible we need to help users to make sure they have safe experience they can explore the ecosystem in a safe way so they need to be some kind of safety nets I also think everything should be one click again if you hide the protocol whatever interaction you want to do you're supposed to do you should be very seamless it should be one click this should you shouldn't have to understand I need to approve X to do y no you want to do an action because all this is transparent invisible you want to do an action you click on a button and that should be it I also think they should be less moment where the user has to be conscious about the technology that means less signing

of transactions okay so that's an interesting list but actually what I'm describing is for example signing to coinbase and indeed coinbase is doing an amazing experience for normal users why because it's a web 2 product and it is it is it's a great onboarding experience because the technology is completely abstract it's basically not there it's a web to product so this list is is okay but it's not enough of course and so we should not forget that what we want also is to have said custody we want to have all these properties but at the center we want it to be self-custodial so is this enough well not completely yet there are companies there are companies that actually

provide its cell custodial web 2 kind of boarding such as Soraya they do an amazing job but actually when you do so you only create a wallet for software so this product there are application specific what we want you want the same experience but we want the users to being able to go from one application to the other if someone comes to say play a game it so happen that it's Unchained so they log in with that invisible wallet at some point they receive some nfts maybe they will want to take these nfts to another application so they should be able to pull their identities and their asset seamlessly so that's still not enough we also want the ability to Port the account to multiple apps and so if you look at this list there's actually the tension between making

everything invisible and very seamless but at the same time having self-custody and distension is actually complicated to solve but the good news is I think there's something we can use and that's actually the account abstraction icon abstraction I believe was the missing piece to enable that experience so Vitaly gave a great talk about account abstraction two days ago so I will not talk too much about account abstraction I want to focus about what we can do with account abstraction but just as a recap the idea of account abstraction is to being able to program the functionalities of an account today an account on ethereum does four things it validates the transaction it executes the transaction it pays a fee to the

miner and then it makes sure you cannot replay these transactions to abuse abuse the account and on ethereum all this is hard-coded the idea of account abstraction is to make that customizable so that you can really program your account and concretely that means your account is a smart contract and so you can really change the underlying cryptography or you can have multiple signer I mean just your imagination is the limit and so that's kind of theoretical so visually I like to when I think about account abstraction to picture it like this so again I have my my client wallet which may hold a key for example some cryptographic material and it manages it in control an object on on on chain the

account and that account contains some custom logic and so when I make a transaction as a user I will use that key in my client wallet to sign something send that to the contract and the contract will execute whatever custom logic I've decided to put in my account and if everything is okay we'll call so let's use that model to kind of see what we could do based on that so the first thing to realize is that is because you can program your account there's actually no need to say a transaction is just one call to adapt we could actually say that a transaction execute a sequence of operation so for example I can say with this transaction I will first call a token to approve some dap then I will

call the dab and I will use whatever output to call a third app all these can be orchestrated in the logic of my account and using this concept of multi-call actually that means everything becomes one click any complex blockchain operation that may require six or seven interaction with different contract you can actually make it in just one call using a construction okay so that's actually one check on our list so far so good what else can we do well we can also basically abstract transaction fees and sponsor transactions there's different ways to do that but one way is to use the concept of a paymaster the idea of a paymaster is let's think of a dab that wants to make it free for its users so the tab is saying I'm

willing to pay the transaction fee for any users that interact with my dap how would they do that they basically deploy a specific contract called APA master and every time a user through a wallet wants to interact with that dap the wallet can actually create a transaction that says you know what I'm not going to pay for that transaction e is going to pay and so the protocol will check with the paymaster are you okay to pay for that transaction the paymaster will execute his logic say yes and we'll subsidize the transaction for the user so again using that we can completely abstract transaction fees what else can we do I mentioned that we should have a simple account recovery because of course we need to get rid of

seed phrases so how do you do that if your account is a smart contract you can for example program it to have a second key and you can choose to give that key to some service let's call it the recovery service and that key is not the same as domain one it cannot do transaction to transfer token it cannot mean 10 FTS it can do only one thing is help you recover access to your account so there is something bad happens you lose your wallet so you've lost that primary key what do you do you call that service you authenticate yourself and say hey I have a new key that I want to authorize you to authorize on my account and the recovery service can do the only operation it can do is reprogram your account with a new key so that's a very

simple flow and it completely removes the need to backup seed phrases and of course you can choose to create an account with one key that you give to a service but you can also choose to have a ledger or maybe you can actually have two or three Guardians I mean you can do what you want but the point is that you can create a flow that's very simple and that allows users to recover access to their account what else I mentioned that we should try to help users navigate the the blockchain the ecosystem in a safe way but again using a kind of fraction you can imagine that you program your account again with a second key you give again that key to another service that you call a fraud Monitor and this time the rules of your account

specify that this key needs to co-sign every transaction and so now as a user when you interact with the DAP you will send the raw data of that interaction to that service and that service will analyze the transaction based on rules such as as the Target contract being you know flagged as a scam or easy to contract you've already interacted with what kind of assets are going to leave the account and be returned to the account so this fault monitoring service can really use any logic to basically try to determine if the transaction is going to be safe for the user if it determines that the transaction is safe it will just provide a second signature and it's completely transparent to the user you click on a

button your transactions goes through but if the service they take that the transaction may be suspicious for example you are transferring 95 of all your asset to an address you've never interacted with maybe it is legit maybe not and so the front monitoring service can basically ping you give you a 2fa challenge and say is it really you the owner triggering that transaction if you say yes it will co-sign and the transaction can go through so again using account abstraction we can really enable 2fa 2fa challenges and really have fraud detection but really happening on chain with the control on chain another thing we can do based on that model is do something like session keys

to reduce the amount of approvals that you need to do again playing with this idea like an abstraction you can imagine that when you go to adapt the dab will generate a key locally and ask you to approve that key on your account under certain conditions so the adapt may say I want this key to be authorized for 25 minutes and it can only call this method on that contract and it can only consume say 50 die so all this is really written is signed by the user return to the dab and next adapt can use that token to actually prove to the account that it's a legitimate operation and so after that every single action that you do every button that you click you actually no

longer need to sign or approve anything there's actually no more wallet the dab can directly call your account to execute the transaction so that makes the wallet completely invisible and you know that this operation is actually secure because it's within the perimeter of what you've allowed the dab to do and finally another thing that we can do that is is interesting is you can actually go passwordless for example we can use a Concepts such as Weber 10 why because we can program the account we can actually program the account to use a different type of cryptography that we usually use and today on your phone on our phones we all have a secure Enclave a hardware

component that can actually sign things the Adas Keys it can sign but if signed that on an elliptic curve that is typically not recognized by most blockchain but because you can program your account you can actually make your account support that different cryptography and so you can turn your phone into a signer with a component that is never exposed and you can use something like weibo 10 or passkeys so just to recap we've I mean I've tried to convince that users actually in one application they don't want wallet and so we need to make the wallet invisible to make the operation the the onboarding and the usage of blockchain as transparent as seamless as possible

but we need to keep something essential self-custody and hopefully I've also tried to convince you that to resolve that tension between a seamless experience making the wallet disappear and maintaining this key property of self-q study can actually be achieved through account abstraction by using techniques such as multi-call icon recovery sponsor transactions session keys and so on and the good news is that this is not theoretical we can actually do that today and actually we are doing that today at Arjun and we've released this week a product called the web wallet on stocknet and I even have a cool video to show you

oh it works and so it really looks like a web to login an experience that most users would know and that's it in two seconds using an email and a password you are connected you can actually browse go from one app to the other uh [Music] this is just Twilight that it's actually very simple for Developers you can clap you don't you don't need to clap that's fine jakub the guy who makes our video will

be happy because he's doing a great job but anyway so the point is to say that all these things that are not theoretical I think we've reached the point of the technology where we can actually make this experience real and I I personally find that very exciting so if that's something you find exciting as well please reach out if you're active in the stock net ecosystem please reach out we would love for you to support this new product and it's actually already live on some dabs so if you're a developer you can scan that fancy QR code and that should give you access to all the details on how to actually support that on your application and if you want to just play with the idea I invite you to go to either brick or stag and ID carbonable and have new and create a wallet with an email and

you will be actually able to use that experience and finally as a side note the contracts have been edited and actually the application has been audited as well so this is I think a great concept and I hope you'll see these kind of ideas more often in the future thank you [Applause] hello yeah hello thank you very much could you go into more details in how the paymaster

would work technically please yeah so the paymaster is a concept that was introduced in the ip4337 and that is today implemented on Z casing era it is not yet implemented on stock net so that's but that's what I mentioned there's different ways to sponsor transaction but the paymaster is basically a smart contract that people can deploy and it's really written at the protocol level when you make a transaction you can actually specify that you will be paying zero fee you know on every transaction you typically say how much fee you are willing to pay as a user and you sign that with the paymaster you basically say I'm not paying anything but you provide an address of who is going to pay for you

and the protocol will take care of that so at the moment where the protocol typically pings the account to save the account is going to pay which you do through validate it will call the validate method to make sure that the the account is willing to execute that transaction but at the same time it will also call a validate method on the paymaster that you have provided to check if that entity is willing to pay and if the open of that call is yes the fee is functioned from that address and the transaction is executed hi so my question so it's not exactly account abstraction but the opposite so I wonder if Argent has any plans to

support also Bitcoin oh that's a wide question uh short and long answer no no we bullish ethereum and this is the ecosystem we want to support so we have no plan to to be on bitcoin there's also some limitation because we are smart contract wallet we need to have a smart contract language and we need a chain that can support all these flows that we are creating but Bitcoin wasn't there I think it is gradually moving in that direction but so far it has never been an option no hi thank you again I have a technical

question regarding um account recoveries you mentioned there is a first key that are only able to sign transaction in a secondary key to change this risky what prevent me to change the first key for someone else so basically the idea of of recovery or social recovery as we called it when we launched that in in ethereum five years ago is to say that you have a primary key the owner key and that key has full control on the account and so that key can actually add other keys that we call Guardians and these Guardians as I mentioned they can only do one action is to help you recover access if something goes wrong and so you can have multiple Guardians they need to to sign with the

majority but imagine you only have one Guardian so yes the question is what is the power of of that key the thing is that you always remain in control so if that Guardian key for example starts to abuse your account and Trigger recovery that you did not want you can actually cancel it so you will there will be a notification of course this is happening on chain so you need to monitor what's happening but we do that for you and there are Services doing that so you can basically detect that your guardian is doing something is not supposed to do and you can cancel the recovery because what I didn't mention is that it's a bit more complex than that we are using time periods for example to make sure that everything is you know is safe so when the guardian triggers a recovery the recovery is

actually only executed only one it was two days on stagnet it's seven days after it has been triggered and that means you have that period to basically detect that event and cancel it if it was triggered by a raw Guardian basically so the idea is really to for you to stay in control and to to have true ownership so if you want you can check on our website there's more detail but I mean this flow has been securing hundreds of millions of of dollars on ethereum for since 2018 so and it's never been there's never been a hiccup okay thank you foreign

when the user creates its wallet who pays for the contracts deployments that's a that's a very good question the way it works is that actually when you on board the first time your account is created counterfactually meaning that we we use create 2 to determine where the account will be created but actually it is not created so as a user you see just an address and of course and at some point you you created that account to do something right so you need to do a first transaction and typically for that you need to have to being able to pay fees and so it's at the moment of that first transaction that we bend the lead with the deployment of of the account so for the

user it's completely seamless the user never sees that he needs to create an account it's completely seamless but at the time of the first transaction the fee for that transaction will be a bit higher because you we are deploying the smart contract at that moment thank you I think that was the last question so thank you [Applause]