Watermark and Recovery
A staked yb-LP position is "underwater" when the price-per-share has fallen below its watermark. The protocol calls this Recovery Mode. Subsequent fee inflows route to the staked side first until parity is restored, so the loss is bounded and temporary; YB emissions continue to accrue throughout. This state is expected to be rare; what follows is the contract-level mechanism that protects stakers if it is triggered.
The two variables
staked: the actual value currently held in staked.ideal_staked: the watermark. Equals price-per-share ATH.
Both update on every deposit, withdraw, transfer into or out of the staker address, and every fee distribution.
Watermark is the user-facing name for ideal_staked. The docs use watermark everywhere except in source-level discussion.
Three states
| State | Condition | What's happening |
|---|---|---|
| At parity | staked == ideal_staked | Normal operation. Fees split between staked and unstaked per admin-fee formula. |
| Recovery mode | staked < ideal_staked | Fees route to staked first until parity. |
| Above watermark | Not a permitted state | staked is capped at ideal_staked in the accounting itself. |
Worked example: how recovery works when triggered
Recovery mode is rare. The scenario below illustrates how the mechanism behaves once triggered; the numbers are illustrative magnitudes for pedagogical clarity.
Day 0. You stake 100 yb-LP shares at PPS = 1.0. staked = 100, ideal_staked = 100.
Days 1–30. Market volatility pushes cumulative rebalance cost above fees by 2%. staked drops to 98; ideal_staked stays at 100. Recovery mode is active. Your YB emissions over the 30 days: about $50 in YB at current price.
Days 31–60. Fees outrun rebalance cost by 1.5%. All 1.5% routes to the staked side first, since admin fee does not apply during recovery. staked climbs to 99.47.
Days 61–100. Another 1.5% net fee gain routes entirely to staked, closing the gap. staked = 100.0. From this point, admin fee applies to subsequent inflows.
Day 100. You unstake. Redemption value (modulo TRD) is roughly 50 of YB emissions: positive net.
If instead you unstake on day 30, mid-drawdown: your 100 shares redeem for 50 YB = 150 you would have had by waiting. Realized loss: $2 of PPS-level value. No TRD assumed.
Entering Recovery Mode
When rebalance costs or LEVAMM revaluation reduce the vault's total value, LT distributes the loss across staked and unstaked. The net effect is staked dropping below ideal_staked.
In the value-distribution logic:
- Positive value change: flows to staked first while
staked < ideal_staked. - Negative value change: absorbed proportionally, with staked loss capped at the larger of its fair share and a safety bound (the
v_st_loss * supply / stakedterm, which prevents unbounded dilution of stakers' shares).
Exiting Recovery Mode
Fees and favourable rebalances accrue. Each fee distribution:
- Increases
stakedtowardideal_staked. - Once parity is reached, subsequent fees resume the normal staked/unstaked split.
Recovery time depends on fee flow. The parameter set keeps rebalance cost close to fee income, so a triggered recovery closes as forward fees outrun forward drag — the size of the gap determines how many fee cycles that takes.
What a staked LP sees
- During drawdown: the dashboard shows PPS still climbing for unstaked LPs, but your staked position's redeemable value is below deposit.
- YB emissions continue throughout. They are the compensation for waiting.
- At watermark recovery: your staked position's redeemable value returns to at-or-above deposit, modulo TRD (which also resolves on its own).
How staked moves on deposits and transfers
- Deposit from user address (unstaked):
supplyandtotalgrow;stakedandideal_stakedunchanged. - Transfer into
stakeraddress (stake):stakedandideal_stakedboth increase by proportional value. Watermark re-anchors. - Transfer out of
stakeraddress (unstake):stakeddecreases by proportional value;ideal_stakeddecreases by the same ratio ofstaked_tokens. The gap as a percentage ofstakedis preserved on unstake, not the absolute value of the gap.
Worked illustration. Suppose staked = 980, ideal_staked = 1000 (gap 2%) and you stake 100 of new value. Both variables scale: staked = 1080, ideal_staked ≈ 1102. Gap stays near 2%.
Related
- Staked vs Unstaked Economics: the staking decision and why only staked positions take this drawdown.
- Fundamental Value, Redemption Value, and TRD: the short-term redemption gap, distinct from watermark drawdown.
- Withdraw Liquidity: how to exit a staked position.
- Dev: LT: the
stakedandideal_stakedon-chain accounting.