# Introduction

Stableswap is a type of amm algorithm that offers low slippage trading for two assets that are **highly correlated** in nature. For exmaple, it is very suitable for pairs like `USDC<>FUSD` and `stFlow<>Flow`.&#x20;

The algorithm we're using is solidly stableswap algorithm, a CFMM with the invariant:

$$
x^3 y + x y^3 >= K
$$

It's simple and elegant, doesn't consume a lot of onchain computation units comparing with other complex stableswap algorithms, yet it provides a much smaller slippage than the cpamm dex, and  enables more capital efficiency with the same amount of liquidity.&#x20;

<figure><img src="/files/XgQdJb9Or0fedWme4kw4" alt=""><figcaption></figcaption></figure>

The original solidly stableswap curve works well for "hard" pegged assets, for example, stablecoins USDC/USDT/FUSD, or different version of bridged BTC like ceWBTC/whWBTC et al., but it's still subject to arbitrages for liquid staking assets (`stFlow`) - as stFlow's value (against flow) increases over time due to the auto-compounding of staking rewards.&#x20;

To make it more suitable for liquid staking pairs, we've extended the original solidly stableswap algorithm further, which we call it "weighted-solidly-stableswap-curve", i.e.:.

$$
(px)^3y +(px)y^3 >= K; s.t.: p = stFlow/Flow
$$

Where `p` is the weight and taken from Liquid Staking smart contracts directly. After each epoch advancement, it'll increase value and then the bonding curve will be adjusted a little bit automatically.

<figure><img src="/files/81CDRq3ZaKsH5Xs1cMaH" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.increment.fi/protocols/decentralized-exchange/stableswap-dex/introduction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
