Deploy an Astroport Outpost on Osmosis

Summary

This proposal seeks to deploy an Astroport Outpost on Osmosis for the purpose of integrating Passive Concentrated Liquidity (PCL) pools with the cosmwasm pool module. This proposal will result in 2 separate on-chain proposals. The first is to whitelist the Astroport Builder Multisig for code uploads and the second is to allow the PCL code ID to be used in CosmWasm pools.

Motivation

The Astroport and Osmosis protocols appear similar on the surface. Both enable on-chain liquidity provisioning and swapping for Cosmos-based tokens. And both have leaned into offering “concentrated liquidity” pools – that is pools, which concentrate or amplify liquidity around prevailing prices to improve their trade efficiency. Under the surface, though, the protocols take very different approaches that we believe are powerfully synergistic.

Osmosis’s flagship pool is the supercharged liquidity pool. That is a concentrated liquidity pool that gives LPs the ability to set price ranges for the assets they deposit into supercharged pools. By offering this level of granular control, LPs can mitigate potential impermanent loss and improve their returns.

This added control does however require more active management of the LP’s positions to fully maximize returns and ensure their liquidity is being utilized.

Astroport’s passive concentrated liquidity (PCL) pools on the other hand aim to give LPs the benefits of concentrated liquidity pools without requiring active management. PCL pools do this by using an advanced repegging algorithm.

This algorithm looks at ongoing trades and rebalances liquidity and fees around the exponential moving average of those trades. The moving average determines a specific price range around which to amplify trades. If prices move outside the range, the repegging algorithm automatically sets a new price range.

While supercharged liquidity and PCL pools may look like competitors, PCL pools are better viewed as an evolution of passive XYK pools. They should perform 2-3x better than XYK pools, while requiring no active management. Supercharged liquidity pools on the other hand can and often will outperform PCL pools when being used by a highly skilled and active LP.

Professional market makers, for instance, often run their own internal algorithms and programmatically readjust their liquidity to match market conditions in real time. These power users are more apt to use Osmosis-style supercharged liquidity pools.

More casual LPs typically take a “deposit and chill” approach. They prefer to deposit once and let the pool’s algorithm concentrate their liquidity automatically.

Rather than competitors, then, supercharged liquidity and PCL pools complement one another. And by offering them both on Osmosis, they should grow the “liquidity pie” for both protocols in a mutually beneficial way. Specifically, the move should:

  1. Expand Astroport’s reach to the largest and most important DEX in the Cosmos ecosystem, and grow it’s global trading volume and fee generation in the process
  2. Attract more liquidity on Osmosis and give Osmosis LPs more optionality/pool types to choose from
  3. Improve capital efficiency for anyone who swaps (or has trades routed through) Osmosis
  4. “Defragment” liquidity, which may be spread across other AMMs throughout the Cosmos

Standard PCL pool fees apply and will flow back to xASTRO stakers. In addition, all trades that are routed through the Astroport’s PCL pools on Osmosis will generate a 10 basis point (0.1%) fee for Osmosis, which will be split between the Osmosis community pool and the OSMO staking pool.

If this proposal is approved, it would signal the Osmosis community’s intent to establish an Astroport outpost on Osmosis, which would exclusively offer PCL pools on the Osmosis blockchain.

To kickstart adoption of PCL on Osmosis, Astroport contributors believe it’s imperative to reward early LPs with ASTRO emissions. These rewards should target higher-volume pools to maximize PCL’s advantages and offer more rewarding options for LPs. A preliminary list of pools includes the following: NTRN/USDC, INJ/USDC, LUNA/USDC, SEI/USDC, DYDX/USDC, ASTRO/OSMO, TIA/OSMO with target APYs ranging from 4% to 40%. An Astroport proposal suggesting exact emission amounts by pool is expected in the coming days.

Limitations of the Outpost

Although Astroport seeks to deploy an entire Outpost, it has the following restrictions:

  1. Only the PCL pool type will be available. The XYK, Stableswap and Transmuter pools will not be deployed.
  2. PCL cosmwasm pool creation are permissionless, however, they can only be deployed via Astroport’s Factory contract. Note that the creation is not currently supported on the Osmosis front-end and needs to be done via the Astroport frontend instead

Contracts and testing

Over the past few months the team developed an Osmosis specific version of the PCL pool. Further, we completed the work on the Osmosis frontend to be able to route trades through this new pool type. Both have been tested on testnet and is ready for deployment on mainnet.

The team will deploy the following contracts:

  1. Satellite v1.2.1
    The Satellite contract connects this deployment to Astroport Governance
  2. Osmosis-specific Factory v1.0.0
    The Pool Factory contract that deploys new pools, specific to Osmosis
  3. Osmosis-specific PCL v1.0.0
    The Osmosis-specific Passive Concentrated Liquidity pool

Audit

All the contracts that will be deployed has been audited by Oak Security and is available at audit-reports/Astroport at master · oak-security/audit-reports · GitHub

Address

The Astroport Builder Multisig on Osmosis is a 2/3 native multisig with the following address:
osmo1yyw80yqf7vytg6l9mtjlj8ru6egd3svvl77zye

Timeline

Once the proposal passes, the team will upload and instantiate the required contracts, connecting the Outpost to Astroport’s governance. At that point the second on-chain proposal will be posted to whitelist the code ID of the PCL contract in the cosmwasm pool module

Links

Astroport: Astroport. The future of trading.
GitHub: Astroport · GitHub
More on PCL pools: Astroport unleashes first passive concentrated liquidity (PCL) pool on Terra | by Astroport | Medium

Conclusion

An Astroport Outpost on Osmosis would be mutually beneficial for both protocols. Astroport would get access to a new userbase of LPs and swappers. And Osmosis would offer LPs a new pool type that’s been audited and battle tested across multiple Cosmos chains. All trades routed through the pool would generate fees for both protocols, earn some LPs ASTRO rewards, and help cement Osmosis’s role as the liquidity hub for all the Cosmos. If approved, the proposal will indicate the community’s willingness to proceed with the integration.

Amendments

Proposal 779 has been added to correct the spot price query on the pools to provide accurate asset pricing in the pool

Proposal 791 has been added to remove the decimal format in spot price queries

5 Likes

Excited for this!
Astroport pools will bring a new mechanism for more passive liquidity providers to earn fees in a more optimal way!

2 Likes

Personally super excited about this, Stakecito will be voting yes on it if it goes onchain.

2 Likes

Does this mean the PCL only resets itself when the price is moving outside of the set price range by the algorythm?
So there is a process which detects the fact that the price is outside of the boundaries and updates the boundaries of a result?

How does this work? Will this still work via the Astroport front-end, where the trade itself is executed on the Osmosis-DEX? If there is a need for IBC-transactions that is all handled by the outpost?

Furthermore, suppose there are similar pools on both Astroport itself and on Osmosis. How will the Outpost behave? Which pool will be used?

Does this mean the PCL only resets itself when the price is moving outside of the set price range by the algorythm?

Not quite, it’s a bit more complex than that. Here is an excerpt from our documentation:

The pool is continually monitoring the market and performs a series of checks to decide whether it’s advantageous to re-peg. This re-pegging process is governed by a simple condition: the pool will only adjust its Price Scale if the net gains from fees are substantial enough to offset at least half of the potential Impermanent Loss from re-pegging.

More details on the exact mechanics is available in How PCL Pools Work. It’s a bit too long to cover here.

Will this still work via the Astroport front-end, where the trade itself is executed on the Osmosis-DEX? If there is a need for IBC-transactions that is all handled by the outpost?

You can trade via the Astroport front-end if you want, but those trades are executed via the Osmosis DEX and not directly against the pool. Everything goes through Osmosis instead.

Same is true for IBC transactions. It will continue to work as it is now, all IBC transactions will be done through Osmosis which under the hood may use the Astroport pools.

Furthermore, suppose there are similar pools on both Astroport itself and on Osmosis. How will the Outpost behave? Which pool will be used?

With Astroport being deployed on 4 other chains as well there may be overlap in pools available on Osmosis and some of the other deployments. If that happens aggregators may use the route that provides the best execution. As Astroport itself doesn’t do aggregation, that falls outside our control

I hope I’ve provided everything you were looking for, if not, please let me know on which part I can expand more

1 Like

Good point here, I forgot that you select the chain to do the swap on already on the front-end. I was more thinking in terms of an aggregator where the most optimal route needs to be found. But that is not the case here.
image

Thanks for your answers!

One final one; this will need new pools to be created on Osmosis with the PCL setup, right?
Existing Osmosis pools will not show up on the AstroPort Outpost front-end?

One final one; this will need new pools to be created on Osmosis with the PCL setup, right?
Existing Osmosis pools will not show up on the AstroPort Outpost front-end?

Correct, new pools will need to be created and existing Osmosis pools will not show on the Astroport frontend.

We expect the vast majority of trading to happen via IBC or on the Osmosis frontend which is why we implemented the changes needed for the Osmosis frontend to support these pools as well.

Thanks for all the answers!!!

Cool. It brings a good synergy. Will vote Yes.