StableSwap Invariant
An easy to swap Bitcoin-pegged assets, with a seamless user experience.
Last updated
An easy to swap Bitcoin-pegged assets, with a seamless user experience.
Last updated
BitFLUX is an automated market maker (AMM) function focused on swapping between correlated assets - that include pegged-value cryptos (bitcoins) - with minimal slippage for traders and more efficient trading for liquidity providers. This includes different versions of bitcoins.
BitFLUX is a hybrid AMM that combines both Constant Product and Constant Sum models, and the following chart shows the stableswap algorithm in relation to constant product and constant sum invariants.
This means that the sum of the assets remains constant, which helps maintain stable prices with minimal slippage. This model is particularly effective when trading assets with similar values.
This allows for greater flexibility in pricing, accommodating larger trades but with increased slippage. The price adjusts dynamically based on the available liquidity of each asset in the pool
The algorithm is a hybrid model that combines both fixed and floating ratios to optimize for low slippage and high liquidity. It adapts between these two formulas depending on the balance of the pool, ensuring efficient trading across various market conditions
A BitFLUX pool is an implementation of the stableswap invariant with 2 or more bitcoin assets, which can be referred to as a plain pool. Alternative and more complex pool flavors include pools with lending functionality, so-called lending pools, as well as metapools, which are pools that allow for the exchange of one or more assets underlying basepools.
Constant Sum: When the liquidity pool portfolio is balanced, the algorithm functions as a fixed ratio approach through the constant sum formula, expressed as . You can observe the stableswap (blue line) staying close to the Constant Sum red line, and the price is stable.
Constant Product: As the liquidity pool portfolio becomes imbalanced, the algorithm transitions to a floating ratio using the constant product formula, expressed as . You can observe the stableswap (blue line) now resembling the Constant Product purple line, and the price becoming expensive.