Osmosis v15.0.0 — Sodium Upgrade

RoboMcGobo
Osmosis Community Updates
8 min readMar 13, 2023

--

March is upon us at Osmosis, and a new month brings a new major chain upgrade. The v15.0.0 upgrade, named Sodium, is packed full of new features, including the highly anticipated ProtoRev Module developed by Skip Protocol. While concentrated liquidity didn’t quite make it into this release as expected, this is one of the more feature-rich upgrades to occur for Osmosis this year, so strap in for a deep dive into what v15 has to offer in this month’s upgrade article.

The upgrade is scheduled to take place at block height 8732500, which is estimated to occur on Thursday, March 16th at 16:00 UTC. Be advised that because block times are variable, the upgrade may take place up to a few hours before or after the scheduled time. You can view a real-time countdown to the upgrade height on Mintscan.

Note: 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.

Osmosis ProtoRev Module

The flagship feature of the Sodium upgrade is the Protocol Revenue Module, or ProtoRev, developed by the team at Skip Protocol. Originally approved by Osmosis governance in Proposal 341, the ProtoRev module is a novel mechanism that aims to capture on-chain Maximal Extractable Value (MEV) and convert it to revenue for the Osmosis chain.

When discussing MEV in the context of the ProtoRev module, we refer to cyclic arbitrage, a process by which a trader (or, more often, an arbitrage bot) takes advantage of a pricing mismatch of one or more assets in different liquidity pools to buy assets at a lower price and sell them at a higher price, often in the span of a single block. For example, in the image below the trader began their arbitrage cycle with 100 OSMO and, by taking advantage of pricing mismatches in various pools, was able to exit the trade with a profit of 1 OSMO.

An example arbitrage transaction. Credit: Osmosis Labs

Arbitrage can often be highly profitable for the arbitrageur. In this example, an arbitrageur walked away with over 30,000 OSMO in profit from a single transaction.

While arbitrage meets an important need of DeFi protocols (ensuring price equilibrium across multiple liquidity pools) it is often a value-extractive process. Arb bots have no vested interest in the success of Osmosis, and often sell their profits as soon as they are earned, putting downward market pressure on OSMO and other assets trading on Osmosis.

ProtoRev attempts to solve this incentives-misalignment by capturing the profits from cyclic arbitrage on Osmosis for the protocol. Here’s how it works:

  • Step 1: The module searches for arbitrage opportunities at the end of each block.
  • Step 2: When the module identifies an arbitrage opportunity, it flash-mints OSMO for itself and uses that OSMO to execute the arbitrage transaction, capturing the profits.
  • Step 3: The module burns the OSMO that it minted for itself, and stores the profits in a module account to be distributed according to parameters set by Osmosis governance.

This mechanism is a groundbreaking innovation in MEV protection that is only possible due to Osmosis’s positioning as an appchain DEX. ProtoRev is expected to generate $10,000 — $35,000 of value for Osmosis per $100 million in DEX volume. As activity on the DEX increases, so too will the value captured by the protocol, creating a strong incentive-alignment between growth of the Osmosis DEX and value capture for the chain and OSMO holders.

Per Osmosis Proposal 421, the revenue generated by ProtoRev will be stored in the module account until at least June 01, 2023, after which Osmosis governance is free to propose how the revenue will be distributed from then on. Some already-proposed uses for this revenue are:

  • Sending it to OSMO stakers, creating a real-yield opportunity for staking OSMO.
  • Fee subsidies for traders on Osmosis
  • Fee distribution to Osmosis liquidity providers
  • Market maker subsidies
  • Burning the tokens, making OSMO a deflationary asset

For a more detailed writeup on how on-chain MEV works on Osmosis and how ProtoRev converts that MEV to value for the Osmosis chain, this article by StevieWoofWoof of Osmosis Labs is an excellent resource.

Protocol-Level Minimum Gas Price

Until now, Osmosis has allowed users to transact with 0 fees to make onboarding easier for new users to Osmosis who may have had difficulty acquiring the OSMO token to use for fees. With changes to the transaction fee module that allow for gas fees to be paid in any whitelisted asset and the recent listing of the OSMO token on Binance, it is now much easier to transact on Osmosis, making a 0 fee option less necessary.

