Conversation
…solidation-improvements Feat/staking router 3.0 consolidation improvements
Chore/fix csm module naming
Co-authored-by: Aleksei Potapkin <folkyatina@gmail.com>
Co-authored-by: Aleksei Potapkin <folkyatina@gmail.com>
Staking router 3.0
Hardhat Unit Tests Coverage SummaryDetailsDiff against masterResults for commit: d088bbc Minimum allowed coverage is ♻️ This comment has been updated with latest results |
scripts for redeploy wv impl
feat: fuzzing updated
ci: update all actions to latest versions pinned to commit SHAs
| uint256 internal initialDepositedValidators; | ||
| uint256 internal initialBeaconValidators; | ||
| uint256 internal initialBeaconBalance; | ||
| bytes32 internal initialWithdrawalCredentials; |
| uint256 internal initialBeaconValidators; | ||
| uint256 internal initialBeaconBalance; | ||
| bytes32 internal initialWithdrawalCredentials; | ||
| uint256 internal initialModulesCount; |
| bool public isUpgradeFinished; | ||
|
|
||
| uint256 internal initialBufferedEther; | ||
| uint256 internal initialDepositedValidators; |
|
|
||
| uint256 internal initialBufferedEther; | ||
| uint256 internal initialDepositedValidators; | ||
| uint256 internal initialBeaconValidators; |
| uint256 internal initialBufferedEther; | ||
| uint256 internal initialDepositedValidators; | ||
| uint256 internal initialBeaconValidators; | ||
| uint256 internal initialBeaconBalance; |
| uint256 internal initialDepositedValidators; | ||
| uint256 internal initialBeaconValidators; | ||
| uint256 internal initialBeaconBalance; | ||
| bytes32 internal initialWithdrawalCredentials; |
| uint256 internal initialBeaconValidators; | ||
| uint256 internal initialBeaconBalance; | ||
| bytes32 internal initialWithdrawalCredentials; | ||
| uint256 internal initialModulesCount; |
ci: extend dependabot config to npm and pip ecosystems
test: fix gindex fuzz config
fix: skip deactivated node operator
| @@ -0,0 +1,38 @@ | |||
| // SPDX-License-Identifier: GPL-3.0 | |||
There was a problem hiding this comment.
| // SPDX-License-Identifier: GPL-3.0 | |
| // SPDX-FileCopyrightText: 2026 Lido <info@lido.fi> | |
| // SPDX-License-Identifier: GPL-3.0 |
There was a problem hiding this comment.
And looks like it can be mass-updated.
| * @param targetPubkeys An array of 48-byte public keys corresponding to validators receiving the consolidation. | ||
| * | ||
| * @notice Reverts if: | ||
| * - The caller is not ConsolidationsGateway. |
There was a problem hiding this comment.
| * - The caller is not ConsolidationsGateway. | |
| * - The caller is not ConsolidationGateway. |
| * @dev Retrieves the current EIP-7002 withdrawal fee. | ||
| * @return The minimum fee required per withdrawal request. | ||
| */ | ||
| function getWithdrawalRequestFee() public view returns (uint256) { |
There was a problem hiding this comment.
| function getWithdrawalRequestFee() public view returns (uint256) { | |
| function getWithdrawalRequestFee() external view returns (uint256) { |
| * @param _lido the Lido token (stETH) address | ||
| * @param _treasury the Lido treasury address (see ERC20/ERC721-recovery interfaces) |
There was a problem hiding this comment.
| * @param _lido the Lido token (stETH) address | |
| * @param _treasury the Lido treasury address (see ERC20/ERC721-recovery interfaces) | |
| * @param _lido the Lido token (stETH) address | |
| * @param _treasury the Lido treasury address (see ERC20/ERC721-recovery interfaces) | |
| * @param _triggerableWithdrawalsGateway the TriggerableWithdrawalsGateway address, the only caller allowed to submit EIP-7002 withdrawal requests | |
| * @param _consolidationGateway the ConsolidationGateway address, the only caller allowed to submit EIP-7251 consolidation requests | |
| * @param _withdrawalRequest the EIP-7002 withdrawal request predeploy address | |
| * @param _consolidationRequest the EIP-7251 consolidation request predeploy address |
| // solhint-disable-next-line | ||
| pragma solidity >=0.4.24 <0.9.0; | ||
|
|
||
| // https://github.com/lidofinance/circuit-breaker/blob/main/src/CircuitBreaker.sol |
There was a problem hiding this comment.
| // https://github.com/lidofinance/circuit-breaker/blob/main/src/CircuitBreaker.sol | |
| // https://github.com/lidofinance/circuit-breaker/blob/b4b2fbc921b3191560a3fc62d502d4bb98ad99e1/src/CircuitBreaker.sol |
There was a problem hiding this comment.
Better explicitly use audited commit, to avoid code drifting
| // If the CL balance is not decreased, we don't need to check anything here | ||
| return; | ||
| uint256 adjustedBase = baselineBalance + totalDeposits; | ||
| if (adjustedBase < totalCLWithdrawals) { |
There was a problem hiding this comment.
This invariant does not hold.
In general case if you deposit 100ETH, it works for some time brings you 1 ETH of reward and you withdraw everything, it will give you recreatedPostCLBalance = 100ETH and totalCLWithdrawals = 101 ETH and it will reverts. It becomes worth if consider gifts to witdrawalVault that will be accounted as withdrawals.
There was a problem hiding this comment.
There was a problem hiding this comment.
TopUpData in TopUpWitness.sol does not help, tbh. At the moment, it looks like a mess.
There was a problem hiding this comment.
Maybe add some comments love like in CLProofVerifier?
Staking Router v3 upgrades Lido's core protocol for EIP-7251 (MaxEB). Validator accounting moves from per-validator counts to direct balance tracking, rewards are distributed per-module balance, and the deposit flow switches from a push model orchestrated by the Lido contract to a pull model where the Staking Router withdraws ETH from Lido as needed. A new
TopUpGatewayenables top-ups of0x02validators up to 2048 ETH, secured by on-chain Merkle-proof verification of validator state.A consolidation pipeline enables stake migration from Curated Module v1 to v2, and the validator exit flow (VEBO/VEO) becomes key-type-aware and balance-based, with sanity checks bound by total effective balance rather than validator count.
A deposit reserve protects a portion of buffered ether for CL deposits, preventing withdrawal demand from consuming ETH needed for stake rebalancing and initial deposits during the CMv1 to CMv2 migration.