# LIP-25: Staking Router v2.0

**URL:** <https://research.lido.fi/t/lip-25-staking-router-v2-0/7773>\
**Category:** The LIP - Lido Improvement Proposal - Process\
**Created:** [June 28, 2024, 3:56pm UTC](https://research.lido.fi/t/lip-25-staking-router-v2-0/7773 "2024-06-28T15:56:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![infloop](https://dub1.discourse-cdn.com/flex013/user_avatar/research.lido.fi/infloop/32/4017_2.png) [@infloop](https://research.lido.fi/u/infloop)\
**Post date:** [June 28, 2024, 3:56pm UTC](https://research.lido.fi/t/lip-25-staking-router-v2-0/7773/1 "2024-06-28T15:56:28Z")

</div>

# LIP-25: Staking Router v2.0: Permissionless, secure and scalable

## Abstract

Lido DAO’s[mission](https://research.lido.fi/t/lido-dao-vibe-alignment-purpose-mission-vision/4380) is to make Ethereum staking simple, secure, and decentralized. Recent long-range goals[approved](https://snapshot.org/#/lido-snapshot.eth/proposal/0x0fa423280ce2bcc2596901d81322716ad440c7581658030a7d21784c2661d81c) by the Lido DAO (and proposed by @Hasu)[suggest](https://research.lido.fi/t/hasus-goose-submission-proposed-goals-for-lido-dao-to-consider/5590) the introduction of a decentralized validator set and permissionless staking modules.

The purpose of the thread is to summarize concerns proposed improvements to the Staking Router, in the form of a v2.0 upgrade which should be made to support permissionless modules (such as[Community Staking Module](https://research.lido.fi/t/community-staking-module/5917)) and improve security and scalability of the existing[Staking Router](https://research.lido.fi/t/lip-20-staking-router/3790). Should the community be generally aligned with these proposed improvements, they shall be detailed via a Lido Improvement Proposal (LIP) which will be posted in the coming weeks and put forth for a Snapshot vote.

## Scope of Staking Router v2.0 upgrade

The proposed SR upgrade includes improvements to both on- and off-chain parts of the following components:

- the Deposit Security Module (DSM),
- the Validator Exit Bus Oracle (VEBO),
- the Accounting Oracle,
- and reward distribution mechanisms in curated-based modules.

Tech details can be found here [LIP-25](https://github.com/lidofinance/lido-improvement-proposals/blob/develop/LIPS/lip-25.md)

## Proposed Improvements

### Deposit Security Module (DSM) improvements

#### Motivation

In the current implementation of the Curated modules, key vetting (the process of validating keys before making them depositable) occurs through DAO actions, and in particular EasyTrack motions, which operators may initiate after submitting keys or via full on-chain DAO votes. The proposed DSM changes aim to improve the process of key vetting to be able to work without requiring governance approval and to accommodate future permissionless modules.

#### Proposed Changes

1. Optimistic Vetting of Deposit Data:

Automate key vetting within DSM to enhance security and eliminate the need for governance approval.

1. Attack Mitigation:

Address cases such as incorrect signatures, duplicate keys, and front-run deposits through robust validation and reporting mechanisms.

#### More details:[DSM Improvements](https://hackmd.io/@lido/rJrTnEc2a)

### VEBO Improvements

#### Motivation

The current VEBO mechanism only processes validator exits in response to user withdrawal requests. This limitation hinders the protocol’s ability to manage validator exits proactively, especially for permissionless modules, and thus an improvement is proposed to allow for exits for reasons other than withdrawal requests. From the Staking Router side, it is also proposed to consider a module’s share when prioritizing (ordering) validators for exit.

#### Proposed Changes

1. Boosted Exit Requests:

Allow modules to signal VEBO to exit validators independently of withdrawal requests, using a new boosted exit mode.

1. Target Share Consideration:

Adjust validator exit prioritization to account for each module’s target share, preventing disproportionate validator exits that could destabilize the module’s intended share.

#### More details:[VEBO Improvements](https://hackmd.io/@lido/BJXRTxMRp)

### Oracle 3rd Phase Improvements

#### Motivation

The introduction of the Community Staking Module, which does not limit the number of node operators, necessitates a scalable solution for the Accounting Oracle’s third phase report.

#### Proposed Changes

1. Multi-Transactional Third Phase:

- Split the third-phase report into multiple transactions to manage large data sets efficiently and stay within Ethereum’s block gas limits.
- Ensure each transaction is processed independently but also maintains report integrity and sequence.

1. Sanity Checks and Limits:

- Implement new gas consumption limits and sanity checks for the third phase to ensure efficient processing without exceeding gas constraints.

#### More details:[Expand the third phase in Oracle](https://hackmd.io/HCXVrrZAQNCm_IC0lYvJjw?view)

### Reward Distribution in Curated-Based Modules

#### Motivation

Current reward distribution mechanisms, tied to the third-phase Oracle finalization hook, risk exceeding block gas limits and complicate the reporting process.

#### Proposed Changes

1. Decoupled Reward Distribution:

- Implement a permissionless on-chain method to handle reward distribution independently of Oracle’s third-phase report.
- Develop a bot to trigger this method after each Accounting Report, ensuring timely reward distribution without overloading any single transaction.

#### More details:[Reward distribution in curated-based modules](https://hackmd.io/@lido/HJYbVq5b0)

## Conclusion

Staking Router v2.0 introduces significant improvements to Lido’s permissionless staking, enhancing security and scalability.

## Next steps

Stay tuned for announcements on the testnet deployments. On-chain and off-chain changes will be polished, and undergo security audits before the mainnet proposal. The final audit report will be published once finalized and on-chain vote would be proposed to upgrade the on-chain components of the protocol.

## Detailed specification

Please proceed to the [LIP-25](https://github.com/lidofinance/lido-improvement-proposals/blob/develop/LIPS/lip-25.md) text published on GitHub for further details.

## Links

- [Staking Router](https://research.lido.fi/t/lip-20-staking-router/3790)
- [Lido Oracles](https://docs.lido.fi/guides/oracle-operator-manual#intro)
- [Validator Exit Bus Oracle](https://docs.lido.fi/guides/oracle-spec/validator-exit-bus)

---

<div class="post-metadata">

**Author:** ![governance-data-bot](https://dub1.discourse-cdn.com/flex013/user_avatar/research.lido.fi/governance-data-bot/32/2204_2.png) [@governance-data-bot](https://research.lido.fi/u/governance-data-bot)\
**Post date:** [August 1, 2024, 4:57pm UTC](https://research.lido.fi/t/lip-25-staking-router-v2-0/7773/2 "2024-08-01T16:57:16Z")

</div>

## Snapshot vote started

The [LIP-25: Staking Router 2.0](https://snapshot.org/#/lido-snapshot.eth/proposal/0xffb4042d3bfceef33c66f78c092a76fa8e1db198559d93798cc9db3fb4d722e7) Snapshot has started! Please cast your votes before Thu, 08 Aug 2024 16:00:00 GMT 🙏

---

<div class="post-metadata">

**Author:** ![governance-data-bot](https://dub1.discourse-cdn.com/flex013/user_avatar/research.lido.fi/governance-data-bot/32/2204_2.png) [@governance-data-bot](https://research.lido.fi/u/governance-data-bot)\
**Post date:** [August 8, 2024, 4:08pm UTC](https://research.lido.fi/t/lip-25-staking-router-v2-0/7773/3 "2024-08-08T16:08:18Z")

</div>

## Snapshot vote ended

The [LIP-25: Staking Router 2.0](https://snapshot.org/#/lido-snapshot.eth/proposal/0xffb4042d3bfceef33c66f78c092a76fa8e1db198559d93798cc9db3fb4d722e7) Snapshot has passed! 🥳  
The results are:  
**Yay** : 50.6M LDO  
**Nay** : 90 LDO

---

<div class="post-metadata">

**Author:** ![Maksim\_Kuraian](https://dub1.discourse-cdn.com/flex013/user_avatar/research.lido.fi/maksim_kuraian/32/3204_2.png) [@Maksim\_Kuraian](https://research.lido.fi/u/Maksim_Kuraian)\
**Post date:** [October 8, 2024, 11:38am UTC](https://research.lido.fi/t/lip-25-staking-router-v2-0/7773/4 "2024-10-08T11:38:13Z")

</div>

The link to [Staking Router + Community Staking Module upgrade announcement](https://research.lido.fi/t/staking-router-community-staking-module-upgrade-announcement/8612)
