SpiritSwap v3
  • 👻SpiritSwap V3 introduction
  • ✅Getting Started
  • 🗺️Roadmap
  • 📖General Resources
  • 📢Marketing Material
  • NEW! V3 FEATURES
    • ℹ️Algebra Integrations
      • 🤑Dynamic Fees
      • ⚖️Concentrated Liquidity
      • 🪙Rebase Token Support
      • 🔌Plugins
      • 🔢Adding Liquidity Guide
      • 🥇Adding Initial Liquidity (Advanced)
      • ➕Calcuating APR
    • 🛒Dollar-Cost Averaging (DCA)
      • 🔣DCA Guide
  • v2 CORE FEATURES
    • 🏧Exchange
      • 🦄vAMM
    • 🏬Liquidity
      • 🦄vAMM
      • ⚖️Balanced AMM (V2.1)
    • 💰Protocol Fees
      • 🦄vAMM fees - 0.18%
      • 🔀Stable Swap fees - 0.04% (customizable fees)
      • ⚖️(V2.1)Weighted pool fees - Dynamic
    • 👩‍🌾Yield Farms
      • 📟Gauges
      • ♻️Permissionless Ecosystem Farms (V2.5 Update)
    • 🗝️inSPIRIT
    • 🌉Bridge
    • 🧪Subcore Feature
      • 🔑Wrapped inSPIRIT
      • 🔖Ola Lending
  • TOKENOMICS
    • 🌎Overview
      • 💪REAL YIELD
    • 🪙$SPIRIT
      • ⏳Emissions
      • ❌Risks
    • 🗝️inSPIRIT
      • 🔄inSPIRIT weekly distribution
      • 🗳️Governance over SnapShots
      • 🔥Farm Boost
      • 🤑Bribes
  • BLOCKCHAIN DATA
    • ☄️Contracts
  • SOULLY'S HOW TO
    • 👨‍💻Pull SpiritSwap data feeds using Covalent API
    • 🦮Guide Overview
    • 🦊How to - Connecting to Metamask
    • 🌉How to - Bridge
    • 🔁How to -Exchange
      • 📔How to - Swapping Tokens & Limit Orders
    • 💦How to - Liquidity
    • 🧑‍🌾How to - Yield Farming
    • 🗝️How to - inSPIRIT
    • 📊How to - Dashboard / Portfolio
    • ✍️How to - Gauge Voting and Bribes
    • 🌾How to - Create a farm
    • ✅How to - Verify Contracts
      • 📃Verify Gauge Contract
    • 🖥️How to - Apply for Whitelist
  • CANTO
    • 🌉Bridging to Canto EVM
  • ARCHIVED
    • 🐵Ape mode
    • ☄️Contracts
    • 💵How to - Lending and Borrowing
Powered by GitBook
On this page
  • Weighted Math
  • Stable Math
  1. v2 CORE FEATURES
  2. Liquidity

Balanced AMM (V2.1)

The balanced AMM is a fork of the Balancer AMM architecture. This enables better trade pricing and peg maintenance of stable pairs and offers the ability to offer weighted pools.

PreviousvAMMNextProtocol Fees

First of all, SpiritSwap would like to give credit to the team at for architecting this supreme piece of technology. SpiritSwap aims to curate the best bits of DeFi available and house them in a central hub that supports the SpiritSwap ecosystem, this portion of innovation was a must have for our V2 hybrid model.

A balanced AMM utilizes both weighted math to facilitate swaps within "weighted pools" and stable math for swaps within "stable pools".

Weighted Math

The purpose of weighted math is to facilitate swaps across a wide variety of asset types, irrespective of their price correlation. In this scenario price of assets are resolved by three factors

  • Balances within pools

  • Weights within pools

  • The volume of tokens being swapped

The weighted math formula used by Balancer is a iteration of the x∗y=kx*y=kx∗y=k CPF (Constant Product Formula) The iteration accounts for cases where by n≥2n \geq2n≥2 (number of tokens within the pool are greater than two) thus allow for index style pools, while accounting for the fact that the weights of these tokens are not your standard 50/50 allocation like the traditional vAMM. The desired weight of value attributed to each token is maintained while the price of each asset changes by virtue of trades made within the pool by arbitrageurs, if effect rebalancing the pool.

Stable Math

The stable math equation is quite complex and utilized for asset classes that are required to remain at a trade value parity (i.e. as close to peg with one an other that the market will allow). With the employment of stable math these pools are expected to allow the facilitation of trades, for these asset classes, without the trader experiencing high slippage on larger volume trades. For a greater level of insight as to how the invariant is determined in this formula, we recommend referencing the original .

🏬
⚖️
Balancer
Balancer documentation