# โ๏ธ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.

First of all, SpiritSwap would like to give credit to the team at Balancer 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

### 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 documentation.

Last updated