An update on the Algofi bug bounty case

Algofi Response:

We’ll revert to your latest email by the end of the week. The team feels that we’ve been clear in answering your concerns and disproving proposed attack vectors during this process. What has been the community response to your proposed attack vectors?

My Response:

We’ll revert to your latest email by the end of the week.
I sincerely hope that the outcome is a reasonable and responsible action by Algofi.

What has been the community response to your proposed attack vectors?

They are concerned based on my direct interactions. Comments do agree with the flaws. Aside that, Upvotes/Downvotes on Reddit are not representative as manipulated based on various incentives. Stepping back, the community response doesn’t matter but the Algofi actions when there is a systemic risk to users.

Algofi Response:

The purpose of this email is to address the latest formulation of your proposal as well as the team’s perspective. Before getting into your proposal we would like to touch on the issue of USDC de-pegging during the SVB turbulence. As is publicly available, Algofi pegs USDC (as well as USDt) to $1.00. This was a decision reached while considering the relative stability of USDC as compared to the relative risk of error in any floating price. This is not a decision unique to Algofi and in fact is a decision that many large protocols have landed on both sides of. That being said, the issue around USDC is not fundamental to your proposed issues with STBL and is not going to factor into this analysis.

In your latest communication you intimated that your primary concern with STBL2 was that there is no concrete connection between the volume of USDC and the volume of STBL2 as STBL2 may be borrowed with other collateral. I don’t quite understand how this differs from the initial assertions that in a liquidation event there may not be sufficient liquidity immediately if the size of STBL2 is significantly greater than AMM liquidity. In the most recent communication you talked about a contraction-expansion cycle. As far as I can tell that doesn’t really change the underlying claim. That claim being, in the event that STBL2 collateral greatly outpaces available AMM liquidity the interest rate modulation mechanism is insufficient to ensure eventual successful liquidation.

As we have previously described, the formulation of STBL2 is such that in the event of a liquidity issue the interest rate modulation mechanism provides ample incentive for liquidators to hold STBL2 as interest rates increase providing guaranteed income vie STBL2 interest as well as incentive for supply to contract as borrowers repay their borrowed STBL2 bolstering the price of STBL2. This formulation does not change based on the borrowed assets in question and while you have pointed out that at much larger ecosystem sizes (1B STBL2) this formulation would meet issues it is the Algofi Team’s opinion that you have not accurately factored in the growth of all aspects of the ecosystem in that scenario. In other words, STBL2 will not reach 1B market cap without multiple orders of magnitude growth in all other aspects of the Algorand ecosystem.
Obviously, these are heuristic assessments and thoughtful parties can disagree on the relative value tradeoff. One proposal you made was to decommission STBL2 as a collateral asset. This would be relatively easy and from our cursory assessment minimally impactful on the current Algofi ecosystem. STBL2 only represents ~222k of collateral on the Algofi protocol at present as the vast majority of supplied STBL2 is in lending pools. A gradual (say over a two month period) drawdown of the STBL2 collateral factor would not be likely to cause significant disruption. As such the Algofi Team would encourage the creation of a proposal for consideration by the Algofi DAO.

The steps to do this would be:

  1. Create a “Temperature Check” post on the algofi governance page (gov.algofi.org)
  2. Allow for ~1 week of discussion by the community
  3. Apply any desired edits to the proposal based on discussion and promote to “Proposal Discussion” and create a proposal using the Algofi webapp

Let us know if you think that seems like a reasonable route forward at this point.

Note: When looking at the webapp you will see ~4.64M STBL2 supplied but this does not show that only 222k of that is “as collateral” the rest is supplied in exchange for the bAsset token which is utilized in lending pools.

My Response:

Thanks for the response.

That being said, the issue around USDC is not fundamental to your proposed issues with STBL and is not going to factor into this analysis.

Agreed. USDC de-pegging demonstrated a few interesting facts and that’s why it was mentioned in my recent emails:

  • There is yet another way that STBL can be de-pegged and hence the greater potential risk for the lending protocol.

  • If USDC, which has only 1-degree distance from USD, can be de-pegged, there is a higher chance that STBL with 2- degree distance from USD, STBL= USDC=USD, will be de-pegged.

  • A very unexpected event like USDC de-pegging can happen and when it happens it is fast with unforeseen consequences.

I don’t quite understand how this differs from the initial assertions that in a liquidation event …

  • The first scenario was about an attacker attempting to create a particular de-pegging condition and benefit from that.

  • The second scenario was about an attacker/market-manipulator/large STBL-holder taking advantage of the STBL interest rate adjustment algorithm to arbitrarily increase the interest rate (or price).

  • The third scenario (cycles) was about explaining that it is not about attackers or market manipulators but the inherent STBL flaw that ensures de-pegging for an extended period eventually happens at some point in the future. As the STBL market cap increases the liquidator argument becomes weaker since the risk and required liquidity for the liquidator goes higher. Why does the risk go higher? Because STBL MC cannot go up forever and there is a turning point (expansion/contraction) and any liquidator caught up in that turning point at minimum needs to wait a long time to get back their money, which also means being exposed to all other DeFi risks during that period.

you have pointed out that at much larger ecosystem sizes (1B STBL2) …

I used 1B as a sufficiently large number to make the understanding of the situation easier. I think much lower numbers (in order of tens of millions) would cause a real issue. In comparison look at how much USDC algofi has been able to attract.

The Algofi Team’s opinion that you have not accurately factored in the growth of all aspects of the ecosystem in that scenario …

Neither the 1B MC nor the ecosystem size matter that much except that they might delay the problem manifestation. The issues are fundamental to STBL. I’d argue that consequences would be greater (and scarier) when the STBL MC and ecosystem are much larger. Just look at all the interventions different central banks need to make to stabilize their currencies. For example, look at many countries that try to keep a stable ratio with USD and many challenges they have. Some of their problems are related to their currency inflation or weaker/stronger economies, but a part is also because of the difficulty of adjusting incentives, the mechanics of the market, etc.

One proposal you made was to decommission STBL2 as a collateral asset…

That was also my impression that there shouldn’t be too much collateral and seemed like the most beneficial and agreeable solution right now. In general, I think Algofi would benefit substantially from internalizing and re-using the risk isolation concept in more areas.

The plan LGTM. I’ll go ahead and create the proposal.

1 Like