FraxFinance / frax-solidity

Solidity implementation of the Frax Protocol
MIT License
474 stars 198 forks source link

How `FraxPoolV3` maintains USD peg #215

Closed rndquu closed 9 months ago

rndquu commented 1 year ago

Hey guys, I've got some questions regarding the FraxPoolV3, not a pro with the Frax protocol so bear with me :)

There is the FraxPoolV3 where users can mint/redeem FRAX tokens in exchange for collateral and FXS tokens. The FraxPoolV3 also helps to maintain the FRAX's USD peg because when collateral/FRAX price fluctuates there is an arb opportunity to mint/redeem FRAX for exactly 1 USD of collateral tokens.

The thing is that collateral token prices also fluctuate so at some point in time the pool becomes insolvent when amount of collateral tokens is not enough for redeeming FRAX hence this line was introduced to prevent redeeming at all.

There is the setCollateralPrice() method responsible for setting collateral prices but I've checked the production pool's transactions and that method has never been called which means that all collateral prices have been set to 1.00 USD since the contract deployment and have never been updated.

I've found some related issues which state that USD-pegged assets should not be considered equal to 1.00 USD at all times:

So questions are:

  1. Is it ok that at some points in time the pool is not solvent? I guess the Frax protocol thinks of it to be ok and simply waits while arbitrageurs make collateral/FRAX price even because in the end all Frax pool collateral tokens are USD-pegged.
  2. Is it enough to set collateral token price to 1.00 and never update it (assuming that all collateral tokens are USD-pegged) to maintain the FRAX USD peg?
  3. If a collateral token price is dropped heavily and FRAX price is less than redeem_price_threshold then what's the point of redeeming FRAX if in return user gets less value in collateral tokens? I mean in this case the redemption mechanism seems to be broken and FRAX USD peg can not be maintained anymore because there is no sense for end users to redeem (i.e. burn) FRAX tokens.

Thanks in advance