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

Loading player…

Wallet Infrastructure Alternatives with Johanna Fransson

Ethereum DenverMon, Oct 9, 2023, 12:00 AM

"In this talk, I will cover the basics of Shamir Secret Sharing, a method that can be used to securely distribute private keys into different parts while still maintaining a fully self-custodial wallet solution. This simplifies the onboarding process and makes recovery easy, while also eliminating the need to keep track of a seed phrase. I will also demonstrate the practical implementation of Shamir Secret Sharing in a crypto wallet infrastructure, providing examples of SDKs and code snippets that developers can use. I will discuss the trade-offs and considerations of using other mainstream wallet solutions, such as MPC wallets, mnemonic wallets, and smart contract wallets. This talk will be valuable for anyone interested in onboarding the next generation of crypto users by creating a smooth user experience in decentralized finance (DeFi) and self-custodial wallets. By understanding the various types of wallets and their strengths and limitations, I hope to inspire further discussion around infrastructure development and the UX challenges facing current systems." Johanna Fransson Infrastructure + Scalability Stage

Transcript

Okay, hello everyone. Today I kind of want to talk about wallet infrastructure alternatives. As you may know, there is quite a few different alternatives that have been popping up, especially like the last one or two years or so. Like we have MPC wallets, we have smart contract wallets, we have the traditional seed phrase wallets. Uh before that, I kind of want to get a quick intro about me.

I'm Johanna. I'm a full stack developer at Liquality. We're developing multi-chain wallet solutions. I worked on a multi-chain browser extension, a multi-chain mobile wallet, as well as right now I'm developing multi-chain SDK wallet with a wallet functionality and all of that. So, kind of just want to brief overview of the today's talk is like I want to go over some of the alternatives that we have right now.

Give a quick intro to MPC wallets and all of the different kinds of MPC wallets that exist out there cuz we have a lot of different variations that I kind of want to go over. And also intro to smart contract wallets. There's a lot of people talking about smart contract wallets right now and account abstractions kind of quick overview of that. And also want to go over the cryptography algorithm that is used for MPC wallet and a lot of other wallets called Shamir's secret sharing and how you can use that to kind of distribute the shares in different ways. So, what are the alternatives right now?

Well, we have the traditional seed phrase wallet. And I call it seed phrase in quotation marks because as long as you have a private key, you can generate a seed phrase. So, as you will see, all of these wallets that I'm discussing, they all have a private key. It's just differs of how the private key is stored and distributed. So, but when I say seed phrase wallet, I'm referring to seed phrase having a seed phrase is the only recovery option that you have.

And the other wallets that you'll see have other recovery options. So, and they also have MPC wallets like I mentioned, smart contract wallets, and the Torus Tech wallet is a special kind of MPC wallet that I also want to go over. It's using the SSS algorithm to distribute the shares. So, the shares are staying within you and staying within the users instead of MPC wallet which are more like distributed for different parties, if that makes sense. So, that was just some of the alternatives.

So, what are MPC wallets? Well, MPC wallets as you may know is stands for multi-party computation wallets. A quick intro for those that are not familiar and the use cases and the features. MPC wallets use the SSS algorithm to split the private key and then distribute that private key among multiple parties. So, when a transaction is initiated, the parties must come together and collaborate and combine their shares so the transaction can go through and authorize.

So, the features include like a split private key, transaction require collaboration, and it can store different cryptos like Bitcoin and Ethereum and all of the currencies and tokens. So, the use cases is basically it's ideal for securing like institutional custody money. You can make sure that no one party has access to all of the keys. So, a scenario would be for example, a hedge fund may work with multiple partners such as other funds, custodians, exchanges. And in this scenario, the MPC wallet can assure that no single party has access or control over the keys and thus reducing the risk of insider insider like collusion or malicious intent or anything like that.

And this could also be used for for like regulatory requirements that require such things. And then we have all of the different kinds of MPC wallets. So, we there's like the hardware MPC wallets which uses hardware to distribute and generate the private key. And the software MPC wallets uses software to to generate and store the private keys. But then we also have a more interesting use case which is the cloud-based MPC wallets which is also called the decentralized MPC wallet.

And this one is interesting because it's a little bit more complex. It's using a distributing process that involves processing the private key into like a lot of different nodes and networks in a decentralized network. So, each node processes a portion of the key and the results are combined when signing a transaction basically. Um So, this is more of a technical setup. Like you obviously have to do all of the technical work to set up such a big network.

And the main benefit is this greater security it provides when you have the shares distributed among a different like a larger network basically. And but the downfall is kind of trust because you have to trust the decentralized servers. And some of these decentralized servers that are out there and using here, they're not like very open and you will see like they obviously have to be closed source because of the security aspect because they're using encrypted data and storing them on IPFS or another network. And we also have a hybrid MPC wallets which uses a hybrid of all of these or some of these like a you can use a hybrid of cloud-based and software or hardware or software and whatnot. So, some of the MPC wallet and developer SDKs that you can use right now to set up your own MPC wallet fast would be like for institutions, probably Copper Fireblocks or Curv which uses the dMPC to split private keys across multiple nodes.

