Skip to content

Commit 42c3628

Browse files
authored
Merge pull request #802 from lidofinance/feature/we-2245-move-stvaults-economy-examples-to-docs
feat: add stVaults economy guide to operational docs
2 parents 49b17d2 + 85b3ca8 commit 42c3628

File tree

10 files changed

+690
-6
lines changed

10 files changed

+690
-6
lines changed

run-on-lido/stvaults/building-guides/pooled-staking-product/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 2
2+
sidebar_position: 1
33
---
44

55
import Tabs from '@theme/Tabs';

run-on-lido/stvaults/operational-and-management-guides/health-emergency-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 2
2+
sidebar_position: 3
33
---
44

55
# 🚨 Health Emergency Guide

run-on-lido/stvaults/operational-and-management-guides/health-monitoring-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 1
2+
sidebar_position: 2
33
---
44

55
# 🩺 Health Monitoring Guide

run-on-lido/stvaults/operational-and-management-guides/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 2
2+
sidebar_position: 1
33
---
44

55
# 📝 Operational and Management Guides
@@ -10,4 +10,6 @@ Day-to-day guidance for running and maintaining stVaults safely, including healt
1010

1111
- [Health Monitoring Guide](./health-monitoring-guide.md)
1212
- [Health Emergency Guide](./health-emergency-guide.md)
13-
- [Identified Node Operators](./node-operators-identification.md)
13+
- [Voluntary Rebalancing and Vault Closure](./voluntary-rebalancing-and-vault-closure.md)
14+
- [stVaults Economy Examples](./stvaults-economy-examples.mdx)
15+
- [Identified Node Operators](./node-operators-identification.md)

run-on-lido/stvaults/operational-and-management-guides/node-operators-identification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 3
2+
sidebar_position: 6
33
---
44

55
# 📝 Identified Node Operators

run-on-lido/stvaults/operational-and-management-guides/stvaults-economy-examples.mdx

