Skip to main content

๐Ÿงช Expert: Subscribing to Important Events

Subscribing to the important events

Some smart contract events in the CSM may occur on the protocol side, such as withdrawal requests, penalties, etc., which require specific actions from the Node Operator (NO).

So, what exactly are the events that the operator has to follow?

info

If the guide seems too complicated, make sure to check out a tool: SM Sentinel. This is a Telegram bot that you can run on your own or use one of the community-supported instances. Note that community-supported instances come with no guarantee!

Contract: VEBOโ€‹

ValidatorExitRequestโ€‹

ValidatorExitRequest is the most important event for key management. It requires sending a voluntary exit request using the key specified in the event. If the Node Operator doesn't exit in time, an exit delay charge is applied to the bond once the validator withdraws, and the protocol may force the exit from the Execution Layer at the operator's cost.

VEBO is shared by the CSM modules on each network. Filter events by both stakingModuleId and nodeOperatorId, using the module ID for your deployment:

  • 0x01 CSM: stakingModuleId=3 on Mainnet and stakingModuleId=4 on Hoodi.
  • 0x02 CSM: stakingModuleId=6 on Hoodi.
event ValidatorExitRequest(
uint256 indexed stakingModuleId,
uint256 indexed nodeOperatorId,
uint256 indexed validatorIndex,
bytes validatorPubkey,
uint256 timestamp
);
info

This event can be tracked using Ejector. In the case of Ejector usage, the requested validators will be exited automatically if the pre-signed messages for them are uploaded to the Ejector.

Contract: CSMโ€‹

GeneralDelayedPenaltyReportedโ€‹

The CSM Committee can report a protocol violation, such as stolen EL rewards. If so, the NO must either compensate or challenge the report. See Penalties.

event GeneralDelayedPenaltyReported(
uint256 indexed nodeOperatorId,
bytes32 indexed penaltyType,
uint256 amount,
uint256 additionalFine,
string details
);

VettedSigningKeysCountDecreasedโ€‹

The uploaded keys might be invalid, so the Node Operator has to remove invalid keys to prevent the others from stopping deposits.

event VettedSigningKeysCountDecreased(
uint256 indexed nodeOperatorId
);

ValidatorSlashingReportedโ€‹

Get notifications when a slashing is reported for one of your keys.

event ValidatorSlashingReported(
uint256 indexed nodeOperatorId,
uint256 keyIndex,
bytes pubkey
);

ValidatorWithdrawnโ€‹

Information event that the key has been reported as withdrawn, so the required bond for this key is released. slashingPenalty shows any loss deducted from the bond.

event ValidatorWithdrawn(
uint256 indexed nodeOperatorId,
uint256 keyIndex,
uint256 exitBalance,
uint256 slashingPenalty,
bytes pubkey
);

KeyRemovalChargeAppliedโ€‹

A key removal charge has been taken from the bond.

event KeyRemovalChargeApplied(uint256 indexed nodeOperatorId);

DepositedSigningKeysCountChangedโ€‹

Information event that the keys have been deposited

event DepositedSigningKeysCountChanged(
uint256 indexed nodeOperatorId,
uint256 depositedKeysCount
);

Contract: ExitPenaltiesโ€‹

ValidatorExitDelayProcessedโ€‹

An exit delay charge has been applied because the validator was not exited within the allowed delay.

event ValidatorExitDelayProcessed(
uint256 indexed nodeOperatorId,
bytes pubkey,
uint256 delayFee
);

TriggeredExitFeeRecordedโ€‹

The protocol forced an exit from the Execution Layer and recorded the withdrawal request fee against the Node Operator.

event TriggeredExitFeeRecorded(
uint256 indexed nodeOperatorId,
uint256 indexed exitType,
bytes pubkey,
uint256 withdrawalRequestPaidFee,
uint256 withdrawalRequestRecordedFee
);

StrikesPenaltyProcessedโ€‹

A bad performance penalty has been applied after the key accumulated enough strikes.

event StrikesPenaltyProcessed(
uint256 indexed nodeOperatorId,
bytes pubkey,
uint256 strikesPenalty
);

Contract: ValidatorStrikesโ€‹

StrikesDataUpdatedโ€‹

A new strikes tree has been published. Check whether any of your keys accumulated strikes, since enough strikes lead to ejection and a penalty.

event StrikesDataUpdated(bytes32 treeRoot, string treeCid);

Contract: FeeDistributorโ€‹

DistributionDataUpdatedโ€‹

Notify when rewards for the current frame are available to claim

event DistributionDataUpdated(
uint256 totalClaimableShares,
bytes32 treeRoot,
string treeCid
);

3rd party notification providersโ€‹

Operators can use Tenderly as a service to subscribe to the emitted events on the particular contracts and notify in the Telegram, Discord, Email, etc.

See corresponding doc for the set-up guide:

Stakesaurus' Telegram Botโ€‹

Stakesaurus Validator Healthcheck Alerts

Eridian's Pager Duty Setupโ€‹

Eridian Alerting and Monitoring Docs