And we also have Web3Auth which has a MPC SDK solution as well. And we have GK8.io has another interesting MPC solution that is patented. So, also uses some combination hybrid of the of the things I went over. And then Liquality, the company I work for, also uses a variation of the MPC wallet.

We use the Torus Tech in the background. And Web3 also uses a Torus Tech so very similar. So, that was a small intro to MPC. And we also have smart contract wallets. I think they are been like greatly discussed today like during ETHDenver in general.

I could go very deep into the like the tech and use cases as they are very popular alternative right now and the main driver for account abstraction probably. But I would kind of try and stick to the basics here. So, what is it? Well, it's a wallet type that uses do not need to worry about private keys or seed phrases. They rely on smart contracts to make and sign transactions which means they will are built on top of blockchain protocols and platforms like Ethereum.

So, the private key is encrypted within the smart contract and decrypted using a pass phrase or any of the other user account details basically. So, the use cases include that they can be used for they can programmatically be used to for like added functionality can be added within the smart contract wallet because it's just code. So, you can enable for example, multi-sigs and you can add additional users to make and sign transactions that way similarly to MPC wallets. So, and it's also like the main driver for account abstraction as I said. So, you can add functionality like account freezing, social recovery, transaction limits, bundle transactions, transfer limits, multi-factor authentication, trusted parties, and even make a totally gas free wallet if you add like a paymaster or a payment contract.

The biggest risk with the smart contract contracts wallets today, I would say is the implementation of the code. It must be audited and design risk. But we if you were at WalletCon, you may might have heard that 4337 was audited and now is passed through by OpenZeppelin. So, that's a huge leap in forward of like the account abstraction and using smart contracts today. So, that was great to hear.

Some of the use cases here as well. Um And there's some SDKs and developer SDKs that you can use right now like Stackup with the 4337 standard that I just mentioned that has been audited and safe to use probably hopefully. And the Etherspot SDK and Gnosis Safe is probably the most popular one alternative right now. So, intro to the smart contract wallets. And Shamir's secret sharing is basically I want to go over it a little bit because there's many use cases for this algorithm because you if you split the private key, you can distribute it in different ways like the shares.

So, it's basically a basic cryptography algorithm to generate shares from a private key. So, most MPC wallets use this but then depending on what kind of MPC, the shares are differently distributed and stored. So, the algorithm is really simple. Here's some Pythonic pseudo code. It's basically generating a private key.

You're sending in the number of shares you want and the threshold you want the shares to be. And then you're using the Shamir's split function to split the key and you can probably just import a library that uses the SSS algorithm or you can just implement it yourself. It's not that complex. And then you have a recover function that recovers the private key using an array of the shares with a threshold. And it performs the recovery algorithm like the Lagrange interpolation.

So, the Torus Tech wallet also uses SSS, but it stores the keys differently because we actually use a social recovery for this. So, share one is stored with a Google authentication, and then you use the Torus Tech Network to decrypt using your Google authentication. So, it's a kind of a mix between a cloud-based and software-based, but also yeah, all mixed in with the social recovery. So, all of the shares are stored within you. That's the second share is stored on Could you be shared?

It could be stored anywhere, but for the Torus Tech like Web3Auth, how they do it is the local storage in the browser and also the Torus Tech Network for decrypting. So, and then share three is basically a simple password share. So, it's your password that you set, and also the password share, which is basically a private key share. And for to recover your account, you need two out of three shares. So, basically, if you have your share on your local storage, you can just sign in simply with your wallet to authenticate with Google Auth, and you will have recovered your wallet, or you need a password.

So, my goal with this talk was mostly to inspire other developers to see and explore different use cases of different wallets. Like depending on your desires and what you need for your dApp, you can kind of play around with all of the different SDKs and wallet alternatives that are out there right now. And yeah, so so I hope like especially now with the account abstraction, I really hope that we feel that we're going to make a great progress in this and further secure the infrastructure and security and bringing more users into DeFi with wallet solutions, basically. So, I hope you guys inspire. And with that, I kind of also want to open up to questions.

Yes. Do you have a question? Tommy wants to ask a question. I see it. Do you have a question?

Yes. Can I Put Oh, okay. Give it to him. I don't Give it to him. Yes.

Hello. Yeah, thank you so much for your speech. Um, I just had a question on like um, why did you guys end up going for like Tech Torus's solution? Well, you said Web3Auth uses Tech Torus, so I I guess indirectly using Torus, right? So, what was the decision factor for that?

So, Tech Torus is the underlying library that Web3Auth uses. So, Web3Auth was Tech Torus was first developed, and then Web3Auth built on top of Tech Torus. And the reason why we're using Torus directly for like quality is basically it gives a lot more flexibility on what we want. Like you could decide yourself on what kind of shares for example like with the local storage, you can also programmatically decide if you want to your shares to be on your device instead, for example. And this provides like a very seamless login experience.

For for example, it can be used for like games and dApps. If you just want to have like a very seamless login experience where you don't want to see the wallet, you don't have to have pop-ups and the transactions assigning and all that. So, it's an immersive wallet in that sense. So, that's why we kind of chose that. Yeah.

Any other questions? No. Thank you.

Automatic transcript — names and jargon may be misspelled.