Change STBL2 collateral factor to 0%

This post is an AI from this original post on the Algorand forum.

STBL can be de-pegged either because the stabilization algorithm and incentives are not sufficient to stabilize it in a timely manner or the main asset (USDC) used for pegging to USD is de-pegged.

The STBL de-pegging breaks the assumption of $1 collateral (or $1 borrow) values for STBL in the lending protocol. Moreover, more STBL can be always created by borrowing. These two facts combined can create unexpected situations and risks to the lending protocol. For example, when STBL is depegged, say it has 90c value, an unlimited amount of it can be supplied and other assets are borrowed against it. The original posts describe specific scenarios.

In order to isolate the STBL de-pegging risks from the lending protocol, a reasonable proposal with minimum impact to the current STBL benefits to Algofi is changing the STBL collateral factor to 0% (from 80%). The goal is to submit a proposal, implement and announce this change after one week from submitting this post.

Update:
The USDC+STBL LP tokens collateral factor either remains the same or is cut in half, since every STBL requires a matching USDC to be used as a collateral, which mitigates the problem of instance money creation and re-use as collateral. Now it is bound to providing equivalent amount of USDC.

I’ve been watching this debate play out on the Algorand forum for the last few weeks. You can follow the debate between Sam and the Algofi team here, here and here. I’m going to attempt to over simplify his points as follows

  • An attacker can depeg STBL2
  • STBL2 and USDC being fixed to $1 in lending presents bad debt risks
  • USDC/STBL liquidity being so much smaller than STBL supply is a risk

An attacker can depeg STBL2

I’m aware that the posts mention more than one attack vector but I’ll just start with the following.

If I had $100M in USDC and placed it in Algofi as collateral, I could borrow $80M in STBL2. I could then allocate $20M of that onto dumping onto the AMM, sinking the price of STBL2. I could do that in such a way that the interest rate on supplying STBL2 goes up. With my other $60M of STBL2, I can use that as collateral. Since interest rates are up, I am earning STBL2. Some of that I can use to repay the $20M I used to dump the price. The rest I can use to continue to dump onto the AMM for any liquidity that does appear. If this goes on long enough without sufficient liquidity to counteract me, eventually I have no STBL2 denominated debt. The excess STBL2 I’ve earned can be used as collateral to borrow assets like Algo. I can borrow ALGO as if STBL2 was worth $1 even though it is currently trading at something below $1.

How possible the above is comes down to:

  • How much liquidity is around to arb an attacker such that they wouldn’t have sufficient volume to move the price. (Algofi team thinks no)
  • Can the attacker keep the price down long enough to actually earn enough STBL2 via interest to continue to push the price down and not take a loss. (Algofi team thinks no)
  • STBL2 interest isn’t minted out of thin air, its earned from the interest charged to borrowers. If borrowers become liquidatable, their collateral can be claimed by those willing to buy it in STBL2. To get STBL2 to make those purchases the liquidator can borrow it agains their collateral or buy it in the market. If I was pushing the price down in the market, then the liquidator is incentivized to buy it in the market. This will put counteracting pressure on my attempt to sell down the price unless liquidators aren’t interested or they don’t have enough liquidity.

STBL2 and USDC being fixed to $1 presents bad debt risks

STBL2 is pegged to USDC (interest rate responds to USDC price). If USDC depegs (which just happened), STBL2 depegs with it (which also happened). STBL2 is fixed at $1 in value on the lending market. If/When USDC depegs, borrowers of STBL2 can borrow as if the STBL2 is worth $1 even though the USDC they used to borrow it is not worth $1.

How possible the above is comes down to:

  • Whether or not USDC depegs, if USDC is depegged this is possible as far as I can tell.
  • If USDC repegs then this doesn’t matter because eventually everything is collateralized
  • Algofi team seems to comfortable assuming the above is going to be true

USDC/STBL liquidity being so much smaller than STBL supply is a general risk

The issue with STBL is that the rate of USDC entering the pools does not keep up with the STBL expansion and contraction cycles. It is an inherent issue.

USDC enters the swap pools in 3 ways:

  1. Providing liquidity (USDC+STBL) to the pool
  2. Buying STBL with USDC
  3. Collateral liquidations and repaying borrowed STBL (only if USDC is used for buying STBL, and for example liquidator doesn’t hold STBL already)

