# Cluster Node: Providing DKG and DVT Services for Lido CSM Users
## Proposal Overview
Cluster Node is a component offering Lido CSM users an innovative Validator management service by utilizing SafeStake infrastructure like **Distributed Key Generation (DKG)** and **Distributed Validation Technology (DVT)**. Through deep integration with Lido CSM, we aim to address the following challenges:
- **Enhanced Key Security**: Eliminates the need for manual management of keystore files, ensuring that Validator private keys never exist in their entirety on any single device, significantly reducing the risk of keystore leakage.
- **Simplified Operational Processes**: Unlike the traditional deposit-cli method, there is no need to manage numerous keystore files. Validator generation is completed through automated interactions between Smart Contracts and operational nodes.
- **Seamless Integration with Lido CSM**: Specifically designed for Lido CSM, enabling staking operations of unlimited scale.
- **User-Friendly Interface**: Provides an intuitive front-end application, allowing Lido CSM users to monitor and manage the complete lifecycle of their Validators.
## Technical Implementation and Integration with Lido CSM
### Key Features
1. **DKG-Driven Key Generation**
- Users initiate a Validator generation request through the Cluster Node, coordinating 4 Operator nodes to execute the DKG protocol, generating encrypted key shards (Secret Key Shares) and a public validator key.
- Key shards are stored by independent Operator nodes, ensuring no single entity possesses the complete private key.
2. **DVT Fault-Tolerant Validation Network**
- Validator tasks (such as block proposals and attestations) are collaboratively executed by multiple Operator nodes, requiring threshold signatures (e.g., 3-of-4) to complete operations.
- Even if some nodes are offline or malicious, Lido CSM's staking services can continue to operate.
3. **Seamless Integration with Lido CSM Contracts**
- Users can directly invoke Lido CSM contracts through the Cluster Node front-end, automating batch staking (e.g., submitting hundreds of deposits in a single transaction), significantly enhancing staking efficiency.
## Workflow

### 1. Initialize Validator Generation
Lido CSM users connect their wallets through the Cluster Node App and initiate the Validator generation process:
- Users bind their Owner identity through the Cluster Contract.
- Users trigger the `generateDepositData` task, initiating the DKG process.
### 2. Distributed Key Generation (DKG)
The Cluster Node App coordinates designated Operator Nodes to execute the DKG protocol:
- Multiple Operator nodes (e.g., Op1, Op2, Op3, Op4) independently participate in computations, generating shared keys for the Validator.
- Each Operator node generates Deposit Data with valid signatures.
- All data is securely transmitted to the Cluster Node Service and stored in a database, accessible only by the Owner.
### 3. Data Collection and Verification
The Cluster Node Service collects and verifies critical data from all Operator Nodes:
- **Validator public key:** The public key of the Validator.
- **Operator IDs:** A list of IDs for all Operator nodes participating in the DKG.
- **Encrypted shared key (Encrypted key share):** Encrypted key shards (Secret Key Share).
- **Key share public key:** Public key of the key shard (Public Key Share).
- **Deposit data:** Deposit Data of the Validator.
### 4. Integration with Lido CSM
For Lido CSM users, the Cluster Node provides a dedicated integration process:
- Users select the generated Validator through the Cluster Node App.
- Users invoke the Lido CSM contract through the Cluster Node App, enabling staking operations of unlimited scale.
### 5. Validator Activation and Operation
The final step registers the Validator to the SafeStake network:
- Users call the `registerValidator` method of the SafeStake Network Contract through the Cluster Node App.
- The Validator is officially activated and begins executing tasks within the network.
- Lido CSM users can monitor Validator performance through the Cluster Node App.
## Funding Request
We’ve spent more than 20 weeks to build this module as a fundamental supplement for Lido CSM. We’d like to apply for the Boulder grant.
**Address:** 0xf9d6d0f7cd8d034fa26f5c81edcd1e3b0d31763b
## GitHub Repository
- [SafeStake Network Contract](https://github.com/ParaState/SafeStake-Network-Contract)
- [SafeStake Operator](https://github.com/ParaState/SafeStakeOperator)
- [Cluster Node Service](https://github.com/ParaState/ClusterNodeAPI)
- [Cluster Node App](https://github.com/ParaState/cluster-node-app)
## Contact Information
- Telegram: [Leon](https://t.me/huliang42)
- X: [SafeStake](https://x.com/safestakedvt)