# (V2.1)Weighted pool fees - Dynamic

Weighted pools will fall under a variable fee structure, whoever sets up the pool can determine the overall fee.\
\
For example if Reaper set up their own weighted pool, they could set the fee on this pool at 1% if they desired.&#x20;

{% hint style="info" %}
Any pools created by SpiritSwap will fall under our vAMM fee structure of 0.18% to keep swap fees as consistent as possible.&#x20;
{% endhint %}

![](https://3699463413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoaFZ0hNv5IpR4uiYMgBF%2Fuploads%2F9W7n2qKmktbOVbsHaPPb%2Fimage.png?alt=media\&token=630e1c95-7849-4067-b9ed-f75dedfd4a99)

## Fee distribution (based on 0.18% fee)

{% hint style="info" %}
**Terminology Key:**&#x20;

**LP (Liquidity pool):** This is a percentage of the overall fee that gets allocated to LP providers \
\
**Weighted Fee:** This is a percentage of the fee that gets distributed in accordance with the "weighted pool structure". This fee is distributed in different ways, depending on variable factors.&#x20;
{% endhint %}

> 1/2 of weighted fees will be allocated to the LP (0.09% fee) - **This will always be the case no matter what**. This is an invariable factor of the fee model.<br>
>
> 1/2 of weighted fees will go the following “weighted fee structure” (0.09% fee) \
> Token 1 = 0.045% of the “weighted fee structure” \
> Token 2 = 0.045% fee of the “weighted fee structure”

**How the weighted fee structure is then distributed, is dependent on a few factors.**\ <br>

![](https://3699463413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoaFZ0hNv5IpR4uiYMgBF%2Fuploads%2FKhZipuYUzPlNCeXgEdP8%2Fimage.png?alt=media\&token=4f4f64a9-a473-432e-9bac-476c001f8a4a)

## **Weighted Fee Factors:**&#x20;

**Factor 1:** \
If token 1 &/or 2 is **SPIRIT**, **Non protocol stable (USDC, DAI, fUSDT)**, **FTM**, **wBTC**, **wETH** or **any other Layer 1** e.g AVAX, this would mean a weighted fee allocation as follows; \
\
A: *12.5% of the overall fee of (0.18%) would go to Spirit DAO treasury.* \
\
*B: 12.5% of the overall fee of (0.18%) would go to the Spirit maker contract for inSPIRIT distribution.*\
\
**Factor 2:** \
If token 1 & /or 2 is any other token (excluding those mentioned in Factor 1 ), protocols will receive a quarter of the “weighted fee distribution”;

*A: 12.5% of the overall fee of (0.18%) would go to would go to our partner project treasury (protocol fee).* \
\
*B: 12.5% of the overall fee of (0.18%) would go to the Spirit maker contract for inSPIRIT distribution.*

![](https://3699463413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoaFZ0hNv5IpR4uiYMgBF%2Fuploads%2FkhGMcALAbDoQBMquAts2%2Fimage.png?alt=media\&token=64c2e4e7-a69a-411d-ba10-67f9d4722e3e)

## Examples:

**Example 1:**&#x20;

If there was a weighted pool for OATH - FTM LP set at a swap fee of 0.18%, distribution of the fee would be as follows:

**LP:**

* [x] 50% of the overall fee is going to the LP as this is an invariable factor (it will always happen)

**Weighted Fee Structure:**&#x20;

* [x] 25% of the overall fee is going to SpiritMaker as per “weighted fee structure” (factors 1B & 2B)
  * [x] *12.5% of the fee is taken for SpiritMaker from token 2 (FTM factor 1B)*
  * [x] *12.5 % is taken for SpiritMaker from token 1 (OATH factor 2B)*
* [x] 12.5% of the overall fee is going to Spirit DAO as per "factor 1A" (for FTM side of the LP)
* [x] 12.5% of the of the overall fee is going to reaper as per “factor 2A" (for OATH side of the LP)

**Example 2:**&#x20;

If the weighted pool comprised of OATH - LQDR LP (2 protocol tokens), only factor 2 is engaged in this "weighted fee structure" as neither of the tokens in the pair fall under the parameters highlighted in factor 1.

**LP:**

* [x] 50% of the overall fee is going to the LP as this is an invariable factor (it will always happen).

**Weighted Fee Structure:**&#x20;

* [x] 12.5% of the overall fee (0.0225%) go to Reaper protocol as per token 1(OATH)“factor 2 A”
* [x] 12.5% of the overall fee (0.0225%) go to Liquid Driver protocol as per token 2(LQDR)“factor 2 A”
* [x] 25% of the overall fee is going to SpiritMaker as per “weighted fee structure”
  * [x] *12.5 % is taken for SpiritMaker from token 1 (OATH) as per “factor 2 B"*&#x20;
  * [x] *12.5 % is taken for SpiritMaker from token 2 (LQDR)* *as per “factor 2 B*"&#x20;

**Example 3:**&#x20;

If the weighted pool comprises of two protocol based tokens from the same protocol e.g (gSCARAB - SCARAB) from Scarab Finance.

**LP:**&#x20;

* [x] 50% of the overall fee (0.09%) would go to the LP would go to the LP as this is an invariable factor (it will always happen).

**Weighted Fee Structure:**&#x20;

* [x] 25% of the overall fee (0.045%) would go to Scarab protocol as per "factor 2A" for both tokens (1 & 2)
  * [x] 12.5 % of the overall fee (0.0225%) from token 1 (gSCARAB) as per token 1 factor 2A
  * [x] 12.5% of the overall fee (0.0225%) from token 2 (SCARAB)as per token 2 factor 2A
* [x] 25% of the overall fee (0.045%) would go to SpiritMaker for inSPIRIT distribution as per "factor 2B" for both tokens (1 & 2)
  * [x] 12.5 % is taken for SpiritMaker from token 1 (gSCARAB) as per token 1 factor 2B
  * [x] 12.5% of the fee is taken for SpiritMaker from token 2 (SCARAB) as per token 2 factor 2B

The Weighted fee structure has been constructed in a manner that still employs the positive feedback loop of the [vAMM fee model](https://docs.silverswap.io/spiritswap-v2/core-features/protocol-fees/vamm-fees-0.18), but aligns closer with the weighted pool contracts from the original balancer infrastructure.&#x20;
