[For Discussion] Handling of a recent bad debt on WaultSwap's position and solution to eliminate this risk in the future


With WaultSwap’s migration and tokenomics change that took place in Q3 last year, we have deprecated our LYF integration with the platform and disabled new positions from being opened. Despite warnings and recommendations for users to close their positions, there are still 100+ active LYF positions on WaultSwap.

As liquidity in these LP pools decreases and debt value continues to accrue from borrowing interest, while the positions no longer earns yields, these positions pose higher risk of bad debt.

Several days ago, one such event occurred and incurred ~$24k USDT in bad debt. This happened because the LYF position is large relative to the underlying liquidity in the pool. When liquidation happened, a part of the LP must be swapped back to the borrowed asset (in this case from TUSD → USDT) but because there isn’t much liquidity in the pool, the swap caused a large price impact resulting in a much lower amount of USDT received and bad debt.

Proposed Implementation:

We would like to propose two independent votes to handle this issue:

First Vote:

Yes or No on the activation of Alpaca Insurance Plan as outlined here: Security - Alpaca Finance

  • If activated, 50% of the platform’s earnings would be directed to cover the $24k bad debt (which will be deposited back into the USDT pool.)
  • ALPACA governance stakers will still receive ALPACA emission rewards, Grazing Range rewards, and 50% of Protocol Revenue.
  • Once the bad debt is covered, 100% of the platform’s revenue will go back to Governance Vault’s stakers as usual.
  • Based on the current revenue run rate and structure above, it should take ~2 weeks to cover bad debt.

Second Vote:

  • Yes or No to close all remaining WaultSwap’s positions and return funds to users to prevent future bad debt cases.

As of March 19th, there are 113 positions with total debt of $140k USD

Below please find the implementation plan:

  • We will upgrade the WaultSwap farming contract to allow for a privileged address (i.e., dev controlled address) to liquidate any WaultSwap’s positions (only for WaultSwap. No change to PCS or MDEX positions.)
  • We will change the liquidation method. Instead of swapping non-borrowed token in the DEX (this is the cause of bad debt due to low liquidity), we will use oracle price and let the new liquidation strategy deduct the necessary amount from our wallet as determined by the Oracle with a 5% discount.
  • Farming positions will now have all base assets and be able to pay back debt and close the positions
  • Any remaining value after debt repayment is sent back to users

In Step #2, Alpaca Core team will provide the liquidity required to close the positions. We will then manually swap them in CEX or other DEX to get back stablecoin. If there is any profit after, we will use them to buyback ALPACA and burn. Note: Some tokens e.g., MATIC no longer has DEX liquidity on BNB Chain and must be traded on CEX.


Bad debt? Wow, that’s not a good news.

It’s a very rare event and only happen b/c WaultSwap pools are no longer active and have low liquidity.

To put in perspective. We currently have ~33Million USDT outstanding loans.

So this bad debt represents ~ 0.07%.


Yes we should cover the bad debt, yes close all remaining positions. Should have been done when the integration was deprecated.

If second vote passes, we should probably take this approach as a default in the future with any token pair that is delisted due to liquidity concerns or an issue that could lead to liquidity concerns. We would give some time for users to close positions manually, and then automatically close all positions.


I think this should be top priority right now and should be moved to an AIP .

1 Like

Agreed to both.
:+1: For keeping a close watch and bring out these issues!

This discussion has now been moved forward into AIP-4. Please continue discussion here: [AIP-4] Handling of a recent bad debt on WaultSwap’s position and solution to eliminate this risk in the future