Epicenter - Learn about Crypto, Blockchain, Ethereum, Bitcoin and Distributed Technologies - Sunny Aggarwal: Osmosis – The AMM Protocol Built for Liquidity Providers

Episode Date: July 16, 2021

Recently launched Osmosis is a Cosmos based and IBC enabled AMM protocol that allows for a high level of customization by liquidity providers. As the main dex on the Cosmos network, Osmosis provides l...iquidity for IBC-enabled Cosmos assets like AKT and ATOM for the first time.Head of the Osmosis development team, Sunny Aggarwal, joined us for a chat about why the protocol was built and the problem it solves, the wider Cosmos ecosystem, and the roadmap for the protocol.Topics covered in this episode:Why the Osmosis project was builtHow Osmosis works on CosmosWhat is IBC?What the ecosystem looks likeWhat the AMM landscape looks like on CosmosWhat the roadmap of Osmosis looks likeThe Gravity BridgeHow was the chain bootstrapped?What is the ION?The Osmosis communityEpisode links: OsmosisCosmosOsmosis on MediumOsmosis on TwitterSunny on TwitterSponsors: Solana: Solana is the high performance blockchain supporting over 50k transactions per second to power the next generation of decentralized applications. - https://solana.com/epicenterThis episode is hosted by Friederike Ernst & Zubin Koticha. Show notes and listening options: epicenter.tv/400

