Unbundling Wallets
ETHCC 7 · 9 Jul 2024 · 21:37
Bryce Ferguson of Turnkey argues that wallet applications and wallet infrastructure should be unbundled. He breaks key management into key generation and storage, transaction signing and access controls, and traces how exchanges, active custody providers and wallet-as-a-service products each built their own. He compares this to the web2 move from on-prem servers to the cloud and describes Turnkey's approach: secure enclaves, verifiable code and authenticators such as passkeys. In Q&A he says Turnkey is legally non-custodial but hosted, so it remains a single point of failure.
Speakers
Topics
From ETHCC 7, hosted by Ethereum France.
Transcript
Of Turnkey. I think you guys have probably seen the themes at this conference so far. Lots of people talking about wallets, talking about kind of traction, pass keys, and how those lead to better UX. And I think our thesis at Turnkey is really that unbundling wallets from the rest of the application layer is gonna enable a lot of this innovation. And so I'm gonna walk through a lot of this in more detail, but to maybe kick off, I'll talk a little bit about myself and why you should care about what I have to say about this. So my background is at Coinbase Custody.
Me and my co-founder, we built Coinbase Custody really from the ground up, from zero to over a hundred billion dollars of assets under custody, and got to see how the industry was evolving in that time. So we were able to see how institutions were engaging with the space, how folks were building applications in the space, and how security methodologies were changing in key management. After that, I went to Trade Republic, which is a crypto broker now in Europe. So kind of like a Robin Hood for Europe. In that time, I integrated with a ton of custodians.
And I think building at the application layer realized a lot of the limitations of using these kind of more paved road solutions. And then obviously, finally, the important piece, founded Turnkey in 2022 to create this low-level scalable infrastructure. So today we'll talk about a couple things to bring you along this journey. We're gonna start off with the history of wallet applications and how they have kind of always bundled that key management infrastructure and always needed to build that key management infrastructure themselves. We'll talk a little bit about the advantages of unbundling those, and then our methodology for that.
So, how Turnkey has approached unbundling the infrastructure layer from the application layer. Last but not least, we'll talk about some of the product experiences that this has enabled. So, a few examples of really bleeding edge use cases that people have built in the space. So, like I mentioned, wallet applications, while infrastructure have been in a very long-term relationship with each other. We're gonna talk about a lot of examples with this. And the big thesis I want you guys to take away is that wall applications and wallet infrastructure should go through a breakup. So we'll start off and talk a little bit about what is key management and what is wallet infrastructure, and then get into why they should break up in more detail.
Key management really boils down to a couple of simple primitives. So you have generation and storage, transaction signing, and then access controls. What people don't realize is that each of these different buckets can be treated differently for different use cases, but also have a lot of security watchouts that you need to think through and usability watch outside that you need to think through as you're implementing these services. On the generation and storage side, this is really about how are you creating that private key? So, what is your source of entropy?
Are you doing this in an offline ceremony? Is it an online ceremony? How are these things happening? Um, and then how are those keys stored? Are you using hardware and HSM, secure enclaves? Are you using cryptography like MPC or Shamirs? What are the ways that you're securing those private keys? I think there are a lot of sneaky uh ways that people have lost crypto in this process. So one of the security researchers on our team, Lance, he actually discovered this vulnerability called milk SAD, which I really recommend you guys read a little bit about. It's super fascinating.
But basically, there was a key generation methodology outlined in the very famous book, Mastering Bitcoin, that had a vulnerability. If you knew when that key was generated, you could deterministically generate that seed phrase. So millions of dollars were lost, and this was something that people had used for over a decade to generate their Bitcoin seed phrases, and they just had no idea that they were kind of exposed to that risk. The second piece here is transaction signing. We're obviously in a very multi-chain world.
We have an explosion of different types of transactions that you can do on chain. And having full flexibility with that signing process is really critical. And then last but not least, access controls. This is one that's really often overlooked. Ultimately, it doesn't matter how securely you're storing your private keys, if you're just blindly signing any transaction and you're allowing anyone to sign, then your crypto is at risk. It's the same idea of if the front door of your house is open, then anybody can get in. And so being very thoughtful with how you approach these access controls and customizing those to your specific use case is really critical.
And so now that you guys understand kind of the basics of key management, I'm gonna talk a little bit about how folks over time have implemented those in different kind of wallet applications. Starting way at the beginning, we have exchanges. Exchanges were pairing key management and consumer and often institutional trading into one kind of unified experience. They had to build everything from scratch, whether that was their cold and hot storage, the way that they were signing transactions, blockchain integrations. And it was an incredible product.
It unlocked crypto for a ton of people. But they had to build all of that from scratch and spent a lot of that time on very undifferentiated infrastructure work. The other challenge with this is as time went on, new use cases emerged that weren't well suited to this type of key management. Institutions were entering the space, folks with $500 million of crypto didn't want to store it in the same way that a consumer with a thousand dollars of crypto wanted to store it. And so new players emerged in what we're calling the long-term custody space. So folks like Coinbase Custody, Anchorage, a bunch of other players in the space, BitGo is another good example here.
And these folks really focused on long-term storage of crypto. So it was very serious offline key generation processes. They primarily used cold storage, and they put a lot of deliberate friction into the process of any transaction. Coinbase custody, for example, every single transaction that you do with Coinbase Custody requires a video call where you go through all of the transaction details of that. Again, one of the challenges here is they had to build everything from scratch, and as time went on, they weren't able to adapt to the new use cases that were forming. We started to see traders entering the space, market makers, high frequency hedge funds, and those folks needed more active management of their crypto.
And so we saw an entrance of a lot of more short-term custody players. So Fireblocks and Copper, where they were thinking about more active management across a variety of venues. They wanted shorter transaction times, they wanted less friction in the process. They often were using MPC, which was kind of a new technology at the time, and combined this key management with portfolio management and CFI integrations. Again, you kind of see a theme here. That key management that they built for that use case over time was not able to be used for the future use cases. So we started to see a lot of consumer wallet as a service needs where applications wanted to have easy ways to spin up wallets for their end users.
This is where Privy and Magic and a bunch of other folks entered the space in order to combine consumer onboarding and a custom key management solution. The important thing to emphasize here is these are all incredible products. These are all things that have unlocked a ton of innovation in the space and are really to thank for a lot of the really great consumer experiences that we have today. But there is a lot of repeated work across these. All of these folks had to build very, very duplicative key management infrastructure, and they built it in such a way that they weren't able to adapt over time as new use cases emerged. And so a lot of these things are probably pretty obvious at this point.
Why is this coupling of key management and the application layer a problem? I think it's helpful to think back to web two and the evolution that we went through from on-prem servers to cloud, because what we're going through with key management is actually very similar. Back in the day, when you were starting a new application, you needed to rack your own servers, think about the security of those servers, how you scaled those servers as your business grew. And that was a huge drain on your engineering resources. People were usually spending 80% of their time on undifferentiated infrastructure work and only 20% on that application layer. As we've added cloud and very strong, kind of low level flexible infrastructure, that has flipped, where 20% of the time is spent on infrastructure work, 80% of the time is focused on driving these really incredible application experiences.
And that is actually what key management infrastructure and that kind of decoupling is going to provide for us. So right now folks need to take on the security risks themselves. They need to think about what is the proper way to store these keys, how do I build expertise in private key security, so on and so forth. There are really massive costs, both upfront and maintenance. Even just auditing a key management system is multiple six-figure audit bills. And as we kind of outlined in that last slide, there is a challenge with evolving with the market over time. So these aren't future proof systems, they're usually overfit to a specific use case that that person is thinking about because they don't have the holistic vision of how the industry is kind of using this infrastructure.
And this was really the insight that drove us to build Turnkey. So Turnkey is this low-level secure, flexible, and scalable wallet infrastructure. We have been thinking about it really from this concept of flexible, future-proof primitives around those three elements that we talked about. So creating wallets, signing transactions, and access controls. So we've really boiled things down as low level as they can be. OAuth, for example, we have our OAuth master here, Arno in the crowd, who is thinking about how we build this in a very flexible way.
And our OAuth solution isn't just a button to log in with Google, it's actually low-level OIDC authentication to our secure enclaves that allows kind of flexible authentication setups for whatever the folks want to implement. The second piece here is we come from a very security sensitive background. We have a lot of early Coinbase custody folks, BitGo folks, other kind of security sensitive crypto companies that have joined Turnkey. And it's our job to wear the tinfoil hat. So we have been really insane about how we're able to build the most secure system possible. Last, we think a lot about scaling.
So you don't have to think about how do you scale that key management infrastructure over time. And so really what this is is we have built a set of Lego bricks for folks to build kind of more innovative experiences over time. It doesn't mean that the Lego models aren't useful for certain use cases where people just want something plug and play. But these Lego bricks allow people to be much more bespoke with how they're implementing and how they're evolving crypto user experience. And that is really what's gonna drive an explosion of innovation in Crypto UX. And so with that, I want to talk a little bit about a few case studies of how these Lego bricks have been implemented over time, starting off with Infinex.
So Infinex came out of the team that brought you synthetics and is really designed to be a cross chain DeFi portal geared towards crypto newbies and kind of abstracting away as much as possible. They're using our low level primitives around authentication, wallet creation, signing, and doing so in a very cross-chain abstracted way. And as you can see, kind of on this very simple signup animation, it's one tap on Touch ID, and you have multi-chain wallets set up across six chains with 50 different tokens underneath the hood. The proof is really in the pudding with this one too.
You know, that they launched and have over 100 mil TVL, and that just happened in a matter of weeks as people realize, hey, this is a really incredible user experience. Next up is Spectral. Spectral is a cool combination of crypto and AI, thinking about how can people use AI to more easily execute on different intents. So the product allows consumers to spin up a wallet and then delegate scoped access via turnkeys, you know, custom access controls in order to sign transactions on behalf of those users. So it unlocks things like agent-to-agent communications, make sure that the end user is always in control, is able to kind of lock those things down.
And then last but not least, Dynamic is another really exciting customer for us as a higher level abstraction built on top of Turnkey. So just because we are offering these low-level bricks doesn't mean that people can't form those into models that can be reused by other people. Dynamic has created an embedded wallet wallet as a service offering using things like pass keys, email auth, pre-generated wallets, import export, so on and so forth, that easily plugs and plays into other applications. And so this innovation is going to not only allow for more bleeding edge kind of use cases, but also democratization of new use cases. I think these are things that are good, separate but apart.
And it adds a lot of advantages to us. So faster time to market, increased security, UX innovation, and as I mentioned, more high-level abstractions that are really gonna push UX in this industry forward. And with that, I will tie it up and open it up for questions. If anybody has anything that they're thinking about building in the space that they need key management infrastructure for, feel free to reach out to me on Telegram or email. Would love to chat about it. All right.
Thank you very much, Bryce. Okay, we have a few minutes for questions. Who would like to go first? Yes. Thank you so much for the great presentation. Um with all these embedded wallets being built uh in in the DAPs, do you do you imagine a world where users will have uh a single UI that someone will have to host where they will be able to manage all of these these different wallets that they've created and building through all the ecosystem? I think that there will be single unified experiences that some users choose to do. But one of the interesting things that we've noticed is it has not been demanded by users.
Users typically are looking for a single experience and a single job to be done that an application can serve. And they're frankly used to fragmentation in their financial life. Most people have you know 15 um 15 different financial apps that they use day to day. Um I think the important thing though is crypto is already interoperable underneath the hood. And so, as different protocols and kind of underlying services need to be combined, they can be in interesting ways. So Infinex is a perfect example of this where they're abstracting away the complexity of a lot of underlying protocols into just one simple kind of wallet experience. Thank you.
All right. Who would like to go next? How exactly does the signing process work? Like how do you um keep the keys secure and then expose them to sign? Yeah. So we have kind of a model around verifiable security leveraging secure enclaves. So private keys are only ever decrypted within a secure enclave. Um leveraging a valid authentication credential from the client that requires an actual cryptographic stamp from the client's authentication credential, whether that's a path key, an API key, email even uses an API key under the hood.
And then we've taken really extreme measures to ensure kind of the um security of those enclave applications. Everything's written deterministically, and then we're able to cryptographically verify that the code that's running in those enclaves is exactly what we expect is running. But it's something that's that's top of mind for us.
Yeah, it's just not always possible to use APIs for every client. Uh some only allow self-host at the same time. Totally. Thank you. How do you think uh how it will be competed with telegram wallets? With what wallets? Telegram wallets. So I I think the interesting thing is we actually have a lot of folks using turnkey to create telegram applications.
So Bullpen is a great example here. It's a telegram bot that uses turnkey wallets and authentication underneath the hood. Um I think in general, wallets aren't a one-size-fits-all product, and there are gonna be a lot of different takes here that that work better for different use cases. Thank you. I'm wondering what has been your experience developing with pass keys to secure access to uh a wallet. So so we were some of the earliest adopters of pass keys in the crypto space. Um we have invested very heavily behind it, and I think our view is it's the future, but there are also some rough edges on pass keys right now.
So syncing sometimes it gets a little bit messy between devices or there are challenges with password managers trying to override you know iCloud or Google Password Manager. Um and because of that having a strong story around recovery is really critical. Um our view is it's a little bit early actually to have uh crypto fully secured using just on-chain pass keys, because we see people lose their pass keys often and things like email recovery or additional recovery methods are really helpful to protect users from losing their funds. Just uh on that note, I'm curious how your recovery process works today and what options you offer to users.
Yeah, so we we basically have abstracted away the private key to a series of authenticators, whether those are pass keys, API keys, email, and OAuth is going to be launching in the next two weeks. And with those, you can have any arbitrary setup as well as kind of mappings of permissions. So you could have M of N approval processes to set up a social recovery setup. You can use email as kind of a standard recovery path for more consumer use cases. You can even create an API key, write it on a piece of paper, and lock it up in a safe if that's what what you'd like to do for your use case. So it really depends on what you're trying to solve for, but we offer that flexibility.
Awesome. Thanks. Any more questions? I think we have time for one last question. All right. Thank you, another one. Um so just to make sure I fully understood. To which extent are you then custodying the key of the user? Because it feels that it's hosted on your services. You have many security measures around it, but yeah, maybe on the technical side and the legal side, to which extent are you in control? Totally.
Yeah, so from a legal perspective, we're fully non-custodial. Only the user ever has unilateral control of that private key. Turnkey can never access that that key. But we are a hosted solution. So there is kind of a single point of failure with Turnkey, and we kind of realize our importance as an infrastructure provider there. We always offer folks the ability to export that key if they want to have a backup somewhere else. Um over time, I think we we see a path where turnkey can be more decentralized and have multiple kind of redundant services that are able to sign in case one of those services goes down. Great.
All right. Thank you very much. Awesome. Thank you guys.
Related talks
- Universal Ethereum Logins
- Next Generation Wallets: Passkeys, Why and How.
- Domain Wallets CAIP #275
- Eliminating seed phrases with threshold crypto and passkeys
- Endgame (Wallet Edition) | Nitya Subramanian - Capsule
- Panel | Self custody is too hard for newbs. What needs to change? | Common S3nse - 2026
- Moms ∩ Cypherpunks: On the practical difficulties of building an accessible yet secure wallet system
- Making DApps Accessible to the Masses with Torus
- OpenSigner: Open-Source Self-Hostable Wallet Key Management - Jaume