**A** (0:00):
Sa.
**B** (0:34):
Hey everyone. Thank you all for coming here. My name is Sunny. I am one of the co founders of a project called Osmosis, which is a Dex built in the Cosmos ecosystem. But today I'm going to talk not so much about Cosmos and Osmosis, but really more around this idea of account abstraction and specifically what it can do and how it can help improve the UX of crypto. And so it's not going to be very Cosmos specific. I think these are ideas that will be relevant to Multiverse X and more and beyond just Cosmos as well. Before I start, I want to just tell a quick story of why I'm even here. Like why is this Cosmos guy here at this like Multiverse X conference? I just want to give a quick story of how I like learned about Multiverse X. You know, the team back then, There's Elrond, I think it was like 2019. They cornered me at some conference and they were asking me questions about how to do how Cosmos proof of stake works and all this kind of stuff. And they were showing me their cool system that they had, which was the sharded system. And they're like, oh, Ethereum's trying to do this. They're years away. We have something working. And it was pretty cool. But then it was all in Java at the time and, and I remember I just told them, hey, you should write this in Go. Why is this in Java? And then I didn't hear from them again and I thought I'd never hear from them again. A lot of people talk to me at conferences and I don't hear from them again. But then they reach out to me six weeks later and they're like, we're done, we did it. I'm like, what are you talking about? They're like, yeah, we rewrote everything in Go. And I'm like, what? In six weeks they rewrote their entire system in a different language. So since then I've always just been a big fan of the team. So I'm just really happy I can come here to my first Multiverse X event X day. Cool. Anyways, without that. So without further ado, let's jump into account abstraction. So, okay, so like I mentioned, Osmosis. What are we trying to do here? We're trying to build the interchain liquidity hub, you know, what does that mean? It's a fancy word for a Dex. We're building a decentralized exchange. And you know, people often ask us like, who is our biggest competitor as a Dex, right? Is it, you know, there's a lot of Dexs in Cosmos Ecosystem. You have Kujira and Astroport. People are like, is it that? Or is it like Uniswap? It's like, no, right? Like our biggest competition is the centralized exchanges, right? If you look at today like most users are stuck on centralized exchanges, every single bull market, there's this giant inflow of users that come in, want to buy their first Bitcoin and ETH and basically end up stuck on Coinbase and Binance. And less than 5% of the users probably ever make it on chain. So we have to figure out what's going on. And I think the biggest issue is the UX of these systems. It is just so hard to onboard into these things. And so I actually gave a challenge just to do a little bit of user research. This is one of my best friends from middle school. He's a software engineer at Robinhood. So pretty technical guy, works in Fintech, should be pretty good at this thing. And so I gave him a challenge. I was like, buy $10 of Maker on Uniswap. And he's never used Ethereum before or anything. It took him like over an hour to figure out how to do it. And so I recorded the whole thing. But I would like to. I think the three big issues that he got into was, one, the Fiat on Ramp UX was very much broken. And so we're working on a lot of stuff within Osmosis to fix this. But I know the Elrond team has done a. Sorry, I keep saying Elrond. I have to remember Multiverse X team is doing a lot of stuff with the cards and X money and stuff. So I think there's a lot of cool work being done in that regard on the Fiat on and off ramps. The next one was understanding fees. He could not comprehend the concept that he needed ETH to pay transaction fees on Ethereum. So he managed to get some USDC on Ramped onto Ethereum. Then he tried to buy the maker finally. And then he was stuck because he didn't have ETH to pay fees. So he was like, oh, okay, let me buy some eth. He's like, wait a second, I can't buy ETH on Uniswap without having ETH in the first place. It was like a really broken ux. So, you know, we've actually been doing a lot of work at Osmosis with this thing called fee abstraction, which basically is a way that on our chain we let you pay your transaction fees in any Token. So you don't need to pay in osmo, you can pay in usdc, you can pay in Tether, you can pay in Bitcoin, you can pay in ETH and Atom. Basically any token that's listed on the Dex, you can actually pay your transaction fees using that. The last one was the Wallet ux. So that's kind of what we're really going to focus on today. So I'm going to put a quick video of like a couple of the highlights of that user interview.
**A** (5:37):
Oh, I have to install MetaMask. What if we did that? Oh, it takes you to a different page download for Chrome. If I do that, copy the clipboard, text edit.
**B** (5:50):
So obviously he's doing the wrong thing, which is copying it into like a text file.
**A** (5:56):
Okay.
**B** (5:57):
He was very confused that you have to go download a Chrome extension in the first place.
**A** (6:00):
Oh, fuck. Where was it? Ah, there it is. Oh, no. Okay, Better. Unable. Oh, no.
**B** (6:11):
Yeah. So like, you know, this whole, like typing in these 12 words, the wallet's fucked. Like, the UX of Chrome extensions is very weird. They get hidden away in your experience extensions. And so he had to figure out how to do this. I have the whole video of. It's over an hour. Then I gave him another challenge. I had to figure out how to get ETH onto Arbitrum without even going into how long that took. So this got me. A lot of the issues came down to, okay, the downloading of the wallet and the onboarding into the browser extension was really where the complexity came into. And so I started wondering, okay, why do we need wallets in the first place? Really? It comes down to the problem that today your crypto account is equal to one key. But this key is not. Just like, you know, this key is like the master key. It has like full powered control over your account. If you have this key, you can do anything on the account. And so, you know, this is a nuclear bomb. It's the tesseract, it's the ring of power. And like, this is very dangerous with all this power. You have to keep it very secure. And the problem is the browser is a very scary place. The security model of the browser is very broken. You can have one wrong JavaScript plugin that you pull in or a Chrome extension you pull in and your entire browser security is effectively compromised. So storing keys in the browser in local storage is a big no, no, you cannot do this. So just like. So to solve this, just like a ring of power, you know, you need a fellowship to protect it. You need something to protect your master key. And that's where the wallets come in today, right? Today the only security paradigm that we have in browsers is this idea of using wallets to protect your keys. What about mobile though? Mobile actually is interesting though. Mobile actually has a pretty good security paradigm, like much better than the browser today, like OS, iOS and stuff. They actually do a pretty good job at segmenting access control between apps. But why do we still need wallets there, right? I still have to use the X Portal wallet, I still have to use the MetaMask wallet. Why am I not using Uniswap directly without having to re input my seed phrase every time? And this actually goes back to some cryptography history, which is fun, which is, you know, back in, you know, many years ago, NIST standardized this curve, this cryptography scheme called SECP256R1 note the R1, this is an ECDSA curve. But what happened was when Satoshi made Bitcoin, he said, no, we're not using that R1 curve because he thought that the NSA might have backdoored it. Which, you know, fair enough, the NSA does have a history of backdooring things. And so instead what he did was he took the, a non standardized curve called the K1 curve and imported that into Bitcoin and then this curve became the standard that was used in Ethereum and then thus almost every like crypto project today. So the K1 curve became the basis of cryptography in web 3. The thing is, meanwhile, while all this was happening, while we were like crypto was rejecting the R1 curve. That R1 curve became the standard for cryptography in like the rest of the tech industry. Right? Like, so there's the, it's used in, you know, the iOS Secure Enclave, it's used in the Android key stores, it's used on like your, on your Mac and the Chrome. And there's this new standard today called passkeys, which is being built and pushed by every Web2 giant you can think of. Google, Apple, Facebook, Microsoft, Amazon, 1Password. Everyone's standardizing along this one system called passkeys, that all trying to get rid of the concept of passwords. But it's all based on this R1 scheme. And so the problem is that Web2 standards have evolved a lot and now Web3 is like stuck in this fragmented world where we're using a different set of cryptography completely. So that's one of the limitations today of crypto accounts today. You have to use that K1 key and then finally you have to copy private key material between devices and apps, which is really crazy. So One Inch actually has one of my favorite crypto mobile apps. But to, like, install it, I have to, like, import my wallet. And when I import my wallet, I have to, like, paste my private key into there, right? That's, like, kind of crazy because that means every time I want to install a new app, I need to have my private key on hand, which is, like, defeats the entire security purposes of what we're trying to do, right? So, yeah. And then finally, there's no key rotation, right? I lose my phone that has my key. I have to go move to a new blockchain account. Because now my entire security system was premised on the key that's on that phone. And now I have to create a new account. I have to transfer my tokens, my NFTs, my name, my DAO memberships. And it's still gonna be annoying because in one day I'll have airdrops on that old account. It's like, there's no way of rotating the key. That would be the equivalent of if your email address, you had a password and you were never allowed to change your password. If your password ever got out or leaked, you have to go, like, create a new email address. That would be very annoying. So to solve this, we kind of had this concept of smart contracts accounts. Instead of having an account that's based off of a private key, we instead have an account as a smart contract. And this is nice because you can put in arbitrary verification code. So one thing you can do is as a contract, you can add multiple keys. You know, you can, in the cont, the Rust code, you can actually say, hey, I'm going to add these multiple. I can verify multiple cryptography keys. You can add new types of cryptography by doing this. You can do things like multisigs, right? Actually, the original smart contract accounts were like, multisig. It's because Ethereum doesn't have, like, a native multisig concept. So the original multisigs were these smart contract accounts like Gnosis Safe. And you can do, like, key rotation, you can do limits, et cetera. And so account abstraction has actually become a pretty big standard, like, you know, popular topic within the crypto space, especially in the EVM world. But how we see it is. So we were looking at, you know, from Cosmos, but also, like from, you know, multiverse X, like, what are some of the limitations of the mechanisms that are happening in the EVM world? So the biggest one is that smart contracts can't originate transactions in the evm. And a transaction has to come from a eoa, an externally owned account, a private key based account. And this is annoying because now you still need to have, you know, you can have a smart contract account, but you still need to have a private key account that like has money in it in order to pay the fees and trigger your smart contract account. This is annoying. And to solve this, Ethereum world has come up with this like very complicated erc4337 has this like off chain bundlers and paymasters and all this kind of stuff and it's going to get very messy and complicated and lots of points of centralization. The other issue is it's very difficult to add new cryptographic primitives. So because the EVM you need to go get new pre compiles added basically every time you want to add new cryptography. And there is a ERC to add the R1 curve, but we don't know how long it's going to take. In the past adding new cryptography to Ethereum has taken years and we don't know how long it's going to be until the R1 curve comes along. Nice thing about having a custom blockchain like we can do in Cosmos is we can add new cryptographic primitives very quickly. You have a lot of fragmentation, so you have a lot of people all building their own sort of account abstraction frameworks. But the problem is none of them are composable with each other. They're all trying to build their own little fragmented ecosystems and there's no way of upgrading current EOAs into smart contract accounts. If you want to start using one of these things, you have to create a new account and it's going to get into all the same issues where it's like I've been using my Ethereum account for like the last six years, right? I have like I'm part of Daos with this thing and like getting upgrading everything to this new to a new address is gonna be really annoying and complicated. And you know, this is some metrics from certain Ethereum L2s where you can see that like hey, like even on L2s where you'd expect the users are a little bit more progressive than on Ethereum L1. The vast majority of use accounts are still EOAs. And the process of this migration of getting everyone to turn from a smart contract account from an EOA into a smart contract account is going to be very long and tedious process. And also most of these smart Contract accounts here are actually just gnosis safes. So if you discount gnosis safe, the number of the adoption right now of smart contract accounts on EVM is very small. So with all these issues, the EVM account abstraction stack ends up looking like this, where you have different people doing different things, you have many different UIs for it, you have all these off chain paymaster bundlers and all these things. Some people are going to be like, wow, this is great. This is modularity. How we see it is this is actually going to lead to a lot of centralization, a lot of rent extraction. Every layer of the stack is going to want to charge fees and it's going to end up being very expensive for users. You're going to have a lot of MEV capture happening, a lot of privacy leakage and just a lot of UX fragmentation. So one of our beliefs at Osmosis, one of the things that has always driven us is this idea of vertical integration. So we often look to Apple as inspiration for a lot of things. And so Apple, they, they build a lot of apps, they build the os, they build the phone, they build the chips. We believe that through vertical integration you can get much better UX and performance and lower fees and everything. So that's why with Osmosis, what we've decided to do is build an account abstraction framework, but into the core of the blockchain, at the native layer of the blockchain rather than at just this contract level. And so you know, natively into the protocol, you, you get a lot of security benefits. As you know your system is secure. It acts like a shelling point that everyone will integrate. With this one standard, you can plug in third party account abstraction stacks. And the most important thing is it allows upgradability from legacy accounts. You can have an EOA today and you can just one click and it will upgrade it to a smart account rather than you having to change addresses and change accounts. Cool. So what is a smart contract account? Let's dive a little bit deeper what this means. So a legacy account today, it has a SECP key and from that key you take the hash of the public key and you get the account address and this thing is statically linked forever, right? You can never change these things, what a smart contract account lets you do, which I don't know why some of the UI is not showing up, but what it does is, okay, you want to upgrade this thing to a smart contract account, okay, there should be a smart contract icon there. I don't know why it's not showing up, but that's fine. So what you can do is you can add multiple keys to the same account. So let's say you add a second key. Now either of these keys could be used. So now let's say I use my laptop to my metamask on my computer or Kepler on my computer to generate a key. Then I want to download a mobile wallet. Instead of having to copy the same private key from the laptop onto the phone, I can have the phone generate a new private key and then just sign a transaction on my laptop authenticating that new private key to also access my account. So now I don't have to manually copy private key material all the time. You can do key rotation, right? You say, oh, I lost my laptop. I don't want to, I want to delete that key now. Right? I can do that. I can delete that key. And now you go back to being a single key account. You can add new types of cryptography keys, right? So we support not just the K1 curve, but we support the R1 curve. We support RSA, we support some other types of cryptography. Yeah, add to 5,000, 519. What you can also do is have say multiple keys, right? So one of the cool things that we can do is like, you know, like I said, the R1 key is what's used as the standard in almost all of the Apple devices as well as almost every device. And so what you can say is like, hey, this transaction can sign, you know, with the whole passkey standard, this is really cool thing where you can say like, hey, you can sign. But like your Apple Watch has its own R1 key as well. And, and what it will do is like, hey, I can sign from my phone, but it also is going to have a notification on my Apple Watch that I have to approve the transaction there. So instead of if I don't trust my phone on its own, but it's like, hey, I have my phone plus my Apple Watch that can be a signer. Yeah. So you can use a browser extension wallet like Leap. You can use fingerprint ID on your or face ID on your phone plus the Apple Watch. But beyond just basic cryptography keys, what we also, you know, our cryptography code is written as go in the core of the blockchain. We also allow you to write these authentication logic. So we call these things authenticators. We allow you to write not just go based cryptography, but we, you know, in Cosmos, we have a smart contracting framework called CosmosM and we allow you to write these Authenticators as Cosmos code. And we also are working on some ZK based authenticators as well. But you know what you can do with Cosmos authenticators is you can. You know, one of the nice things about using Rust as your contracting language, which I know Multiversex does as well, is you can import the vast array of existing Rust libraries that exist there today. So you know, you can say, hey, we're gonna just import an open source oauth library and then you can do OAUTH verification on chain. So now you can do like sign in with Google or sign in with Facebook as an authentication system on chain. You can make these things composable so you can use these authenticators so you can say just. You could say, hey, I need these two keys to approve a transaction. You can say, I need this CosmosM authenticator and this key to approve a transaction. And what that lets you do is it'll let you write middleware as cosmwasm contract. So you can say, hey, you can do restricted message types. You can say, hey, if you know this type of transaction, this key is not allowed to do. So basically, maybe on my phone, I want it to be able to do voting transactions, so I can do that from my phone quickly, but I don't want it to be able to send money to someone else because I don't trust that. Or I can give someone else being like, hey, I want someone else to do my voting on behalf of me or my staking on behalf of me, but they shouldn't be able to steal my money. So you can restrict the types of transactions they can do. You can put things like trade limits. So as a dex, we can say, hey, we want to have a new key, but it should only be able to trade 10% of my portfolio a day to put some rate limits on this stuff. You can put balance change limits. You can say, hey, this type of key can do any sort of transaction, but it can't change my balance by more than 5% a day or something. So it can't just withdraw all the money off of my account in one fell swoop. And you can plug into external protocol. So in Cosmos, everyone knows that that's the logo of this project called Daodao, which is like a DAO framework. And so you can say like, hey, Daodao can write an authenticator that you can say, hey, this DAO is allowed to make transactions on behalf of my account following a certain set of rules. So I'll give you a quick demo of how this all is going to look from the UI side. So this is, you know, the osmosis front end. When you come in, you sign up. Now first thing you do is, you know, this is an idea I always love from xportal was first thing you do, username. That's what everyone does in normal world. Right now you have all these options for authenticators. You have like, you can do your fingerprint id, you can use a crypto wallet, you can use a ledger, you can use oauth. You know, in this example I used the fingerprint id. Now we choose a backup method. You can, you know, upload to iCloud or 1Password or you know, just download it, encrypt it, the password and you know, so you. But you. The nice thing is, like I said, you can have multiple authentication systems. So you can say along with the touch id, I want to also add my Google account as a backup system as well. So if I lose this laptop or if I want to just go use a friend's laptop, I can do that. We also have this session key. So when you go on an exchange today, every time you want to make a trade, you're not asked to re sign something. So what we do is we generate a new hotkey. So what did I say? I said, never ever, where'd it go? So what we ended up doing was we created an account that has four keys attached to it, four authenticators attached to it. We have one which is the fingerprint one. We have one is the Google oauth one. We have one which is the backup key that we uploaded to icloud. And then we have this fourth one which is a hot session key that's stored in the browser, which is, if you remember at the beginning, that's what I said, never, ever, ever do. We just broke that rule. But we did it because we were able to add a bunch of limitations on this account. We said, hey, it's only valid for 30 minutes. It's not allowed to withdraw money off of the exchange. It's not allowed to trade more than 5% of the portfolio. So by putting these limitations on the account, we were able to now put a key in the browser storage so people don't have to have us pop up every time they want to make a transaction. But with these limitations there. Cool. I think I'll skip forward. This is just like showing some of the UIs that we're doing. So with smart accounts, we're still going to support people connecting the existing wallets they have just for the purpose of importing assets. Importing into Osmosis so you can say, hey, here's my EVM assets, Cosmos Assets, hopefully Multiverse X assets soon, once Axelar connects to multiversex and it'll just swoop all the assets into the Dex. And so now you can use this. Our goal is to become this sort of account hub where you can do all these actions but not just holding the assets, right? We want to make it easy for you to now once you have all your assets in this very secure account framework, we want you to still enable to do stuff on other chains without while still using the account infrastructure that we're building at Osmosis. So Stride, so what's the problem today? Why is this smart account stuff going to get messy today? So Stride is another Cosmos blockchain that they do a lot of liquid staking stuff. So we work very closely with them. So when you do a normal private key based account, your address is static on both chains and it's fine, you can just use the account, the wallet as the way of communicating both the chains. It's the same address on both the chains. The problem is this is going to get messy when you upgrade to a smart account. So because let's say what happens is when I add a second key, I want to say, hey, I have my Kepler browser extension wallet, but I want to add a fingerprint ID based signing. I can make the transaction on Osmosis to add that there, but then I have to remember I have to go also make that same transaction on Stride because if I don't, you know what will happen is if I delete my I say, hey, I lost my brow, I want to delete the browser extension key, right? Because I don't trust that system anymore. You need to constantly make sure you have to synchronize these account changes to every single chain. And this is going to get very complicated, especially when you have new chains at launch. For some example, you had this situation happen where Wintermute lost a bunch of money because they had a Gnosis safe on Ethereum and they thought they owned the same address Gnosis safe on Optimism, but they didn't. And so they sent the Optimism team, they said, hey, send us tokens to this address. But they sent it on the Optimism chain and then someone else basically took that address and stole all their money. So it's going to get messy. So to solve this, we built this thing called interchain accounts. It's actually something that's existed in Cosmos for a while where what it basically is is the interchain accounts is the ability for an account on one chain to make transactions on another chain. So this has been used mostly for protocols today. So, you know, Stride as an example, they have smart contracts on their chain that do staking transactions on other chains. Or you can use interchain accounts. You have a DAO on one chain, they want to do a trade on an exchange that exists on a different chain. They can do this over ibc, which is our bridge protocol that we use. So you can make transactions on other chains. With interchain accounts, we'll basically, you know, you can imagine it's like, okay, you have your account on one chain and then you do this like app astral projection and you're making transactions on other chains. So the same thing will happen here where, sorry, these diagrams don't make a lot of sense because one of the icons is missing. But the idea is that you would do this astral projection, have this other version of your account on Stride and you're able to make transactions there. And then doing this, you'll be able to, from the Osmosis site, make transactions on all of these other, other different chains just by using the interchain accounts. Same thing here where like, you know, when you want to connect your chain, you can, you can just say, hey, I want to use osmosis as my wallet. But it's using an osmosis smart account. It'll just authenticate you with your, you know, whichever signing system you used, and then you can start using that account with any app in Cosmos, even if it's not on the osmosis chain. Cool. And, yeah, so over time, I think this will expand to more and more chains, eventually be able to do Ethereum transactions as well via these interchain account systems. And so this is how osmosis evolves from being just the interchain liquidity hub into also being the interchain account hub. Thank you.