LogoLogo
HomeDappGithub
  • 🌈What is Bifrost
    • Bifrost vs Others
    • Bifrost cross-chain architecture
    • Bifrost security model
  • 🧬Tokenomics 2.0
    • Overview
    • Protocol Growth Flywheel
    • Core - bbBNC
      • How to maximize your bbBNC yield?
      • How to get or redeem?
    • BNC
    • vBNC
    • Treasury
  • 📚FAQ
    • Glossary
    • What are vTokens?
      • vETH
      • vKSM
      • vDOT
      • vFIL
      • vGLMR & vMOVR
      • vMANTA
      • vASTR
      • Validator Governance
      • XCM V3 in Bifrost
      • Mint/Redeem vToken without Dapp
    • What is LoopStake?
      • LoopStake Lending Parameters
    • What is LST Governance?
    • What is LST Stable Swap?
    • What is vToken Delegation Voting?
  • 🏃Dapp Tutorials & use cases
    • Liquid Staking on Bifrost
    • Liquid Staking on Omni LS
    • Loop Stake (Leverage Staking)
    • Governance with vDOT & vKSM
    • Providing Liquidity on DEX/Perp DEX
    • Supplying Liquidity on Money Market
    • Yield DCA
    • Farming
    • Unstaking
  • 🦸For the Community
    • Ambassadors
    • Governance
      • Overview
      • Proposal Guidelines (polkadot.js)
      • Proposal Guidelines (Subsquare)
      • OpenGov Components
      • OpenGov Tracks
        • Root
        • WhitelistedCaller
        • Liquid Staking
      • Proposal Template
        • HRMP
        • Validator Boost List
      • Bifrost Fellowship
      • On-chain Identity
    • Rainbow Boost
  • ⚒️For Builders
    • Build with SLPx
      • Overview
      • Supported Networks
        • Soneium
        • Astar
        • Manta Pacific
        • Moonbeam
        • Moonriver
        • Ethereum
      • XCM Oracle
    • vToken APIs
    • Builder Programs
      • Grants and Funding Program
      • Open Bounties
      • Bug Bounty
  • 🧩For Partners
    • Reward-Share Program (RSP)
      • Why RSP?
      • Integrate RSP
      • Claim RSP Rewards
      • Terms & Conditions
      • FAQ
    • Join The Program
    • Validator Boost List (VBL)
  • ⚖️For Collators
    • Requirement
    • Run a Collator
    • Stop Collating
  • 📦Resources
    • Tools
    • Audit Report
    • Press Kit
    • Token Icon
Powered by GitBook
On this page
  • Overview
  • Why Bifrost Stable Swap is unique?
  • Liquidity Efficiency Statement
  • Invariant
  • How to Swap

Was this helpful?

  1. FAQ

What is LST Stable Swap?

PreviousWhat is LST Governance?NextWhat is vToken Delegation Voting?

Last updated 4 months ago

Was this helpful?

Overview

Bifrost Stable Pool is designed to facilitate related exchanges between vToken and Token that are expected to have similar values, such as vDOT-DOT, vETH-ETH, vKSM-KSM, etc. The Bifrost Stable Pool uses (based on StableSwap, widely promoted by Curve), which allows for large-scale exchanges to take place before encountering significant price impact, greatly improving the capital efficiency of vToken-Token exchanges.

Why Bifrost Stable Swap is unique?

As vToken is a yield-bearing token, its value will gradually increase over time compared to the corresponding Token value. Therefore, the liquidity supply anchor of vToken and Token in AMM should change with the vToken exchange rate to avoid loss for liquidity providers. The following is a comparison between pegged stable swap and correllated stable swap.

  • Pegged Stable Swap

Tokens that swap near 1:1, such as two stablecoins of the same currency

  • Correllated stable swap

Tokens that swap near 1: R with some slowly changing exchange rate R, like vToken (eg: vDOT, DOT)

Liquidity Efficiency Statement

In Stableswap, the size of function A determines the range of stable exchange rates supported in the Stable Curve. 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 mathematical details about the A value, please refer to Invariant.

To facilitate user understanding, we express the value of A in Stable Swap as an improvement in liquidity efficiency compared to Uniswap V2.

As shown in the above figure, 100 times liquidity efficiency means:

"Exchanging 100 BNC in the stable pool with the same liquidity is equivalent to exchanging 1 BNC in the Uniswap V2 pool."


Let's take an example. Suppose a liquidity pool has the following liquidity (assuming the exchange rate between vDOT and DOT is 1:1):

vDOT
501.1872

DOT

501.1872

When a user exchanges 100 vDOT for DOT, the following results will be presented:

Uniswap V2

Input
100 vDOT

Output

90.8539 DOT

Swapped Price

0.90854

Slippage

9.146%

Bifrost Stable Pool (with A coefficient 5,000)

Input
100 vDOT

Output

99.9958 DOT

Swapped Price

0.99996

Slippage

0.004%

Conclusion

Input
100 vDOT

Output

90.8539 DOT ⇒ 99.9958 DOT

Swapped Price

0.90854 ⇒ 0.99996

Slippage

9.146% ⇒ 0.004%

Invariant

This invariant has the following properties:

  • When the token prices are closed to equilibrium(1 to 1), it’s performing close to a constant sum curve;

  • When the token prices are shifted away from the equilibrium, it’s performing close to a constant product curve.

  • The further the token prices are shifted away, the more slippage the invariant produces. This ensures that the pool can always provide liquidity even at extreme prices.

How to Swap

Basic Swap

  1. Switch the token to the desired token through the token dropdown menu on the token name

  1. Enter the number of tokens that need to be swapped, and verify the output of the transaction (price impact).

  2. Click the "Swap" button to confirm the transaction and complete the signature

Since the Stable Math equation is quite complex, determining the invariant, D is typically done iteratively. For an example of how to do this, please refer to:

Enter and click "Swap" on the left main navigation menu to enter the swap page

📚
https://miguelmota.com/blog/understanding-stableswap-curve/
bifrost.app
Stable Math
Stable Curve Coefficient: from Understanding Stable Swap (Curve)
Bifrost Stable Swap
Curve's StableSwap Invariant
StableSwap's Curve, from StableSwap whitepaper
Swap page