sunnya97.com

Smart Accounts in Blockchain

App chains offer unique advantages like scalability, vertical integration, and sovereignty, enabling tailored solutions that enhance user experience and operational efficiency beyond generalized blockchains.

Summary

In the video, I discuss the concept of app chains, emphasizing their unique advantages over generalized Layer 1 blockchains. I draw an analogy between the evolution of civilizations—from villages to empires and now to independent nations—to illustrate how app chains can achieve interoperability while maintaining sovereignty. By leveraging the Cosmos ecosystem and the Inter-Blockchain Communication (IBC) protocol, app chains enable developers to create tailored solutions that enhance scalability, vertical integration, and customizability. I highlight specific features like customizable transaction fees, transaction ordering, and unique validator requirements, showcasing how these capabilities allow us to optimize user experience, reduce costs, and improve overall functionality. Ultimately, I argue that the future of blockchain development lies in the flourishing ecosystem of app chains, exemplified by our work on Osmosis.

Key Takeaways

  • App chains allow for greater scalability and customization compared to generalized blockchains, enabling developers to create tailored solutions for their applications.
  • Vertical integration within app chains leads to optimized functionality and reduced costs, as developers can control various aspects of the ecosystem, such as transaction fees and custom execution rules.
  • Sovereignty in app chains allows projects to avoid disruptions from external changes, ensuring consistent performance and reliability for their applications.
  • Innovative features like custom transaction ordering and fee systems can enhance user experience and operational efficiency, providing a competitive edge in the blockchain space.
  • The interconnected ecosystem of app chains fosters interoperability, encouraging the growth of diverse applications while maintaining unique functionalities.

Detailed Analysis

In the video, the discussion centers around the concept of app chains, emphasizing their unique advantages over generalized Layer 1 blockchains. The speaker articulates a compelling argument for why app-specific chains are emerging as a preferred architecture for decentralized applications. By drawing parallels between the evolution of political systems and blockchain technology, the video presents app chains as the next logical step in achieving scalability, vertical integration, and sovereignty for developers. Key themes include the importance of customized transaction models, fee structures, and the potential for innovation that app chains provide, which are often stifled in monolithic systems like Ethereum.

These ideas resonate with broader trends in the cryptocurrency space, particularly regarding the ongoing quest for scalability and efficiency. As we've seen with Ethereum's congestion during major events, the necessity for dedicated infrastructure that can handle high throughput without compromising user experience is more pressing than ever. The speaker’s emphasis on vertical integration echoes a growing recognition that the ability to control every layer of the stack—from consensus to application logic—can lead to significant cost savings and improved functionality. This trend is indicative of a shift towards more specialized solutions in the blockchain ecosystem, as projects seek to carve out niche markets and provide tailored experiences.

The implications of these points are profound. By championing app chains, the speaker suggests a future where developers have the freedom to innovate without the constraints imposed by generalized networks. This could lead to a richer and more diverse ecosystem of applications, each optimized for its specific use case. However, the reality of deploying app chains is not without its challenges. While the benefits of customization and sovereignty are clear, they also introduce complexities related to interoperability and the need for robust communication protocols between chains. The success of app chains will depend on how well these challenges are addressed.

One notable strength of the discussion is its practical focus on real-world applications of app chain technology, particularly through examples from Osmosis. The exploration of features like custom fee structures and transaction ordering illustrates how app chains can create a more user-friendly environment while also maximizing revenue for developers. However, a limitation is the assumption that all developers have the resources to create and maintain their own app chains. This might not be feasible for smaller projects or teams lacking the technical expertise, potentially leading to a bifurcation in the ecosystem where only well-funded projects thrive.

This video is particularly useful for developers, blockchain entrepreneurs, and investors looking to understand the evolving landscape of decentralized applications. By highlighting the advantages of app chains, it provides a clear roadmap for those interested in building scalable and efficient solutions. Additionally, it serves as a call to action for the broader community to embrace the potential of specialized chains, fostering an environment ripe for innovation and collaboration. As we move forward, the successful integration of app chains into the blockchain ecosystem may very well define the next wave of technological advancements in this space.

Transcript

