Skip to content

Add owner-requested undelegation and timeout recovery to v2 #267

Description

@snawaz

Goal

Add an on-chain way for an owner program to request that a v2 delegated account be returned, with a timeout recovery path if the validator does not respond.

This work is separate from validator-requested Undelegate because Challenge clusters can have live commitments, challenges, locked stake, and state buffers when the timeout expires.

Why

An owner program currently has no v2 request object or bounded recovery path when the current validator does not complete undelegation.

The legacy timeout rules cannot be copied directly because they do not account for the fraud-proof state machine.

Scope

  • First define how a final validator commitment is signaled after an owner request and how an active Challenge commitment is settled if the request times out.
  • Add a v2 UndelegationRequest PDA keyed by the delegated account.
  • Authorize requests through owner-program CPI using the delegated PDA as a signer. On-curve accounts need a separate authorization design and are not included initially.
  • Reject a new request while a commitment or challenge is already active.
  • Use the existing protocol timeout of 9,000 slots.
  • Make repeated requests idempotent and never extend an existing deadline.
  • Record the request in DelegationState so unrelated new commitments cannot start.
  • Let the validator satisfy the request through the normal final commit, finalization, and v2 Undelegate path.
  • Close the request only after the account has been returned successfully.
  • Add a permissionless timeout exit that returns the current finalized base-layer state without accepting unfinalized validator state.
  • Define deterministic handling for any final commitment that is still active when timeout becomes available, including operator locks, challenger stake, buffers, and rent.
  • Keep Direct and Challenge behavior explicit and keep all legacy behavior unchanged.

Related work

Outcome

An owner program can request undelegation and has a documented, bounded recovery path that cannot silently accept unfinalized validator state.

Activity

  1. self-assigned this
    on Oct 22, 2026
  2. added theissue type on Oct 22, 2026
  3. changed the title [-]Add owner-requested undelegation and timeout recovery to the primary protocol[/-] [+]Add owner-requested undelegation and timeout recovery to v2[/+] on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions