πŸ₯€
Stableswap

What is a Stableswap?

A stableswap is a product which allows users to seemlessly swap one stablecoin with another. This means that even for large trades, if a user, for example, swaps one USD stablecoin for another USD stablecoin, the number of tokens the user receives is equal to the number of tokens the user deployed for the transaction. The stableswap does this by attempting to mitigate negative slippage and by providing traders with ultra-low transaction fees, mechanisms that will be explained further down this page.
The goal is to allow for the seamless integration of a wide variety of stablecoins in the ecosystem, and a well-functioning stableswap is integral to the success of a thriving DeFi ecosystem. Thus, Rose envisions to become Aurora's leading stableswap.
At present, Rose only has stablecoins tracking the US Dollar, but we are hoping that in the future, stablecoins pegged to other major fiat currencies (Euro, Japanese Yen, etc.) and cryptocurrencies (BTC, NEAR) will be able to be traded for like assets as the Aurora DeFi ecosystem expands and offers more use cases for its international and sophisticated user base.
The current stablecoins available for trading are: USDC, USDT, DAI, FRAX, UST, MAI and BUSD.

How does Rose's Stableswap work?

Rose's stableswap is inspired by Curve. Accordingly, it has its Automated Market Maker (AMM) model integrated. Remember, one of the goals is that when trading like assets - that is, assets that should have the same value e.g. USDC and USDT, etc. - the trader does not experience so-called negative slippage. Slippage is the difference between the price before the user had their trade validated and the price at which the user actually finalized the trade. Negative slippage is when the user experiences a loss due to this price difference.
For example, Lane wants to swap her USDT for USDC so that she can farm a USDC pair on a different DEX. She currently has 5000 USDT, which is in essence equivalent to 5000 USDC. But Lane makes the mistake of swapping it on a traditional, Uniswap-forked, DEX. Because of this, she suffers from negative slippage: instead of receiving 5000 USDC, she only receives 4950 USDC, a 1% loss. Rose seeks to fix this and make sure that Lane receives a USDC amount as close to 5000 as possible.
How does Rose do it?
Unlike a Uniswap fork, which uses a constant-product AMM, Rose uses a Hybrid Constant-Function AMM (CFMM). The CFMM is the algorithm that decides how to best allocate the LP's funds to facilitate a trade. Rose's CFMM equation can be seen below:
Rose Stableswap Hybrid CFMM inspired by Curve
Where x is the total value of reserves for each asset in the LP, n is the number of assets, D is an invariant which represents the value in the LP, and A is the Amplification Coefficient, an important variable that in-part determines how profitable LPs are and the range where low-slippage swaps are best supported. The idea with fine-tuning A is to balance LPs' profitability and usage of funds while maintaining low slippage for large trades and high trading volumes.
The equation yields the following graph:
Source: Curve Whitepaper
In this example, the assets being traded for one another are assets x and y. As seen, the stableswap invariant (used by Rose) allows for swapping of assets with very little negative slippage over a greater range of liquidity than traditional DEXs.
Note that pools' individual A values are visible on our swap on the bottom right of the User Interface in the Pools tab:
Rose Stables LP (USDC/USDT/DAI) Pool Page - its A parameter is shown here
Here are the current A-values for all LPs:
Liquidity Pool
Amplification Coefficient
Stables LP (USDC/USDT/DAI)
100
FRAX/Stables LP
100
UST/Stables LP
100
BUSD/Stables LP
100
MAI/Stables LP
100
Finally, to incentivise liquidity provision while providing traders with the best possible experience, the protocol currently charges a 0.04% trading fee on every single trade. This gets split, with some of it given to LPs and some of it allocated as protocol revenue. To learn more about how these fees get distributed, see tokenomics; specifically Protocol Revenue.
In the future, A and the trading fees are going to be changed for existing pools through our DAO's governance, where participants propose their change, make their case in the forum, and finally have their proposal voted on for on-chain implementation.
For more in-depth analysis of how A affects LPs and how it is fine-tuned, we recommend to read the discussions and analyses provided on Curve's docs, technical docs, governance page, and Twitter. The development team is also more than happy to engage in technical discussions regarding the mechanisms surrounding our stableswap. You can find us 24/7 on our Discord, Telegram, and Twitter.