Osmosis Liquidity Mining 101
Tags: Amm, Osmosis, Yield Farming, Cosmos, Liquidity Mining

Osmosis is an automated market maker (AMM) protocol built for liquidity providers. Therefore, it should be governed and owned by liquidity providers. Over time, the largest allocation of OSMO tokens is set aside for liquidity incentives to reward liquidity providers for their contributions and give them an ownership stake in the future of the protocol.

The process for earning these liquidity incentives is known as liquidity mining. While many within the Cosmos ecosystem are familiar with concepts like staking rewards and community pools, Osmosis is the first Cosmos project to introduce liquidity incentives.

Osmosis aims to be the most innovative AMM across all ecosystems. Osmosis has many planned features in development to improve LP incentives beyond what current AMMs have been able to accomplish.

In this post, we will cover the process of how liquidity incentives are chosen, earned, and distributed on Osmosis.

Liquidity Providing

Providing liquidity (called “LPing”) is the process of depositing assets into an AMM pool. AMMs are decentralized finance protocols that allow for the swapping of assets without a centralized intermediary. Just as trading firms make traditional markets, AMMs establish prices and facilitate trades using permissionless liquidity pools into which users can deposit assets.

For example, if Pool #1 is the OSMO<>ATOM pool, users can deposit OSMO and ATOM tokens into the pool and receive back Pool1 share tokens. These Pool1 share tokens (called LP tokens) represent one’s proportional ownership of the pool.

Liquidity pools have specific ratios at which assets must be deposited. Most AMMs require that assets be added at a 50–50 ratio (the total value of Asset 1 is equal to the total value of Asset 2). Similar to Balancer protocol, Osmosis allows for 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.

Users pay a fee to buy and sell from these liquidity pools. These transaction fees are added to pool assets, essentially resulting in a pro-rata distribution to LP share holders. (Since one’s proportional ownership of the pool remains constant, as the total amount of liquidity in these pools increases due to fees, one’s total contributions also increase.)

Liquidity provision is not without costs. LPs take on a risk known as impermanent loss. It essentially means that users would have earned more simply by holding the assets than depositing them into liquidity pools. When the price of the assets in the pool change at different rates, LPs end up owning larger amounts of the asset that increased less in price (or decreased more in price). For example, if the price of OSMO moons relative to ATOM, LPs in the OSMO-ATOM pool end up with larger portions of the less valuable asset (ATOM).

Impermanent loss is the difference in net worth between HODLing and LPing. Liquidity mining helps to offset impermanent loss for LPs.

Impermanent loss is mitigated in part by the transaction fees earned by LPs. When the profits made from swap fees outweigh an LP’s impermanent loss, the pool is self-sustainable.

To further offset impermanent loss, particularly in the early stages of a protocol when volatility is high, AMMs utilize liquidity mining rewards. Liquidity rewards bootstrap the ecosystem as usage and fee revenues are still ramping up.

Osmosis also has many new features and innovations in development to decrease impermanent loss as well.

Bonded Liquidity Gauges

Many AMMs are plagued by short-term mercenary farming, in which liquidity providers quickly remove and add back liquidity from pools in pursuit of the best yields. AMMs sometimes encourage this type of farming through “vampire attacks,” in which a protocol offers special incentives to liquidity providers from other protocols for migrating their liquidity over.

If enough LPs are engaging in short-term yield strategies, it can cause a serious disruption to the quality of the AMM. Liquidity within pools becomes volatile, resulting in an inconsistent and unreliable trading experience for users.

Instead, with Osmosis we want to build a platform conducive to Long-Term Liquidity. Osmosis reduces short-term farming through two mechanisms: Exit Fees (a small fee LPs pay when withdrawing liquidity from a pool) and Bonded Liquidity Gauges.

Bonded Liquidity Gauges are mechanisms for distributing liquidity incentives to LP tokens that have been bonded for a minimum amount of time. 45% of the daily issuance of OSMO goes towards these liquidity incentives.

