Skip to main content

Safeguard Pool

Safeguard parameters​

The Safeguard Pool is designed to provide safety mechanisms to protect liquidity providers against extreme unexpected events, as outlined in the Security documentation and 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 as of 10/10/2023:

  • Allowed Token Imbalance: This parameter prevents strategies that excessively expose the pool to one token reserve. At the time of writing it is set at 15% for most pools. This parameter can be modified by the Swaap Pool Control multisig, with a maximum of 20%.

  • Last look: To account for potential delays between off-chain pricing and transaction validation, the Last Look parameter ensures that the pool does not underprice an asset below the indicated oracle prices. The initial allowed deviation is set to 1% for most pools. This parameter is controlled by the Swaap Pool Control multisig, with a maximum deviation of 3%.

  • Management Fees: The initial management fees are set at 0%, with an upper limit of 5% annually.

  • Max drawdown circuit breaker: This safety mechanism guards against harmful strategies, mistakes, or malicious acts. It disables trades if the latest pool's performance falls below the allowed threshold. The initial setting is 4% for most pools. This parameter is controlled by the Swaap Pool Control multisig, with a maximum of 5%.

  • Performance Update Interval: Initially set at one day for most pools. This parameter is controlled by the Swaap Pool Control multisig, with an authorized range for the performance update interval between 0.5 to 1.5 days.

  • Signer: This refers to the off-chain signer responsible for providing quotes. This parameter is controlled by the Swaap DAO multisig.

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 t2βˆ’t1=Ξ”tt_2 - t_1 = \Delta t

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


  • tt is the time such that t2β‰₯t1t_2 \ge t_1
  • Ξ”t\Delta t is a constant time difference
  • y(t)y(t) is the pool ownership ratio of an LP at a given time (0≀y(t)≀10 \le y(t) \le 1)
  • ff are the fees accrued in Ξ”t\Delta t (0≀f<10 ≀ f < 1)

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)=Ceβˆ’at(2)y(t) = Ce^{-at} \qquad (2)

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

Ceβˆ’at2Ceβˆ’at1=1βˆ’f=>eβˆ’aΞ”t=1βˆ’f\frac{Ce^{-at_2}}{Ce^{-at_1}}= 1-f => e^{-aΞ”t}=1-f
=>a=βˆ’ln(1βˆ’f)βˆ—Ξ”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(1βˆ’f)βˆ—1y(4)a = -ln(1-f)*1y \qquad (4)

The collection of fees on the pools is done by minting pool tokens to the DAO 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)=eβˆ’a(t2βˆ’t1)\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(t2βˆ’t1)βˆ’1)(5)=> MT(t_2)=TS(t_1)*(e^{a(t_2-t_1)}-1) \qquad (5)


  • TS(t)TS(t) is the total pool token supply at time tt

  • MT(t)MT(t) are the minted pool tokens at time tt

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