Skip to content

ADR 016: contract inventory and constructor tables drift from the shipped contracts #1557

Closed

Description

@thiras

ADR 016's Contract Inventory + Constructor Dependencies tables (self-described as a single reference for security audits) have drifted from the shipped contracts:

  1. CapacityBond (adr/016-contract-interactions.md:289, step 4) — lists 8 constructor args; the contract takes 9 (contracts/src/CapacityBond.sol:539-549), the 9th being bytes32 currentTermsHash_, zero-rejected (ZeroTermsHash, :566). The entire terms-acceptance mechanism (currentTermsHash, setCurrentTermsHash, TermsHashMismatch — CapacityBond.sol:400, :490, :778, :1213) appears nowhere in ADR 016. A deploy following the table as written reverts.
  2. FeeRouter (:292, step 7) — omits capacityBond_ and windowEpochs_. contracts/src/FeeRouter.sol:146-163: capacityBond_ is zero-checked and cross-validated (EpochLengthMismatch(bondEpoch, epochLength_)), windowEpochs_ bounds-enforced [4,26]. The FeeRouter→CapacityBond deploy-time dependency is invisible in the deployment order.
  3. ContentBlacklist (:296, step 11) — pins the literal signature ContentBlacklist(address capacityBond); the actual constructor is (ICapacityBondEjector capacityBond_, address admin).
  4. Ed25519Verifier — a deployed contract (contracts/src/Ed25519Verifier.sol:25, consumed at CapacityBond.sol:541) with no inventory row and no deployment step, yet it must exist before step 4 — the order as written is unexecutable.
  5. BuybackBurner inventory row (:27) — describes one contract with Pausable; the code ships abstract BuybackBurner (SunsettingPausable) + GuardedBuybackBurner + BuybackBurnerBalancerV3 + BuybackBurnerUniswapV3. (:719 in the same ADR already says SunsettingPausable.)

Verified clean in the same pass (no action needed): SlashAppeal, SlashJudge, PaymentChannel, PublisherRegistry constructor rows; ADR 009/002 parameter bounds; SunsettingPausable 365d deadline.

Activity

  1. added
    kind:docs
    design:consistency
    design:adr
    prio:high
    area:contracts
    on Aug 1, 2026
  2. self-assigned this
    on Aug 1, 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:consistencykind:docsprio:high

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions