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
.
The algorithm we're using is solidly stableswap algorithm, a CFMM with the invariant:
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.
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.
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.:.
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.
Last updated