Dynamic Swap Pricing
Once 90% of reserves have been lent out, Dynamic Swap Pricing will kick in to start to add a premium to trades taking the scarce liquidity and a discount for those bringing it. This essentially puts a throttle on swap transactions depleting the threatened assets. These adjustments start small and gradually increase as the health of the liquidity deteriorates. You can think of the adjustment to the invariant curves behavior similar to how Curve handles the depletion of assets as the stable invariant () as the pool becomes unbalanced.
During Dynamic Swap Pricing, instead of quoting trades using the invariant (calculated with the primary reserves in the contract ignoring the lent out and ) the calculation of the invariant would be adjusted to add a premium or discount to swaps. This premium would increase as the health of the reserves deplete. This can be achieved by modifying the inputs, and , prior to calculating .
In the typical invariant