The v15 upgrade implements Osmosis Proposal 354, which sets a minimum gas price of 0.0025 uOSMO at the protocol-level. When the chain upgrade is implemented, Osmosis will no-longer offer a 0 fee option. Instead, a minimum gas price is set which, when multiplied by the standard gas used for certain transactions, sets a minimum fee for transacting on Osmosis.

In the event that fees are paid in an asset other than OSMO, the minimums will be calculated based on the time weighted average price equivalent for the other asset as compared with that of OSMO over a 24 hour period.

This change will reduce the amount of transaction spam on the chain and minimize the chances of a Denial of Service (DoS) attack by increasing the cost to successfully execute such an attack. It will also supplement staking rewards by providing a source of additional real yield in the form of transaction fees to validators and their delegators.

Note: There will be no faucet for mainnet OSMO tokens to use as fees. It is highly recommended to set aside some OSMO or any of the other whitelisted fee assets to use for fees prior to the upgrade to avoid a situation in which you don’t have the necessary fees to transact on Osmosis.

Initial IBC Rate Limits

As previously discussed in the v13 upgrade article, Osmosis offers bi-directional rate limiting for IBC transfers to and from the chain. The purpose of these rate limits is to minimize losses in the event of a black swan event such as an exploit on Osmosis, a counterparty chain, or IBC itself.

The v15 upgrade sets the initial rate limit amounts for certain assets as authorized by Osmosis Proposal 427. For each of the following assets (the largest by TVL on Osmosis), the initial rate limits will be set to 30% of TVL in, 30% out over 24 hours and 60% of TVL in, 60% out over 7 days:

  • ATOM
  • USDC
  • WBTC
  • WETH
  • EVMOS
  • STARS
  • DAI
  • JUNO
  • CRO

The limits have been set well outside of peak net inflow / outflow rates to ensure a low likelihood that they will be reached in the course of normal Osmosis usage. In the event of a high-volume event on Osmosis, these limits may still be reached, causing Osmosis users to be unable to deposit or withdraw a given asset for a brief period of time.

Validator-Set Preference Module

The Validator-Set Preference Module represents a significant improvement in the user experience associated with staking of OSMO. The module allows for staking of OSMO to multiple, user-selected validators using a single transaction, making it far easier to diversify your staked OSMO.

While this makes it far more convenient to manage your stake, this also creates significant opportunities to improve UX at the front-end level for validator selection. For example, a wallet like Keplr could display multiple curated validator lists for delegators to choose from, making it easy to find and delegate to IBC relayers, core contributors, active governance participants, and more.

A wallet or staking dashboard could also feasibly allow for Osmosis users to share their own lists with each other, or even create an upvote rating system by which users can rank community created lists. An often-cited issue for new users coming to Osmosis for the first time is that they don’t know which validators to trust with their delegations. User-curated validator lists will reduce that onboarding friction.

IBC Packet Forward Middleware

While its value won’t be immediately apparent, the v15 upgrade adds an IBC packet forward middleware capability that will pave the way for unlocking the next phase in IBC ease of use.

Originally intended to be used to create an IBC router for the Cosmos Hub, packet forward middleware allows for Osmosis to route IBC message packets from one chain to another.

The simplest example of this is transfers of tokens. One dilemma inherent in IBC involves token fungibility. If Alice wants to send OSMO from Juno to the Cosmos Hub, she can’t send the OSMO directly to the Hub in one IBC transfer, because the token won’t be fungible with OSMO sent to the Hub directly from Osmosis. Instead, she must first send OSMO to Osmosis, and then execute another IBC transfer on Osmosis to send her OSMO to the Hub. This is a poor user experience that users of L1s like Ethereum don’t have to deal with.

With Strangelove’s packet forward middleware solution, Alice can now send her OSMO to Osmosis with instructions to forward it to the Cosmos Hub from there, allowing for this transfer to be reduced to one simple transaction.

This middleware is also one of several steps toward improving the capability of Osmosis outpost Dexes on other chains by allowing for outposts to execute swaps on Osmosis and forward the resulting token to its destination chain. Further upgrades to IBC are needed to fully realize this vision, but the end-result will be to create an interchain trading experience as seamless as a single-chain trading experience.

Looking Ahead

Osmosis’s concentrated liquidity implementation is nearly finished, and it’s anticipated that it will launch with the v16 upgrade. That upgrade is expected soon(tm). Look out for more information related to concentrated liquidity in the coming weeks!

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 Osmosis Community Updates by Email or Twitter and the Osmosis Support Lab by Email or Twitter

--

--