SafeguardPool

Safeguard parameters

The Safeguard Pool is designed to provide safety mechanisms to protect liquidity providers against extreme unexpected events, as outlined in the v2 whitepaper.

At present, the Swaap Labs team's multisig governs these parameters. The authority to adjust individual parameters is granular and can be permanently revoked if needed. The parameters have preset limits that are determined when a pool is launched.

Here's an overview of the adjustable parameters and their configuration:

By adjusting these parameters, the Swaap Labs team ensures the implementation of robust safeguards within the Safeguard Pool to protect liquidity providers against unforeseen extreme events.

Safeguard management fees

The safeguard pool implements a unique approach in fees collection. This management fee is a flat fee that depends on the pool's total supply, the elapsed time and the overall yearly fees (up to 5%).

Below is a technical description of how to derive the functions and how the fees are calculated based on total supply.

To expresses a flat and constant management fee rate we need to find a function y(t), that represents an LP's ownership of the pool, with the following properties: \forall t₂, t₁ ∈ ℝ⁺ ∪ {0} and t2t1=Δtt_2 - t_1 = \Delta t

y(t2)y(t1)=1f(1)\frac{y(t_2)}{y(t_1)} = 1 - f \qquad (1)

Where:

The equation can be reordered to represent a homogeneous first-order difference equation. To satisfy the condition let’s consider an exponential function:

y(t)=Ceat(2)y(t) = Ce^{-at} \qquad (2)

where CC and aa are constants. If we substitute result (2) in equation (1):

Ceat2Ceat1=1f=>eaΔt=1f\frac{Ce^{-at_2}}{Ce^{-at_1}}= 1-f => e^{-aΔt}=1-f
=>a=ln(1f)/Δt(3)=> a = -ln(1-f)/Δt \qquad (3)

For Δt\Delta t = 1 year, ff will represent the yearly collectible fees and constant rate aa will be:

a=ln(1f)/1y(4)a = -ln(1-f)/1y \qquad (4)

The collection of fees on the pools is done by minting pool tokens to the multisig to increase its pool ownership. This will dilute the pool share % that the LPs own, such that:

TS(t1)TS(t2)=TS(t1)TS(t1)+MT(t2)=y(t2)y(t1)=ea(t2t1)\frac{TS(t1)}{TS(t_2)} = \frac{TS(t1)}{TS(t_1) + MT(t_2)} = \frac{y(t_2)}{y(t_1)} = e^{-a(t_2-t_1)}
=>MT(t2)=TS(t1)(ea(t2t1)1)(5)=> MT(t_2)=TS(t_1)*(e^{a(t_2-t_1)}-1) \qquad (5)

Where:

For reference, equations (4)(4) and (5)(5) are implemented here.