Skip to content

design: automated quota-based vetting policy for new publishers, manual only above the quota #2592

Open

Description

@thiras

Kind of gap

decision not recorded in any ADR

ADRs and sections affected

ADR 011 § Vetting policies, ADR 011 § The vetting seam, ADR 016 § Contract Inventory

What the ADR says

ADR 011 § Vetting policies lists two policies behind IVettingPolicy:

ManualVettingPolicy — the genesis default. A VETTER_ROLE holder approves publishers directly.
OpenVettingPolicy — vets every publisher. For local and test deployments only.

and says a later policy is "each a governance setVettingPolicy call". No ADR records a policy between those two: one that vets a new publisher automatically within a bound and needs a human only above it.

What the code, contract, other ADR or doc does

contracts/src/ManualVettingPolicy.sol is what the testnet runs. OriginAssignment.addOrigin calls vettingPolicy.isVetted(msg.sender) and reverts for every wallet a VETTER_ROLE holder has not touched. The README documents the consequence: "That step happens out-of-band, not through the CLI." So every publisher, however small, waits on a person. The one-command publish (#2591) cannot ship on top of that.

Options

A. Keep ManualVettingPolicy, automate the vetter. An off-chain service holding VETTER_ROLE calls setVetted for any wallet that passes a gate (captcha, email, quota). Adds no contract. Adds an operational key with VETTER_ROLE that a bot drives, and the quota lives nowhere on chain: a vetted wallet can seat any number of origins for any number of namespaces, because isVetted is a boolean.

B. QuotaVettingPolicy contract. isVetted(publisher) returns true while the publisher is under a governance-set quota: at most N namespaces, each with at most M seated origins, and (if ADR 011 carries one) a bytes-published bound. Above the quota, falls through to a VETTER_ROLE grant as today. Adds one small contract and one or two governed parameters. The quota is enforced where the seating happens, by the contract that already answers isVetted, so no bot key and nothing to patch around. Takedown, blacklist and bounty-slash (ADR 011) are unchanged: payment stays content-agnostic and compliance stays enforcement-after-the-fact, which is the stated design.

C. OpenVettingPolicy on the testnet. Zero new mechanism. The ADR scopes it to "local and test deployments only", and the testnet is the only deployment, so this is admissible today. It records no decision for mainnet, so the one-command publish would ship against a policy that changes under it later.

Recommendation

B, with C as the testnet bridge until B is deployed. The quota is the one mechanism that earns its place: without it, "automatic" means "every wallet", which is C, or "a bot with a role", which is A and is the thing ADR 011 says the vetting seam exists to avoid. The ADR text should state what isVetted checks, who sets the quota, and that above-quota publishers keep the manual path. Needs a new section in ADR 011 or a new ADR; list adr/ for the next number.

Downstream that must follow the decision

  • adr/architecture.md summary
  • finance/notebooks/_shared/params.py (decdn-finance) and its notebooks
  • docs/runbook.md or another operator doc
  • website docs or marketing copy (decdn/website)
  • contracts in contracts/ or the deployment manifest

Related

Activity

  1. added
    design:missing-decision
    design:adr
    area:contracts
    on Oct 24, 2026
  2. added theissue type on Oct 24, 2026
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

    area:contractsdesign:adrdesign:missing-decision

    Type

    Fields

    Priority

    None yet

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions