Skip to main content

Collateral shutdown

A branch can be shut down. The whole system can be shut down by shutting down every branch. Shutdown is a terminal state for a branch; there is no path back to normal operation. This page covers the triggers, the effects, and what stays alive afterward.

Triggers​

A branch becomes shutdownable when any of these conditions hold:

  1. Branch TCR has fallen below its SCR (per-branch shutdown collateral ratio, set to MCR − 0.5 percentage points — e.g. 109.5% on WETH). The branch is dangerously undercollateralized and continuing to issue debt would be irresponsible. Anyone can call BorrowerOperations.shutdown() to formalize.
  2. Branch oracle is failing. priceFeed.previewWillShutdown(...) == true means the next price fetch would find no usable source for some input of the branch's feed (see Collateral oracles). The price feed itself calls BorrowerOperations.shutdownFromOracleFailure() (only the feed may call it) during that fetch, so any operation that reads the price, or a call to BorrowerOperations.shutdown(), shuts the branch down.
  3. Collateral custody has failed. One of the branch's collateral pools holds less of the collateral token than its ledger says (underbacked), or — for collaterals that can be blacklisted (WBTC, weETH, PAXG) — a zero-amount test transfer out of one of the pools fails. The Aggregator checks this and calls BorrowerOperations.shutdownFromCollateralFailure().

The Aggregator also exposes:

Aggregator.tryAllShutdown() // attempts shutdown on every branch that is shutdownable
Aggregator.tryShutdown(address tm) // the same checks for one branch
Aggregator.getShutdownableBranches() returns (address[]) // view; no transfer test
Aggregator.getShutdownableBranchesWithTransferChecks() returns (address[]) // includes the transfer test

