SafeguardPool
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 multisig 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: t₂, t₁ ∈ ℝ⁺ ∪ {0} and
Where:
- is the time such that
- is a constant time difference
- is the pool ownership ratio of an LP at a given time ()
- are the fees accrued in ()
The equation can be reordered to represent a homogeneous first-order difference equation. To satisfy the condition let’s consider an exponential function:
where and are constants. If we substitute result (2) in equation (1):
For = 1 year, will represent the yearly collectible fees and constant rate will be:
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:
Where:
is the total pool token supply at time
are the minted pool tokens at time
For reference, equations and are implemented here.