Staking with Lido using Sedge
What is the Lido Community Staking Module (CSM)?
The Lido Community Staking Module (CSM) is a protocol that allows anyone, especially community stakers and solo stakers, to become a Lido Node Operator in a permissionless manner by providing an ETH-based bond as security collateral. CSM offers various benefits, such as smoothed rewards with other Lido modules received via stETH, reasonable low bond requirements (accepted in ETH, stETH, wstETH), and a user-friendly experience.
Sedge supports the Lido CSM, allowing users to generate validator keys and set up their full nodes with ease. This guide will walk you through the process of staking with Lido CSM using Sedge.
If you are interested in becoming a Lido node operator, make sure to read the Node Operator Expectations
Workflow breakdown
The Lido CSM staking process involves several steps:
- Generate Validator Keys and Deposit Data: Generate validator keys compatible with Lido CSM with withdrawal credentials set to Lido Withdrawal Vault.
- Set Up Your Full Node: Set up your full node with Lido CSM settings enabled (Fee recipient pointing to Lido Execution Layer Rewards Vault, and using designated MEV relays for Lido CSM) and the designed validator keys.
- Upload Deposit Data: Upload the deposit data to the Lido CSM Widget and provide the required bond amount in ETH, stETH, or wstETH.
- Wait for Deposit Confirmation: Wait for your CSM validator keys to be deposited through the protocol and ensure your node remains online in the meantime.
Sedge simplifies the process of staking with Lido CSM by providing a seamless workflow for:
- Generating validator keys with the respective deposit data (Step 1)
- Setting up your full node with Lido CSM settings enabled (Step 2)
- Importing existing Lido CSM validator keys to your Sedge node (In case you already have validator keys generated and running but want to migrate your clients or to Sedge)
This means you only have to upload the deposit data to Lido CSM and purchase the bond manually. Sedge will take care of the rest.
Let's dive into each step in detail.
Using Sedge for Lido CSM
You can run sedge cli
to kickstart Sedge's one-click interactive setup. In this step, you will be guided through generating validator keys and setting up your full node with Lido CSM settings enabled.
Alternatively, for a more controlled setup, you can use the following commands to generate validator keys and set up your full node with Lido CSM settings enabled.
Generating Validator Keys with the respective deposit data
To get started with CSM using Sedge, you first need to generate your validator keys and deposit data. Sedge simplifies this process
with the sedge keys
command. Use the --lido
flag to generate keys compatible with Lido CSM:
sedge keys --lido --network holesky
Setting up your full node with Lido CSM settings enabled
Once the keys are generated, you can set up your full node:
sedge generate full-node --lido --network holesky
This command will generate a setup with the Lido CSM enabled for the Holesky testnet.
If supported, you can set other networks by changing the --network
flag.
This command will generate a new set of validator keys with the following parameters:
withdrawal_address
set to the Lido Withdrawal Vault addresschain
set to the appropriate network (e.g.,holesky
,mainnet
)fee_recipient
set to the Lido Execution Layer Rewards Vault addressmev_relay
set to the designated MEV relays for Lido CSM on the appropriate network
You can now proceed to run the generated setup for your full node with the Lido CSM settings enabled and the validator keys you want to run with sedge run
(although not filled and registered yet).
Uploading deposit data and registering the Node Operator
After generating your validator keys and setting up your node, you need to register your wallet as a Node Operator to work with Lido CSM:
- Upload the newly generated deposit data file pertaining to your CSM keystores onto the Lido CSM Widget and provide the required bond amount in ETH, stETH, or wstETH. Before uploading, ensure that your nodes are synced, running and ready for validator activation.
The official instructions guide provides detailed instructions on how to upload the deposit data and register your Node Operator.
- Wait for your CSM validator keys to be deposited through the protocol and ensure your node remains online in the meantime.
Managing Your Node Operator
Once your validator keys are deposited and your node is running, you can manage your Node Operator using Sedge commands and the Lido CSM Widget.
Checking Node Operator Status
To view detailed data about your Node Operator, use the sedge lido-status
command. This command displays information specific to the Node Operator based on the provided rewards address.
sedge lido-status <your_reward_address>
rewardAddress
is the ultimate recipient of the rewards. It can perform the following actions regarding the CSM Node Operator:
- Claim rewards
- Propose a new
rewardAddress
- Reset
managerAddress
to make it equal to the currentrewardAddress
The Lido Documentation provides detailed information about the rewardAddress
.
Description
This command helps you monitor your Node Operator's performance by displaying:
- Node Operator ID
- Queue information (e.g., available for deposit, stuck, refunded, exited, deposited)
- Bond and rewards details
Monitoring through Grafana Dashboards
Sedge provides an integrated monitoring stack with pre-configured Grafana dashboards. These dashboards display detailed insights about your Lido CSM node operator performance, including key metrics such as validator status, bond information, non-claimed rewards, penalties, and exit requests.
How to Launch the Grafana Service
-
To initialize and start the monitoring stack, run the following command:
sedge monitoring init lido --node-operator-id <ID>
The following flags can also be included:
--network
:holesky
ormainnet
, set toholesky
by default.--reward-address
: Can replace the--node-operator-id
flag with the rewards address to identify the node operator.
-
This will install and configure the monitoring services for your Lido CSM node, including Grafana and Prometheus, as well as the Grafana OnCall and Prometheus alertmanager modules.
-
Once the monitoring stack is running, you can access the Grafana dashboards by navigating to
http://localhost:3000
. -
You will find dashboards specifically designed for Lido CSM with key panels:
- Keys and Bonds Information: Displays data about validator keys (deposited, exit requests, etc.) and bond statuses (current bond, required bond, etc.).
- Rewards: non-claimed rewards for your node operator.
- Penalties: Tracks penalties related to slashing, EL rewards stealing, and withdrawal issues.
- Exit Requests: Monitors exit requests for your validators.
Alerting for Penalties and Exit Requests
To monitor critical events from your Lido node operations, such as penalties or exit requests, Grafana OnCall can be connected with Prometheus Alertmanager. Sedge’s monitoring stack provides pre-configured alerts for various scenarios related to Lido's CSM node operations. Follow these steps to connect Grafana OnCall with Sedge and ensure you’re alerted in real-time.
I. Initialize the monitoring stack with Lido-specific configurations:
sedge monitoring init lido --node-operator-id <ID>
II. Connect Grafana OnCall with Prometheus Alertmanager
Follow these steps to integrate Grafana OnCall with Sedge’s pre-configured rules and alerts:
- Go to OnCall > Integrations > New Integration.
- Choose Alertmanager (Prometheus) and click Create Integration.
- Copy the integration's HTTP Endpoint.
- On your PC, navigate to the following path:
- Default path:
$XDG_DATA_HOME/.sedge
or$HOME/.local/share/.sedge
if$XDG_DATA_HOME
is not set. - Go to
monitoring > prometheus > alertmanager > alertmanager.yml
.
- Default path:
- Update the configuration by adding the Grafana OnCall webhook:
receivers:
- name: 'grafana_oncall'
webhook_configs:
- url: <your HTTP Endpoint>
- Replace any instance of
http://localhost:<port>
withhttp://engine:8080
to ensure proper communication between Prometheus and Grafana. - Restart the Alertmanager container:
- Go to your Docker setup and locate the sedge_alertmanager container.
- Restart the container to apply changes.
Next, log into Grafana and complete the remaining configurations.
III. Access Your Grafana Instance
- Log into your Grafana instance at
http://localhost:3000
. - Go to Administrations > Users and Access > Users.
- Click on Edit Info and update your email address (make sure it matches your Grafana account email).
IV. Navigate to OnCall
In your Grafana instance:
- Go to Alerts & IRM and select OnCall.
- Grafana OnCall will display all configured alerts. Sedge provides the following pre-configured rules for Lido operations:
- Initial Slashing Detected: Triggered when a slashing event occurs.
- Withdrawal Penalty Detected: Alerts when a penalty related to withdrawal of funds is incurred.
- EL Rewards Stealing Penalty Detected: Notifies when an EL rewards stealing penalty is incurred.
- Exit Request Detected: Alerts when one or more validators request an exit.
V. Configure Contact Points in Grafana OnCall
To start receiving alerts:
- Navigate to OnCall settings in Grafana.
- Ensure that your contact points (email, Slack, Telegram, etc.) are configured for notifications.
- Grafana will send notifications based on the pre-configured alert rules whenever critical events occur in your Lido node operations.
Additional Management Tasks
Using the Lido CSM Widget, it allows you to:
- Claim bond and rewards
- Add extra bond amount
- Propose new Rewards and Manager addresses
- Add or remove validator keys
Remember to keep your node running smoothly and follow the Lido protocol rules to avoid any penalties or bond confiscation.
For more detailed information on managing your Node Operator, refer to the Lido CSM documentation.