Transcript
Discussion (0)
Starting point is 00:00:00 This is Epicenter, Episode 400, with guests Sunny Agrawal. Welcome to Epicenter, the podcast where we interviewed crypto founders, builders and thought leaders. I'm Friedke Ernst and I'm here with Suben Kutjia. Today we're speaking with Sunny Agrival, who all of you know and love as one of our Epicenter co-hosts, but today we're talking to him about his project, Osmosis, which is an AMM thing on Cosmos. We'll get into the D-SEN. in a bit. But before that, let me tell you about our sponsor this week. Solana is the next generation blockchain with lightning fast blocks and fees less than a cent per transaction.
Starting point is 00:00:56 Scalability is perhaps the single biggest challenge preventing crypto from becoming the backbone of the world's financial system. Go to Solana.com slash epicenter to learn more. Cool. Sunny, it's super funny to actually have you on the other side of this for once. Weird. It feels really weird. Osmosis is a pretty recent project, right? So it's not been around for a long time. So tell us about how osmosis came into being and about the team and what it does in a nutshell. Yeah, sure.
Starting point is 00:01:34 So it's about the project launched about a month ago. But maybe worth talking a little about the history of the project. The, you know, I think I was on, I took, I think I was on my second time being a guest on Epicenter. I was on as well, maybe a year and a half ago, me and Ethan Buckman, we were talking about Cosmos. And I think it was like shortly after the launch of the Cosmos Hub. And yeah, so basically last year, we, I left the core Tenderman team. And I sort of went, but, you know, still wanted to keep working on the Cosmos project. And so I went and I had a validator that I'd been running for a while called Sica.
Starting point is 00:02:17 And we started sort of running our validators and we were just experimenting with all sorts of different things. We realized, you know, running validators is not the most fun thing in the world. I mean, it's okay, but, you know, we want to build stuff. And we're trying to figure, and, you know, this is right around when, like, DFI summer was happening on Ethereum. And we're like, well, all this DFI stuff is going super cool. Like, how do we bring it to the cosmos? And so we started experimenting with like different kinds of things that we want to build. We got really, you know, so me and my co-founder, Dave Ojo, we were like, you know, experimented
Starting point is 00:02:50 with a lot of like privacy stuff. We got really interested in front-running resistance. And so we started building that out, spent most of all building out of front-running prevention scheme and realized it's a cool feature without a product. And that's why we're like, all right, let's actually launch a decks called osmosis. So it's the first sort of decks on the cosmos ecosystem that's like IBC enabled. And that's sort of like, you know, in parallel, while we were working on this osmosis thing, we were also contributing back to the Cosmos core development and helping with a lot of the
Starting point is 00:03:24 the work that was going on there. And osmosis sort of got a chance to be like the first chance that IBC, with inter-blocking communication protocol was used at scale. And so this is sort of the first real time that like the cosmos vision has sort of come alive. Oh, and then one thing I also mentioned about the team is we kind of actually merged with another team called Chainapsis. So they built the Kepler wallet, which is sort of the metamask of Cosmos, it's the most popular wallet on Cosmos. And so our Sica Balladator company kind of merged with the wallet company, and we started building this Osmosis project
Starting point is 00:04:02 together. And so we've been doing that for about six months until we launched last month. Super interesting. I'm fascinated to get into the weeds here because AMMs and MEV resistance seem to not go together very well, but we'll get to that. So let's talk about cosmos first, right? So basically, osmosis runs on cosmos. Is it, is it its own zone or does it run on Cosmos hub? And maybe for the listeners who are probably mostly familiar with Ethereum, can you kind of put these, into a larger context. So osmosis is a chain in Cosmos. So yes, it is its own independent chain. It has its own validators. It has its own staking token, has its own security model. But what it means that it's part of Cosmos is that it enables this IBC protocol.
Starting point is 00:04:56 And this IBC protocol is what allows it to talk to the other chains in the Cosmos ecosystem. So whether that means the Cosmos Hub, you have the Akash network chain, you have Regent chain. Currently, we have about eight chains connected right now, although I think another one just launched yesterday. So it will be nine, hopefully, by end of day today. So, yeah, we have more and more chains that are connected. But yes, it's built using the Cosmos SDK and like the Tendermintz software stack, which is sort of a lot of the stuff that I was contributing to back when I worked at the Tendermanent team. But yeah, it's its own chain now built using this stack. So the IBC, just for, so the IBC is the internet of blockchains.
Starting point is 00:05:41 What exactly does it mean? Does it mean that the standalone chains kind of trust each other or that there's shared security layer or what's what's the, what unites them? Yeah. So IBC, it stands for inter-block chain communication. What it is is it is a generalized bridge protocol. So, you know, at this point, I think everyone's familiar. with bridges and like, you know, you have a way of moving tokens between two different chains. But all of these bridges right now are very bespoke. And for every like chain-wise pair, you
Starting point is 00:06:16 usually have to have some trusted set that maintains the bridge and all the kind of stuff. With IBC, the idea is let's build this native generalized bridge protocol where you have two chains. Let's say you have chain A and shade B. Chain A will have a light client for the consensus of chain B on on chain A itself. And so it's part of the state machine itself and it's doing like client verification. And so this way, your security of your bridge is equivalent to your, to the security of the counterparty chain. And so this allows people to sort of, you know, basically send tokens between these chains with no additional trust to something. They have to have trust in the two chains because, you know, if you're, you know,
Starting point is 00:07:08 you're, if you're holding tokens on chain B and you want to move into chain A, you obviously have to have some trust in both those chains, but you don't have any additional trust assumptions on top of that. And what's nice is because we use the tenement consensus protocol, which is this like fast finality chain where, you know, it comes to consensus on every block and, you know, once a block is committed, there's like, it will not be reverted. allows this like cross-chain communication to happen very quickly. You don't have to wait for like minutes or hours or you know days for like some sort of finality guarantees. You can say okay, I want to
Starting point is 00:07:43 send a token from chain A, you know, one block happens and then chain B receives it and you get it. And also from like the developer standpoint to create these bridges is very simple because when you want to open a connection with two IDC enabled chains, it literally just requires making two transactions on both chains. So you know, you don't have to get validators to run new software, you don't have to run, you know, all this new stuff. It's just like transaction, transaction, you have a connection and now these things can start talking to each other. That sounds like it's potentially dangerous. We're going off on a tangent here, but what prevents you from kind of scamming this mechanism? Yeah. So, you know, what happened? So if you actually
Starting point is 00:08:26 go right now, there's a site called Map of Zones. And what? What, it does is it has a overview of the cosmos network right now with all the list of all the iBC enabled chains and you'll actually notice a lot of them are there's like on the on the thing there's probably hundreds of chains but most of them are actually just test nets and like on you know weird chains of people just spot up on their computer for an hour to have decided to make an iBC connection and to ibc it doesn't know the difference right like it doesn't care it doesn't know that something's a main net with like economic value or if it's a test now that's running on my computer. So basically the idea of the IBC Cosmos vision is a lot of this is pushed onto the users
Starting point is 00:09:10 where you design protocols such that the if a user trusts chain A and they trust chain B, they can like move their A tokens onto chain B and do whatever they want. But any other user that also has to A tokens on chain A. As long as they don't move the tokens onto chain B, they're not going to be affected. Because the IBC, you know, it keeps track of how many tokens were ever transferred over a connection. And it will never let more token, more than that number of tokens come back. So it's sort of up to users to decide which chains do they trust and want to interact with. So it's kind of a web of trust architecture, is it correct?
Starting point is 00:09:54 where basically the nodes across which you can actually send tokens correspond to how trusted the connection is by users? Yeah, it's up to individual users, right? I think that the region network chain is trustworthy and I want to interact with it. The question is, would you be willing to hold tokens natively on their chain in the first place? If so, then you should also be okay with holding IBC tokens. to that chain as well. Okay, I see. But you might not be okay with that.
Starting point is 00:10:29 You might not trust that chain. And so you're not going to, and you know, this act is already today, right? Like, all right. Like, let's say, let's say chain that's like somewhere, it's a little bit sketchy, but it is legit, like, something like Tron, right? It's like, all right, maybe I think it's, I think it's okay to hold tokens on Tron because I think it's secure enough. But there's obviously reasonable argument for what many people are like, no, I'm never
Starting point is 00:10:50 going to hold tokens on Tron because it's a centralized system or whatever it is. And today we already do that, right? Like, I can hold Tron tokens and you don't have to. It's the same model for IBC as well. It's up to users to decide what they trust or don't. Okay. And did you just say that there is currently eight IBC-enabled chains in the Cosmos network? There is eight when Cosmos, when Osmos is launched.
Starting point is 00:11:18 I believe at the moment, this 10. So in the last month, two more. Okay. And can you give us an idea of what kind of chains they are, what they do, what the ecosystem looks like? Yeah. So, I mean, there's a wide variety of different chains right now. So there's a project called a Kosh network where they're trying to build like a sort of a decentralized cloud similar to like, you know, build a decentralized version of like AWS essentially. a compute market of sorts. And so they're one of the big ones. You have chains like the Crypto.com chain, which is like this large exchange.
Starting point is 00:12:04 Their chain is actually built on the Cosmosis SDK and has IBC enabled. So it's interesting that a number of different big exchanges actually use the Cosas SDK for their chains. But Crypto.com was the first one that actually enabled IBC and is using it, you know, actively. you have things like region network, which are this, they're a carbon credits marketplace. There's, there's a Sentinel, which is this like decentralized VPN service. So you have, you have all these like a couple of different chains. And, you know, it's interesting that in cosmos right now, it's sort of like a very, it feels like Ethereum, if you go back in 2017, there was like, you know, I feel like
Starting point is 00:12:43 most of the things that are interesting things that are happening on Ethereum right now are like mostly defy stuff. But I think like back then there used to be like a cool combination of like DFI and Web 3 and all these like different things. I think you see something very similar happening with Cosmos right now. And especially a lot of these products that were sort of priced off of main net Ethereum because of, you know, defy just like takes up all the bandwidth on Main Net Ethereum. I think a lot of these projects are starting to like migrate onto their own chains, which like,
Starting point is 00:13:12 you know, so some of these, like for example, Sentinel, they used to be on Ethereum and they actually migrated onto a Cosmos chain for this. recently. Now let's talk about Solana. We all know that scalability is one of the most important issues facing the blockchain industry today. The Solana blockchain has been engineered from the ground up optimizing for performance and scalability. The network supports thousands of transactions a second with 600 milliseconds block times and over 500 different validators. It's not a sharder blockchain, but a single blockchain hyper-optimized for performance. And that makes it easy to maintain composability between the apps on Solana so they work together seamlessly.
Starting point is 00:13:52 The Solana ecosystem is growing at a rapid pace and it's a great place to build your project and get involved with the community. So go to Solana.com slash Epicenter to learn more. What was the AMM landscape look like on Cosmos right now? Are you guys the first AMM? Are there other AMMs coming about and does it look like Uniswap constant factor market makers or is there new ideas being pursued in Cosmos? Yeah. So we're not the first AMM built using the Cosmos SDK. There was, you know, so what, so for example, there's a project called secret network that
Starting point is 00:14:34 they built this like, uh, uh, SGX based like smart contracting system. And they have an AMM on there called Secret Swap. So that was running. the biggest one is Thorchain, right? So Thorchain is this like, you know, I absolutely love the Thorchain team and project. And, you know, they have, they were sort of the first people to build like an AMM using the big, major scale AMM using the K. And they don't have IBC enabled yet, but I know they will be working on that very soon. But they're kind of focused on a different market where they're kind of connect to like Bitcoin and Ethereum and like a bunch of Bitcoin-esque chain.
Starting point is 00:15:14 So they're kind of going for a different target market than we are right now. But yeah, we were the first ones to have sort of IBC enabled and being able to provide liquidity to all these tail end assets that are being built on the Cosmos SDK right now. And then there's more AMMs in development right now. So the Cosmos Hub actually is building their own AMM called Gravity Decks. I have all these reasons why I think that like it's not you know I was as a core developer I was heavily against putting a decks on the hub which is what you know when we started osmosis we actually started from the idea of like hey we're going to build this as a decks on the hub and as we thought through it we realized well there's all these like different reasons why building something on the hub like this
Starting point is 00:16:02 doesn't make sense but you know we were outvoted in on chain governance and so there's a decks on the hub now called Gravity Dex, and they launched like two days ago, actually. So yeah, I think the, you know, AMMs are obviously one of the most fundamental building blocks of Defi. And I think, you know, the way that you're going to see Defi explode in Cosmos is you need to see multiple AMMs sort of all competing with each other and like trying new things. And so, you know, I think that Gravity Dex people are working on like certain things. What we have right now is actually very similar to balancer. I mean, admittedly, it's, it's, I'll say it's basically a clone of balancer.
Starting point is 00:16:44 We took the balancer codebase and like re-implemented it in the Cosmos SDK. So we didn't take the code base. We took their white paper and re-implementing it, re-implemented it in the Cosis SDK. And that's sort of our basis. And then on top of that, we're going to start to build all these like cool innovations that we have coming up soon. why not build an AMM on the hub? What is your philosophy there? Yeah, I mean, so I think that the Cosmos Hub is really the core feature and use case of the
Starting point is 00:17:19 Cosmosis, where there's a number of, you know, for example, osmosis, you know, we are, we want to secure way more assets. But, you know, we just don't have the security that the Cosmos Hub does. This Cosmosin atoms are this like multi-billion dollar market. a cap coin and that, you know, I think what it should be doing is taking that security and offering it and leasing it out to other chains and wanted, similar to what Pocodot's relay chain does. And I think that's really what the Cosmos Hub was meant for. But I think by putting a Dex on the hub, it kind of ruins the credible neutrality of this like base layer L1. Like the Cosmosub really is
Starting point is 00:18:03 supposed to be this base layer L1. And by putting it, a dex natively on it. And I just noticed like a massive shift of resources within the Cosmosub development team going towards this decks as opposed to like shared where it should be going, which is shared security. You know, imagine Ethereum had a native decks that was like built by the Ethereum foundation and like instantiated in the chain. It's like, would Uniswap have been built on Ethereum? Would? I just don't, I think like, you look at like Binance Smart Chain, right? The only people building on Binance Smart Chain are people who are being basically paid. by finance. And if you don't have that like credible neutrality at the base layer, it's very
Starting point is 00:18:40 hard to like build an organic system on top of your L1, which is okay because, you know, the Cosmos Hub is not this like the basis of the Cosmos ecosystem. The Cosmos ecosystem is sort of a much larger vision than just the causal hub. And they are sort of distinct. But, you know, as someone who is also very, you know, active in the Cosmos Hub side of things as well, I would have liked to see it go on a slightly different path. But I think it can still happen. I think I'm willing to bet that within a few months, gravity decks will move on to its own chain.
Starting point is 00:19:13 What do you think will cause that? Just a realization that like this like shared security model is probably like where the real value lies and like this gravity debt like the cosmos hub should not be competing on becoming a defy application. And I think that people will start to realize that as like, you know, I think it'll look bad for the Cosmos Hub. If it tries to become this defy application, then isn't able to compete at being the best Defy Appalachians
Starting point is 00:19:43 because the problem wasn't designed to do that. Like, you know, all the tokenomics we've designed and everything that went into the Cosmosis Hub went in with a very different purpose. And so it'll be interesting. I think eventually, you know, hopefully they'll see that. You said earlier that osmosis kind of launched as a clone of balance.
Starting point is 00:20:04 you kind of position yourself as an experimentation center for AMMs, though. Can you talk about that for a little bit? Yeah, sure. So there's what I call the Cosmos mindset. And the Cosmos mindset is this idea that, like, we believe in localized systems. We believe in systems where, like, you know, spread a thousand flowers and see what blooms, right? And that's sort of the vision of the cosmos. Like, okay, let's have all these chains, someone that will fail.
Starting point is 00:20:38 We'll see what ends up happening. And I think balancer is that the closest thing to that mindset, but for AMM design. Where I think it's the most like generalized AMM that exists currently on Ethereum with like as much flexibility. And like, you know, you can change the weight. You can create the pool. You can have like different multi-acid pools. You can have, you know, you can have two different pools for the same asset pair. And is that the most efficient?
Starting point is 00:21:03 Probably not. But I think it's the most in line with the Cosmos mindset. And so that's why we were, you know, most intrigued by the balance or design. And we decided to implement that. But as we go on, you know, I think what's going to, so one of the key visions that we started with when we started Cosmosis was, I wrote a blog post almost over a year ago now back in maybe like February 2020, where I said, you know, it's called Taoifying uniswap. And I basically said, hey, this like
Starting point is 00:21:34 AMM thing is really cool, but it's way too simple right now. It's like X times Y equals K. Cool. But, you know, I think it needs to become more powerful and like just more smarter algorithms. And since then, curve came out and balancer came out. And all these, like a lot of AMM innovations happened obviously in the last one year. But I think, I think it can go even further. I think like, and we're starting to see that now as well, right? Like now you're just like all the V2s and the curve v2, UDISR B3, and you're seeing like, it's still going forward. And essentially what we want, this whole idea of being the AMM laboratory, what that meant was we wanted to build a place where it's very easy for people to design custom AMMs
Starting point is 00:22:16 and have them like, and then this also provides like all the standardized interfaces and UIs and everything, but in the back end, the AMMs could be working completely differently. And a lot of this actually came from watching Zubin design a lot of the AMMs for options that he's been working on for like, you know, many months now. And so, you know, I saw that when I saw him like designing that, that also like helped me realize that, yeah, look, the design space of AMMs is still so much left to explore. Because I think as we have like new types of financial instruments, each financial instrument it will like need its own specialized AMM essentially.
Starting point is 00:22:57 And I think these current ones are great for spot assets and like very specific spot assets at that. But I think, yeah, I think there's so much more room to go. And when I say AMM, I'm actually, you know, I don't think, I don't think of them in terms of like this X times why or like this like two side AMM. I think like I have this meme that we have, or we have this meme internally, which is like AMMs, I'd, but bonding curves though. Because I think like bonding curves are like, you know, the original AMM.
Starting point is 00:23:22 essentially and like you know I think there's a lot of cool design space to be had there when you explore with like one-sided AMMs for creating like financial derivative assets and things of that. So I'm a big user of osmosis and I'm just wondering like what's your roadmap? How is osmosis going to change the world and change defy? And when are you going to also have a stable coin on osmosis? the first part for the roadmap we have a lot of things we want to work on but so we basically we've prioritized three main like big pillars that we're going to like focus on for the next like six months and these are the three things we want to start with so one is better AMM designs
Starting point is 00:24:12 and so whether that includes things like concentrated liquidity one of the ones that we're really working on is batching because I think because that kind of feeds back into a lot of MEP stuff that we're doing where we want to make sure that like, okay, if you have two, you know, trades coming in different directions, they can be batched against each other. And where it comes from really how we think about it is that you have, it'll make actually maybe more sense if I come back to the batching in a second. The second piece that we're working on is a something called threshold decryption. So that is our sort of grant project. to like solve front running, which is it's a method of encrypting all transactions in the mempool
Starting point is 00:24:54 and they only, to a threshold key of all the validators. And once the validators commit and finalize a block in the order of ordering in a block, then and only then do the all the transactions get decrypted and executed. And so this basically makes it impossible to frontrun because you can't read what's in anyone's transactions. And this like, no more sandwich attacks or anything like that. And, you know, this is like I mentioned, this is what we did a lot of fall, where we were exploring all the different techniques
Starting point is 00:25:27 of doing Mempool encryption. We had like SGXs, which has its own host of issues for many, many reasons. You have time lock encryption, which has its own set of issues for like, around like UX and security and stuff. And then you have threshold decryption. And, you know,
Starting point is 00:25:43 which, you know, threshold encryption also has its own issues, of course. But, you know, we spent a lot of time but looking at the tradeoffs, and we came to the conclusion that, like, okay, this threshold encryption model is definitely the way to go. And so that's what we're, like, building right now and, like, building it into the tendermint. We have our own, like, sort of fork of tendermint core where we're adding this in natively.
Starting point is 00:26:04 And so, yeah, so that, so that, that will help solve the front running. And then so then going back to the batching, why we think batching is important here is if you have a system where no one can read the transactions in the order, the transaction, the that are about to go into block, you know, the order of transactional block are really just random and they're kind of meaningless. And so it seems, but that what order they end up being executed in means that everyone gets a slightly different pricing, which seems arbitrary to us. Like, why should this random ordering affect what pricing people get? And so that's why we want to create a batching system to make, and so to create what we consider a fair mechanism. And we have like, you know, I think people often use the word fair, but then they don't have good definition.
Starting point is 00:26:50 They don't define what they mean by fair. And so what we've actually done is we've come up with a definition of fair, which means that you take all permutations of all orders of transactions in a block, everyone will be getting a different pricing. Let's give everyone the average price across all permutations of orderings within a block. And that's like the execution clearing price that everyone would get. And that I feel that's like that basically removed. the arbitrariness of transaction ordering within a batch.
Starting point is 00:27:21 I have so many hoods. So in a way, what you're doing is basically you're amalgamating, you know, from an Ethereum point of view, shutter network and cowswap. Is that correct? Yeah, yeah. So we've been working on this thing for about like nine months now. Yeah. So shut up, the problem with doing it on a, so the reason why it's beneficial to do this
Starting point is 00:27:45 on your own chain instead of on Ethereum is you just have so much more flexibility on like what you can do on your own chain. So for example, Shrater network has to be done as this sort of like overlay system on top of Ethereum. But with your own chain, we have the ability to bake it in natively into the consensus protocol and make it such that decryption of transactions has to happen atomically and in lockstep with consensus itself. And there's no, you can never get into a situation where anything is.
Starting point is 00:28:15 committed but undecryptable. And you can't, or the other way around, if something is decrypted but wasn't committed, we have all these ways of creating slashing conditions for that. So you essentially get the same security as your consensus protocol itself. Okay. And then the second part with the batch auctions. Yeah. So basically from my own experience working with Nosis protocol V2 and cowswap,
Starting point is 00:28:39 basically finding optimization conditions that make sense. is super difficult. I mean, so basically even if you look at the average prices, it depends on what you measure the average prices in, right? So depending on what your basis vector is, the average price and the fair price is going to change, right? No, I just like, can you expect that a bit more? Yeah, so basically, if you look at the average prices of different assets
Starting point is 00:29:10 and basically you say you go for the average, it depends on what you measure these prices in, right? Basically what your unit is, your unit of account. Depending on what your unit of account is, the average is going to vary. Yeah, so you actually have to take it. So we're dealing with four types of orders right now, which is out given in, given out,
Starting point is 00:29:35 and then the same for the other direction, right? Out given in. So A, give me the out given in for asset A, given out for asset A, and then give me the outgiven in for asset B and then the in given out for asset B. And basically we need to create an algorithm that gives us the, takes all four of these transaction types and gives every individual the average clear price. And I would call that, I don't know, maybe, maybe the word fair is not the right word to be using here.
Starting point is 00:30:03 But I think it's the one that removes the bias of ordering. And I think, you know, that's how, what we're defining as is the, what is the, what is the, Because we, so, you know, Epicenter hat, you know, we just did the episode with, with the Nosis protocol. And, you know, there they had sort of a different definition of what the utility function for your batching system is, where they have this concept of surplus value. And you want to maximize the surplus value that's given to traders. That's based up of where they think the slippage back, what, what prices they're willing
Starting point is 00:30:37 to accept versus what clearing price they get. And I guess we just have a very different definition of what, is the, what is our batching mechanism trying to optimize over? And what we're trying to optimize over is removing the bias ability of ordering. Because, you know, we kind of remove 99% of the MEP via our front running resistance. And all we're left with is the arbitrariness of the ordering. And we're just trying to remove that arbitrariness. Okay.
Starting point is 00:31:06 But basically, you're very much in the MEP must be combated camp, Because, I mean, there's also the converse camp that says MAB must be extracted, right? So basically the flashbts camp. Yeah, I am very much in the MAB must be combated. And it's just like, it's like a moral issue for me. I think this is fundamentally a privacy violation. Like, you should not, the fact that you're able to, like, read other people's intent before they commit them seems like a privacy violation to me. And that needs to be combated.
Starting point is 00:31:41 There are specific forms of MEV that I think I actually gave a talk at the flashbodge like MEP conference last week where I kind of categorize the different types of MV and it's pretty good categorization. But when it comes to, you know, you go down this tree of categorization, you get to this thing called transaction ordering manipulations. And within that, there's what I call relative ordering and absolute ordering. Relative ordering is when you're trying to position your transaction in relation to someone else's transaction. And that is what I think.
Starting point is 00:32:19 But to do that, you need to be able to read someone else's transaction. That is what I'm trying to stop. Right. I don't, I think that is like where the issue comes. That's what sandwich attacks and all and like, you know, back running and all these kind of things. That's that those are all examples of relative attacks. Now you have like what I call absolute ordering attacks where like you're not trying to position. relative to someone else's transaction, you're just trying to position yourself in a block.
Starting point is 00:32:44 So you want to be the first person in a block, for example, because you want to go run some liquidations or you want to go do like some exist arbitrage based off of some existing state of the network, right? That is, I think is a fair. That's not what I'm super concerned about. I mean, you know, we've spent some times figuring out solutions or how if we did want to get rid of that, how we could do that. But I'm not convinced that that's what we need to get rid of. And that kind of thing, I'm open to having like auctions and things like that. What I'm not okay with is having auctions in order to extract value from other users. That's totally fair. So maybe if I zoom out a little bit, what made you build this on Cosmos with a very, I'll be gracious and say,
Starting point is 00:33:33 nascent defycine. I mean, it sounds like you have a lot of very, advanced opinions and ideas of how to combat these things that are currently happening in a really large scale on Ethereum, but you're building solutions on a network that currently doesn't have that problem set. How does it fit together? So keep in mind, I'm biased because I've been building the software for Cosmos for four years, and I do think it's the best software blockchain development stack that it exists today. I think that, and part of it is because to do a lot of the things that we're trying to do, you need this like low level native access to your chain.
Starting point is 00:34:19 So, you know, like I said, threshold decryption. We need this at the, we need, we needed to like change the consensus protocol itself in order to make this happen. We needed to like, one, we needed to invent new cryptography to make our threshold decryption scheme work. And then we needed to like integrate it into the chain, which is something. you know, we can't do on Ethereum today. Or our batching systems, right? We need to, like, build, like, we need, we want code that executes automatically at the end of every block. And yes, you can do this on Ethereum by building overlay network.
Starting point is 00:34:54 You can build relay networks. You can build shutter. You can build all of these things. But it's like, you know, I just don't think that's the right U.X. I want this to happen natively in the chain. And also, as I mentioned as well, very. importantly, with the same security guarantees as your chain itself, where I don't want this, like, threshold decryption to have a different security assumptions than the consensus
Starting point is 00:35:18 protocol. And so that's kind of why it's important for it to be on its own chain. Now, just because it's on its own chain doesn't mean it's not going to be part of the Ethereum ecosystem. I mean, I don't know if people have realized Polygon is basically built using the Cosmosis SDK. It is like, it's built on tendermine core, using the causal SECK, and, you know, I don't think anyone would argue that it's not a core piece of the Ethereum ecosystem right now. And so, you know, our osmosis will, you know, currently we focus on just connecting to the IBC chains right now, but like, very soon we'll be connecting to the wider Ethereum ecosystem as well. So basically the bridges are something that is kind of a mystery to me, how exactly it works. So basically the bridges within the IBC, they're kind of built in. But there's also the gravity bridge, right, that bridges the IBC networks to Ethereum.
Starting point is 00:36:18 How does that work? And can you in principle actually have an AMM that works across this bridge? The gravity bridge is essentially... So IBC requires building a light client for the other chain and the native in that chain. Typically what we do is build this into the core code base of the chain itself. So in the causes SDK, it's in the software of the COSUSDK to be able to do this.
Starting point is 00:36:52 You can also, if you wanted to write this light client, at a smart contract layer. So, you know, I think there's a team working on doing this for Solana, where they're, you know, Solana is reasonably scalable, thank you sponsors, that they can, like, you know, you can actually build an IBC, a tenement light client in a Salana contract and have it be performing enough. But the problem with Ethereum is it just too expensive to do that, like writing a light client, a tenement light client in Ethereum. People are working on it. I mean, people are work on it, but it just have much, harder lift than going the, and just too expensive, especially, you know, six months ago,
Starting point is 00:37:34 where it would just have not been feasible from a gas perspective. That's why for the Ethereum to Cosmos bridge, we needed to go down the more traditional typical bridge route, not using IBC. And so in that, what happens is, you'll essentially, you have this chain that is the bridge, gravity bridge, and you have the validators of that chain running Ethereum nodes and acting as the, like the, you know, they all decide when they witness an event happening on Ethereum, and then they declare their witnessing of the event happening on the gravity bridge chain, and then once they declare that, once there's enough of a quorum of them doing that,
Starting point is 00:38:15 then it triggers, you know, it admits the asset that's being bridged over. So what does that mean for an osmosis Ethereum AMM bridge? Does it mean it's too expensive or does it mean it's theoretically possible but not feasible? No, it means that you'll be able, very soon, we'll be able to bring Ethereum assets over the bridge into Cosmos land and then trade them on any, you know, you can break them onto osmosis and trade them on osmosis and trade them on osmosis. And, you know, there'll be like a multi-hop thing, but like, you know, it'll be our UX will like handle all of that where it'll be like, you know, we want to make it as simple as possible where it's like, you know, deposit as Ethereum Mac. If you go on the osmosis website today, like, you know, it's, you'll notice we actually
Starting point is 00:39:06 don't use the word IBC anywhere because I really do think IBC and bridges and all of this stuff is like lower level things that users should not be the one to worrying about. And so on the osmosis website, there's like a deposit button and a withdraw button, which is like very similar to what you see on centralized exchanges today. And, you know, it will be the same where it'll have a button where it's like, all right, deposit, eth. And it will just, your east will show up then after a couple of seconds into your osmosisic wallet. And then you can do whatever trade you want. And then you can press withdraw and send it back to Ethereum. One question I had was, how do you bootstrap a new chain and make sure the security?
Starting point is 00:39:51 Because you're not drawing from hub security. So what was your process of making sure that there was security from day one, a strong validator set, sufficient like capitalization of like Osmo, et cetera? Yeah. So one of the things that we did was we actually distributed the Genesis Osmo via. a quadratic fair drop. What that means is it's basically an air drop to atom holders. The quadratic fair drop was basically you, everyone got air drop based off of the square root of the number of atoms in their address. Obviously, we could not announce this before the air drop happened. So we had to take the snapshot first and then we announced the quadratic nature
Starting point is 00:40:36 of it. But yeah, this was basically a way of like making sure that distribution is like even more decentralized than the atom distribution. And also because, you know, traditionally whales are they're going to be the ones to get more the liquidity mining rewards. So we wanted a way of just giving every, all the atom holders a little bit more distributed stake. You know, unlike a lot of defy projects on Ethereum,
Starting point is 00:41:00 our token is also the staking token, along with being like the governance token. And in order to be the staking token of the network, you need to be sufficiently decentralized from like t equals zero. You can't be like, okay, you know, all the tokens are in the hand of the team, and we're going to have this liquidity mining program, and then, like, you know, look, five years from now,
Starting point is 00:41:18 it's going to have a decentralized token distribution. We needed something decentralized from day one. And so that's why we were able to, we did thisirdrop to make sure that had it. And then, you know, a number of, because it was distributed to Adam holders, that means all the Cosmos hub validators, by definition, were air dropped, uh, Osmo as well. And so that's how we were able to bootstrap the validators. set. We did, you know, I know like a lot of new chains have to go, like, run validator programs
Starting point is 00:41:46 and all of that. But, you know, because all 125 for the Puzzons Hub valeters had Adams, you know, I'd say probably the majority of them also became osmosis validers as well. And then how did the chain get enough security? I mean, I don't know. Market dynamics, I guess. I mean, the price of Osmo became enough from the get-go to, to secure the number of assets that were. or bridged onto it. What is ion? Because that's something else that people have mentioned has been airdroft recently.
Starting point is 00:42:20 Yeah, so ions are this, it's the secondary token of osmosis. And basically, I could tell a little bit about the story of ions, where what happened was I wanted the smallest unit of osmo to be called ions. And it was, but you know how it either has way
Starting point is 00:42:41 or Bitcoin assets. So, but then one of my teammates said no, because he's like, oh, you're going to make the wallet's job more difficult because the standard in Cosmos is you use metric prefixes for,
Starting point is 00:42:54 for like denominations of assets. So if you have like a thousand, it'll be millie osmo, you'll have microosmo, et cetera. And so, and both wallets sort of expect this. So I was like, okay, fine. But then when the test,
Starting point is 00:43:09 when we were doing the test nets, you know, I really, I still just really, like the ion name. And so I, you know, test that's particularly an EMM. I need two tokens to test with. So I just used to put a second token in there called ions just to test my AMM with. And then two nights before the launch, I just, I don't know, I was really hired or something, but I just had this like stroke of inspiration. I'm like, what if there was a second token in the genesis of the
Starting point is 00:43:37 chain? And I kind of just pulled this like all-nighter. I don't, I don't really, even remember everything that happened that night, but like, there was like, I woke up in the morning and I was like, all right, I had a token distribution and that's just added to the chain. And I don't know what this thing does, but, you know, maybe people like it and do something with it. And what's really cool is there's a huge community that has like formed around ions. Like, it's probably one of the most active chats I've ever seen in my life. And it's one of my friends, Dylan from Commonwealth.
Starting point is 00:44:14 We had him on actually a couple of years ago. But yeah, he's working on a project called Commonwealth. And, you know, he has this whole idea called token curated communities. And I was honestly a little bit skeptical of it until I saw it happening in front of my own eyes. And like I accidentally created one where it's like this ion thing just created this like token curated community. And they're having like every other day. They have community calls for like, you know, all this. like really active governance proposals.
Starting point is 00:44:42 And what's crazy is Jay, who is like, you know, the founder of Cosmos, who's sort of been stepped away from the causal ecosystem for the last year. He actually's gotten involved with this ion thing as well. And he's in the chats like every day now talking about it. He even has a bounty up for people to try to reverse engineer the distribution criteria for ions, which is kind of funny. Yeah. So I don't know.
Starting point is 00:45:05 It's just a big experiment to see what would happen if, uh, it's a meme coin. And, you know, but can the memes become real? We'll see. Well, knowing that you're a big proponent of Doge, I kind of know what your answer would be. Tell us more about this osmosis community, because basically, community building has been one of the least planable things in the defy ecosystem.
Starting point is 00:45:32 And a lot of the Ethereum defy communities are also, I'd say, peculiar in nature. So how would you describe the osmosis community? Yeah, the osmosis community, I mean, I think it's still like so early and it's like still trying to find its like aesthetic or its own, you know, culture. What it was was, um, Zubin and I about like two or three months ago, we made this like political compass chart. If you know that the political compass mean where it's like left and right and then authoritarian libertarian. And we planted every, like, major crypto community on this, like, chart. It didn't make that much sense. But it was, you know, it was a funny meme and, like, you know, okay, Bitcoin is very
Starting point is 00:46:18 libertarian right. Ethereum is, like, like, left, like, moderate left. And then, like, somewhere, like, not as libertarian as Bitcoin. And, like, Dogecoin was at the farthest left. And we had this whole, like, thing. And I think it's on Zoom's Twitter. And then someone asked me, like, oh, where does osmosis fit on this? And I'm like, I don't know.
Starting point is 00:46:38 figuring that out right now as we have this like literal conversation is like the this discussions that we're having in these early days is what's setting the community culture and so what's cool is a lot of the I mean we were able to bootstrap a community pretty quickly thanks to this air drop where like you know the atom we kind of a lot of the atom community has come over and become osmosis community as well and then also just a lot of the communities of all these not just the atoms but like you know we we connected to all these like other chains, right? You have like crypto.com, you have the Akash network, you have the region. All of their communities have also sort of become part of this osmosis community as well
Starting point is 00:47:17 because this is sort of the first time that a lot of these projects have had liquidity on their tokens. And so a lot of their users have like, and by providing by being LPs on it, they're earning osmo tokens thanks to liquidity rewards. And so now, you know, so they're also really excited about being part of these osmosis community as well. And then there's obviously like, there's a little bit of drama that happens sometimes between
Starting point is 00:47:43 the osmosis community and the Cosmos hub, Adam community. And I really think, I don't know if people have read like any of like Renee Gerard's work on like memetic, conflict and stuff where it's like,
Starting point is 00:47:55 you fight the hardest with the people who are the most similar to you. And I think that's sort of what's happening a lot right now between some of the infighting between the Adam and Osmo community. But I, think that's sort of a temporary thing that, you know, I think I think we'll get resolved over time.
Starting point is 00:48:10 And I think the osmos community is really supposed, like, we try to be as pro-Adam as possible because we are, there's another meme I had, which is like the father, the son and the Holy Spirit is Adams, Osmo and ions. I don't know what that means, but it fits really well. Well, you heard it here first. So, Sunny, I mean, it's been a couple of weeks. And the community is kind of blossomed. Where would you say it fits on the four quadrant model that you just talked about? I mean, you said that you didn't know when, when, when, when, when, when, when, when, when, when, when, when, when, when, when, when, when, when, when, when, when it's been around for a little while, right. To matter, I still don't know yet.
Starting point is 00:48:53 I don't think it's something that gets set in four weeks. I think, you know, I mean, it took Bitcoin years to find out its, like, culture. It took Ethereum years to find its culture. I think culture is not something that is defined in four weeks. I think culture is this, like, more long-term process. And I actually legitimately do think it's too early. I think what's happening right now is the community is finding its like, you know, I mean, I don't want to use the word, but at least.
Starting point is 00:49:20 or like, you know, influencers. And like, you know, there's people who didn't even get any tokens in the air drop, but they just have gotten really passionate about the project and have gotten like are stepping up as these community leaders and are like, you know, hosting government community calls and like writing governance proposals and stuff. And so I think, you know, I think we're still in this very early stage of it that it's hard to really pinpoint anywhere yet. What's your role in the community? my chief troll I don't know
Starting point is 00:49:50 I like to spend a lot of time in the community it's fun because it reminds me of like early Adam community I used to spend a lot of time in like the telegram chats back like when before the class was hub launch
Starting point is 00:50:01 and no I really enjoyed doing that and so I spend a lot of time in the telegram but sometimes it's a little bit too much where like I need to get away from this thing and go back to like building the actual product so yeah I mean
Starting point is 00:50:13 my role is I'm the head of the development team. And so, you know, we want to, we have a, we have a roadmap that we are really passionate about. And we, and our goal is just to execute on that roadmap. And then, you know, we hope that the community sort of likes this roadmap and like works with us on like, you know, pushing this to the larger crypto ecosystem. But you don't want to set culture. You think that that's impossible to do from, you know, a single person. Yeah. I think.
Starting point is 00:50:47 I think single people can influence culture. I mean, you know, I think I, you know, I share my thoughts in the community quite a bit and like the kind of thing that I'm thinking about. I think it's a dialectic process. I think it's like, you know, I'm communicating with the community, but the community is communicating back. And obviously, I wouldn't say I don't have any influence over that. But I try not to have too big of an influence over it. I want the community to figure out its own path, which is why another reason why I do. I try to not be, especially on like the ion one, especially, right?
Starting point is 00:51:22 I try to not be too active on there. I'm sort of passively falling or long. And when someone asks questions or, you know, someone has something interesting and I want to say, you know, for example, people were talking about web of trust stuff in there yesterday. And I, you know, if anyone knows me, I've been super passionate about web of trust for like number of years now. And so, you know, I started telling them about, you know, brain dumping about all my ideas
Starting point is 00:51:44 about web of trust. And I talked about circles a lot. and I talked about like, you know, all these cool things. So, yeah. You said that Osmo is both the staking and the governance token. So let's talk about governance a little bit. So what does osmosis need governance for, which parameters are governed? You mentioned the staking token.
Starting point is 00:52:05 One thing I just want to quickly mention really quick, the third thing that was on our roadmap, that's like the priority. So one was the AMMs, the other was the threshold decryption. The third is we're building some called superfluid stakes. which is this idea inspired heavily by like Dan Ellitzer's post from a couple years ago called like super fluid collateral. But the idea is we have Osmo is one of like the main base pairs of the AMMs, but it's also the staking token.
Starting point is 00:52:32 And this has this like weird tension on its like security model. And so what we're trying to do is or what we're going to build is this super fluid staking. So you have these normal staking derivatives where what happens. is you take a staked asset, you stake it, and then you get back this like derivative asset, and then you go use it in defy. The problem is this completely undermines this entire like security model of proof of stake, where it's like, oh, well, I mean, you were supposed to lock up these assets and have them be easily slashable, but if you could just like liquidate the asset, you know, it defeats the whole point.
Starting point is 00:53:09 What we're kind of do is put this in the reverse direction. So we're saying, what if you use staking tokens in defy and then take the defy assets? assets and stake them. So, you know, the simple example would be something like compound. Like, let's say there's a osmo. I can go lend it on compound and get back a Cossmo. And then I can take my Cossmo and stake it. And as long as there's a way for the protocol to efficiently know the conversion rate of like how much osmo is underlying this D5 position, it should allow, it should, it should, it should allow you to stake it and treat it as that because that's still slashable. Um, and so while we're doing,
Starting point is 00:53:46 the one that we're starting with is with the LP shares. So if you have a pool that contains both Osmo and Foocoin, you can then take that LP share and stake it and it will be treated as the underlying value of the Osmo half of it. And so that way it, when you don't have to choose between staking and LPing Osmo anymore. You can do both at the same time and be earning both the staking rewards and liquidity rewards. And this will just help the security of the chain. And yeah, so I really do think this, like, idea of superfood staking is going to be, it's going to be a help a lot of the solution for how to, like, what you were asking
Starting point is 00:54:32 earlier on about like, okay, in Cosmos, like, don't you have this like security issue? I think this will be part of the solution for a lot of these chains. Okay. So that was a long, we didn't answer that. Now, to answer your governance question, what are these things going to be used to govern? So, I mean, a couple of things, right? I mean, there's obviously, for what superfluid staking, you actually do need to specify which pools can be used for superfluid staking
Starting point is 00:54:56 because you can't have a system where like, you can't allow people to just like bring in any, you can't create a pool of like osmo with like shit coin that I can mint infinitely because if you stake that, then you can just like drain the osmo from the pool. So governance has to manually approve all of them. that's one thing. A lot of like the roadmap and software upgrades have to be approved by governance. A lot of like the sort of like new AMMs and stuff. Like I really it really is like you know, I think there's a lot of parameters in the system that will that will like have to be approved by governance.
Starting point is 00:55:34 And most of them really do come in the form of like roadmap-esque like software upgrade style things. I'm not sure whether I understood that correctly. but you have per pool governance, right? And not holistic governance. Why did you do that? Yeah, because I think that the people who best understand the needs of their pool are the LPs themselves. So let's say, you know, you have this pool that's really popular. It's, you know, I don't know, let's say it's an Osmo-Eath pool.
Starting point is 00:56:07 And it has a 0.3% fee, swap fee. And, you know, let's say, what's interesting right now, what's happening right now in the crypto space or in the AMM ecosystem is there's been this like 0.3% meme that's been like standardized with uniswap for the past like three years. But I think the entire space is in this process of like refiguring out what the shelling point is going to be for this for what swap fees are going to look like. And so I think, you know, you want a way for the LPs of this pool to basically use governance to say, hey, let's go ahead and like, well, you could, what you could do is put a new pool and then have people like fork off and like try to add liquidity in this new pool. But that has like all these issues with like, you know, who wants to be the first one to take the leap and like, you know, you fragment your liquidity. So instead, if you have a way for the LPs of a pool to say, hey, let's all collectively agree to change our swathes. And then if people don't like it, they can fork off, right? They can, you know, we have like a rage, we'll have like a rage quit feature where like people can like automatically say, okay, no, we want to stick with the old parameterization of the pool. So then we'll spin up a new pool that maintains the old parameterization. So that's kind of why it's a way of not splitting liquidity essentially. That's sort of the main reason why you want LP governance. I see. Now I now I think I'm wrapping my head around.
Starting point is 00:57:38 because when I first heard this, it seemed like needlessly complicating things. But when you frame it like that, it makes sense. So can you give us an idea of what the current usage of osmosis looks like? How much liquidity are in pools and how much trading is going on? Yeah. So I think we have about $100 million of TBL right now, at least when I checked last. And then the trading volume, it was somewhere between like three to five million dollars per day. And so, yeah, that's kind of, you know, not bad for one month in.
Starting point is 00:58:20 We're pretty saturated right now where I think it's like a lot of the people who in these cosmos chains wanted to like provide liquidity are already providing. And obviously we, you know, we're going to continue to do that. But I think we're going to see the big flood of liquidity come in once we get the Ethereum bridge up. because that's going to be when a lot of the people who, you know, all the assets currently on Ethereum, but actually there's also, I'll be a caveat that with like, you know, like I said, I think there's more cosmos chains coming all the time. I think, you know, it doesn't the last month since we launched, it's already two new ones that have added IBC.
Starting point is 00:58:53 And I think in the next coming months, it's going to be a lot more ones. And then the other ones are like, you know, there's a couple of big powerhouses within the cosmos ecosystem like Thor chain and Terra. I think Tara actually has a huge swan. of interesting assets. So because they have like, you know, they have a stable coin. They have their, oh, you ask a question about stable coins. But yeah, the Terra has a stable coin called UST. They have all their anchor assets. They have all their mirror assets. So I think they have a lot of interesting assets that will be able to find liquidity on osmosis. But yeah, once we get
Starting point is 00:59:27 Ethereum connected, you know, we're going to be able to bring in like a lot of the stable coins that are on Ethereum, we're going to be able to bring in, like, you know, ETH, all the EOC20s, wrapped Bitcoin. So, and what we're really trying to do is like, you know, we want to focus on making sure we have the best trading infrastructure for these things when they come over. Cool. Super interesting, Sunny. Where can people find out more about the community?
Starting point is 00:59:56 Where should they go to join you guys? Yeah. Yeah, so our Twitter is at osmosis zone. Our website, you can just go to osmosis.zone. And there, you know, you can click the button to enter the app and, like, you know, trade and everything. Or, you know, that should also have links to our telegram and Discord and things like that. And that's especially the best way to find, learn more about osmosis. The telegrams are especially some of the more active.
Starting point is 01:00:27 And so if you really just want to, if you want to drink from the fire, hose of the osmosis community. I think that's the place to go. Cool. Thank you. It's been fun, Sunny, having you on the other side of this. We'll have you back on our side, you know, next week or so. But thank you so much for coming on.
Starting point is 01:00:47 Awesome. Thank you guys. Thank you for joining us on this week's episode. We release new episodes every week. You can find and subscribe to the show on iTunes, Spotify, YouTube, SoundCloud, or wherever you listen to podcasts. And if you have a Google Home or a advice, you can tell it to listen to the latest episode of the Epicenter podcast. Go to
Starting point is 01:01:07 epicenter.tv slash subscribe for a full list of places where you can watch and listen. And while you're there, be sure to sign up for the newsletter, so you get new episodes in your inbox as they're released. If you want to interact with us, guests or other podcast listeners, you can follow us on Twitter. And please leave us a review on iTunes. It helps people find the show, and we're always happy to read them. So thanks so much, and we look forward to being back next week.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.