Speakers: A
**A** (0:06): All right. Hey everyone. Thank you guys for coming early in the morning. My name is Sunny, I'm one of the co founders of Osmosis, which is a dex app chain. And today what we'll be talking about is just going through why app chains and what are some of the unique things you can do with your own app chain that you couldn't if you are building on a generalized L1 or a non application specific chain. So before we hop into why, let's just quickly talk about what is an app chain. Pop quiz. What is the biggest app chain out there today? Anyone? Bitcoin? Correct. So anyways, what are app chains? Right? So you know, I like to like put it in this like political, economic like history timeline where like originally in like civilization we had these like villages and kingdoms. They're all like relatively smaller scale and you had like a little bit of like, you know, trade happening between them, but like not that much. Then you know, humanity progressed to this world of empires where we saw that through like mass scale political integration, by putting everything under one common political system, we get like massive amounts of interoperability. And this leads to a lot of like benefits, right? You get like, you know, huge economic booms from this. But they come from a lot of, they come with a lot of cons. You got to pay taxes to the emperor, to the empire. You, you know, you're restricted on a lot of the things you can do when in the realm of the empire. And so that's why today we've moved now towards what, what I call a world of nation and city states, right? Today we have 190 to 200 sovereign countries in the world. They all are independent politically, but we actually still have a great deal of economic integration between them. And this economic integration is powered by a number of core technologies in the world today. Things like free trade zones, institutions like the un, which is meant for like coordination. You have the World bank, you have imf, you have all these institutions that help with this process. You have technologies like the Internet which enable global trade. Blockchain as well, right? Blockchain helps make financial activity between different countries and jurisdictions easier. And you have containerization which is this like not Docker. It's this idea that like you can have a standard shipping container that allows you to send products from any port in the world to any other port in the world. This is an analogy for ibc, but that's not what we're talking about today. So in blockchains we kind of see something similar where early on you had in the generation one of blockchains, you had these like app chains only, right? You have like Bitcoin was meant for payments, you had Saya for storage, you have Namecoin for DNS. And then what we eventually, you know, similar to the shift towards empires, we moved towards the Ethereum empire, right, where we saw that, hey, by putting all of these applications on one system, one political system, one single blockchain, we got all these amazing interoperability benefits, right? Like ENS composes very well with like the payments of ensemble Eth, which compose very well with like Uniswap and aave. And you have all this like great composability, but you lose out on a lot as well. You know, you have to pay the taxes to the empire, you have to pay your gas fees in eth, you have to, you know, you want to like change, add some new privacy primitive. You want to capture your own mev. You can't do that. You have to pay to the empire. And that's why today we see a shift towards a world of app chain. So this is actually a picture from like 2017 when I saw like the view of app chain starting to come about. So, you know, we'll have augur on its own chain. But we have like with app chain today. What IBC enables is that we have the ability to have separate app chains but still have that interoperability benefits that you get from the empire model. So and today we finally actually see this live today where you know, this is specifically the cosmos ecosystem. But you know, app chains are bigger than just cosmos, right? There are many app, you know, you look at things like filecoin or Flow or Bitcoin, right? These are all examples of app chains that aren't necessarily cosmos. But over time the idea is that like as we get more interoperability between these app chains, we're going to see a shift of more and more applications moving off of generalized blockchains into an interconnected ecosystem of app chains. So now let's, now that we have a good sense of like what an app chain is, let's talk about why app chains. Well, so this is a tweet from Antonio and like, you know, I think he put it very simply that it's like, you know, when you stop caring about alignment and like, you know, paying homage to like, you know, if you just focus on your product, this is the natural. App chains are the natural result of the architecture you come upon. And so we'll talk about why that is, right? So number one, scalability Right? You have this idea of like one blockchain just can never scale to achieve the goals that it needs, right? You have all these applications competing for throughput on this generalized blockchain. And as soon as there's a popular NFT mint happening or you know, some ICO or something, right? Like that ends up taking up all the block space of a generalized app and causing this like unfair effect to everyone else. So, you know, this was from, this is a diagram from one of my friends, Dmitri. He had this like really good blog post on app chains and he has this like flowchart of what are you trying to build, right? And you'll notice that at the end state that, you know, I would hope that if anyone's building a product and you're actually like serious about building like a billion dollar product, your goal is to scale, right? And no matter what, if you're trying to scale, you end up in either an app specific L1 or an app specific L2, right? The only way to get to like billion user level scale is you need dedicated infrastructure. You also get a lot of benefits with vertical integration. So Apple builds one of the, you know, I think they build some of the best products in the world and they do this through insane levels of vertical integration, right? They build a lot of the components, right? They started in housing the like, you know, if anyone switched to an M1 Mac, you'll realize it's like worlds better than the old intel ones. Because when you can, like when you control the components and are designing it for your use cases, you can optimize the hell out of it. They build the phone, they build the os, they own the app store, they build a lot of the apps as well, right? Through this like really high level of vertical integration, they're able to build these great products. And this is kind of what we, we what the idea behind app chains as well is, right? It's almost, you know, this is the monolithic thesis, right, where it's like there's some people who believe like, oh, in modular systems, you know, you want someone else to do the data availability, you want someone else to do like consensus, you want someone else to give you, I don't know, oracles. The problem is when you do this, everyone starts charging a fee and your costs are gonna skyrocket. SpaceX builds like hyper. The reason they're able to build such cheap rockets is they invested heavily in extreme vertical integration, right? They squeeze out costs at every layer cause they realized that every single vendor was scalping them for money, right? And this is what happened. When you start to build blockchain applications, you realize that all of these vendors are like scalping you on fees, right? And if you want to drive the fees down for your users, you gotta start in housing this functionality. So, you know, something like Osmosis, we own the blockchain, we own the application, we own the primary front end. And with a lot of these smart account and account abstraction work that we're doing as well, we own the wallet as well. Finally, with sovereignty, right? You know, you had situations where Ethereum hard fork upgrades can break entire applications because they change how some gas metering works or something like that, right? You are at the whim of some external party to make sure that your product still continues to work. And that's very scary. So I'm going to focus more on the vertical integration side. And so we talked about at a high level, I'm going to now talk about some specific examples of what are actual cool things you can do via vertical integration. And I'll use a lot of examples from osmosis, things that either we've already done or are building. And then I'll use some examples from other products as well. So one example is custom fees. Like I mentioned, when you build on Ethereum, you have to pay gas fees in eth, right? That is a tax to the ETH asset that you're paying in app chain. You can pay your transaction fees in your own native token. In Osmosis we could say hey, we want to pay in Osmo or in Stargaze they could say they want to pay in Stars. But you can also go a step further, right? You can say, hey, we can pay transaction fees in any token. So this is actually something that we've built on osmosis. So when you trade on osmosis, you can pay your transaction fees in any token you want. You can pay in USDC and Tether and ETH and Atom. But what it will do is after you make the transaction, it will collect all the transaction fees that are accumulated by the chain over the course of the day and swap them all into osbo. So that way the transaction, all the transaction fees, even though we're providing the UX of being able to pay in any asset, it's still providing buy pressure on our native asset at the end of the day. And then we're actually, we generalized this module and are actually shipping it as a Cosmos SDK module to other blockchains as well. So on something like Stargaze, you'll also be able to Pay transaction fees in USDC or eth. But all those transaction fees will go into Star's buy pressure. At the end of the day you can charge different fees for certain types of transactions. So this is actually something we do in Osmosis today is that we noticed there was a lot of cyclical arbs that were like spamming the blockchain. And so what we actually did was in the blockchain itself we added a mempool, what we call a filter and we can detect, hey, is this transaction a cyclical arb? If so, we're going to charge it a higher gas fee, right? And so this is like something cool that you could only do as an app chain. You can like look at what are the types of transactions that are happening and charge different fees based off of the, you know, different types of transactions have different secondary effects on the, on the product, right? And so we saw arbs were like, you know, we can allow them to pay more because they're going to continue to arb, but you know, it brings in more revenue for Osmosis and it less clogs up the blockchain. For our normal users you have these things called fee credits, right? You can have systems where by doing certain types of actions we can make it so you get this fee credit, which is not a transferable token, but rather it is a ability to pay like it is considered a voucher to pay as a substitute for paying your transaction fees in a fungible token. So we can do this for things like, oh, every time you trade on Osmosis you're paying swap fees. We can allow that to help you accumulate fee credits, right? So that way your actual transaction fee costs are basically subsidized because you know, our osmosis is bread and butter is the swap fees. Anyways, another one is, you know, for IBC relayers, right? IBC relayers, we can say that, oh, the more packets people relay, they get these fee credits. So that way it reduces the cost for these relayers over time. And then finally you have these like what I find really fun is like non monetary fee systems, right? So you can imagine something like, oh, you do a little bit of proof of work, you do some hashing or something, then you can like make a transaction. The one that we're actually working on at Osmosis is this thing called privacy pass. So you've probably never heard of it, but it's basically this like in progress W3C standard where you know, what it does is every time you do a captcha, it Gives you this like cryptographic token that you can then use to to a site. So the idea is like okay, you do a Cloudflare captcha once you get 10 tokens. So that way next time you go to a site that wants a captcha done, you can just pay that token and that way the site will just bypass the captcha. So it's like instead of having to do a captcha every time, it's like memory stateful captchas basically. Right? And so we're actually working with Cloudflare to actually how do we bring this on chain where we can take these like, oh, you do a captcha and now you can do certain types of transactions for free on chain. This is actually a big part of how we're solving the onboarding problems with every crypto blockchain out there today. You can do a lot of things with custom transaction ordering. So you can do MEV mitigations right? @ the blockchain level. We can say things like no sandwiches, right? We can take a block proposer's block proposal and, and see and like when we iterate over, when we execute it, we see, oh, this is clearly a sandwich transaction. Similar how we like detected the arbs. We can say, oh, this is an invalid proposal. You could do things like batch trading. You can take things like, hey, you know, osmosis is a contrary to liquidity system. So we can say, oh, we're going to look at all the transactions in a block, we're going to execute all the liquidity ads at the beginning of the block, then execute all the trades and then execute all the liquidity removals, right? This is what will give the best execution for the traders on the chain. You can prioritize certain types of transactions, right? So this is something we're working with like pith on is like we say, hey, all the pith transaction Oracle updates, this will automatically go to the beginning of the block, right? So that way, you know, a lot of projects have to like build mitigation systems or how do you deal with Oracle lag? We have other solutions for Oracle lag as well, including like in protocol Oracles. But this is, you know, in protocol Oracles will serve some assets. You can also work with Oracle providers that you say, like, hey, any pith Oracle update is automatically going to go to the front of the block, top of the block auctions, right? Usually the most valuable spot in a transaction, spot in a block is the first transaction because that's where all the arbitrage usually happens. Atom goes up 5% on a centralized exchange, there's a race to be the first person to do that arbitrage on the dex. And what we can do is we can sell off the right to do that. So this is basically similar to what something like Flashbots does off chain on Ethereum, right? But all that revenue just goes to the validators, right? With osmosis, with having in protocol top of the block auctions, all that MEV revenue can go to osmos stakers as a whole. And so yeah, this is something. So Skip is one of the core dev teams of Osmosis. And so this is one of the products that they built with us self executing code you can have an in protocol arbor. So this is something that we also built with Skip, which is called protorev, where it basically says after every trade, the blockchain. Normally on every other blockchain you have like external arb bots running that will try to back run trades and do these cyclical arbs. What we actually do on Osmosis is say like hey, the blockchain can just run these ourselves, right? And capture that as protocol revenue for the chain. So this actually, you know, these in protocol arbor has actually makes up more transaction revenue than even transaction fees today. You can do things like batch trading, protocol owned liquidations, right? So you know, you could say that, hey, at the top of the block we're going to check the lending protocol, see if anything is liquidatable and trigger the liquidation automatically from the chain rather than requiring off chain liquidation bots that then have to be compensated. Oh yeah, built in keeper network, similar idea. Other custom execution stuff you can do is like you can add custom cryptography, you can add zero knowledge verifiers, you can do things like pinned contracts. So this is something that's being activated I think in the next upgrade on Osmosis where we can say like, hey, certain types of contracts are being called constantly. Like they're being used in almost every single block. We can pin them and basically keep these contract data in cache or in ram, right. Rather than having to go to disk. And this will massively help the performance. And you can do this as an app chain because you as a developer can, you know, you know which contracts are like fundamental and important to your chain. You could do things like parallelize computation. This is something that like SEI has been doing a lot of work on. You could do things like Flash mints. You can, you know, similar to a Flash loan, you can say, oh, you can mint infinite of a token as long as you burn it by the end of the transaction. You can do this because you control the entire execution system of the chain and you can allow systems like Infinite Mints. This is actually how our in protocol arbor, the protorev system works right now is it mints as much tokens as it wants in order to execute arbs as long as it burns them at the end of the transaction. And then you can do a lot of private smart contracting stuff. Permission contract uploads is something Osmosis does today as well. You know, as an app chain, we don't want our chain being clogged by random NFTs or gaming projects or competing DEXs. Right. Osmosis governance whitelists, which contracts are allowed to be uploaded to the chain. You can build new account models. We're working on this thing called native credit accounts, which is basically this idea that like I'm kind of running out of time so I'm going to go fast. You know, you can add systems that like you can have native leverage primitives built in to the account model of your blockchain. You have Osmosis smart accounts allowing a lot of account abstraction and new sorts of like login systems. You know, today this goes back to the whole modular thing I was talking about before, right? In Ethereum you have like this extremely fragmented account abstraction stack and every layer of the stack is going to start charging its own fees. Right. And the account abstraction framework like Stack is just going to get very expensive by having a native in protocol default account abstraction stack, you can cut out a lot of these fees, right? You don't have to pay the off chain bundlers and paymasters and NPC libraries and all of these things. Yeah, Softmost is building this like very native system. I'm gonna click through this private account. Okay. One of the big ones, I think I just want. The last one I want to bring up is like make your validators do more. Right? Like I think this is one of the most powerful things that you get by having an app chain is that you have a set of captured validators that you can demand more of them. So examples validator provided price Oracles, right? There are a lot of perp protocols and lending protocols built on the osmosis chain. They want access to oracles instead of relying on an external provider like Chainlink or Pith or something like that, we can say, hey, our validators can run oracles themselves and provide that to the chain. The first example of this was actually Terra. So Terra was doing this where they had their validators running Luna Price Oracles and providing that to the chain. This allows you to have your Oracle updates happen much more cheaply and faster. You can have bespoke node requirements, right? So you can say hey, a project like Secret Network, right? They say, hey, we need all of our validators to have access to an SGX node because that's important for the product that we're trying to build. A very privacy focused product. You can say, hey, some products might say like, hey, we need our validators to have access to GPUs because we want them to do certain sort of like proving systems that then you know, the block proposer has to prove certain properties about the block that they want to do, generate a ZK proof and then it just gets verified by everyone else. You can have something like arweave, right? It's an app chain that basically requires very high storage capacity of its validator nodes. You get a lot of, you can do a lot of off chain computation like order book matching. So this is something that the DYDX chain does. This is one of the main reasons that that DYDX switched to Cosmos is they wanted to have it so their validators could all run an order book in the mempool and have much faster matching and clearing of the order book. You can move a lot of incentive calculations off. You can have bridge, you can have your validators act as bridge operators, right? So this is something that Thorchain does, for example, right? They wanted, you know, they're an interchange decks. They wanted their validators to also be the ones operating. There are bitcoin and eth bridges and whatnot. And then you can do other things like, you know, you can require your validators run data indexers, you can require your validators run routing servers, you can require validators run, run front end host hosting, right? Like if you're trying to build a decentralized application, you have to think about the other layers of your app that need to be decentralized beyond just the state, the blockchain itself. And leaning on your validators to provide a lot of that decentralization infrastructure is a good way about doing that. Finally, I'm way over time. So you know, custom staking, you can have your own staking token, but you can also do really cool stuff like superfluid staking. Is this idea that you can like use defi assets in the staking system, right? So in osmosis you can use LP shares in the staking system. And, and now this is being taken to its extreme by projects like Bearachain and Initia and stuff like that. So I think that's a really cool thing you can do. And then you kind of have novel mechanisms as well. I gave a talk at the URBIT conference a couple months ago talking about how they can incorporate NFTs into their staking system. So I think there's a lot of cool, novel staking systems you can do as well. So in conclusion, I hope this kind of provides a good brief case study into some of the ways that Osmosis is making use of its app chain functionalities. And you know, people always say, like, oh, would you ever like consider migrating Osmosis onto, I don't know, some L2 or something like that? It's like, we can't, right? Because the product that we're building requires the superpowers of an app chain. So in conclusion, let a world of app chains flourish, and the place to trade all those app chain tokens is on Osmosis.