Skip to main content

Rebalance stVault

Rebalancing transfers ETH from the stVault to Lido Core and writes off the same amount of stETH liability at a 1:1 ratio – all in a single transaction. The stETH is not burned — it stays in circulation, now backed by Lido Core instead of your stVault.

The stVault's Total Value and stETH Liability both go down by the rebalanced amount. Since the liability shrinks while the collateral shrinks by the same absolute amount, the reserve improves and so does the Health Factor.

Rebalance or repay?

Both reduce the stETH liability, but they spend different things. Taking an stVault with 1,000 ETH of Total Value and 400 stETH minted, closed out in full either way:

Repay (burn)Rebalance
What is spent400 stETH acquired externally400 ETH from the stVault balance
Total Value afterwardsunchanged, 1,000 ETHreduced to 600 ETH
ETH recovered at the end1,000 ETH600 ETH
Future rewardsunchangedreduced, the stVault has less ETH working

Recovering 1,000 ETH instead of 600 is not a gain: the 400 stETH had to be bought somewhere. At parity that purchase costs 400 ETH, so both paths leave the same 600 ETH — the extra ETH that came back was paid for on the market.

The whole difference is therefore the stETH price. Trading below parity, repaying is cheaper; above parity, rebalancing is. What repaying gives at any price is that the stVault keeps its full balance, and keeps earning on it, until the moment of withdrawal — see Supply, withdraw, mint and repay.

Rebalancing avoids the market entirely, and it is what the protocol falls back to when an stVault becomes unhealthy.

Before you start

  • REBALANCE_ROLE is required — by default the Vault Owner has it; it can be delegated. See Roles and permissions.
  • A fresh oracle report must be applied. The call reverts with VaultReportStale otherwise. The Web UI handles this automatically; via CLI or Etherscan the report has to be applied first — see Apply oracle reports.
  • The ETH must be on the stVault balance, not on validators. If most of the stVault's ETH is staked, request validator exits first and wait for the ETH to be swept back.

How much to rebalance

It depends on the goal:

  • Restore health — rebalance the shortfall. Read it from healthShortfallShares on the Dashboard contract: it returns the shares needed to bring the stVault back to a healthy state, 0 if the stVault is already healthy, and the maximum uint256 value if rebalancing alone cannot fix the position.
  • Close the stVault — rebalance the entire stETH liability, which brings it to zero and unlocks the remaining ETH for withdrawal. See Disconnection.
note

The stETH liability grows daily with the stETH rebase, so a number calculated yesterday will be slightly short today. Always read the current value right before executing.

Doing the rebalance

Two methods are available on the Dashboard contract, differing only in how the amount is denominated:

MethodAmount in
rebalanceVaultWithSharesstETH shares
rebalanceVaultWithEtherETH

rebalanceVaultWithEther converts the amount to shares internally, so the ETH transferred can differ slightly from the amount passed because of rounding. It is also payable: you can supply extra ETH in the same transaction to cover a shortfall the stVault balance cannot.

using stVaults Web UI
  1. Go to https://stvaults.lido.fi/vaults/<vault_address>/rebalance.
  2. Enter the amount to rebalance. Utilization ratio, stETH Liability, Health Factor and Total Value are shown as current → projected values, so you can check the outcome before signing.
  3. If the stVault balance is not enough, switch on the supply toggle and add the missing ETH — it is funded and rebalanced in the same transaction.

If the oracle report is stale, the UI prepends the report update to the same transaction batch, so there is no separate step for it.

using Command-line Interface
yarn start contracts dashboard write rebalance-ether <dashboard_address> <ether>
yarn start contracts dashboard write rebalance-shares <dashboard_address> <shares>

To check the shortfall first:

yarn start contracts dashboard read health-shortfall-shares <dashboard_address>

Note that these commands take the Dashboard address, not the stVault address, and that contracts, write and read can be shortened to c, w and r.

using Etherscan UI
  1. Open Etherscan and navigate to the Dashboard contract — find its address on the Per-setup addresses page.
  2. Call healthShortfallShares to check how many shares are needed to restore health.
  3. Call rebalanceVaultWithEther or rebalanceVaultWithShares, passing the amount in wei.

Forced rebalancing

If the stVault becomes unhealthy and the owner does not act, the protocol restores the position without them.

forceRebalance on the VaultHub contract is permissionless — anyone can call it for an stVault that has an obligations shortfall. It takes all available ETH on the stVault balance, up to what is needed to cover the outstanding obligations, and rebalances it.

It also requires a fresh oracle report, and it does not settle Lido fees.

The Web UI exposes this as well. Once an stVault becomes force-rebalanceable, its rebalance page switches into force-rebalance mode: the amount field and the supply toggle disappear, and the submit button works for any connected address — no REBALANCE_ROLE needed.

warning

Being force-rebalanced is worse than rebalancing voluntarily: the Vault Owner loses control over how much is rebalanced and when. Monitor the Health Factor and act while it is still above 100% — see the Health monitoring guide and the Health emergency guide.