STBL can expand rapidly and its creation (new loans and interest) can significantly exceed the rate of USDC entering the pools. There will be cycles of expansion and contraction and they can be quite extreme. As the contraction starts and the volume of #1 and #2 declines or stops completely and therefore #3 becomes the only option. However, assuming that borrowers immediately jump in and liquidate themselves is not true. For many reasons that may not happen. So, there is an arbitrary delay until the collateral is liquidated.

The contraction-expansion cycles may happen at 10M, 25M or 1B STBL market cap but they will happen and can be extreme and that’s where the huge risk is. The DAO being able to adjust the rates or change the mechanism provides some flexibility but doesn’t solve the inherent problem. When dealing with large numbers and conflicting scenarios, the only real solution is to provide significant liquidity. Assuming that’s an option (When that’s not an option for Algofi, at 10M or 1B?), in most cases it sets up for an even bigger issue down the road.

  • ā€œAs the contraction starts and the volume of #1 and #2 declines or stops completelyā€ is an interesting claim. If the supply of STBL2 is contracting, people are paying off their loans (via STBL2 buys) or getting liquidated (possibly via STBL2 buys) which is going to cause buying pressure on STBL2 in the market. How does STBL2 supply contract without more liquidity coming into the market via those purchases of STBL2?
  • USDC is also not the only way to buy STBL2, liquidity could come in the form of ALGO for example.
  • In the expansion cycle, more STBL2 is being generated via borrowing but most of it is going to be sold or put in LPs. Either of those actions decreases the price of STBL2 relative to exit liquidity. The expansion is only dangerous if more STBL2 is being borrowed into existence but actors holding USDC/Algo liquidity are not interested in buying it, such that the expansion depegs STBL2 by draining AMMs. But even still, at some point borrowers will stop borrowing STBL2 if they have to sell it at a enough of a loss.

Temp Check

As a heads up @sam171921 , it is common in a temperature check topic to put a poll is helpful to see where the group stands.

Should we change the STBL2 collateral factor to 0%?
  • Yes, ASAP
  • Yes, but slowly decreasing the collateral factor
  • Maybe, if more evidence is presented (please comment on what you’d like to see)
  • No

0 voters

My take

tl;dr: I’m going to vote maybe because I think we should do some simulations and probably discuss dependency on USDC.

I think after sitting on this a bit I think there are a few areas where I see merit and a few where I don’t with OP.

  • I did not believe the points raised about USDC AMM liquidity to be convincing
  • I do believe that STBL2 being pegged to $1 in the lending market is a risk. I do not believe that USDC can be assumed to be bullet proof. USDC reflects both risks from Circle’s risk management as well as the risk management of their counterparties (mostly banks). I’ve raised this before in my proposal about an insurance market..
  • I think it is theoretically possible for an attacker to depeg STBL2 via the mechanisms outlined by @sam171921. However, I think the situations where such an attack is succesful is largely about liquidity and other market dynamics. I’m inclined to believe a liquidity crisis is possible because we see that in Tradfi. Even when the incentive is there, panic can cause actors with large amounts of liquidity to hold it tight and retreat from markets. We should stress test how the system performs under those condition I think its in the interest of the DAO to spend funds to commission simulations to determine if/how likely this is and under what conditions.
3 Likes

the possibility to use STBL2 in the lending market is an important usecase for STBL2 and is part of its peg mechanism imo. since i am also not convinced in your overall assumptions in the attack i dont think it should be done

i see the point in which STBL2 treating as 1$ in the lending market could become a problem if it would to depeg heavily (more than the liquidation incentive). that is the point where we might want to look into imo (we shouldnt track the market price in general but maybe shift to it if the depeg is too big)

1 Like

@pescennius Thanks for writing the summary and your evaluation.

I did not believe the points raised about USDC AMM liquidity to be convincing

Is it about arbitrarily increasing the interest (or price), or the expansion-contraction cycles that guarantee the STBL de-pegging in the future?

@lobo please be specific about the following point:

i am also not convinced in your overall assumptions in the attack

The proposal here is limited in scope and its impact on the STBL usage, leaving most of STBL benefits intact while removing an unbound risk to the lending protocol. The majority of lending protocol users never use STBL (or use it temporarily for swaps) and shouldn’t be exposed to the unnecessary STBL risk. Please note that the first scenario (the attacker uses two accounts) can still happen in any short squeeze event. A key factor to remember is that a sufficiently large number of STBL can be borrowed (new money is created) and immediately supplied, which can effectively break many assumptions. No other asset on Algofi has the same quality. STBL borrowing and its interest are fundamentally different from other assets borrowing and interests. When you borrow a regular asset you borrow it from a supplied reserve but STBL is just created from thin air. The same for the interest. The interest on a regular asset for a depositor is less than the borrower. The interest on STBL is the same on both sides (for reasons) and accelerates STBL creation, since the itnerest in this case is not a liability to a supplier but to the Algofi lending protocol.

