Inspired by Liquity's Stability Pool (https://docs.liquity.org/faq/stability-pool-and-liquidations)
The Stability Pool (SP) is the second line of defense in Positions contract liquidations. It acts as a pool of liquidity that can be used to repay insolvent positions in return for discounted collateral assets.
When a position is liquidated, the pool repays its debt in exchange for assets sent by the Positions contract after successful repayments. In contrast to Liquity's pro rata model, this SP is First In First Out when it comes to rewarding liquidations to pool liquidity providers.
Due to how the Liquidation Queue calculates liquidations, there will always be something for the SP to liquidate, meaning its advantageous for the first bidder at every liquidation and not just the one's the Liq Queue can't fulfill. This has the added benefit of filtering through spam deposits before large liquidatiosn.
Pro-rata distributions, like the Liq Queue and Liquity's SP are better than FIFO at attracting large capital, but FIFO has direct incentives for competitive replenishes which is better for a pool that isn't prioritized but needs quick refills if the situation calls for it.
We want this step of the liquidation mechanism to be reactive when low while not taking too much potential capital from the Liq Queue which will likely liquidate collateral for lower premiums a majority of the time, which is better for user solvency.
Key Points:
Any user funds in the Stability Pool will be used to repay said user's positions if liquidated. Meaning depositing in the SP doesn't increase liquidation risk for the user.
Unstaked deposits are still used to liquidate but accrue no incentives.
Withdrawals that would leave less than the minmum deposit amount will withdraw the remaining bid.