-
Notifications
You must be signed in to change notification settings - Fork 1
Dug - If a pegged token oracle goes down or price falls to zero, depeg events cannot be triggered #71
Comments
users are made aware of this risk when participating in the epochs |
Considering 462/228/71 as duplicates of 422: they have the same root issue and all are borderline low/medium, so packing them in one valid medium. |
Duplicate of #422 |
Escalate for 10 USDC. I believe this issue should be de-duped. While other issues that this issue has been grouped with primarily discuss the Y2K is a protocol that is built specifically for cataclysmic scenarios. Chainlink has a history of intentionally going offline in these situations. Additionally, a token price going to zero should be anticipated and accounted for by the protocol, but instead, is ignored. |
You've created a valid escalation for 10 USDC! To remove the escalation from consideration: Delete your comment. You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final. |
Escalation rejected Duplicate of #422 |
This issue's escalations have been rejected! Watsons who escalated this issue will have their escalation amount deducted from their next payout. |
Dug
medium
If a pegged token oracle goes down or price falls to zero, depeg events cannot be triggered
Summary
In some extreme cases, oracles can be taken offline or token prices can fall to zero. In these cases,
triggerDepeg
will not execute, even though these situations are likely what Earthquake is built for.Vulnerability Detail
Chainlink has taken oracles offline in extreme cases. For example, during the UST collapse, Chainlink paused the UST/ETH price oracle to ensure that it wasn't providing inaccurate data to protocols.
In such a situation (or one in which the token's value falls to zero), calls to
triggerDepeg
would revert. This is because any call totriggerDepeg
callsgetLatestPrice
, which calls the oracle to get the values of the pegged token.Depending on the specifics, one of the following checks would cause the revert:
priceFeed.latestRoundData
would failif (price <= 0) revert OraclePriceZero();
if (answeredInRound < roundID) revert RoundIDOutdated();
Impact
Depegs cannot be triggered at a time when the protocol should be paying out collateral to those who have paid the premium for the epoch.
Code Snippet
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Controllers/ControllerPeggedAssetV2.sol#L51-L62
https://github.com/sherlock-audit/2023-03-Y2K/blob/main/Earthquake/src/v2/Controllers/ControllerPeggedAssetV2.sol#L273-L318
Tool used
Manual Review
Recommendation
Ensure there is a safeguard in place to protect against this possibility.
Duplicate of #422
The text was updated successfully, but these errors were encountered: