Conversation
| const activeBranch = activeBranchSymbol ? getBranch(activeBranchSymbol) : null; | ||
| const collToken = activeBranch ? getCollToken(activeBranch.branchId) : null; | ||
|
|
||
| const price = useLastGoodPrice(activeBranchSymbol); |
There was a problem hiding this comment.
We should not be using lastGoodPrice, as it can be outdated. For example if the shutdown is triggered due to TCR falling below SCR, the oracle will still be fully functional, and the urgent redemption will fetch a more recent price than lastGoodPrice.
And for staked ETHs (wstETH, rETH), there are multiple underlying price feeds. For example in the case of rETH, the price is normally calculated based on a combination of rETH:ETH and ETH:USD prices. If the rETH:ETH price feed fails or stops working, it will trigger a shutdown of the rETH branch and we'll switch to using ETH:USD and the canonical exchange rate of rETH to ETH according to Rocket Pool's accounting. In this case, fetchPrice() will still result in a different price from lastGoodPrice.
TL;DR: we should just use fetchPrice()
| const branch = getBranch(branchId); | ||
| const collToken = getCollToken(branchId); | ||
| const tokenName = collToken.symbol === "ETH" ? "WETH" : collToken.name; | ||
| const price = useLastGoodPrice(branch.symbol); |
There was a problem hiding this comment.
Same here, it should be using fetchPrice(), AKA useCollateralPrices()
Fixes #1067
Urgent redemptions screens (/redeem/urgent)





Shutdown mode warning on loan screen
