-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Labels
@aesedepece
Description
Wit/2.0 enforced a 1:1 relationship between stake entries and withdrawer addresses (i.e. each validator has a single associated withdrawer). In preparation for delegation support in Wit/2.1, we need to identify all parts of the codebase where this "single-withdrawer" assumption is present.
Before lifting this restriction, it's critical to audit the business logic across the staking, rewards, and withdrawal flows to ensure they behave correctly under a one-to-many relationship (i.e. multiple withdrawers per validator).
This task includes:
- Systematically identifying all places in the code that rely on or enforce the 1:1 withdrawer assumption
- Documenting each instance with context and potential implications
- Proposing how to approach each case:
- Remove condition or assumption
- Replace with an iteration over multiple entries
- Fully refactor data structures or logic
This issue will lay the groundwork for safely extending the protocol to support delegated staking while preserving correctness and backward compatibility where necessary.