Osmosis v7.0.0 — Carbon Upgrade

RoboMcGobo
Osmosis Community Updates
6 min readFeb 27, 2022

--

On February 28, at block height 3401000 (Approximately 20:00 UTC), The Osmosis blockchain will undergo one of the most important upgrades in its history: the v7 upgrade. Dubbed “Carbon” by the development team, v7 will be packed with several long-awaited features, including the highly anticipated Superfluid Staking module! This article will briefly explain the major features included in v7 and the impact they will have on the Osmosis user experience. For a more detailed list of new features, check out the changelog and the upgrade proposal, which is currently in voting.

Superfluid Staking

Superfluid Staking has finally arrived, and will be implemented into the Osmosis mainnet when the upgrade goes live. For the uninitiated, Superfluid Staking will allow you to stake your 14-day bonded LP shares with a validator and earn a portion of the Osmosis staking APR in addition to the APR you already get from bonding your LP shares in a liquidity pool. At launch, Superfluid Staking should be treated as a Beta test. As such, there will be several temporary limits on superfluid functionality to allow the development team to integrate it as easily as possible and reduce potential points of failure. These limits are as follows:

  • Only Pool #1 (ATOM/OSMO) LP shares will be eligible for Superfluid Staking at launch. More pools can be added via governance.
  • LP shares can only be staked to one validator per pool
  • You can’t use staked LP shares to vote on governance proposals, but the validator to whom you delegate your LP shares can vote them for you.

These limitations are temporary, and increased functionality will be implemented in future upgrades.

In addition, Superfluid Staking will come with a built-in “superfluid discount factor” parameter, which reduces the percentage of eligible LP shares that can be staked using Superfluid Staking by a pre-set amount. This parameter can be changed though governance, but at launch the discount parameter will be set to 50%. To illustrate how this works, let’s take a hypothetical example:

  • Wosmongton has $1000 USD worth of liquidity bonded for 14 days in the ATOM/OSMO pool. To keep the numbers simple, lets assume that amounts to 10 ATOM and 10 OSMO.
  • Superfluid staking will allow Wosmongton to stake those LP shares and earn APR on the OSMO half of that liquidity (10 OSMO / $500). This gives him an effective Superfluid Staking APR of half of the staking rate (80% APR at the time of writing). Under this scenario, the APR offered by superfluid staking will be 40% plus the Pool 1 APR of 76%, for a total of 116% APR.
  • However, the 50% discount factor will reduce the number of LP shares eligible for Superfluid Staking by an additional 50%, meaning only half of Wosmongton’s OSMO liquidity will be counted (5 OSMO / $250). Thus only 25% of Wosmongton’s total Pool 1 liquidity will be eligible for Superfluid Staking. Consequently, the effective staking APR will be 25% of the staking rate. With the discount in place, Wosmongton’s total APR is now 20% + 76% = 96%.

One final note on Superfluid Staking. If the validator to whom LP shares are staked is slashed 5% for double-signing, the entire LP share delegated to that validator is also subject to a 5% slash. This means that even though 25% of pool 1 liquidity is eligible to earn rewards via Superfluid Staking, 100% of the liquidity is at risk of a 5% slash. In our example above, Wosmongton would see 0.5 ATOM and 0.5 OSMO ($50) of his liquidity slashed. Please note that validator slashing is exceptionally rare, and unlikely to happen.

CosmWasm Basic Integration

The Carbon upgrade will bring with it the initial CosmWasm integration into the Osmosis blockchain. For reference, this is part one of the CosmWasm integration promised in Proposal 107. Part two of the integration promising more advanced features will be included in a subsequent upgrade.

This CosmWasm integration is the first step to allowing for permissioned smart contracting capability on Osmosis, which will enable d’apps and additional functionality to be built directly on top of the Osmosis blockchain. These smart contracts will be permissioned, meaning that any application or wishing to build on Osmosis will need to seek approval to do so via Osmosis governance first.

Proposed use-cases for these smart contracts include the ION DAO / IONize proposals, as well as the decentralized lending protocol known as Isotonic. While these features can now begin development, part two of the CosmWasm integration will be needed to fully realize each project’s ambitious vision.

IAVL Fast Storage and Reduced Epoch Delays

You may have noticed that epoch delays have gotten much shorter recently. In fact, epoch block times have gone from over 20 minutes to just below 4 minutes after a series of software upgrades to the IAVL data structure by the Osmosis development team (special shoutout to R0man, who has taken the lead on this). Carbon will include the latest of these upgrades, which could see us at epoch times as low as one minute or less!

Without going into too much detail, IAVL plays a role in transmitting data from a node’s hard drive to it’s RAM. The IAVL upgrades allow for more RAM to be utilized on a node, which drastically increases its processing speed. As a result, epoch block times will be significantly decreased.

Mempool Filtering to Prevent Arbitrage Bot Spam

Osmosis is one of the few DeFi protocols that offer zero transaction fees to interact with it. This has been a major factor in attracting liquidity and trade volume from other ecosystems where significantly higher gas fees are the norm.

One unfortunate trade-off of this zero-fee environment is occasional transaction spam slowing down the network. In past instances of network spam, it has been determined that the root-cause is usually a misconfigured arbitrage bot that fills the transaction mempool with high gas transactions. Since fees are set to zero, the bot can continue to spam the network at no cost, which has the ultimate effect of slowing down transaction times for the rest of the chain.

The Carbon upgrade offers a potential solution for this problem that doesn’t involve raising transaction fees for everyday users: mempool filtering. Following the upgrade, the chain will be able to identify arbitrage transactions and charge them a transaction fee. In the event that a misconfigured bot spams the network with transactions, the bot’s wallet will be quickly drained by fees, thereby preventing any protracted slowdown events and keeping transaction fees at 0 for everyone else.

Partial Unbonding — Sort of…

This has been a highly requested feature since the launch of Osmosis. Currently, you can only unbond all of your liquidity in a pool for any given bonding gauge. Unbonding less than all of your liquidity (such as 50% of it) has not historically been possible.

The v7 upgrade makes this feature a reality — with one major caveat. For now, this can only be done via the command line and won’t be possible on the Osmosis website. With a major front-end overhaul on the way, however, this upgrade paves the way for this feature to be included. Osmosis users should be prepared to see this feature integrated into the user interface very soon.

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

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

--

--