Osmosis v12.0.0 — Oxygen Upgrade

RoboMcGobo
Osmosis Community Updates
6 min readSep 26, 2022

--

The Osmosis blockchain is scheduled to undergo a version upgrade to v12.0.0 at block height 6246000, which is currently scheduled to occur on approximately Friday September 30th at16:00 UTC. Fittingly named Oxygen, this upgrade is packed with features that will breathe life into Osmosis’s burgeoning developer ecosystem.

Between time weighted average pricing, CosmWasm development tooling, interchain accounts, and governance changes, the v12.0.0 upgrade may not be the “sexiest” upgrade Osmosis has seen to date, but the impact of v12 on the chain’s ability to serve as the base-layer for a massive DeFi ecosystem will be felt for years to come. Read on to learn more.

NOTE — Due to variances in block time the upgrade height may occur sooner or later than the estimated time. You can follow a countdown of the time remaining until the upgrade height here. During the upgrade, you will be unable to use the Osmosis DEX. Staking and governance features will also be unusable until the upgrade is complete. A full changelog of upgrade features can be found here.

Time Weighted Average Pricing

Following this upgrade, time weighted average pricing (TWAP) will be utilized to calculate asset prices in all new and existing liquidity pools on Osmosis moving forward.

At a high level, TWAP involves storing cumulative pricing data for a given trading pair on chain, which can then be used to derive an average price over a selected time interval for that pair. To learn more about how exactly this is done, take a look at this insightful article by Osmosis contributor StevieWoofWoof.

The impact of TWAP implementation is a pricing mechanism that is far less susceptible to manipulation on a block-by-block basis. This is an essential prerequisite for the launch of lending and margin trading protocols on Osmosis. If these protocols were to launch on Osmosis without TWAP, actors with substantial financial means could manipulate asset pricing at will to profit from liquidations or short interests.

For example, an anonymous whale could place a liquidation bid on borrower collateral at a given asset price that would execute on liquidation of that collateral asset. The whale could then proceed to initiate a large sell order of that asset on Osmosis, causing a temporary (but substantial) reduction in that asset’s price. This would liquidate the borrower and cause the whale’s bid to execute. Meanwhile, arbitrage would return the price of the asset to relative parity, enabling the whale to sell the asset they bid on at a discount for an instant profit.

With TWAP enabled, manipulation of this kind will be far more costly to execute, as it would require continuous large sales of the asset over a larger time period in competition with arbitrage and MEV bots.

Because of this significant manipulation risk and the impact that it has on borrowers and lenders, builders like Mars Protocol’s Larry have stated that they are waiting for TWAP to go live before launching on Osmosis. The v12.0.0 upgrade will unblock these builders and usher in the era of lending and margin trading on Osmosis.

Stargate Queries

In v12.0.0, select CosmWasm queries, known as “Stargate Queries” will be enabled on-chain. Stargate queries will enable CosmWasm contract developers on Osmosis to write and deploy contracts that are capable of fetching data from chains connected to Osmosis via IBC. While the impact of this feature will not be felt immediately, enabling Stargate queries is the first step in allowing for cross-chain smart contracting between Osmosis and other chains.

Osmosis will have a whitelist of certain query types that will be able to run on the chain. This is because certain query types, if used maliciously, can result in non-determinism, a situation in which validators cannot come to consensus on the state of the chain. This can result in halts like the one that occurred on the Juno blockchain in April of 2022.

Interchain Accounts Module

If this section sounds familiar, it’s because the Interchain Accounts module has been covered in a previous upgrade article. This module was implemented with the Osmosis v9.0.0 Nitrogen upgrade, but was never enabled. With the v12.0.0 upgrade, this module will finally be initialized, enabling a host of new use cases for inter-blockchain communication. For more details on Interchain Accounts and how they will revolutionize IBC, see the v9.0.0 upgrade article.

Many chains and d’apps have been waiting for Osmosis to enable this module to interact with or launch on Osmosis and, with this upgrade, all of these teams will finally be able to take the final steps to do so. Protocols like Stride and Quicksilver, for example, have been waiting for this module to be enabled in order to bring their liquid staking services to Osmosis. Yes, you heard that correctly. Shortly after this upgrade we will have liquid staked OSMO from multiple liquid staking providers! stOSMO and qOSMO will soon be used to provide liquidity on Osmosis.

Expedited Proposals

The collapse of the Terra blockchain made it painfully clear that under certain emergency situations, proposals may need to be passed in an expedited fashion. This occurred with proposals 222–228, a series of proposals aimed at quickly reducing the impact of the Terra incident on Osmosis liquidity by reallocating some UST incentives to USDC, wETH, and DAI incentives as well as allowing for de-pooling of assets to prevent further impermanent loss in those pools.

Because these changes needed to be implemented on a shorter timeline than the 5 day voting period allowed, Proposals 225 and 226 proposed to implement the changes via a chain hard fork upgrade as soon as the quorum reached 67% voting power. While it can be argued that voting yes on these text proposals created an enforceable social contract to consent to the hard fork, it is always preferable to implement features via governance controllable parameters wherever possible.

In light of that, proposal 278 was passed, which set a process by which proposals could be expedited to pass in a shorter time period. This has been included in the governance module with the Oxygen upgrade.

With the v12.0.0 upgrade, proposals can now be expedited subject to increased quorum and pass requirements. By including the isExpedited=true flag in the proposal submission process, proposals can now be passed as soon as 67% of the voting power has voted with a majority Yes vote. If, however, the 67% quorum has not been reached within 24 hours, the proposal will operate as a regular proposal and the 5-day voting period must be honored.

Expedited proposals should be used sparingly, as they are meant to be left for emergency situations. For this reason, expedited proposals will be subject to a larger deposit that is changeable by governance. At the outset, this will be 5,000 OSMO. If another black swan event like Terra’s collapse occurs, Osmosis governance will be better prepared to deal with it using expedited proposals.

More to Come

Future upgrades promise to be more feature-rich. v13.0.0 will introduce the long-awaited Stableswap AMM logic to improve capital efficiency in stableswap pools, and v14.0.0 is the estimated upgrade that will ship orderbooks on Osmosis. Keep an eye out for these in the coming months!

Enter the laboratory at Osmosis.zone, the first decentralized exchange powered by the Cosmos SDK and IBC. See our published lab reports at the Osmosis blog, our bench notes at Github and help plan future experiments in our Commonwealth

Connect with other DeFi Scientists by following us on Telegram, Twitter, Discord, Reddit, and the new Facebook and Instagram pages

Reach out to the Osmosis Ministry of Marketing by Email or Twitter and the Osmosis Support Lab by Email or Twitter

--

--