so a keeper can sweep all branches in one tx. KeeperRewards.tryAllShutdownWithReward() runs the same sweep and pays the caller 100 RD per branch shut down, up to 400 RD per call (limited by the contract's RD balance).

The protocol does not include an admin-only shutdown trigger. Shutdown is permissionless and condition-driven.

What changes on shutdown​

When a branch shuts down, TroveManager.shutdown first updates rate and par and drips the branch's interest one last time, records the shutdown time (and the oracle-failure time if that was the cause), and the Aggregator marks isShutdown[troveManager] = true:

SubsystemBehavior
BorrowerOperationsopenTrove, withdrawRD, addColl, withdrawColl, Redemption Shield toggles and moving SP gains to a trove revert. closeTrove, repayRD (pure repayment) and claimCollateral still work; the early-repayment fee still applies.
InterestEngineInterest stops accruing on the branch: drips return early, so the accumulated rates stay where the final drip left them. Interest accrued before shutdown is kept.
StabilityPoolSpIssuance stops emitting MOAI to this branch's pool; MOAI already earned stays claimable, and the remaining pools share future emissions. If it was the last active pool, the unissued remainder of the SP emission schedule is sent to the 0x…dEaD address. Existing depositor balances and gains remain claimable.
AggregatorBranch removed from the redemption basket weights (no normal-mode redemption) and from the cross-branch drip sweep. Its debt leaves the global debt figure and its debt EMA stops being refreshed. Its utilization target and bands are set to zero and the surviving branches' targets are rescaled.
RedemptionsSwitches to shutdown pricing mode, called directly on the branch through Redemptions.redeemCollateralForShutdown(amount, maxIterations). Both base and Redemption Shield sorted lists are walked together in ascending ICR order. No redemption quota, no branch redemption fee and no redemption protocol fee apply.
LiquidationsStill callable while the branch's oracle is healthy (offset + redistribute work as before). After an oracle-failure shutdown the feed is shut down and liquidations revert.

In short: no new borrowing, no new SP incentives, but redemption (and, with a working oracle, liquidation) continues so the branch can wind down to zero.

Residual debt​

Shutdown redemption can take a trove's last collateral even when debt remains (the trove is closed and the leftover debt stays at branch level). Once the whole branch's collateral is gone, Redemptions burns the branch's gas-pool RD against the remaining debt. If debt is still left after that, the branch is flagged underCollateralized and becomes the Aggregator's bad-debt sink: normal redemptions on healthy branches then pay part of their value toward it (see Redemption mechanism), and GlobalFeeRouter can also repay it. Redemptions.settleResidualPoolDebt() runs the same settlement when the collateral left through other exits.

Shutdown redemption pricing​

In shutdown mode, redemption no longer uses the live oracle price minus a redemption fee. Instead, it applies a discount multiplier to the branch price (the last good or fallback price if the oracle failed).

The multiplier depends on why the branch was shut down and how much time has passed:

Trigger Start Max discount Ramp window
----------------------------- -------------------------- ---------------------------------- -----------------------------------
TCR < SCR, collateral failure 1% premium (BASE_DISCOUNT) MAX_DISCOUNT_TCR_BELOW_SCR = 5% MAX_DISCOUNT_TIME_SCR = 1 day
Oracle failure same first-day ramp MAX_DISCOUNT_ORACLE_FAILURE ≈ 100% MAX_DISCOUNT_TIME_FAILURE = 14 days

The multiplier starts at 1 + BASE_DISCOUNT (1.01 — a 1% premium). The premium start is an anti-griefing measure: shutdown redemptions bypass the redemption quota, so an instantly profitable discount would make forcing a shutdown a prize that scales with branch size. The first hour is a fast linear ramp from the 1% premium to a 1% discount (crossing break-even about 30 minutes in); from that kink it ramps gently over the remaining 23 hours to the 5% cap. Both causes share the identical first-day ramp; when causes overlap, the contract takes the min of the two multipliers on their own clocks (Redemptions._calcPriceMultiplier), so the schedule is continuous and monotonic — a cause flip can never jump the price.

A redeemer hands the protocol RD; the collateral they receive is valued at oracle price × multiplier. Below parity, redeemers receive more collateral per RD. At the oracle-failure cap the multiplier approaches zero — the branch pays out whatever collateral remains to whoever clears its debt. That's intentional: it lets the branch fully clear even when its price feed is broken.

For TCR-below-SCR and collateral-failure shutdowns, the discount is capped at 5% — much gentler, because the protocol still trusts the oracle and is just adding urgency to the wind-down. If the oracle of a branch already shut down for another cause fails later, the failure time is recorded and the deeper oracle-failure curve starts from that moment.

Why troves with Redemption Shield enabled lose their shield​

Inside shutdown mode, redemption can walk both books on the same discount schedule. The redemption shield's purpose was to delay redemption while the base book existed, but the branch is being wound down anyway, so that delay would just leave RD holders unable to exit.

Troves with Redemption Shield enabled paid a premium while the branch was operating. After shutdown, that premium stops accruing and both cohorts are redeemed under the same wind-down schedule.

Effects across branches​

A single-branch shutdown has cross-system consequences via the Aggregator:

  • Basket weights: _basketWeights() checks isShutdown[troveManagers[i]] and sets the shutdown branch's weight to 0. Subsequent Aggregator.redeemCollateral calls route 100% of the requested RD across the remaining active branches.
  • Drip sweep: Aggregator.drip() skips shutdown branches.
  • Issuance quotas and targets: the shutdown branch can never issue again; its utilization target is zeroed and the surviving branches' targets are rescaled to fill the gap.
  • Global debt: the shutdown branch's debt is removed from the global debt figure used by the redemption and issuance quotas.
  • SP emissions: the remaining Stability Pools share the MOAI emissions the shutdown pool no longer receives.

Healthy branches keep operating normally.

System-wide shutdown​

The protocol doesn't have a "global shutdown" switch. System-wide shutdown is what happens when every branch has been shut down individually. There's no global state for it; each branch just transitions on its own conditions.

In a system-wide shutdown:

  • RD holders can redeem directly against any branch that still has redeemable collateral, at that branch's discount schedule, through that branch's Redemptions.redeemCollateralForShutdown.
  • No new borrowing anywhere.
  • Liquidations on each branch continue until troves are cleared or oracle pricing is no longer trustworthy.
  • Aggregator.redeemCollateral has no branch left to route to and reverts.

Controller shutdown​

Separate from collateral branches, the system rate controller has its own terminal state. If both RD market pools permanently shut down (see RD Market Oracle), the next RateParControl update latches controllerShutdown and emits ControllerShutdown. From then on rate and par only decay toward their biases (2% APY and $1.00) and no longer respond to the market. Collateral branches are not shut down by this; see Peg control.

What survives shutdown​

StateSurvives
RD tokenYes, it's a standalone ERC-20
Trove debt and collateralYes, claimable via redemption / liquidation / closeTrove
SP depositor balances and gainsYes, claimable via withdrawFromSP. Gains can always be claimed (withdrawFromSP(0)). RD withdrawals revert while any trove is below MCR; after an oracle-failure shutdown liquidation is disabled, so they stay blocked until shutdown redemptions remove those troves.
MOAI staking lockupsYes, the shut branch stops producing interest fees, but principal and fees from other branches continue
MOAI tokenYes
Pending redistribution rewardsYes, applied on the next state-touching call

No protocol administrator can confiscate, freeze, or migrate user assets. Shutdown is a rules-based wind-down.

Operational constraints after shutdown​

If a branch is in shutdown:

  • Opening a new trove is disabled. The branch cannot issue new debt.
  • Stability Pool deposits remain accepted, but rewards change. MOAI emissions and branch interest stop. While the oracle remains usable, later liquidations can still burn deposited RD in exchange for collateral, and the normal withdrawal restrictions still apply.
  • Direct shutdown redemption remains available while the branch has redeemable collateral, using the time-dependent pricing schedule above.
  • Existing borrowers can still repay or close. Full repayment and collateral claims remain available.

Deep dive​