[For Discussion] Handling of bad debt from recent stkBNB's depeg


As many of you are aware, on 2nd December, there was an exploit on Ankr BNB (aBNBc) which caused a temporary depeg of stkBNB’s price, due to the dumping of aBNBc in pools shared with stkBNB on other protocols, which allowed the exploiter to drain stkBNB and subsequently sell it in other pools. Alpaca Guard worked as intended and managed to save a noteworthy % of positions from liquidation. However, due to the extent and duration of the depeg, some LYF positions on the stkBNB-BNB pairs were still liquidated and the platform incurred some bad debt.

You can read more details from our tweet here: https://twitter.com/AlpacaFinance/status/1598685838686138368

Proposed implementation:

The total bad debt from this incident is 1,587.87 BNB which represents ~0.2% of the lending TVL at the time of the event.

You can see the detailed breakdown of liquidations here: stkBNB-BNB@Block23546085 - Google Sheets

We are putting this up for the discussion to activate the Insurance Plan, so xALPACA holders can vote for if the event fits the conditions to be covered by the Insurance Plan. As a reminder, you can read more about how our Insurance Plan works here: Security - Alpaca Finance

Please note that we’ve discussed with Ankr, pStake, and Binance about if they can do anything to cover the losses from stkBNB, and none of them have given a positive response. So at this point, the Insurance Plan is the only avenue to cover the bad debt.

To summarize the key point, if the Insurance Plan covers this, 50% of the protocol revenue going to Governance will be used to cover this bad debt until it is paid off to BNB lending. The locked ALPCA in governance will not be touched and the remaining 50% of protocol revenue will still be paid out to Governance during this time.

Ultimately, it’s up to xALPACA holders to decide if this event falls under the cover conditions, keeping in mind that fair activation of the Alpaca Insurance Plan is what gives lenders and users of our platform confidence to use it, which ultimately drives all the protocol revenue coming into Governance.

As for any losses to the LYF positions that were liquidated, unfortunately, since the protocol operated as designed during liquidation, it does not fall under the cover terms of the Insurance Plan. So this discussion, and subsequent vote, would only be to cover the aforementioned bad debt to lending.


The protocol revenue to users from November 2nd 2022 to November 30th 2022 was ~165,276.75 USD, 50% of that is 82,638.38 USD.

1,587.87 BNB at current prices is 439,840 USD.

We are looking at ~5 months to repay the bad debt to users, all else equal.

Just throwing that out there for people who like numbers.

1 Like

5 months, not a good news.
Since we didn’t use liquidation treasury for a long time, as a big part of platform revenue, now is the time we use part of it.
Or use 1/6 revenue of a year(according numbers which mathrio given)cant be easily taken by holders.

Stupid question, but what happens if we dont do anything and not use the insurance plan?

Lenders are going to suffer the losses and probably leave.

If the insurance plan is not activated, lenders at the time of the incident will be impacted by the bad debt proportionally.

While it’s easier in the short-term to want to not cover the rare case of bad debt like this, the Alpaca Insurance Plan is what gives lenders and users of our platform confidence to use it, which ultimately drives all the protocol revenue coming into Governance, which has paid out +$3.5 million to the vault so far this year.

1 Like

When you guys say “lenders will probably leave” - is your hypothesis that they deposited on alpaca in the first place because they felt protected?

Some will leave for sure, we don’t know how many tho.

that’s what I’m thinking…the balance is whether we want to penalise lenders or penalise people who invested in alpaca

I was wondering whether there’s an option where 50% of the bad debt is absorbed by insurance and 50% is absorbed by lenders so that they get part of the money back…that should mitigate

That’s a selfish way of reasoning. It would have a negative long term impact if the protocol doesn’t cover lenders as it should. And all alpaca investors would lose in the long run. Confidence is key.

1 Like

Your point is valid - but this was a hack to a third party protocol…not something we can control…

Anyway I was just asking whether there are alternatives to consider so that we’re aware of the options when we go into the vote?

Thank you. I went back and read the language in the Insurance Plan:

What the Alpaca Insurance Plan covers

It will cover any shortfall event for which Alpaca Finance’s code or infrastructure is responsible, including: bad debt for lenders, smart contract risk, exploits, economic design failure, severe oracle integration failure, etc.

After then double-checking with staff, in this specific case for stkBNB where the depeg happened due to events on a sequence of external protocols (ankr exploit → stkbnb wombat pool), and our liquidation engine and Oracle Guard still worked as intended, one could argue that Alpaca Finance’s code or infrastructure was not responsible, because it’s hard to say what we could have done better.

So it should go to a vote and xALPACA holders will decide whether to cover the bad debt to lending or not.

I have created an AIP for this topic. Please continue any discussion there [AIP-12] Handling of bad debt from the recent stkBNB's depeg

Hey builders! Anyone want to add his comment/quote to the article? PM me if so.