Analyzing and Modeling Stability Pool Dynamics

R Koschig
Risk DAO
Published in
6 min readJun 28, 2022

Overview of the modeling approach and parametrization for stability pool mechanics in the Risk DAO stress test simulation environment.

Part of the Risk DAO report was to model the dynamics of stability pools. We queried empirical results from Liquity protocol to derive a suitable modeling approach.

Mechanics of the stability pool and observable dynamics

A stability pool as used by lending protocols like Liquity or Vesta serves as an instant reserve of stablecoins to liquidate ‘bad’ loans (i.e. loans whose collateralization is below the liquidation threshold, see detailed explanation here). This allows for faster liquidation and hence lower collateralization requirements.

Anyone can stake the pool’s stablecoin (e.g. LUSD, VST) into the stability pool. When the stability pool liquidates loans these depositors lose some of their stablecoin balances (to pay off the debt) but get the collateral (from the loan) in exchange. In such case, the depositor has the following options:

  1. No action, i.e. their LUSD balance in the stability pool is reduced and they have an additional amount of collateral that they can withdraw from the stability pool
  2. Rebalance/withdraw, i.e. swap the received collateral back to the stablecoin and stake that amount to the stability pool, such that their balance is the same as to prior the liquidation event

Typically, depositors of the stability pool receive more value in collateral than what was deducted in stablecoin balance (since the liquidation threshold is >1). This is why in principle a staker of the stability could even stake more stablecoins back into the stability pool. Conversely, they could also decide to provide less back into the pool or even withdraw additional balances from their stake of the stability pool.

Below chart shows, on a minute basis, Liquity’s stability pool balance (upper chart), the liquidations (bottom chart) and the ratio of ETH to LUSD in the stability pool (LUSD scaled by millions, middle chart), i.e. this red line in the middle chart shows if depositors rebalance/withdraw the collateral and how quickly (as then that ratio approaches 0 again):

From top to bottom: Stability pool balance (M), ratio of ETH to million LUSD in the stability pool, liquidations.

As staking rewards decreased since the start of the stability pool in May 2021, it doesn’t surprise that the total balance of the stability pool decreases as well. Noteworthy though is the drop in balance of over 500m LUSD mid May 2021 following several larger liquidation events. This is one example for the option 2) mentioned above, where stakers withdraw the ETH they received from the liquidations (and hence the red line in the middle chart goes down), but they withdraw additional funds from the stability pool (i.e. whilst almost 100m LUSD was used for liquidations on May 19th, the stability pool balance dropped by ~500m LUSD).

There are also points where the stability pool balance of the upper chart makes a step-move down without major liquidation, e.g. mid/end July 2021 are examples where stakers withdraw.

We capped that middle chart as there are four days with major liquidation events where the ratio goes all the way to 40, i.e. for every million LUSD in the stability pool there was 40 ETH from liquidations. The sharp spikes show that typically stability pool depositors quickly rebalance or withdraw the ETH received from liquidations. However, it is not going back to 0 right away, but decaying exponentially over time. After the larger liquidations in January 2022 quite some share of ETH wasn’t even withdrawn, i.e. the ratio stayed at an elevated level of 2 ETH per million LUSD in the stability pool.

Above chart was base of our modeling. Recent market turmoils lead to the biggest imbalance of LUSD and ETH in the stability pool balance. Extending above chart to the time of writing the ETH to LUSD ratio (middle vanishes in comparison of the current imbalance:

To model these dynamics it is also worth looking into the depositor structure. Below chart shows the wallets that staked LUSD into Liquity’s stability pool. The current top 10 wallets are shown separately, the rest is aggregated (labeled as ‘>10’):

Liquity stability pool stakers over time, ranked by current deposit value

There are ~2.5k wallets staking >10 LUSD. Concentration is quite high, i.e. the largest staker has 30%, top 10 stakers shown above make ~60% and top 100 exceed 90%. The normalized Gini coefficient is 0.98.

Modeling approach and parameters

Modeling approach

In order to model the above dynamics, we make some simplifying assumptions:

  1. The volume of the stability pool only changes in the course of liquidation events, i.e. there are no additional deposits and/or withdrawals (those dynamics can be modeled separately in relation to the staking incentives for the stability pool)
  2. Stakers always rebalance, i.e. the red line in the middle chart representing the ETH to LUSD ratio of balances in the stability pool approaches 0 after a liquidation happened (and does not stay at some elevated level as seen in the past months for Liquity)

Clearly, the first assumption is a big simplification given those steep, step-function like decreases of the stability pool balances seen in Liquity’s history so far.

The second assumption allows us to use an exponential decay function to describe the rebalancing after a liquidation as

tₗ is the time of liquidation, t the current time and L the amount of stability pool reserves used for that liquidation. Hence, b(t|t) describes the stablecoin balance at time t that still needs to be rebalanced (swapping the received collateral back into the stablecoin) in order to get the stability pool back to where it was prior tₗ.

λ is a parameter that defines how quickly stakers rebalance. We use the notion of a half life time here, i.e. use a time T at which half of L was repaid (and consequently ¾ of L repaid after 2T, ⅞ after 3T etc.): λ = ln(2)/T

With that our decay function given the half life time T is

For our simulation we also want to add the impact of adding a (or even multiple) backstop protocol(s) like bProtocol that has automated processes in place to sell the liquidated collateral to replenish their position in the stability pool. In this case, X% of the total stability pool is managed by such protocol(s) and (1-X%) by the group of stakers. Model-wise that means we have

Stakers, that behave as seen in Liquity’s stability pool and hence can be modeled with the above, with the adjustment that they recover (1-X) of the liquidated amount

Protocols, for which we assume a constant recovery volume R in given timesteps (recovery intervals t_R) where they swap the collateral from the liquidation for the stablecoin until they fully recovered their original balance of the stability pool:

The balance b that still needs to be repaid after time t is the initially used amount XL_tₗ minus what has been repaid. Every timestep t_R these protocols manage to repay R, hence they rebalanced (t-tₗ)R/t_R.

Parameter selection

The half life recovery time T depends on user behavior, and the recovery interval tR depends on market liquidity. In order to asses historical values for T we generate multiple simulation for different values of T, plot a curve on how the stability pool ETH to LUSD ratio would behave with a given value for T, and find the T values that minimize the Euclidean distance from the historical ETH to LUSD curve. Naturally this value is expected to change over time, and thus we only aim to get reasonable boundaries for expected T values. The following chart shows the simulated stability pool ETH to LUSD ratio according to T=81 hours and the actual ratio (in blue):

The value of R corresponds to the amount of liquidity that the market can digest with B.Protocol maximum rebalance discount (which typically amounts to the liquidation incentive of the lending platform).

--

--