Floating Stablecoin Prices

Idea: migrate USDC, USDT, and TUSD to use a floating oracle price.

The Comptroller value for stablecoins like USDC, USDT, and TUSD is currently fixed at $1. However, there is a very real risk that one or more of these tokens loses its peg in the future. I propose that we switch these to floating oracle prices–the same way that every other token on Compound works, including Dai.

Leaving these prices fixed at $1 will lead to many problems in the event that one depegs. I’ll illustrate the worst one I can think of:

  • Suppose USDC value slips to $0.50. Compound continues to value it at $1 for collateral purposes.
  • Arbitrageurs can deposit 1 USDC, which cost them $0.50, and borrow $0.75 of value.
  • They will borrow all of the liquidity of every asset, stealing 33% of all of Compound’s liquidity value.
    • Worked example:
      • $0.5 / USDC
      • $100 worth of liquidity on Compound
      • Arbitrageurs deposit 133 USDC to access $100 of borrowing power on Compound (USDC collateral factor is 0.75). They withdraw all liquidity.
      • Compound now has 133 USDC worth $.5 each, or $66 in value, vs the $100 it started with.

Of course, there are downsides to a floating oracle, including the risk that the system works as designed. An alternative change, suitable as an intermediate solution, is to sanity check the fixed $1 price against Uniswap (“Anchor price”), just as we do for all of the oracle-reported tokens.

Note: this topic originated as a suggestion from @aklamun in repayBorrow() with cToken thread.

1 Like

Note that it’s not straightforward to check the USDC price in USD using a Uniswap anchored price (or really any DEX). You can only compare with on-chain traded assets, in this case how USDC is priced in terms of other stablecoins, which may also have pricing problems. Another option is checking the USDC price in terms of ETH coupled with a trusted ETH price oracle (which Compound relies on currently anyway).

1 Like

Good point! Wow, I didn’t realize ETH-USDC Uniswap pair was used for computing the anchor price–I assumed the Reporter (chainlink) ETH price was used.

This means there’s another really bad consequence of USDC depegging. If USDC trades below $0.87, all of the oracle reported prices will fall outside their anchor, and will cease being updated. Am I reading correctly that transactions are allowed to process and the comptroller just uses the old price? That seems like a potential vulnerability–shouldn’t the comptroller just refuse to process new transactions until it can get a recent price?

1 Like

I’m not sure on the particulars here since the update to integrating Chainlink (haven’t had the chance to review everything). But to the extent that a Uniswap anchored price is still used, it is presumably measured in USDC. Aggregating oracle prices with appropriate manipulation checks is definitely worth thinking through carefully

1 Like