Lines changed: 326 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
---
2+
sidebar_position: 4
3+
---
4+
5+
# 🔄 Volunteering Rebalancing and Vault Closure
6+
7+
## TLDR
8+
9+
- **To close a stVault and withdraw all ETH**, you must first eliminate the stETH Liability entirely.
10+
- **Option 1:** Acquire stETH externally and repay it to the stVault to reduce the liability.
11+
- **Option 2:** Use voluntary rebalancing to transfer ETH from the stVault to Lido Core, writing off debt at a 1:1 ratio.
12+
- Once the liability is cleared, the remaining ETH becomes fully withdrawable.
13+
14+
---
15+
16+
## 📚 Definitions
17+
18+
- **Voluntary Rebalancing** — a Vault Owner-initiated action that transfers ETH from the stVault to Lido Core, writing off the equivalent stETH liability at a 1:1 ratio.
19+
- **Reserve Ratio (RR)** — defines the amount of ETH that will be reserved as part of the collateral when the Vault Owner mints stETH in the stVault. stETH isn’t minted for this amount.
20+
- **stETH Liability** — the amount of stETH that the Vault Owner minted in the stVault, backed by the ETH collateral. Increases daily due to the stETH rebase.
21+
- **Total Value** — the total amount of ETH, consisting of ETH staked on validators plus ETH held in the stVault Balance. Rewards accrue to both and increase Total Value.
22+
- **stVault Balance** — the portion of ETH held directly in the StakingVault contract, not staked on validators. Only stVault Balance ETH can be used for rebalancing or withdrawal.
23+
- **Validator Balance** — the portion of ETH staked on validators. To make this ETH available for rebalancing, you must first request validator exits and wait for the exit to complete.
24+
25+
---
26+
27+
## 🔍 Why you need to repay stETH Liability to close an stVault
28+
29+
When you mint stETH against your stVault, you create a **debt obligation** — the stETH Liability. The stVault’s ETH serves as collateral backing that liability.
30+
31+
You cannot simply withdraw all ETH while stETH Liability remains outstanding. To close the stVault and unlock your ETH, you must first eliminate the liability entirely.
32+
33+
There are two ways to do this:
34+
35+
1. **Repay stETH** — acquire stETH externally and repay it back to the stVault to reduce the liability directly.
36+
2. **Voluntary rebalancing** — transfer ETH from the stVault Balance to Lido Core, which writes off the equivalent stETH Liability at a 1:1 ratio.
37+
38+
Once the liability reaches zero, and it's confirmed by a fresh Oracle report, the remaining ETH in the stVault is unlocked to withdraw.
39+
40+
---
41+
42+
## 📝 Option 1 — repay stETH
43+
44+
The standard way to reduce stETH Liability is to acquire stETH and repay it back to the stVault.
45+
46+
### How it works
47+
48+
1. Acquire stETH equal to your stETH Liability (e.g., buy on a DEX, swap ETH → stETH, or use stETH you already hold).
49+
2. Repay the stETH back to the stVault. Each stETH repay reduces the stETH Liability by the same amount.
50+
3. Once the full liability is repaid, the stVault’s ETH is fully withdrawable.
51+
52+
### Calculation
53+
54+
`stETH to Repay = stETH Liability`
55+
56+
For example, an stVault with 1000 ETH Total Value and 400 stETH minted: acquire and repay **400 stETH**.
57+
58+
After repaying, the stVault has 1,000 ETH with zero liability — all of it is withdrawable (once validators are exited and ETH is back in stVault balance, and a fresh Oracle report is applied to the stVault).
59+
60+
---
61+
62+
## 📝 Option 2 — Voluntary rebalancing
63+
64+
If you do not have or do not wish to acquire stETH externally, you can use voluntary rebalancing to repay the liability using the stVault’s own ETH.
65+
66+
### How it works
67+
68+
1. Transfer ETH from the stVault balance to Lido Core.
69+
2. Lido Core writes off the equivalent stETH debt at a 1:1 ratio.
70+
3. The stVault’s stETH Liability decreases by the amount of ETH transferred.
71+
72+
### Trade-offs compared to repaying stETH
73+
74+
- **Cons:** Reduces the stVault’s Total Value. To repay 400 stETH, you spend 400 ETH from the stVault — leaving you with less ETH to withdraw at the end.
75+
- **Cons:** Requires sufficient stVault balance (not validator balance), so you may need to exit validators before rebalancing.
76+
- **Pros:** No need to acquire stETH externally or interact with DEXes.
77+
78+
### How to calculate the ETH needed
79+
80+
To **fully close the stVault**, you are repaying the entire stETH debt. Since voluntary rebalancing writes off stETH at a 1:1 ratio for each ETH transferred, the total ETH required equals the full stETH Liability (**full rebalancing**):
81+
82+
`ETH for full repayment = stETH Liability`
83+
84+
---
85+
86+
## 🔍 Example: closing an stVault with 1,000 ETH and 400 stETH minted
87+
88+
### Initial stVault state
89+
90+
| Metric | Value |
91+
| --- | --- |
92+
| Total Value | 1,000 ETH |
93+
| — Validator Balance | 960 ETH (30 validators × 32 ETH) |
94+
| — stVault Balance | 40 ETH |
95+
| Reserve Ratio (RR) | 5% |
96+
| stETH Liability (minted stETH) | 400 stETH |
97+
98+
### Path A — Repay stETH
99+
100+
1. Acquire 400 stETH externally.
101+
2. Repay 400 stETH against the stVault. stETH Liability drops to **0**.
102+
3. Exit all 30 validators. Wait for ETH to be swept back to the stVault balance.
103+
4. Withdraw all 1,000 ETH.
104+
105+
| Metric | Before | After repay | After withdrawal |
106+
| --- | --- | --- | --- |
107+
| Total Value | 1,000 ETH | 1,000 ETH | 0 ETH |
108+
| stETH Liability | 400 stETH | 0 stETH | 0 stETH |
109+
| ETH withdrawn ||| 1,000 ETH |
110+
111+
**Result:** You recover all 1,000 ETH from the stVault (minus any unsettled fees). The 400 stETH used to repay was acquired externally.
112+
113+
### Path B — Voluntary rebalancing
114+
115+
Voluntary rebalancing can only use ETH from the **stVault Balance** (40 ETH here), not from validators directly. Since the full repayment requires 400 ETH, you must exit validators first to move enough ETH into the stVault Balance.
116+
117+
**Step 1 — Exit validators to free up ETH**
118+
119+
You need 400 ETH available in the stVault Balance to fully repay the stETH Liability. Currently, only 40 ETH is available — the remaining 960 ETH is locked on validators.
120+
121+
Request exits for enough validators to cover the shortfall:
122+
123+
`ETH shortfall = stETH Liability − stVault Balance = 400 − 40 = 360 ETH`
124+
125+
At 32 ETH per validator, you need to exit at least **12 validators** (12 × 32 = 384 ETH) to cover the 360 ETH shortfall.
126+
127+
After the exits complete and ETH is swept back to the stVault:
128+
129+
| Metric | Value |
130+
| --- | --- |
131+
| Total Value | 1,000 ETH |
132+
| — Validator Balance | 576 ETH (18 validators × 32 ETH) |
133+
| — stVault Balance | 424 ETH |
134+
135+
The stVault Balance now has enough ETH to cover the full 400 ETH rebalance.
136+
137+
**Step 2 — Calculate the ETH for full rebalancing**
138+
139+
To eliminate all stETH Liability, you must rebalance the full 400 ETH:
140+
141+
`ETH for full repayment = stETH Liability = 400 ETH`
142+
143+
**Step 3 — Execute voluntary rebalancing**
144+
145+
Initiate a voluntary rebalance of **400 ETH**:
146+
147+
1. The stVault transfers 400 ETH to Lido Core.
148+
2. Lido Core writes off 400 stETH debt at a 1:1 ratio.
149+
3. The stVault’s stETH Liability drops from 400 stETH to **0 stETH**.
150+
151+
**Post-rebalancing stVault state**
152+
153+
| Metric | Before | After |
154+
| --- | --- | --- |
155+
| Total Value | 1,000 ETH | 600 ETH |
156+
| — Validator Balance | 576 ETH | 576 ETH |
157+
| — stVault Balance | 424 ETH | 24 ETH |
158+
| stETH Liability | 400 stETH | 0 stETH |
159+
160+
**Step 4 — Withdraw remaining ETH**
161+
162+
With stETH Liability at zero, the remaining **600 ETH** is fully withdrawable. No collateral is locked, and no reserve requirements apply.
163+
164+
Of this 600 ETH, 24 ETH is already in the stVault Balance and can be withdrawn immediately. The remaining 576 ETH is still on validators — exit the remaining 18 validators and withdraw once the ETH is swept back to the stVault.
165+
166+
**Result:** You recover 600 ETH from the stVault. The other 400 ETH was spent on rebalancing.
167+
168+
Keep in mind that **unsettled fees** may reduce the actual withdrawable amount. Fees accrue daily and are deducted from the stVault’s Total Value. Ensure all fees are settled before calculating the final withdrawal amount.
169+
170+
---
171+
172+
## ❗️Important considerations
173+
174+
### stETH Liability grows over time
175+
176+
stETH Liability increases daily due to the stETH rebase. If you calculated 400 stETH today, the actual liability at the time of execution may be slightly higher. Always use the **current** stETH Liability value when executing the repay or rebalance.
177+
178+
### stVault balance vs. staked ETH
179+
180+
Voluntary rebalancing and withdrawals can only use the stVault's **available balance** (unstaked ETH). If the stVault’s ETH is primarily staked on validators, you must first exit enough validators and wait for the ETH to become available in the stVault Balance.
181+
182+
### Partial closure
183+
184+
If you do not have enough stETH or liquid ETH to repay the full liability at once, you can repay in stages — using multiple repays, multiple voluntary rebalances, or a combination of both. Each action reduces the stETH Liability.
185+
186+
### Fees
187+
188+
Unsettled fees reduce the effective Total Value. Factor in accrued fees when planning the closure to avoid a shortfall.

0 commit comments

Comments
 (0)