Skip to content

Replace FastLane with buffered ether allocation#1690

Open
Psirex wants to merge 1 commit intofeat/staking-router-3.0from
feat/buffered-ether-allocation
Open

Replace FastLane with buffered ether allocation#1690
Psirex wants to merge 1 commit intofeat/staking-router-3.0from
feat/buffered-ether-allocation

Conversation

@Psirex
Copy link
Contributor

@Psirex Psirex commented Mar 4, 2026

This PR replaces FastLane with buffered ether allocation and reservation logic.

Buffered ETH is now handled as prioritized parts: depositsReserve, withdrawalsReserve, and unreserved remainder. The diagram below illustrates buffer partitioning:

   ┌─────────── Total Buffered Ether ───────────┐
   ├────────────────────┬───────────────────────┼─────┬──────────────┐
   │●●●●●●●●●●●●●●●●●●●●│●●●●●●●●●●●●●●●●●●●●●●●●○○○○○│○○○○○○○○○○○○○○│
   ├────────────────────┼───────────────────────┼─────┼──────────────┤
   └─ Deposits Reserve ─┼─ Withdrawals Reserve ─┘     ├─ Unreserved ─┘
                        └───── Unfinalized stETH ─────┘

     - covered by Buffered Ether
     - not covered by Buffered Ether

    depositsReserve    = min(total, stored deposits reserve)
    withdrawalsReserve = min(total - depositsReserve, unfinalizedStETH)
    unreserved         = total - depositsReserve - withdrawalsReserve

The reserve target behavior is designed to be safe for report processing: decreasing depositsReserveTarget is applied immediately, while increasing it is applied on report sync, so in-flight withdrawal finalization assumptions are not broken.

Tests were updated to reflect the new behavior and validate the main invariants around deposits reserve, withdrawals reserve, and finalization budget calculation.

@Psirex Psirex requested a review from a team as a code owner March 4, 2026 18:02
@Psirex Psirex requested review from folkyatina, krogla and mkurayan March 4, 2026 18:06
@krogla krogla mentioned this pull request Mar 5, 2026
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.

1 participant