Osmosis users can choose to bond their LP tokens after depositing liquidity. Similar to OSMO staking, LP tokens remain bonded for a certain length of time, except users are allowed to choose the length of their own unbonding period. Staking requires a two-week unbonding period.

When a user wants to stop bonding an LP token, they submit a transaction that begins the unbonding period. After the end of the timer, they can submit another transaction to withdraw the tokens.

Bonded Liquidity Gauges distribute liquidity incentives to LP tokens with specific bonding lengths. For instance, a `Pool 1 LP share, 1-week` gauge would distribute rewards to users who have bonded Pool1 LP tokens for one week or longer. The amount that each user receives is in proportion to the number of their bonded tokens.

A bonded LP position can be eligible for multiple gauges. Qualifications for a gauge only involve a minimum bonding time.

Let’s explore with an example:

The rewards earned from liquidity mining are NOT subject to unbonding. Rewards are liquid and transferable immediately. Only the principal bonded shares are subject to the unbonding period.

Allocation Points

Not all pools will have incentivized gauges. In Osmosis, staked OSMO holders choose which pools to incentivize via on-chain governance proposals. To incentivize a pool, governance can assign “allocation points” to specific gauges. At the end of every daily epoch, 45% of the newly released OSMO (the portions designated for liquidity incentives) is distributed proportionally to the allocation points that each gauge has. The percent of the OSMO liquidity rewards that each gauge receives is calculated as its number of points divided by the total number of allocation points.

Take, for example, a scenario in which three gauges are incentivized:

Gauge #3 – 10 allocation points

Gauge #4 – 5 allocation points

Gauge #7 – 5 allocation points

20 total allocation points are assigned in this scenario. At the end of the daily epochs, Gauge #3 will receive 50% (10 out of 20) of the liquidity incentives minted. Gauges #4 and #7 will receive 25% each.

Governance can pass an `UpdatePoolIncentives` proposal to edit the existing allocation points of any gauge. By setting a gauge’s allocation to zero, it can remove it from the list of incentivized gauges entirely. Proposals can also set the allocation points of a new gauge. When a new gauge is added, the total number of allocation points increases, thus diluting all the existing incentivized gauges.

Gauge #0 is a special gauge that sends its incentives directly to the chain community pool. Assigning allocation points to gauge #0 allows governance to save some of the current liquidity mining incentives to be spent at a later time.

External Incentives

Osmosis not only allows the community to add incentives to gauges. Anyone can deposit tokens into a gauge to be distributed. This feature allows outside parties to augment Osmosis’ own liquidity incentive program.

For example, there may be an ATOM<>FOOCOIN pool that has a one-day gauge incentivized by governance OSMO rewards. However, the Foo Foundation may also choose to add additional incentives to the one-day gauge or even add incentives to a new gauge (such as one-week gauge).

These external incentive providers can also set up “long-lasting incentive programs” that distribute rewards over an extended time period. For example, the Foo Foundation can deposit 30,000 Foocoins to be distributed over a one-month liquidity program. The program will automatically distribute 1000 Foocoins per day to the gauge.

Genesis

At genesis, the only gauge that will be incentivized is Gauge #0, (the community pool gauge). However, a governance proposal can come immediately after launch to choose which gauges/pools to incentivize. Governance voting period at launch is only 3 days at launch, so liquidity incentives may be activated as soon as 3 days after genesis.

Conclusion

Allowing governance to shape the liquidity rewards makes Osmosis better equipped than other Cosmos AMMs to bootstrap new pools and to address low liquidity in existing pools. The Osmosis community will be able to formulate strategies with the liquidity rewards to continuously improve the protocol.

Over time, new types of Gauges will be added besides Bonded Liquidity Gauges, that distribute incentives using mechanisms besides bonding length. Examples could include trading volume gauges, impermanence loss gauges, and more! We’d love for the community to contribute and propose new strategies of rewarding users of the platform.