Bifrost Stable Swap: correlated StableSwap pools for vToken/Token pairs
Thread489 words
Explains Bifrost's StableSwap pool for yield-bearing vTokens and their base tokens, using a correlated rather than pegged curve. Example: 100 vDOT swap gives 90.8539 DOT on Uniswap V2 (9.146% slippage) versus 99.9958 DOT (0.004%) with A=5,000.
Key claims
With A=5,000 a 100 vDOT swap yields 99.9958 DOT at 0.004% slippage
Uniswap V2 yields 90.8539 DOT at 9.146% slippage on same pool
0/ @BifrostFinance has just launched their Stable Swap function on the Bifrost-Kusama network! ๐
This function will increase the efficiency of vToken/Token swaps on Bifrost by lowering slippage and providing better swap rates! ๐
A ๐งต on how it works! (0/15) ๐
1/ ๐ Overview
@BifrostFinance Stable Pool is created to facilitate exchanges between vTokens & their respective Tokens (e.g., vDOT-DOT, vETH-ETH) that are anticipated to have near-equal values.
2/ Leveraging StableSwap's framework, established by Curve, it can accommodate extensive trades with minimal price alterations, optimizing the efficiency of such exchanges.
3/ vTokens are yield-bearing, meaning their value will gradually increase over time compared to the corresponding Token value.
4/ Therefore, the liquidity supply anchor of vToken and Token in AMM should change with the vToken exchange rate to avoid loss for liquidity providers.
5/ ๐ Comparing Stable Swap Mechanisms
๐น Pegged Stable Swap: Tokens that swap at a roughly 1:1 ratio, typically like two identical stablecoins.
๐น Correlated Stable Swap: Tokens swapping near a 1:R rate, with 'R' being a slowly shifting rate (e.g. pairs like vDOT to DOT)
6/ ๐งฎ Liquidity Efficiency
Within Stableswap, the 'A' function determines the extent of stable exchange rates the Stable Curve can support.
7/ The larger the A value, the more liquidity is available to support constant prices.
Conversely, the smaller the A value, the less liquidity is available to support constant prices.
For more mathematical details about the A value, please refer to the Invariant section.
8/ ๐ Interpreting Stable Curve Coefficient
In the Stable Swap context, 'A's value represents an improvement in liquidity efficiency relative to Uniswap V2.
9/ For clarity:
100x liquidity efficiency implies that swapping 100 BNC in a stable pool, given the same liquidity, is analogous to swapping 1 BNC in the Uniswap V2 pool.
10/ ๐ Practical Example
Consider a liquidity pool (vDOT & DOT both at 501.1872 with a 1:1 rate):
๐น Uniswap V2: 100 vDOT swap yields 90.8539 DOT (9.146% slippage).
๐น Bifrost Stable Pool (with A coefficient of 5,000): The same swap results in 99.9958 DOT & 0.004% slippage.
11/ As we can see, @BifrostFinance showcases significant slippage minimization:
๐น From an input of 100 vDOT:
๐น Output transition: 90.8539 DOT (Uniswap) to 99.9958 DOT (Bifrost).
๐น Slippage shifts from 9.146% (Uniswap) to 0.004% (Bifrost).
12/ ๐ง On the Invariant:
Determining the invariant, termed 'D', within the Stable Math framework is iterative due to its complexity.
13/ The invariant's behavior:
๐น Approaches a constant sum curve when token prices align closely to a 1:1 equilibrium.
14/
๐น Resembles a constant product curve as prices veer away from the equilibrium. Strong deviations lead to increased slippage, ensuring liquidity even at highly disparate price points.
15/ For a deeper technical dive, one can refer to Curve's StableSwap Invariant documentation.
I hope you've found this thread helpful! ๐ซก
Follow me @zerokn0wledge_ & @BifrostFinance for more! ๐
Like/Repost of the quoted post below highly appreciated! ๐๐
3 images on X
What came next ยท since 23 Sep 2023
Show how the covered asset moved
This explainer walks through how things work without making a call on the token, so price moves since publication are shown as market context.
Covered, no call
Since then
Zero has written 5 more pieces on Bifrost Finance and $BNC since this one.
- Bifrost vToken Voting: governing Polkadot with liquid staked vDOTOn Bifrost
- Bifrost liquid staking data: TVS by asset and SALP locked valueCovers $BNC
- Bifrost September 2023 recap: vDOT volume, TVL and vToken votingCovers $BNC
- Bifrost omnichain liquid staking: SLP pallet and headquarters plus branch modelOn Bifrost Finance
Daily closes in USD from DefiLlama and Yahoo Finance. Only a bullish or bearish call in a thesis or market take is tracked; explainers, lists, maps and mentions are neutral context. Not financial advice.