Builder Stories: Why Osmosis Chose the Cosmos SDK

Cosmos SDK
The Interchain Foundation
6 min readAug 8, 2024

--

Cosmos SDK Builder Stories highlights innovative projects that are building with the Cosmos SDK. In this third edition, learn more about Osmosis and how the world’s leading toolkit for building application-specific blockchains is helping them achieve their goals.

Hear from Osmosis on the advantages of building with the Cosmos SDK

Osmosis — The Interchain DEX

With over 1 million users and almost $400 million in IBC trading volume over the last 30 days, Osmosis is the interchain’s most popular DEX. Powered by Cosmos SDK, Osmosis enables users to access liquidity and assets from over 115 ecosystems and has an all-time trading volume of over $34 billion. Osmosis allows users to participate in various DeFi interactions, including liquidity pools, trading perpetuals with up to 30x leverage, liquid staking, and lending and borrowing assets across the interchain.

Osmosis co-founder Dev Ojha says, “Osmosis is the interchain DEX. People want to exchange assets across the interchain and Osmosis is the liquidity hub facilitating that.” In addition to providing a unified place to trade a growing ecosystem of interchain assets, Osmosis was built with what Dev says are “some pretty strong MEV and privacy takes.”

To prevent undesirable practices like sandwich attacks or front-running by validators manipulating the order of transactions within blocks, user transaction flow is encrypted on Osmosis. “No one knows what you’re trying to do until it gets onchain and is decrypted and executed by everyone,” Dev explains. Using threshold encryption in this way, Osmosis’ in-protocol MEV capture ensures this value is secured and distributed to Osmosis participants instead.

Solving the Largest Problems in Web3 Adoption

With new features such as smart accounts and one-click trading, Osmosis continually improves and enhances the user experience to attract more people to the platform. Despite this, Dev believes UX remains one of the main hindrances to the broader adoption of web3. There’s still a long way to go surrounding the custody and safety of user assets. “Let’s stop having hacks and things that make it possible for protocols to go to zero, bridge hacks, lending market hacks, a bug in the code… it’s just crazy design in all of crypto that a lot of these things are possible.”

IBC has helped the interchain rise above the problem of bridge hacks and poor code with a seamlessly designed interoperability protocol with zero exploits since inception, but crypto custody needs to be resolved to attract the wider market, he says: “Mnemonics are insane. That’s why a lot of talk today is on account abstraction because this mnemonic UX isn’t going to work. We need different backup structures to bind the risk, and if someone dies you can have the inheritance go to the next person, not just the money’s fully gone. We really need this stuff to exist to attract more users… Social recovery is such an exciting area in this regime.”

With a deep-seated belief in privacy as a fundamental right, Dev also says the industry should focus on the privacy-enhancing side of the tech. “Every time you pay someone in crypto or do a transaction, it’s linked with all your history. Let’s get this de-correlated so that if you do a swap, it’s not public to the entire world what your entire trading history is… Let’s get all of these things fixed.”

Why Osmosis Built Using Cosmos SDK

As an open-source toolkit for building application-specific blockchains, Cosmos SDK gives developers the flexibility and freedom to mix and match different components and modules to create custom blockchains from scratch that natively interoperate with other chains through IBC. The configurable nature of Cosmos SDK was a standout feature for the Osmosis team and instrumental in its builder journey.

“Cosmos SDK gives you such powerful configurability over what you can do. You’re not tied to a given execution model. You can easily add your own VM. You can paralyze stuff… We could imagine switching to something like a zero-knowledge proving where it does batching. We can do all sorts of performance optimizations… The SDK just gives you this huge amount of configurability and iterability on every part of the protocol.”

— Dev Ojha, Co-Founder, Osmosis

Control Over the Whole Stack

Cosmos SDK enables developers to focus on what they’re building and how to build it without being constrained by the framework design or dealing with development overhead attempting to integrate custom components. This cannot be done by building in an ecosystem like Ethereum.

“Compared to Solidity, having full control over the whole stack is super powerful. This is the appchain thesis. If your chain is specialized you can make the best decisions without having to care about other use cases, and you don’t have to lose composability because you have IBC.”

A Configurable Design Enabling Protocol Evolution

The modularity and composability of Cosmos SDK enable the ecosystem, industry, and projects to evolve as their needs change. With the rapid pace of iteration in web3, supporting innovation is vital. Dev believes the industry is still in its early days and many ideas that have been floated around over the years haven’t been tested yet.

“We shouldn’t be ossifying the protocol design. There’s so much to improve on here, and in the Cosmos SDK, we have ways to do all this. Everything about it is configurable and feels configurable.”

— Dev Ojha, Co-Founder, Osmosis

Dev wants to see privacy becoming prioritized across the Interchain Stack, and one of the use cases he’s most excited about is compiling Cosmos SDK Go or Rust modules into a zkEVM. “This is still the biggest missing piece in crypto,” he says. “We have such high iterability on consensus, on the state machine, it makes us a great place to have new ideas and be experimental.”

A Better Architecture from the ‘Get-Go’

If Dev had any advice for new developers wanting to build a blockchain application, it would be to carefully consider the tech stack and choose a framework that gives them sovereignty over their vision. While some ecosystems aim for decentralization over time proving the technology and maturing, building an appchain using Cosmos SDK enables developers to launch projects that are decentralized from the start, with hundreds of validators distributed around the globe and no centralized party that can halt the chain or work against its interests.

Dev says, “Ethereum has this vision of: let’s get one chain highly secure and then let people do whatever centralized or semi-centralized things they want but inheriting Ethereum’s security, whereas we have a vision that’s less centered around one thing.”

Dev compares the interchain vision to nation-states and says that different applications should have their own security properties that “co-secure each other,” as this makes for a more “robust” system: “A lot of things in the world are safe because there are checks and balances from many parties, not one mega country… Checks and balances give us more secure systems and anti-fragility everywhere… Let’s not have a single party who can get total control over blockspace or be able to censor users… let’s just start off with a better architecture from the get-go.”

Stay tuned for more Cosmos SDK Builder Stories coming soon and follow our developments on X.

Interested in using the Cosmos SDK to unlock the potential of your project? Begin your journey or start building today.

--

--

Cosmos SDK
The Interchain Foundation

The world's most popular framework for building application-specific blockchains. https://github.com/cosmos/cosmos-sdk