Skip to content

ADR 026/028 execution-risk register: deferred decisions before contract bytecode locks #453

Closed

Description

@alpergundogdu

Summary

ADRs 026 and 028 are surface-defined but enumerate several decisions the ADRs themselves explicitly defer — to a future ADR, to off-repo analysis, or to "amend if needed before mainnet." Tracking these as a register so they don't fall between #451 (surface lock-down) and #452 (implementation).

Rebaselined. The original #453 referenced ADR 027 throughout. ADR 027 (Distinct-Client Diversity Gating / Delivery Receipts) was retired; its content collapsed into the per-operator gauge-share cap in ADR 026 §3 and a contract-pinned launch prerequisite in ADR 026 §2. The original Risk 1 (SlashJudge slashId emission) was already canonicalised in ADR 014 §2 — Slashed(slashId, operator, offenseType, amount, evidenceHash) for all three offenses, monotonic, atomic with StakingRegistry.slash(). Both items removed.

Primary — ADR-deferred decisions

1. Cross-category payout ordering in SafetyReserve

Deferral. ADR 028 §5:

Cross-category ordering of pending claims (e.g., whether a slash-restitution pending claim is paid before or after a new SLA-breach payout in a later epoch) is intentionally not specified in this ADR; if a deterministic queue across payout categories is desired before mainnet, [ADR 026 §5] must be amended to define ranking semantics.

ADR 028 § Forward references lists this as the dependency on ADR 026 §5.

Why it's load-bearing. Under SafetyReserve insolvency (correlated-outage scenario from ADR 028 § Risks), pending claims accumulate across categories. Without a deterministic queue, disbursement order is whatever sequence SafetyReserve.payout() is authorized in — political ordering by multisig + governance. Affected parties (operators awaiting slash restitution, users awaiting SLA-breach payouts) have no predictable queue position; the deferred-claim path's "operator working-capital exposure" risk becomes unbounded across categories.

Resolution. Either (a) amend ADR 026 §5 to pin ranking semantics across payout categories, or (b) explicitly accept FIFO-by-authorization as canonical and document the operator/user expectation in ADR 028 §5. Decide before SafetyReserve bytecode locks.

2. Contract-implementation ADR for SafetyReserve appeal surface

Deferral. ADR 028 § Forward references:

A future contract-implementation ADR will pin the exact SafetyReserve storage layout, the per-appeal escrow accounting from §2, and the Solidity event signatures for SlashAppealOpened / SlashAppealFastTracked / SlashAppealRejected / SlashAppealRatified / SlashAppealReversed / SlashAppealLapsed.

Why it's load-bearing. ADR 028 §6 specifies five new entry points on SafetyReserve and references "per-appeal escrow accounting" without pinning the storage shape. #452 cannot start the appeal-flow contract work without this; the six event signatures the §6 interface block names live nowhere canonical and are referenced from #450's interface-gap audit.

