Skip to content

dign: safety-margin setting with presets, shown with its real cost #388

Description

@MichaelTaylor3d

Task

Surface the collateral safety margin in the dign CLI and the DIG App, with its real cost.

Parent epic: https://github.com/DIG-Network/dig_ecosystem/issues/3173

The setting

Default +1%, presets 0.01% / 1% / 5%, persisted, and settable from both surfaces.

User's stated reasoning: under-collateralising means "they will likely be skipped for rewards that
epoch"
; over-collateralising has "no penalty… just opportunity cost to use that DIG elsewhere". The
failure is asymmetric, which is why the default errs high.

Two properties that must hold in the implementation

  1. The margin is LOCAL, never consensus. It changes what this node locks; it never changes what the
    network requires. Nothing about it enters the census, the controller, or any value another node
    derives. A margin that leaked into a consensus input would fork the network.
  2. Apply it to the already-derived integer requirement, and round UP. A margin that rounds down can
    leave a node one mojo short — which is precisely the failure the default exists to prevent, arriving
    through the mechanism meant to avoid it.

Show the cost, not just the percentage

A percentage alone does not tell an operator anything actionable. Show what the margin costs at the
current requirement and the node's current store count
— the actual extra DIG locked. The whole point
of the setting is choosing between safety and opportunity cost, and that choice cannot be made from a
bare "5%".

Honesty requirements

  • Never imply the margin guarantees inclusion. It reduces the chance of falling short if the
    requirement moves; it is not a promise. The requirement is derived per epoch and can rise.
  • If the node cannot currently determine the requirement, say so rather than showing a computed cost
    based on a stale or assumed value. Unknown is a state; a confident wrong number is not.
  • The app surface follows §6.1/§6.4 — the four async states, externalised copy, and the professional-ui
    pass. The CLI keeps --json machine output (§6.2).

Method

The dign and dig-app halves are different repos and are separate lanes; keep the persisted
representation and the preset values identical across both — a margin that means 1% in one surface and
something else in the other is a drift bug on a money path.

§2.6 governs: the thinnest path to an operator changing the setting and seeing the cost.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions