owned this note
owned this note
Published
Linked with GitHub
---
tags: 7002, Oracle
---
# ADR: Curated Module Implementation
## **1. Context**
This ADR defines the implementation details of the NodeOperatorRegistry to enable support for Triggerable Withdrawals, specifically integrating the new interface described [here](https://hackmd.io/TVzBJS38RT-mC8uwJePqew#).
This upgrade applies to both the Curated and sDVT Staking Modules. It introduces a new debt system for Node Operators and outlines the process of penalization for those who fail to exit their validators on time after being requested in the Validator Exit Bus (VEB).
## **2. Decision**
### Penalization Policy
The current penalty system will be updated from rewards halfing to fixed penalties. The penalties include:
- **One-time penalty**: Applied if a Node Operator fails to exit their validator before the deadline.
- **Daily penalty**: Applied for each block the validator remains active past the deadline.
- **Trigger exit compensation**: If a `forced` exit is triggered after the deadline but before the validator exits voluntarily, the Node Operator must compensate for the exit cost.

### Bond / Debt
To enforce penalties, Node Operators must maintain an account balance. Two approaches are proposed:
#### Debt
Each Node Operator has an implicit level of trust, particularly within the curated set. A debt system will track accumulated fines, which will be deducted from future reward distributions.
#### Bond
Bonds function similarly to the debt system but require Node Operators to maintain an initial balance. These bonds can go negative but will be replenished during reward distribution. The bond size should be dynamic, adjusting based on the Node Operator’s effective balance. This approach provides stronger protection for the protocol but requires further analysis (e.g., determining optimal bond sizes and refund mechanisms).
### Triggerable Exits hook
Whenever a validator exits via an EL request, the module receives a notification through the `onTriggerableExits` method ([spec]((https://hackmd.io/TVzBJS38RT-mC8uwJePqew#Add-Handle-Triggerable-Exit-hooks))). The notification includes:
- Validator identifier (public key and Node Operator ID)
- Exit trigger cost on EL
- Exit type:
- 0 (Voluntary): A non-forced exit, e.g., the Node Operator initiates the exit through VEB.
- 1 (Forced): Initiated by an automated bot, expecting Node Operator compensation.
Node Operators must compensate for exits if:
- The Triggerable Exit request was created after the deadline.
- The validator was in `active_ongoing` status at the time of the exit.
- The exit was forced.
If validator exit info is available, the exit cost could be deducted from the Node Operator’s balance immediately.
:::spoiler Algorithm (WIP)
1. Receive hook with data.
2. Check if the validator was previously triggered:
- If True, then exit;
3. Determine exit type:
- If `0`, record the exit and proceed.
- If `1` and `currentTimestamp` == `activeOngoingTimestamp`, penalize the Node Operator, record the event, and exit.

:::
### Validator Exit Info
Anyone can submit validator state data from the CL to verify exit conditions and enforce penalties ([spec](https://hackmd.io/TVzBJS38RT-mC8uwJePqew#Add-Handle-validators-exit-state)). The data includes:
- Validator identifier
- Activation time on CL. Required to be sure NO could exit validator.
- Exit request time through VEB.
- Current `active_ongoing` status timestamp.
Upon receiving the hook, the following conditions are checked:
- If `active_ongoing` timestamp is after the deadline, penalize the Node Operator.
- Apply a penalty for the duration between the deadline and `active_ongoing` timestamp.
- If a forced EL exit request existed before `active_ongoing` timestamp, deduct the exit cost from the Node Operator.
If an exit record already exists, only the time difference is penalized.
### New Staking Module Settings
New contract variables will define penalty fees:
- `timeToExitInSeconds`: Timeframe within which Node Operators must submit an exit request after the event appears in VEB.
- `baseDelayFee`: One-time penalty if the validator exit is delayed.
- `dailyDelayFee`: Daily penalty for the validator remaining active beyond `timeToExitInSeconds`. Should be set higher than a node operator’s daily earnings per validator.
To prevent excessive charges, a `maxTriggerableExitFee` will be enforced, capping the exit fee deducted from Node Operators per validator.
## **3. References**
- [Triggerable Withdrawals spec](/tMwct9BuQru47giIv4dVYw)
- [IStakingModule inteface](https://hackmd.io/TVzBJS38RT-mC8uwJePqew)