1 Like

because STBL2 doesnt have a lot of usecases outside of algofi, but thats something we should work on. we need a decentralized stablecoin on algorand and STBL2 being part of the biggest protocol on algorand right now is in a pretty good situation to become the decentralized stablecoin on algorand

i honestly at this point dont know on which of the 3 (?) attacks exactly i should comment, they are similar but have their own assumptions. a problem i have in general is that your assumptions all seem to assume that MC of STBL2 is high but no one would like to buy it which seems weird? why would a lot of people ā€œmintā€ it but no one would like to buy it and in that way peg it again? and your assumption is based on one whale holding ā€œonlyā€ 5% of the STBL2 supply and being able to control the market completely (holding price below 0.99 for example)

and again: why wouldnt all your possible ā€œproblemsā€ be just fixed if STBL2 isnt considered 1$ anymore in the lending market?

@sam171921 thanks for starting the conversation. While we all might not end up agreeing, I think you’ve started a conversation that is worth paying attention to because if you are right, everyone involved with this project stands to lose money.

Is it about arbitrarily increasing the interest (or price), or the expansion-contraction cycles that guarantee the STBL de-pegging in the future?

I agree with you that contraction/expansion cycles will exist and that higher amounts of risk exist when the transition is either moving very quickly or we are at the transition point between contraction and expansion. My point largely was that I did not believe that it was convincing in terms of removing STBL2 as collateral, not that I felt that it was not possible for a depeg.

When it comes to expansion, I noted that ā€œmore STBL2 is being generated via borrowing but most of it is going to be sold or put in LPsā€. I don’t see a ton of risk in the expansion cycle because I can’t construct a scenario where expansion causes a depeg outside of the an intentional attack. Borrowers as a group, don’t have an incentive to borrow and sell STBL2 at a loss in that kind of volume.

As I pointed out, contraction can only happen when borrowers of STBL2 are closing out their positions (either voluntarily or via liquidation). You assert that ā€œAs the contraction starts and the volume of #1 and #2 declines or stops completelyā€. But for that to happen, borrowers have to be trying to close out while nobody is willing to provide STBL2 liquidity for them to do so. Again, this is technically but requires the right conditions to be possible. You either have to attack with more liquidity than the market can counter with or wait for some kind of liquidity crisis (which I believe does happen) to attempt to exploit this.

Part of the reason I suggested a simulation, is that we are somewhat handwaving away exactly what these numbers (interest rates, price, etc) look like at different levels of liquidity, volatility, and market participation. What are the conditions where an attacker can actually profit from trying to depeg?There may only be a narrow window of conditions where what you’ve expressed can actually be executed profitably and I’d like to know what those are before saying the risk is so high that STBL2 cannot be collateral. Technically there are also plenty of other ways the system can end up with bad debt, like if an asset we allow to be collateral crashes faster than positions can be liquidated. Given that, the risk that something can cause bad debt is not sufficient for removal. Imo the risk has to be shown to be excessive compared to other operating risks. Generally, I believe we need to invest in creating a pool to be used as last resort liquidity in the scenarios, rather than trying to eliminate all possible risks upfront.

STBL2 being part of the biggest protocol on algorand right now

The damage of any failure here would be even greater and won’t be limited to Algofi but severely impacts the Algorand reputation.

they are similar but have their own assumption

Although all three have STBL at their center, they are not similar.

to assume that MC of STBL2 is high but no one would like to buy it which seems weird?

It is just a matter of demand and supply. Happens for all currencies and are usually extreme because of economic cycles and market mechanics.

and again: why wouldnt all your possible ā€œproblemsā€ be just fixed if STBL2 isnt considered 1$ anymore in the lending market?

Price doesn’t have that much meaning more than the available liquidity that supports it. So this approch doesn’t solve the liquidity/price issue. Having said that, it is just one part of the issue. USDC can be de-pegged too as hppened. The bigger issfue is that STBL can be created very easily in an unlimited amount and supplied as collateral. It makes conducting any operation convenient and fast.

As I pointed out, contraction can only happen when borrowers of STBL2 are closing out their positions

