Skip to content

[App] Urgent redemptions#1197

Open
cyril-dfi wants to merge 21 commits intomainfrom
urgent-redemptions
Open

[App] Urgent redemptions#1197
cyril-dfi wants to merge 21 commits intomainfrom
urgent-redemptions

Conversation

@cyril-dfi
Copy link
Copy Markdown
Collaborator

@cyril-dfi cyril-dfi commented Feb 5, 2026

Fixes #1067

Urgent redemptions screens (/redeem/urgent)
image
image
image
image
image

image image

Shutdown mode warning on loan screen
image

@cyril-dfi cyril-dfi marked this pull request as draft February 5, 2026 15:26
@cyril-dfi cyril-dfi changed the title feat: urgent redemptions [App] Urgent redemptions Feb 6, 2026
@cyril-dfi cyril-dfi marked this pull request as ready for review February 12, 2026 12:46
const activeBranch = activeBranchSymbol ? getBranch(activeBranchSymbol) : null;
const collToken = activeBranch ? getCollToken(activeBranch.branchId) : null;

const price = useLastGoodPrice(activeBranchSymbol);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, it should be using fetchPrice(), AKA useCollateralPrices()

Copy link
Copy Markdown
Collaborator

@danielattilasimon danielattilasimon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[App] Redemption During Shutdown

2 participants