Guide to Osmosis
December 13, 2022
Osmosis is a Cosmos SDK-based blockchain powering a native decentralized exchange.
An introduction to Osmosis
Osmosis is a proof of stake blockchain built using the Cosmos SDK. It is built specifically to support automated market maker (AMM) applications, such as the Osmosis decentralized exchange. AMMs allow for assets to be traded in a permissionless manner against liquidity pools, rather than traditional order book market makers. Users depositing tokens into liquidity pools are called liquidity providers (LPs) and are essential to the operation of an AMM.
Asset prices in liquidity pools are determined based on mathematical formulas which can be tailored based on the liquidity pool. Users are incentivized to act as LPs to earn a portion of that transaction fees from the pool. In the case of Osmosis, there are additional rewards programs for LPs in the form of OSMO (the native Osmosis token) and other tokens depending on the liquidity pools offering. The OSMO token is used for staking, governance, paying transaction fees, and is the base pair for most liquidity pools.
Osmosis allows the creation of pools with customized weights (allowing the total value of one asset in the pool to be higher than the other) and even liquidity pools with more than two assets. Liquidity pools also use bonded liquidity gauges, pioneered by Balancer, as a mechanism for distributing liquidity incentives to LPs that have committed to bond for a certain length of time.
As an application-specific blockchain with control over the entire tech stack, Osmosis is able to provide features unique to AMMs. An example of this is Superfluid Staking (SFS). Based on governance approval, select pools allow LPs the opportunity to stake a portion of their OSMO provided to the liquidity pool. SFS is essentially the inverse of liquid staking – it allows for value from LP tokens to be staked. For example, a user that puts OSMO and OSMO into a liquidity pool can stake a portion of the OSMO value to increase network security and earn staking rewards, on top of the pool’s rewards for providing liquidity. There are some limitations governing the bonding period and the stakable amount in order to reduce the risk of a significant percentage of network stake coming from SFS assets. To learn more about SFS check out our article.
Features like Superfluid Staking are only possible because the Osmosis application is able to interact with the underlying consensus layer in a more sophisticated way. Another feature currently in development is threshold encryption of the mempool, which would introduce MEV resistance at the protocol level. Again, this is only possible due to the more closely connected nature of the application and the consensus layers in Cosmos SDK-based blockchains.
Osmosis serves as a liquidity gateway into the Cosmos ecosystem by enabling IBC deposits and withdrawals, as well as trading all from one simple interface. Osmosis is currently positioned as the de facto decentralized exchange for the Cosmos ecosystem with the deepest liquidity for Cosmos assets and the vast amount of messages sent via the Interblockchain Communication protocol (IBC) to and from Osmosis. Introducing permissioned CosmWasm has opened Osmosis up for outside development. External teams are building complimentary applications on Osmosis and, to some degree, are being incubated with potential to spin off onto their own chain in the future.
How to participate in Osmosis
As a PoS network, token holders participate in securing the blockchain through staking the protocol’s native token, OSMO. Token holders can participate in network security as a delegator or validator. Validators actively participate in network consensus by operating validator nodes, while delegators can delegate their staked OSMO to validators. By delegating to a validator, the user is allowing the validator to use their delegated stake to participate in consensus. A validator must garner enough stake (self-bonded + delegated) to become active and earn rewards for participating in consensus. The validator ‘active set’ is composed of the top validators ranked by stake, the number of which is determined by on-chain governance.
While operating a validator requires a level of technical competency, there is no deep technical knowledge needed to delegate. Any token holder can stake by delegating their OSMO to a validator and earn rewards in return. Delegated OSMO is locked and requires unbonding to become liquid again. Once a delegator initiates an unbonding, the tokens are locked throughout the unbonding period (21 days) and do not receive any staking rewards. If delegated to a validator outside of the active set, unbonding is immediate.
Risks of staking on Osmosis
In order to keep validators operating within the bounds of the protocol, a mechanism called slashing is used to disincentivize bad behavior. A slashing incident will burn a portion of the validator’s stake depending on the severity. When a validator is offline longer than a specified period of time, a portion of their stake is burned every block. A validator that double-signs is slashed severely and permanently removed from the active set. This is why, as a delegator, it is important to choose your validator carefully.
Downtime is penalized on Osmosis if a validator does not participate in consensus for more than 28,500 blocks in a row (approx. 48 hours). The validator is considered jailed and removed from the active set for 1 minute. Following this, the validator can submit an un-jail transaction to rejoin the active set.
Double-signing has much more potential for network harm and, thus, is penalized significantly more. Double-signing burns 5% of a validator’s total stake, and becomes tombstoned making it ineligible to be an active validator ever again. Any delegations to the tombstoned validator automatically unbonded after the slashing incident.
Governance on Osmosis
OSMO stakers can also participate in on-chain protocol governance. There are many ways in which OSMO stakers can participate in governance, from discussing topics in the Osmosis governance forum to submitting a proposal on-chain. Governance is especially important in Osmosis as it allows for the community to decide on protocol upgrades, parameter changes, community pool spends, decision signaling, and more.
Typically, a governance proposal is expected to be discussed on the governance forum before being put on-chain. Once on-chain, the proposal enters the deposit period. If the deposit is not filled before two weeks the deposit is burned and the proposal is never voted on. By requiring a deposit for collateral towards the proposal it discourages spam proposals. During the voting period, stakers are able to vote Yes, No, NoWithVeto, or Abstain and can change their vote at any time during the voting period. Delegated stake assumes the validators vote but can be overridden by the delegator voting.
For a proposal to be valid, there must be enough voting power participating to meet the quorum of 20% total staked OSMO. Voting Yes or No indicates approval or disapproval of the proposal, respectively, while voting Abstain indicates that the user wants to contribute to the quorum but not the direction of the vote. NoWithVeto is typically reserved for spam or malicious proposals and requires only 33.4% of voting power to veto the vote which burns the deposit. For a proposal to be accepted, the following criteria is required:
Quorum must be me
Majority vote must be in favor, and
NoWithVeto vote must be less than 33.4% of the participating voting power
Depending on the proposal type, a change may occur immediately, at a specific block height, or it may not change anything about the protocol level directly.
Why run Osmosis nodes with Coinbase Cloud?
Participate with confidence based on Coinbase Cloud's expertise and experience with Osmosis and broader Cosmos ecosystem. We have been an active Cosmos ecosystem validator operator since the early Game of Stakes testnet before the Cosmos Hub’s mainnet launch. Coinbase Cloud participates in Osmosis governance by voting on-chain and empowering customers to vote on-chain.
Participate with industry-leading security, including offline-generated validator signing keys, and HSM-supported secure backups
Protect your validator node from DDoS attacks with our unique node architecture and Equinix-metal infrastructure
Manage governance and participation with insights and guidance from our protocol specialists
Leverage our deep experience as a validator within the broader Cosmos ecosystem
Coinbase Cloud is trusted by the highest tiers of financial institutions for quality, reliability, and security.