From contraction, I in particular mean the moment where most STBL holders want to convert it to USDC, basically exit their STBL long positions. There is always differences between supply and demand but as long as it is small that’s OK, however at one point there will be a larger gap and at that point there is no mechanism to fill the missing demand. The only mechanism is borrowers willingly decide to pay back or get liquidated but that’s not sufficient because neither may happen in a timely manner particularly when the imbalance is large enough (Say a few millions).

so you are assuming a special situation there and assume how everyone would react?

so you mean like DAI minted using makerDAO and then used in compound?

From contraction, I in particular mean the moment where most STBL holders want to convert it to USDC

There are two ways to be a STBL2 long holder. You either borrowed and held or you bought on the open market. Borrowers are going to exit STBL2 by paying back their loan, not swapping to USDC. The incentive is to do that because the loan costs interest so paying it off is the cheaper option vs paying a fee for a swap. So this is limited to the STB2L long holders who bought STBL2 on the open market.

STBL2 buyers, should be already or made aware that STBL2 has a duration risk. To your point, it is possible you want to exit the long position and there is no liquidity to swap, including liquidity in other tokens like ALGO. Eventually, borrowers will close out or be liquidated which will bring new buyers to the STBL2 market. How long this takes to your earlier points is undertermined. This is the duration risk that anyone buying STBL2 takes on. I’ve modeled it as a perpetuity for my own purposes.

Where I agree with Algofi is that even though there is no market for STBL2, the token is still a claim on $1 worth of assets but with a potentially infinite time to maturity on that claim. So even though the market price might depeg, the actual asset is still backed. Its similar to bond prices moving with interest rates. Even though the market price of a bond yielding 1% has tanked, if you hold to maturity you don’t lose any money.

I agree with you that the lending market fixing STBL2 to $1 for lending presents additional attack surface given the duration risks. So I also agree with @lobo that we should look to have some mechanism of shifting the STBL2 value in the lending market when a depeg in the market price goes on for a long duration.

However, I don’t agree that we can say a situation where an attacker exploits this is inevitable. For me to agree with that, I’d need to see simulations demonstrating there is a probablity that a succesful attack can be exectued. Then, I’d have to evaluate that probability to see if it is high enough that I would not reasonably value STBL as a $1 on a few different time horizons.

If the ability for an attacker to hit the lending market because of the duration risk is sufficiently unlikely, then I’m not particularly concerened with a market depeg caused by lack of liquidity. USDC is itself is actually more exposed to this conceptually. Circle holds the majority of its reserves in short term treasuries, which normally trade as cash. However, these treasuries could lose market value in a liquidity crisis. A bank run on USDC during a liquidity crisis could cause Circle to become insolvent if they have to sell the treasureis at a loss such that even the equity of Circle could not cover their liabilities (this is one reason I don’t love pegging STBL to USDC). Algofi is insulated from this by not allowing STBL2 holders to withdraw when the liquidity is not available. Instead of that risk being on Algofi equity holders, it is on STBL2 holders. Long holders earn an interest rate for holding STBL2 as collateral, this is ultimately the risk they are being compensated for.

so you are assuming a special situation there and assume how everyone would react?

It is not saying a special situation but the fact that it will definitely happen, could be tomorrow or a year from now.

so you mean like DAI minted using makerDAO and then used in compound?

I haven’t used MakerDao/DaI but since 50% of reserves are in USDC, as part of miniting DAI that 50% USDC reserve should be provided/covered.

However, I don’t agree that we can say a situation where an attacker exploits this is inevitable.

Two cases:

  1. The first scenario could have happened at least once during the past 4 months, when Algo’s price moved from .16 to above .2. Note that in the first scenario the attacker should supply STBL in the first step (not USDC) to not only pay any increase in interest but also benefit from it.

  2. A similar scenario could have happened when USDC was below .9. Although the Algofi team blocked more USDC deposits, an attacker could borrow a large amount of STBL , supply that in another account and borrow against that.

Wouldn’t reducing the collateral factor of stbl2 to 0 then necessitate the usdc+stbl2 LP token collateral factor to be zero? With that incentive gone, liquidity would become a lot worse.

My understanding is that the collateral factor will be half (of what it is right now) but the interest rate will remain the same.

  1. The first scenario could have happened at least once during the past 4 months, when Algo’s price moved from .16 to above .2. Note that in the first scenario the attacker should supply STBL in the first step (not USDC) to not only pay any increase in interest but also benefit from it.

