liquity / bold

Liquity v2 monorepo containing the contracts, subgraph and frontend.
https://www.liquity.org/liquity-v2
37 stars 8 forks source link

CS-BOLD-031 Informational 7.13: Price Deviation in Composite Price Feed #489

Open bingen opened 4 weeks ago

bingen commented 4 weeks ago

The RETHPriceFeed calculates RETH/USD price as the product of the RETH/ETH and ETH/USD price fees in CompositePriceFeed._fetchPrice(). The Chainlink RETH/ETH price feed has a deviation threshold of 2%, and the ETH/USD price feed has a deviation threshold of 0.5%. So, the combined price can deviate up to approximately 2.5% from the actual price before it gets updated.

A branch can shut down for two reasons:

  1. Oracle failure.
  2. Total collateralization ratio (TCR) drops below the Shutdown Collateralization Ratio (SCR).

The second event can occur when the Liquid Staking Token (LST) price de-pegs due to slashing events or market volatility. In such cases, the protocol provides a 1% bonus on the oracle price in TroveManager.urgentRedemption().

However, this bonus may not be sufficient, as the oracle price can deviate up to 2.5% from the actual price before it gets updated.

Additionally, the price feed queries the canonical rate from Rocket Pool that updates every 24 hours and then takes the minimum of Chainlink Price and canonical rate. In the worse case the urgent redemptions could be delayed by 24 hours, as it may happen that neither Chainlink nor the canonical rate update within this period.

bingen commented 2 weeks ago

This a known issue and accepted risk. We already accept the urgent redemption bonus may be insufficient in branch shutdown, especially if the branch is using lastGoodPrice. Besides we have checked the historical deviation of RETH/ETH and it seem in practice was way more accurate, so that 2% seems theoretical and unlikely to be hit. Of course no warranty that it cannot happen at all, but, again, we accept the risk.