Resolution. Open ADR 030 (verified as next available against adr/) for the contract-implementation surface. Out of scope: parameter values (#451), audit-pinned constants.

3. SafetyReserve sizing under 3.3× depletion ratio

Tracked at decdn/finance#3. ADR 028 § Risks explicitly defers sizing validation:

Reserve sizing in [ADR 026 §5] — and the underlying economic-model spec — must accommodate this depletion ratio when projecting reserve solvency.

Validation work (steady-state inflow vs outflow, correlated-outage worst-case, cross-category ordering input from Risk 1) lands in _shared/params.py + notebook output. Resolution paths if sizing fails (raise FeeRouter safety share, lower MAX_APPEAL_RESTITUTION, pin cross-category ordering — Risk 1) are tracked there. Closes back here on completion.

Secondary — auditability / canonical-text concerns

4. Wash-trading-defense analysis is in internal/ideas/, not in the canonical ADR set

The replacement of ADR 027 with the per-operator gauge-share cap leaves the economic-safety argument resting on internal/ideas/wash-trading-economics.md, referenced from four canonical sites:

The launch prerequisite (gaugeLaunched == false until the cap is enforced) and the cap's governable bound [1%, 25%] are gated on a quantitative claim that lives in a private repo. An auditor reading the public ADRs cannot independently verify the prerequisite is sufficient or that the lower bound is safe.

Resolution. Promote the analysis to an ADR appendix (appendix-wash-trading-economics.md, analogous to appendix-l2-deployment.md and appendix-fraud-detection.md), or inline the assumption table and breakeven derivation into ADR 026 §3.

5. MAX_EVIDENCE_AGE_US < unbondingPeriod invariant: SHOULD-level enforcement

ADR 014 § Interaction with unbonding period:

The safety bounds ([1 day, 30 days] for evidence age vs [3 days, 30 days] for unbonding per [ADR 009]) permit governance to violate this invariant — implementations SHOULD enforce MAX_EVIDENCE_AGE_US < unbondingPeriod whenever MAX_EVIDENCE_AGE_US is configured or updated…

If governance sets MAX_EVIDENCE_AGE_US ≥ unbondingPeriod, an operator can commit any of the three on-chain offenses, initiate unbonding, and exit before the evidence window opens — the slash is uncollectible. "Implementations SHOULD enforce" delegates a safety invariant to the contract author rather than to the contract itself.

Resolution. Promote to a contract-level invariant in SlashJudge / StakingRegistry setter paths, with paired-update enforcement under ADR 009 § Governable Parameters with Safety Bounds. Mirrors ADR 026 §11's "sum-to-100% across the six router shares is enforced on every governance update" pattern.

6. ADR 009 editorial: enumerate appeal entry points as sub-modes of multisig capability (4)

ADR 028 § Forward references:

ADR 028's fastTrackAppeal / rejectAppeal are sub-modes of capability (4) "SafetyReserve fast-track authorization" (§6) and do not create a new multisig power, but ADR 009's enumeration should be editorially expanded to reference the appeal-specific entry points so an auditor reading ADR 009 alone can find the appeal flow.

Editorial only. Group with the next ADR 009 housekeeping PR.

Out of scope

  • Parameter values (ADR 026 / 027 / 028 surface lock-down: review formula shapes, state machines, and signatures before implementation #451 defers these explicitly).
  • Items the ADRs already resolved: Slashed event / slashId allocation across all three on-chain offenses (ADR 014 §2); gauge-pause launch prerequisite (ADR 026 §2 gaugeLaunched / enableGauge()); distinct-client receipts mechanism (retired with ADR 027, replaced by ADR 026 §3 share cap).
  • Acknowledged residual risks with documented mitigations: sworn-declaration perjury enforceability (ADR 028 § Risks — backed by bond forfeit + §5 frequency cap); reputation-hit persistence across successful appeals (ADR 028 §7 — explicit trade-off).

Acceptance

  • Risk 1 resolved via ADR 026 §5 amendment (or explicit FIFO acceptance in ADR 028 §5)
  • Risk 2 resolved by opening ADR 030 (contract-implementation: SafetyReserve appeal surface)
  • Risk 3 resolved via decdn/finance#3
  • Risk 4 resolved by promoting wash-trading-economics to an ADR appendix
  • Risk 5 resolved by promoting MAX_EVIDENCE_AGE_US < unbondingPeriod to contract-enforced
  • Risk 6 closed by ADR 009 editorial PR

Related

Activity

  1. added
    design:missing-decision
    design:adr
    on May 7, 2026
  2. self-assigned this
    on May 7, 2026
  3. assigned and unassigned on May 7, 2026
  4. changed the title [-]ADR 026/027/028 execution-risk register: slashId emission, MMR pinning, SafetyReserve depletion sizing[/-] [+]ADR 026/028 execution-risk register: deferred decisions before contract bytecode locks[/+] on May 11, 2026
  5. thiras commented on May 11, 2026

    @thiras
    Contributor

    Status update on the execution-risk register, splitting into landable units:

    PR #522 — closes Risks 1, 5, 6:

    • Risk 1. ADR 026 §5 pins cross-category payout ordering as epoch-FIFO across all categories with deterministic tiebreakers. ADR 028 §5 + Forward references trimmed.
    • Risk 5. MAX_EVIDENCE_AGE_US < unbondingPeriod promoted from SHOULD to a paired-setter contract-enforced invariant on both SlashJudge and StakingRegistry. New ADR 014 Governable Parameters subsection; ADR 009 rationale list updated.
    • Risk 6. ADR 009 capability (4) editorially expanded to enumerate fastTrackAppeal / rejectAppeal as appeal-flow sub-modes. ADR 028 §6 + Forward references trimmed.

    PR #523 — closes Risk 4: adr/appendix-wash-trading-economics.md authored from scratch (the internal/ideas/wash-trading-economics.md file referenced from four canonical ADR sites never existed in the internal repo). Per-cycle breakeven derivation showing the per-operator gauge-share cap is the binding on-chain defense; the four dangling references are updated to the appendix.

    Issue #524 — tracks Risk 2 (ADR 030: SafetyReserve appeal-surface contract-implementation). Promoted out of this register into its own ADR PR cycle so it gets dedicated review focus. Closing #524 will check the Risk-2 box here.

    Risk 3 remains tracked at decdn/finance#3; closes back through that issue.

    After PRs #522 and #523 land, the Acceptance checklist on this issue should be:

    #453 stays open until Risks 2 and 3 close.

  6. alpergundogdu commented on May 11, 2026

    @alpergundogdu
    ContributorAuthor

    Update on risk 4. Filed #525 instead of going with #523's appendix approach. On second look the appendix is the wrong shape of fix.

    The four dangling references this PR set out to clean up all pointed at internal/ideas/wash-trading-economics.md — a private-repo path. The internal/ repo isn't going public; that was the implicit constraint the original references didn't honor.

    #523 replaces the broken pointers with a 135-line appendix in the public ADR set, but the appendix itself is derived from internal material:

    • The closed-pool dilution argument, the 8¢ leakage floor, the ve-boost amplification factor 1/0.4 = 2.5×, the cap-vs-floor capture table, and the sybil capital-lockup arithmetic come from the internal economic model.
    • The References section names the source spec explicitly (tokenomics-v2-gauge-boost-design, 2026-04-18) — telling readers a private spec exists, its codename, and its date.
    • Several derived figures (e.g., per-pseudo-operator dollar cost at $0.05 and $0.20 TOKEN prices, the 5M/50M TOKEN aggregate lockup figures, the cross-operator collusion ⌈cap_breakeven/cap⌉ formula) are downstream of internal modeling assumptions that haven't been vetted for public release.

    Net result: instead of a dangling pointer that says "the analysis is internal," #523 would ship a public derivation of the analysis that says the same thing more explicitly and surfaces the source spec's name. That moves the leak in the wrong direction.

    #525 takes the opposite approach: drop the four dangling pointers and let the surrounding ADR prose stand on its own, with one localized rewrite in §2 Pre-launch gauge accumulation (where the original sentence quoted a specific internal quantitative result and removing the citation alone would have left a dangling claim).

    Proposed rebaseline for risk 4: resolved by removing the references — the public ADR set is intentionally not a substitute for the internal economic model. If clean-room public auditability is wanted later, it should be a fresh piece of work scoped explicitly as non-derived from the internal spec.

  7. removed their assignment
    on May 11, 2026
  8. added a commit that references this issue on May 15, 2026
    a0b901d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    design:adrdesign:missing-decision

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions