Wavelength Explained: Stable Pools

Wavelength
6 min readNov 7, 2022

--

Introduction

Here at Wavelength, we strive to ensure we educate the community so that our users can navigate the DeFi seas with ease on the best waves possible. Crypto as an industry can be confusing at first, with so much to do and learn it is easy to make costly mistakes. If there is one thing we do not like to see, is a fellow DeFi enthusiast get hurt for no reason other than ignorance.

With the above said in mind, we would like to introduce you to our educational series Wavelength Explained. In this series, every single feature of Wavelength will be covered and broken down in a concise way with easy to comprehend language.

As an AMM built on top of the Balancer V2 framework, Wavelength’s portfolio of Liquidity Pools includes all the latest technology in the space, making it the most advanced Decentralized Exchange (DEX) on Velas Chain.

Today, we are kicking off the series with an introduction to Wavelength’s Stable Pools, a type of pool that maximizes the efficiency of swaps between assets that are expected to always trade at parity or near-parity, like stablecoins.

Stable Pools

Stable Pools were pioneered by Andre Cronje’s Curve Finance. The development of these pools marked a revolution in the DEX sector because they enabled very low slippage swaps between assets that are meant and expected to always trade at parity, or near it. Wrapped-asset pools like ETH/WETH and stablecoin pools such as USDC/USDT are both examples of the token pairings that Stable Pools were designed for.

After launching to the public, these innovative new pools quickly became popular as trading between stablecoins made up, and still does, a sizable portion of the volume in DeFi.

Essentially, the introduction of Stable Pools meant that traders could execute much larger trades before being faced with significant price impact (i.e.: slippage). Traders, however, were not the sole beneficiaries. Liquidity Providers (LPs) (and/or “yield farmers”) also benefited from the greater volume this innovation enabled because it meant more swap-fees to collect and less significant risk of impermanent loss from pool imbalance.

On launch day, Wavelength will support two stable pools:

  • $USDT/$BUSD/$USDC Pool (33% $BUSD, 33% $USDC, 33% $USDT);
  • $USDC/$BUSD Pool (50% BUSD, 50% USDC).

Moreover, as our more avid readers will already know, users can create any pools they want on Wavelength with some degree of customization. Therefore, not only will the team be looking into expanding our Stable Pool offering, but so can YOU contribute and add your own!

How Stable Pools Work

To comprehend how Stable Pools work, we must look into the math behind them and how it differs from the formula used by traditional 50/50 pools of two assets expected to fluctuate in price.

First off, let us check the equation for a supposed $ETH/$WBTC pool on Uniswap. This pool uses the constant product model, which can be described by the following equation:

Where X and Y are variables representing the amounts of tokens X and Y in the pool respectively. K is the product variant of X and Y. Solving for Y, we get:

In a two-dimensional graph, the equation is represented as:

The constant product model used in this example means there is always some liquidity in the pool because the prices of both Y and X are impacted every time this pool is used to carry out a trade. Indeed, this model is effective because these are two assets whose prices are expected to fluctuate against each other. In practice, it ends up functioning just like traditional markets, like the stock market, which use the Orderbook model that matches every buy with a sell and vice-versa. As people buy more and more of token X, the more the price of X rises and the price of Y falls until people begin selling X forcing Y’s price to increase.

However, this is not the optimal model for trading pairs where both tokens are pegged to the same asset. Such is the case of $USDC/$USDT pools.

Therefore, Stablepools use a different formula to achieve low slippage trading for tokens expected to trade at near-parity. The equation is as shown below:

Where X and Y represent tokens X and Y, and D is the sum of X and Y. As you can see, the equation for Stable Pools combines the constant product equation with the equation: X + Y = D. This equation is also known as the linear invariant model, which if applied to a Liquidity Pool, would result in constant prices for the assets in the pool and no slippage. Although at first it may look like the linear invariant model would be perfect for Stablecoin pairs, the reality is that the pool would be at constant risk of complete drainage. Such a scenario is not desired, obviously.

In a two-dimensional graph, the comparison of the equations for Stable Pools, Traditional Pools and the Linear Invariant model looks like the image below:

As the graph suggests, there is a range within which two stablecoins pegged to the $USD, or any other asset, can be traded at parity or extremely close to parity with little to no slippage. As the pool gets increasingly unbalanced, prices for both assets in the pool begin to fluctuate and traders start experiencing slippage. Furthermore, the Stable Pool invariant (Stableswap in the chart) has an “amplification coefficient” parameter: the lower it is, the closer the invariant is to the constant product.

The graph below is yet another representation of the superiority of Stable Pools over Traditional Pools for stablecoin pairs.

As the graph indicates, the line for Stable Pools (Stableswap) stays closer to y=1 (parity) than Uniswap’s for the same values of x. In other words, Stable Pools can offer near-parity trading in situations of greater pool imbalance than Traditional Pools (Uniswap).

By using Stable Pools, Wavelength is able to offer a superior trading experience, which results in larger volume and swap fees being collected and paid out to Liquidity Providers. Indeed, this creates a better environment for all participants involved.

Conclusion

In this post, we explored the benefits of Wavelength’s Stable Pools and how they work. We hope this article has made our protocol, Wavelength, easier to navigate. Stay tuned, because more articles explaining all of Wavelength’s features are on their way.

As always, do not forget to regularly check all of our social channels to stay up to date with all things Wavelength and Velas.

Follow us on TWITTER
Visit our WEBSITE
Read our DOCS

Legal Notice:

This article and any information contained in it are subject to Legal Notice. Please carefully review the Legal Notice as it contains important legal information, limitations, and restrictions relating to the information that we provide, third-party resources, and forward-looking statements.”

--

--

Wavelength

We are proud to announce Wavelength, the most advanced AMM on Velas Blockchain.