Skip to content

CapacityBond: an operator that has ever declared a tier can never fully unbond #1351

Closed

Description

@yigitdot

What

Once an operator calls declareMbps even once, bondRequired(declaredMbps) > 0 forever, and requestUnbond enforces activeBond >= bondRequired(declaredMbps) (contracts/src/CapacityBond.sol:626-631). So the operator can never withdraw their last TOKEN — there is no full-exit path.

Why it's inescapable

declaredMbps has exactly one writer: declareMbps at CapacityBond.sol:666. That function requires mbps >= minCapacityMbps (:658), and minCapacityMbps is initialized to 10 (:574) with a hard floor of MIN_CAPACITY_FLOOR_MBPS = 10 (:123) that governance cannot lower. So declareMbps(0) always reverts and the tier can never return to 0.

deregisterNode (:839-849) clears info.active and bumps registrationNonce, but leaves declaredMbps untouched. Deregistering therefore does not release the curve floor either.

Net effect: an operator who declared 10 Mbps is permanently locked out of bondRequired(10) worth of TOKEN, whether or not they still run a node. An operator who never declared is unaffected (bondRequired(0) == 0).

Why this surfaced

Building decdn node unbond (#1033). The command's --all flag has to be documented as 'release everything the curve permits' rather than 'exit', because a true full exit is not expressible against the current contract.

Decision needed

ADR 026 does not describe this as intended — it says only that lowering a bond is requestUnbond + unbond subject to the window (adr/026-tokenomics.md:155). Pick one:

  1. Clear declaredMbps in deregisterNode, making deregistration the exit path (natural, but changes what deregistration means for a still-bonded operator).
  2. Allow declareMbps(0) as an explicit 'not serving' sentinel, exempt from the minCapacityMbps band check.
  3. Confirm the residual lock is deliberate and say so in ADR 026 + the operator docs, so it stops reading as a bug.

Whichever is chosen should be recorded in ADR 026 in place (no tombstone text), per the repo ADR convention.

Activity

  1. added
    area:contracts
    design:adr
    design:economics
    design:missing-decision
    prio:medium
    on Jul 21, 2026
  2. self-assigned this
    on Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:contractsdesign:adrdesign:economicsdesign:missing-decisionprio:medium

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions