Aquarius AMMs — Updates and plans for 2024

Discover how we are using Soroban smart contracts to create a new AMM ecosystem on Stellar

Aquarius
Aquarius / AQUA
6 min readJan 13, 2024

--

Today, if you browse through any Stellar-focused social media channel, you’ll find that Soroban is the predominant topic of discussion. Soroban — is an upcoming Rust-based smart contracts platform that seamlessly integrates with the existing Stellar blockchain.

This new technology is expected to go live on January 30, 2024, and the Stellar community looks forward to trying it out. If you follow us on Discord or X, you may notice that Aquarius has been a part of this journey from the beginning. In this article, we aim to share our experiences with Soroban, highlighting the milestones we achieved in 2023 and giving you a look at our exciting plans for 2024.

Soroban: New chapter for Aquarius.

2023 was a landmark year for us in exploring and advancing our capabilities with the help of Soroban. While we developed and improved our existing functionality and interfaces, our focal point was undeniably centered on developing smart contracts around Aquarius.

Since 2021, Aquarius has been actively helping improve liquidity on Stellar DEX and AMMs. We incentivized Stellar users to provide liquidity to hundreds of markets and distributed more than 6B of AQUA as rewards to market makers and liquidity providers. We received a ton of positive feedback from asset issuers who used the Aquarius platform to attract market liquidity.

Merging new capabilities of Soroban smart contracts with our existing experience enabled us to come up with a bigger vision for Aquarius, and we’ve been busy building the way forward.

We have set the following goals for the upcoming Soroban release:

  • Create and oversee our own Aquarius Liquidity pool;
  • Build and launch Aquarius’ own AMMs engine and support liquidity providers with AQUA rewards;
  • Rewrite some existing Aquarius modules using smart contracts to decentralize the protocol further.

Let’s look at the progress of our plans together and what we have already accomplished.

Building AMM engines on Soroban

During the last few months, we have built a set of Automated Market Maker (AMM) smart contracts running on the Soroban futurenet and testnet. We’ve experimented with various AMM design ideas and are currently focused on building smart contracts to manage these AMMs and use them depending on user needs. In Aquarius, we’ve integrated two AMM models, drawing inspiration from the top AMM platforms on Ethereum — Curve and Uniswap. We’ve adopted Uniswap’s Constant Product Market Maker (CPMM) model, which is effective for a broad range of assets, and Curve’s Stable Swap, known for its efficiency with correlated assets.

Curve’s Stable Swap model stands out in the decentralized finance sector for its efficiency in handling stablecoins and other asset swaps with minimal price variance. This cost-effective approach results in significantly lower slippage for trades, which is particularly beneficial for large transactions where even a minor percentage of slippage can lead to substantial value differences. Focus on stable or correlated assets also means a reduced risk of impermanent loss for liquidity providers, enhancing its appeal as a secure option in the DeFi landscape. We’re excited about bringing Stable Swaps to the Stellar network!

Also, we’ve implemented a smart contract that manages AQUA rewards distribution based on the user’s pool share. AQUA rewards will incentivize users to provide liquidity to the new Aquarius Soroban AMMs. The distribution engine runs as a set of Soroban smart contracts that will calculate and distribute liquidity rewards to LPs accordingly. This goes in line with our goals to further decentralize Aquarius. This is something that was not possible before on Stellar.

We still have a few smart contracts that need to be developed, like the Aquarius Swap Router. This smart contract provides a single interface method for performing swaps and identifying the best pool to execute a swap. This Router will be integrated into our front-end interface and be available for external applications such as AMM aggregators or wallets. These applications can use the Router to get quotes and preview the swap results, enhancing user experience and platform utility.

We’re focused on the security and reliability of our codebase, involving comprehensive testing, code reviews, and documentation. Additionally, we’ll conduct a security audit in collaboration with the Stellar Development Foundation (SDF) to address any vulnerabilities. Scalability testing is also planned to ensure efficient real-world performance. These steps represent our commitment to delivering a secure, scalable, and user-friendly platform, paving the way for a more efficient and reliable DeFi ecosystem on the Stellar network.

New UI for new AMMs

In our upcoming developments, we plan to unveil a new front-end interface for Aquarius to enhance the user experience significantly. This future update is set to include a user-friendly platform for asset swapping through the Aquarius AMM. It will also allow straightforward management of liquidity positions and LP tokens, with users able to view and claim their AQUA rewards directly within the interface.

Additionally, the interface will offer comprehensive analytics, providing insights into Total Value Locked (TVL), volume, key stats like APY, and detailed information on various AMM pools. The creation of new AMM pools will be streamlined, with functionalities to assist in setting parameters and preventing the duplication of pools.

Finally, we plan to expand our voting dashboard to support more inclusive governance, particularly for pools with over two tokens, ensuring our platform remains user-friendly and engaging.

What’s under the hood?

We currently have four ready Soroban smart contracts: Liquidity Pool Router, AMM Token, and two AMM pools — CPMM and StableSwap.

For those with a technical background, our smart contracts are available for review on the Aquarius GitHub repository.

Here is a short description of our existing smart contracts:

Liquidity Pool Router contract

This is an entry point for Aquarius AMMs. The Router contains all general information about AMM pools and creates new pools on demand. This smart contract stores information about different AMM models. The Router controls how multiple types of AMM will work for the same market pair. Currently, we have two AMM models, and more models will be added soon.

AMM Token contract

Implements the Token Soroban interface. Its purpose is to store pool shares. The new contract deploys automatically for every new AMM pool.

CPMM pool contract

This is the smart contract of the Constant Product Market Maker (CPMM) pool. We automatically create a new CPMM smart contract for every new CPMM pool. Swap fees are configurable and can be set for any new AMM pool contract.

StableSwap AMM pool contract

The StableSwap AMM model allows for two or more assets of similar value to be placed into a pool to be exchanged against each other with very low slippage, allowing users to exchange between the assets in the pool freely. Across blockchains, you can find many assets that can represent the same real-world asset. For example, you can create a StableSwap pool on Stellar with USDC, USDT, and yUSDC assets, representing real-world USD assets.

Launch timeline.

As we approach the final stages of development, we’re confident that Aquarius AMMs will be fully prepared for the Soroban release. We’re excited about the significant progress we’ve made and are eagerly anticipating the upcoming launch. This milestone marks the culmination of our dedicated efforts and the beginning of a new chapter in decentralized finance on the Stellar network.

We anticipate significant liquidity within our AMMs, and we’ve seen a lot of interest in our AMMs from ecosystem wallets, exchanges, and other DeFi products. Projects utilizing our AMMs will gain significant advantages, as their users will enjoy immediate access to diverse markets, benefit from competitive exchange rates, and tap into a greater pool of usable liquidity, thanks to the innovative design of Aquarius AMMs. We are in touch with several key ecosystem participants to get the new DeFi swaps powered by Aquarius integrated and readily available in multiple products.

Stay tuned for the big reveal, where we will showcase the power and potential of Aquarius AMMs on the Soroban platform.

--

--

Aquarius
Aquarius / AQUA

A liquidity management layer for Stellar. Powered by AQUA token