Can you be more specific. Like give me:

  • A specific day
  • The price of ALGO
  • The price of STBL2
  • the interest rate on STBL2
  • the size of the liquidity pools for STBL2 on that date
  • How much STBL2 you’d buy? over how long and how aggresively?
  • How much liquidity you think is in the market to arb against you
  • How much that would distort the interest rate?
  • What does the existing lending market look like and when does the rate change start forcing liquidations or borrowers to close positions?

Its not as simple as saying it could have happened at least once in the last 4 months. All of these variables move in response to one another. If the liquidity in the pools isn’t high enough, you might not be able to buy enough STBL2 to supply in the first place. If the amount of liquidity to arb you is high enough, you might not have enough STBL2 to actually move the price or interest rate. You have to demonstrate that these variables can actually end up aligned such that an attacker could end up in a state where they have posess so much STBL2 that no outside liquidity wants to take on the duration risk of buying it at a discount.

  1. A similar scenario could have happened when USDC was below .9. Although the Algofi team blocked more USDC deposits, an attacker could borrow a large amount of STBL , supply that in another account and borrow against that.

If you believe that USDC was never actually unbacked, then there was no problem with those STBL2 borrows because it was also backed, both the USDC and STBL2 just had some time duration for which you had to wait for a repeg. However, I agree that if USDC actually turned out to not be backed, this would absolutely blow up, because I agree with you STBL2 magnifies that problem. However, I’m of the opinion we don’t fix USDC to a $1 rather than we say STBL2 can’t be collateral. I’m fine leaving it the way it is in the mean time because I feel (and a lot of the DAO probably does) that USDC is backed and any depeg will repeg. At least I’m quite fine taking that risk in the time frame of settling the USDC fixed price situation.

1 Like

no it would be 0. they have been using the smallest cf of the assets in the LP

Can you be more specific.

The original post about scenario 1 has the details. The only needed modification is to start with STBL instead of USDC. If the numbers seem too large you can divide them by 5 or 10.
A few points:

  • The needed STBL should be bought over time and already available.
  • The response to this scenario has been that the liquidator is willing to take STBL even if it is a large amount and cannot be converted in the market without significantly de-pegging STBL. So, the liquidator is likely to keep all or most of STBL for a longer (undefined) period of time.
  • The attacker doesn’t take any risk and has already achieved their goal. However, it is the liquidator who needs to convert a much more liquid asset (say Algo) with a less liquid asset (STBL) in large amounts. This is not a reasonable assumption and the expansion-contraction cycles argument says that it will definitely break at some point as the required liquidity and risk increases.
  • The same attack, because of availability of unlimited STBL to borrow and the ability to re-deposit immediately can happen again and again, let’s say when there are a sequence of short squeezes in the borrowed asset (say Algo) by the attacker.

Sure, I wasn’t aware of that decision.

Thinking further, I think it should be OK to keep the collateral factor (or half of it) for the USDC+STBL LP tokens, because it requires putting one USDC per STBL and doesn’t have the same similar cyclic borrow+deposit issue with STBL. Any reason that could be an issue?

The post has been updated with a paragraph about LP tokens.

I’ve read your description of your original attack and it seems to me that you are describing the normal behaviour of an over-collateralised asset :

  1. under extreme market conditions it is possible that the stbl depegs from its target value but the stability mechanisms would slowly allow it to repeg;

  2. the larger the market cap, the more difficult it is to manipulate, not the other way around as you claim in the post;

  3. one individual would not have sufficient funds to manipulate the algofi market unless he already starts with more fund than algofi;

  4. even if such individual existed and decided to carry an ā€˜attack’ as you described I don’t see how that would be profitable for him.

In any case I think we could discuss improvements of stbl as for instance uncorrelation to USDC or stability mechanism in extreme market conditions, but your proposal goes:

*) against the stability mechanism as the ability to deposit usdc/stbl LP and borrow loop the process guarantees deep liquidity for that pool;

*) against the development of algofi in general as the ability to borrow against stbl is an important use case of stbl.

2 Likes

As I explained multiple times on different occasions getting de-pegged for an extended period of time is guaranteed independent of the existence of an attacker/manipulator, however the exact time is unknown, it can happen tomorrow or a year from now but it will happen. An attacker or manipulator may try to artificially create the same conditions at a particular time for their benefit.

The collateral factor for usdc/stbl LP tokens would not change. Please see the update at the end of the top post.